Skip to content

Commit

Permalink
Regenerate client from commit b61e2f52 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jul 12, 2023
1 parent cc8f40e commit 6d50662
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 314 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.5",
"regenerated": "2023-07-11 16:39:35.936049",
"spec_repo_commit": "824086bb"
"regenerated": "2023-07-12 18:22:56.905023",
"spec_repo_commit": "b61e2f52"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-07-11 16:39:35.952370",
"spec_repo_commit": "824086bb"
"regenerated": "2023-07-12 18:22:56.921616",
"spec_repo_commit": "b61e2f52"
}
}
}
31 changes: 6 additions & 25 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,10 @@ components:
type: string
tags:
$ref: '#/components/schemas/TagsEventAttribute'
test_level:
description: The event test level.
example: session
type: string
timestamp:
$ref: '#/components/schemas/TimestampEventAttribute'
type: object
Expand Down Expand Up @@ -2192,7 +2196,7 @@ components:
links:
$ref: '#/components/schemas/CIAppResponseLinks'
meta:
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
$ref: '#/components/schemas/CIAppResponseMetadata'
type: object
CIAppPipelinesAggregateRequest:
description: The object sent with the request to retrieve aggregation buckets
Expand Down Expand Up @@ -2335,29 +2339,6 @@ components:
type: string
type: object
CIAppResponseMetadata:
description: The metadata associated with a request.
properties:
elapsed:
description: The time elapsed in milliseconds.
example: 132
format: int64
type: integer
request_id:
description: The identifier of the request.
example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR
type: string
status:
$ref: '#/components/schemas/CIAppResponseStatus'
warnings:
description: 'A list of warnings (non-fatal errors) encountered. Partial
results may return if

