Skip to content

Commit 49ff16d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Reference Tables API spec: disallow additional properties from FileMetadata (#3243)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 749a81d commit 49ff16d

File tree

3 files changed

+6
-119
lines changed

3 files changed

+6
-119
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.

src/main/java/com/datadog/api/client/v2/model/TableResultV2DataAttributesFileMetadataCloudStorage.java

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66

77
package com.datadog.api.client.v2.model;
88

9-
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10-
import com.fasterxml.jackson.annotation.JsonAnySetter;
119
import com.fasterxml.jackson.annotation.JsonCreator;
1210
import com.fasterxml.jackson.annotation.JsonIgnore;
1311
import com.fasterxml.jackson.annotation.JsonInclude;
1412
import com.fasterxml.jackson.annotation.JsonProperty;
1513
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
16-
import java.util.HashMap;
17-
import java.util.Map;
1814
import java.util.Objects;
1915

2016
/** File metadata for reference tables created by cloud storage. */
@@ -167,53 +163,6 @@ public void setSyncEnabled(Boolean syncEnabled) {
167163
this.syncEnabled = syncEnabled;
168164
}
169165

170-
/**
171-
* A container for additional, undeclared properties. This is a holder for any undeclared
172-
* properties as specified with the 'additionalProperties' keyword in the OAS document.
173-
*/
174-
private Map<String, Object> additionalProperties;
175-
176-
/**
177-
* Set the additional (undeclared) property with the specified name and value. If the property
178-
* does not already exist, create it otherwise replace it.
179-
*
180-
* @param key The arbitrary key to set
181-
* @param value The associated value
182-
* @return TableResultV2DataAttributesFileMetadataCloudStorage
183-
*/
184-
@JsonAnySetter
185-
public TableResultV2DataAttributesFileMetadataCloudStorage putAdditionalProperty(
186-
String key, Object value) {
187-
if (this.additionalProperties == null) {
188-
this.additionalProperties = new HashMap<String, Object>();
189-
}
190-
this.additionalProperties.put(key, value);
191-
return this;
192-
}
193-
194-
/**
195-
* Return the additional (undeclared) property.
196-
*
197-
* @return The additional properties
198-
*/
199-
@JsonAnyGetter
200-
public Map<String, Object> getAdditionalProperties() {
201-
return additionalProperties;
202-
}
203-
204-
/**
205-
* Return the additional (undeclared) property with the specified name.
206-
*
207-
* @param key The arbitrary key to get
208-
* @return The specific additional property for the given key
209-
*/
210-
public Object getAdditionalProperty(String key) {
211-
if (this.additionalProperties == null) {
212-
return null;
213-
}
214-
return this.additionalProperties.get(key);
215-
}
216-
217166
/**
218167
* Return true if this TableResultV2DataAttributesFileMetadataCloudStorage object is equal to o.
219168
*/
@@ -237,16 +186,12 @@ public boolean equals(Object o) {
237186
&& Objects.equals(
238187
this.errorType, tableResultV2DataAttributesFileMetadataCloudStorage.errorType)
239188
&& Objects.equals(
240-
this.syncEnabled, tableResultV2DataAttributesFileMetadataCloudStorage.syncEnabled)
241-
&& Objects.equals(
242-
this.additionalProperties,
243-
tableResultV2DataAttributesFileMetadataCloudStorage.additionalProperties);
189+
this.syncEnabled, tableResultV2DataAttributesFileMetadataCloudStorage.syncEnabled);
244190
}
245191

246192
@Override
247193
public int hashCode() {
248-
return Objects.hash(
249-
accessDetails, errorMessage, errorRowCount, errorType, syncEnabled, additionalProperties);
194+
return Objects.hash(accessDetails, errorMessage, errorRowCount, errorType, syncEnabled);
250195
}
251196

252197
@Override
@@ -258,9 +203,6 @@ public String toString() {
258203
sb.append(" errorRowCount: ").append(toIndentedString(errorRowCount)).append("\n");
259204
sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n");
260205
sb.append(" syncEnabled: ").append(toIndentedString(syncEnabled)).append("\n");
261-
sb.append(" additionalProperties: ")
262-
.append(toIndentedString(additionalProperties))
263-
.append("\n");
264206
sb.append('}');
265207
return sb.toString();
266208
}

