Skip to content

Commit

Permalink
change schema used in FastlyServicesResponse (#2700)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Sep 24, 2024
1 parent 0313fb3 commit 2b42d31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 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.6",
"regenerated": "2024-09-23 19:10:10.010692",
"spec_repo_commit": "41592dc6"
"regenerated": "2024-09-24 13:39:51.932118",
"spec_repo_commit": "7752efd3"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-23 19:10:10.024754",
"spec_repo_commit": "41592dc6"
"regenerated": "2024-09-24 13:39:51.946239",
"spec_repo_commit": "7752efd3"
}
}
}
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9200,7 +9200,7 @@ components:
data:
description: The JSON:API data schema.
items:
$ref: '#/components/schemas/FastlyServiceResponse'
$ref: '#/components/schemas/FastlyServiceData'
type: array
type: object
Finding:
Expand Down
14 changes: 7 additions & 7 deletions api/datadogV2/model_fastly_services_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// FastlyServicesResponse The expected response schema when getting Fastly services.
type FastlyServicesResponse struct {
// The JSON:API data schema.
Data []FastlyServiceResponse `json:"data,omitempty"`
Data []FastlyServiceData `json:"data,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{} `json:"-"`
Expand All @@ -35,17 +35,17 @@ func NewFastlyServicesResponseWithDefaults() *FastlyServicesResponse {
}

// GetData returns the Data field value if set, zero value otherwise.
func (o *FastlyServicesResponse) GetData() []FastlyServiceResponse {
func (o *FastlyServicesResponse) GetData() []FastlyServiceData {
if o == nil || o.Data == nil {
var ret []FastlyServiceResponse
var ret []FastlyServiceData
return ret
}
return o.Data
}

// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FastlyServicesResponse) GetDataOk() (*[]FastlyServiceResponse, bool) {
func (o *FastlyServicesResponse) GetDataOk() (*[]FastlyServiceData, bool) {
if o == nil || o.Data == nil {
return nil, false
}
Expand All @@ -57,8 +57,8 @@ func (o *FastlyServicesResponse) HasData() bool {
return o != nil && o.Data != nil
}

// SetData gets a reference to the given []FastlyServiceResponse and assigns it to the Data field.
func (o *FastlyServicesResponse) SetData(v []FastlyServiceResponse) {
// SetData gets a reference to the given []FastlyServiceData and assigns it to the Data field.
func (o *FastlyServicesResponse) SetData(v []FastlyServiceData) {
o.Data = v
}

Expand All @@ -81,7 +81,7 @@ func (o FastlyServicesResponse) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *FastlyServicesResponse) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Data []FastlyServiceResponse `json:"data,omitempty"`
Data []FastlyServiceData `json:"data,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
Expand Down

0 comments on commit 2b42d31

Please sign in to comment.