warnings are present in the response.'
items:
$ref: '#/components/schemas/CIAppWarning'
type: array
type: object
CIAppResponseMetadataWithPagination:
description: The metadata associated with a request.
properties:
elapsed:
Expand Down Expand Up @@ -2465,7 +2446,7 @@ components:
links:
$ref: '#/components/schemas/CIAppResponseLinks'
meta:
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
$ref: '#/components/schemas/CIAppResponseMetadata'
type: object
CIAppTestsAggregateRequest:
description: The object sent with the request to retrieve aggregation buckets
Expand Down
37 changes: 36 additions & 1 deletion api/datadogV2/model_ci_app_event_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type CIAppEventAttributes struct {
Service *string `json:"service,omitempty"`
// Array of tags associated with your event.
Tags []string `json:"tags,omitempty"`
// The event test level.
TestLevel *string `json:"test_level,omitempty"`
// Timestamp of your event.
Timestamp *time.Time `json:"timestamp,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
Expand Down Expand Up @@ -130,6 +132,34 @@ func (o *CIAppEventAttributes) SetTags(v []string) {
o.Tags = v
}

// GetTestLevel returns the TestLevel field value if set, zero value otherwise.
func (o *CIAppEventAttributes) GetTestLevel() string {
if o == nil || o.TestLevel == nil {
var ret string
return ret
}
return *o.TestLevel
}

// GetTestLevelOk returns a tuple with the TestLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CIAppEventAttributes) GetTestLevelOk() (*string, bool) {
if o == nil || o.TestLevel == nil {
return nil, false
}
return o.TestLevel, true
}

// HasTestLevel returns a boolean if a field has been set.
func (o *CIAppEventAttributes) HasTestLevel() bool {
return o != nil && o.TestLevel != nil
}

// SetTestLevel gets a reference to the given string and assigns it to the TestLevel field.
func (o *CIAppEventAttributes) SetTestLevel(v string) {
o.TestLevel = &v
}

// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *CIAppEventAttributes) GetTimestamp() time.Time {
if o == nil || o.Timestamp == nil {
Expand Down Expand Up @@ -173,6 +203,9 @@ func (o CIAppEventAttributes) MarshalJSON() ([]byte, error) {
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if o.TestLevel != nil {
toSerialize["test_level"] = o.TestLevel
}
if o.Timestamp != nil {
if o.Timestamp.Nanosecond() == 0 {
toSerialize["timestamp"] = o.Timestamp.Format("2006-01-02T15:04:05Z07:00")
Expand All @@ -194,6 +227,7 @@ func (o *CIAppEventAttributes) UnmarshalJSON(bytes []byte) (err error) {
Attributes map[string]interface{} `json:"attributes,omitempty"`
Service *string `json:"service,omitempty"`
Tags []string `json:"tags,omitempty"`
TestLevel *string `json:"test_level,omitempty"`
Timestamp *time.Time `json:"timestamp,omitempty"`
}{}
if err = json.Unmarshal(bytes, &all); err != nil {
Expand All @@ -206,13 +240,14 @@ func (o *CIAppEventAttributes) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "service", "tags", "timestamp"})
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "service", "tags", "test_level", "timestamp"})
} else {
return err
}
o.Attributes = all.Attributes
o.Service = all.Service
o.Tags = all.Tags
o.TestLevel = all.TestLevel
o.Timestamp = all.Timestamp
if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down
18 changes: 9 additions & 9 deletions api/datadogV2/model_ci_app_pipeline_events_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type CIAppPipelineEventsResponse struct {
// Links attributes.
Links *CIAppResponseLinks `json:"links,omitempty"`
// The metadata associated with a request.
Meta *CIAppResponseMetadataWithPagination `json:"meta,omitempty"`
Meta *CIAppResponseMetadata `json:"meta,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{}
Expand Down Expand Up @@ -97,17 +97,17 @@ func (o *CIAppPipelineEventsResponse) SetLinks(v CIAppResponseLinks) {
}

// GetMeta returns the Meta field value if set, zero value otherwise.
func (o *CIAppPipelineEventsResponse) GetMeta() CIAppResponseMetadataWithPagination {
func (o *CIAppPipelineEventsResponse) GetMeta() CIAppResponseMetadata {
if o == nil || o.Meta == nil {
var ret CIAppResponseMetadataWithPagination
var ret CIAppResponseMetadata
return ret
}
return *o.Meta
}

// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CIAppPipelineEventsResponse) GetMetaOk() (*CIAppResponseMetadataWithPagination, bool) {
func (o *CIAppPipelineEventsResponse) GetMetaOk() (*CIAppResponseMetadata, bool) {
if o == nil || o.Meta == nil {
return nil, false
}
Expand All @@ -119,8 +119,8 @@ func (o *CIAppPipelineEventsResponse) HasMeta() bool {
return o != nil && o.Meta != nil
}

// SetMeta gets a reference to the given CIAppResponseMetadataWithPagination and assigns it to the Meta field.
func (o *CIAppPipelineEventsResponse) SetMeta(v CIAppResponseMetadataWithPagination) {
// SetMeta gets a reference to the given CIAppResponseMetadata and assigns it to the Meta field.
func (o *CIAppPipelineEventsResponse) SetMeta(v CIAppResponseMetadata) {
o.Meta = &v
}

Expand Down Expand Up @@ -150,9 +150,9 @@ func (o CIAppPipelineEventsResponse) MarshalJSON() ([]byte, error) {
func (o *CIAppPipelineEventsResponse) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Data []CIAppPipelineEvent `json:"data,omitempty"`
Links *CIAppResponseLinks `json:"links,omitempty"`
Meta *CIAppResponseMetadataWithPagination `json:"meta,omitempty"`
Data []CIAppPipelineEvent `json:"data,omitempty"`
Links *CIAppResponseLinks `json:"links,omitempty"`
Meta *CIAppResponseMetadata `json:"meta,omitempty"`
}{}
if err = json.Unmarshal(bytes, &all); err != nil {
err = json.Unmarshal(bytes, &raw)
Expand Down
44 changes: 43 additions & 1 deletion api/datadogV2/model_ci_app_response_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
type CIAppResponseMetadata struct {
// The time elapsed in milliseconds.
Elapsed *int64 `json:"elapsed,omitempty"`
// Paging attributes.
Page *CIAppResponsePage `json:"page,omitempty"`
// The identifier of the request.
RequestId *string `json:"request_id,omitempty"`
// The status of the response.
Expand Down Expand Up @@ -71,6 +73,34 @@ func (o *CIAppResponseMetadata) SetElapsed(v int64) {
o.Elapsed = &v
}

// GetPage returns the Page field value if set, zero value otherwise.
func (o *CIAppResponseMetadata) GetPage() CIAppResponsePage {
if o == nil || o.Page == nil {
var ret CIAppResponsePage
return ret
}
return *o.Page
}

// GetPageOk returns a tuple with the Page field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CIAppResponseMetadata) GetPageOk() (*CIAppResponsePage, bool) {
if o == nil || o.Page == nil {
return nil, false
}
return o.Page, true
}

// HasPage returns a boolean if a field has been set.
func (o *CIAppResponseMetadata) HasPage() bool {
return o != nil && o.Page != nil
}

// SetPage gets a reference to the given CIAppResponsePage and assigns it to the Page field.
func (o *CIAppResponseMetadata) SetPage(v CIAppResponsePage) {
o.Page = &v
}

// GetRequestId returns the RequestId field value if set, zero value otherwise.
func (o *CIAppResponseMetadata) GetRequestId() string {
if o == nil || o.RequestId == nil {
Expand Down Expand Up @@ -164,6 +194,9 @@ func (o CIAppResponseMetadata) MarshalJSON() ([]byte, error) {
if o.Elapsed != nil {
toSerialize["elapsed"] = o.Elapsed
}
if o.Page != nil {
toSerialize["page"] = o.Page
}
if o.RequestId != nil {
toSerialize["request_id"] = o.RequestId
}
Expand All @@ -185,6 +218,7 @@ func (o *CIAppResponseMetadata) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Elapsed *int64 `json:"elapsed,omitempty"`
Page *CIAppResponsePage `json:"page,omitempty"`
RequestId *string `json:"request_id,omitempty"`
Status *CIAppResponseStatus `json:"status,omitempty"`
Warnings []CIAppWarning `json:"warnings,omitempty"`
Expand All @@ -199,7 +233,7 @@ func (o *CIAppResponseMetadata) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"elapsed", "request_id", "status", "warnings"})
datadog.DeleteKeys(additionalProperties, &[]string{"elapsed", "page", "request_id", "status", "warnings"})
} else {
return err
}
Expand All @@ -212,6 +246,14 @@ func (o *CIAppResponseMetadata) UnmarshalJSON(bytes []byte) (err error) {
return nil
}
o.Elapsed = all.Elapsed
if all.Page != nil && all.Page.UnparsedObject != nil && o.UnparsedObject == nil {
err = json.Unmarshal(bytes, &raw)
if err != nil {
return err
}
o.UnparsedObject = raw
}
o.Page = all.Page
o.RequestId = all.RequestId
o.Status = all.Status
o.Warnings = all.Warnings
Expand Down
Loading

0 comments on commit 6d50662

Please sign in to comment.