Skip to content

Commit e7ecad4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 3c17510 of spec repo (#3459)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 537f9b5 commit e7ecad4

File tree

3 files changed

+4
-32
lines changed

3 files changed

+4
-32
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50997,6 +50997,7 @@ components:
5099750997
- $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage'
5099850998
- $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile'
5099950999
TableResultV2DataAttributesFileMetadataCloudStorage:
51000+
additionalProperties: false
5100051001
description: File metadata for reference tables created by cloud storage.
5100151002
properties:
5100251003
access_details:
@@ -51043,6 +51044,7 @@ components:
5104351044
- OPERATION_ERROR
5104451045
- SYSTEM_ERROR
5104551046
TableResultV2DataAttributesFileMetadataLocalFile:
51047+
additionalProperties: false
5104651048
description: File metadata for reference tables created by upload. Note that
5104751049
upload_id is only returned in the immediate create/replace response and is
5104851050
not available in subsequent GET requests.

api/datadogV2/model_table_result_v2_data_attributes_file_metadata_cloud_storage.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ type TableResultV2DataAttributesFileMetadataCloudStorage struct {
2323
// Whether this table is synced automatically.
2424
SyncEnabled *bool `json:"sync_enabled,omitempty"`
2525
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
26-
UnparsedObject map[string]interface{} `json:"-"`
27-
AdditionalProperties map[string]interface{} `json:"-"`
26+
UnparsedObject map[string]interface{} `json:"-"`
2827
}
2928

3029
// NewTableResultV2DataAttributesFileMetadataCloudStorage instantiates a new TableResultV2DataAttributesFileMetadataCloudStorage object.
@@ -199,10 +198,6 @@ func (o TableResultV2DataAttributesFileMetadataCloudStorage) MarshalJSON() ([]by
199198
if o.SyncEnabled != nil {
200199
toSerialize["sync_enabled"] = o.SyncEnabled
201200
}
202-
203-
for key, value := range o.AdditionalProperties {
204-
toSerialize[key] = value
205-
}
206201
return datadog.Marshal(toSerialize)
207202
}
208203

@@ -221,12 +216,6 @@ func (o *TableResultV2DataAttributesFileMetadataCloudStorage) UnmarshalJSON(byte
221216
if all.AccessDetails == nil {
222217
return fmt.Errorf("required field access_details missing")
223218
}
224-
additionalProperties := make(map[string]interface{})
225-
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
226-
datadog.DeleteKeys(additionalProperties, &[]string{"access_details", "error_message", "error_row_count", "error_type", "sync_enabled"})
227-
} else {
228-
return err
229-
}
230219

231220
hasInvalidField := false
232221
if all.AccessDetails.UnparsedObject != nil && o.UnparsedObject == nil {
@@ -242,10 +231,6 @@ func (o *TableResultV2DataAttributesFileMetadataCloudStorage) UnmarshalJSON(byte
242231
}
243232
o.SyncEnabled = all.SyncEnabled
244233

245-
if len(additionalProperties) > 0 {
246-
o.AdditionalProperties = additionalProperties
247-
}
248-
249234
if hasInvalidField {
250235
return datadog.Unmarshal(bytes, &o.UnparsedObject)
251236
}

api/datadogV2/model_table_result_v2_data_attributes_file_metadata_local_file.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ type TableResultV2DataAttributesFileMetadataLocalFile struct {
1515
// The number of rows that failed to create/update.
1616
ErrorRowCount *int64 `json:"error_row_count,omitempty"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
18-
UnparsedObject map[string]interface{} `json:"-"`
19-
AdditionalProperties map[string]interface{} `json:"-"`
18+
UnparsedObject map[string]interface{} `json:"-"`
2019
}
2120

2221
// NewTableResultV2DataAttributesFileMetadataLocalFile instantiates a new TableResultV2DataAttributesFileMetadataLocalFile object.
@@ -104,10 +103,6 @@ func (o TableResultV2DataAttributesFileMetadataLocalFile) MarshalJSON() ([]byte,
104103
if o.ErrorRowCount != nil {
105104
toSerialize["error_row_count"] = o.ErrorRowCount
106105
}
107-
108-
for key, value := range o.AdditionalProperties {
109-
toSerialize[key] = value
110-
}
111106
return datadog.Marshal(toSerialize)
112107
}
113108

@@ -120,18 +115,8 @@ func (o *TableResultV2DataAttributesFileMetadataLocalFile) UnmarshalJSON(bytes [
120115
if err = datadog.Unmarshal(bytes, &all); err != nil {
121116
return datadog.Unmarshal(bytes, &o.UnparsedObject)
122117
}
123-
additionalProperties := make(map[string]interface{})
124-
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
125-
datadog.DeleteKeys(additionalProperties, &[]string{"error_message", "error_row_count"})
126-
} else {
127-
return err
128-
}
129118
o.ErrorMessage = all.ErrorMessage
130119
o.ErrorRowCount = all.ErrorRowCount
131120

132-
if len(additionalProperties) > 0 {
133-
o.AdditionalProperties = additionalProperties
134-
}
135-
136121
return nil
137122
}

0 commit comments

Comments
 (0)