src/main/java/com/datadog/api/client/v2/model/TableResultV2DataAttributesFileMetadataLocalFile.java

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@
66

77
package com.datadog.api.client.v2.model;
88

9-
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10-
import com.fasterxml.jackson.annotation.JsonAnySetter;
119
import com.fasterxml.jackson.annotation.JsonIgnore;
1210
import com.fasterxml.jackson.annotation.JsonInclude;
1311
import com.fasterxml.jackson.annotation.JsonProperty;
1412
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15-
import java.util.HashMap;
16-
import java.util.Map;
1713
import java.util.Objects;
1814

1915
/**
@@ -76,53 +72,6 @@ public void setErrorRowCount(Long errorRowCount) {
7672
this.errorRowCount = errorRowCount;
7773
}
7874

79-
/**
80-
* A container for additional, undeclared properties. This is a holder for any undeclared
81-
* properties as specified with the 'additionalProperties' keyword in the OAS document.
82-
*/
83-
private Map<String, Object> additionalProperties;
84-
85-
/**
86-
* Set the additional (undeclared) property with the specified name and value. If the property
87-
* does not already exist, create it otherwise replace it.
88-
*
89-
* @param key The arbitrary key to set
90-
* @param value The associated value
91-
* @return TableResultV2DataAttributesFileMetadataLocalFile
92-
*/
93-
@JsonAnySetter
94-
public TableResultV2DataAttributesFileMetadataLocalFile putAdditionalProperty(
95-
String key, Object value) {
96-
if (this.additionalProperties == null) {
97-
this.additionalProperties = new HashMap<String, Object>();
98-
}
99-
this.additionalProperties.put(key, value);
100-
return this;
101-
}
102-
103-
/**
104-
* Return the additional (undeclared) property.
105-
*
106-
* @return The additional properties
107-
*/
108-
@JsonAnyGetter
109-
public Map<String, Object> getAdditionalProperties() {
110-
return additionalProperties;
111-
}
112-
113-
/**
114-
* Return the additional (undeclared) property with the specified name.
115-
*
116-
* @param key The arbitrary key to get
117-
* @return The specific additional property for the given key
118-
*/
119-
public Object getAdditionalProperty(String key) {
120-
if (this.additionalProperties == null) {
121-
return null;
122-
}
123-
return this.additionalProperties.get(key);
124-
}
125-
12675
/** Return true if this TableResultV2DataAttributesFileMetadataLocalFile object is equal to o. */
12776
@Override
12877
public boolean equals(Object o) {
@@ -138,15 +87,12 @@ public boolean equals(Object o) {
13887
return Objects.equals(
13988
this.errorMessage, tableResultV2DataAttributesFileMetadataLocalFile.errorMessage)
14089
&& Objects.equals(
141-
this.errorRowCount, tableResultV2DataAttributesFileMetadataLocalFile.errorRowCount)
142-
&& Objects.equals(
143-
this.additionalProperties,
144-
tableResultV2DataAttributesFileMetadataLocalFile.additionalProperties);
90+
this.errorRowCount, tableResultV2DataAttributesFileMetadataLocalFile.errorRowCount);
14591
}
14692

14793
@Override
14894
public int hashCode() {
149-
return Objects.hash(errorMessage, errorRowCount, additionalProperties);
95+
return Objects.hash(errorMessage, errorRowCount);
15096
}
15197

15298
@Override
@@ -155,9 +101,6 @@ public String toString() {
155101
sb.append("class TableResultV2DataAttributesFileMetadataLocalFile {\n");
156102
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
157103
sb.append(" errorRowCount: ").append(toIndentedString(errorRowCount)).append("\n");
158-
sb.append(" additionalProperties: ")
159-
.append(toIndentedString(additionalProperties))
160-
.append("\n");
161104
sb.append('}');
162105
return sb.toString();
163106
}

0 commit comments

Comments
 (0)