Skip to content

Commit 932ac44

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Make metadata optional for GCS destination (#2840)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9ff78b6 commit 932ac44

File tree

115 files changed

+163
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+163
-163
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-05-13 17:47:35.388838",
8-
"spec_repo_commit": "b673a489"
7+
"regenerated": "2025-05-14 09:52:26.039780",
8+
"spec_repo_commit": "996fd99d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-13 17:47:35.404525",
13-
"spec_repo_commit": "b673a489"
12+
"regenerated": "2025-05-14 09:52:26.055318",
13+
"spec_repo_commit": "996fd99d"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24406,7 +24406,8 @@ components:
2440624406
description: Optional prefix for object keys within the GCS bucket.
2440724407
type: string
2440824408
metadata:
24409-
description: Custom metadata key-value pairs added to each object.
24409+
description: Custom metadata to attach to each object uploaded to the GCS
24410+
bucket.
2441024411
items:
2441124412
$ref: '#/components/schemas/ObservabilityPipelineMetadataEntry'
2441224413
type: array
@@ -24422,7 +24423,6 @@ components:
2442224423
- auth
2442324424
- storage_class
2442424425
- acl
24425-
- metadata
2442624426
type: object
2442724427
ObservabilityPipelineGoogleCloudStorageDestinationAcl:
2442824428
description: Access control list setting for objects written to the bucket.
@@ -24701,8 +24701,7 @@ components:
2470124701
x-enum-varnames:
2470224702
- LOGSTASH
2470324703
ObservabilityPipelineMetadataEntry:
24704-
description: A custom metadata entry to attach to each object uploaded to the
24705-
GCS bucket.
24704+
description: A custom metadata entry.
2470624705
properties:
2470724706
name:
2470824707
description: The metadata key.

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class ObservabilityPipelineGoogleCloudStorageDestination {
5757
private String keyPrefix;
5858

5959
public static final String JSON_PROPERTY_METADATA = "metadata";
60-
private List<ObservabilityPipelineMetadataEntry> metadata = new ArrayList<>();
60+
private List<ObservabilityPipelineMetadataEntry> metadata = null;
6161

6262
public static final String JSON_PROPERTY_STORAGE_CLASS = "storage_class";
6363
private ObservabilityPipelineGoogleCloudStorageDestinationStorageClass storageClass;
@@ -76,8 +76,6 @@ public ObservabilityPipelineGoogleCloudStorageDestination(
7676
@JsonProperty(required = true, value = JSON_PROPERTY_BUCKET) String bucket,
7777
@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
7878
@JsonProperty(required = true, value = JSON_PROPERTY_INPUTS) List<String> inputs,
79-
@JsonProperty(required = true, value = JSON_PROPERTY_METADATA)
80-
List<ObservabilityPipelineMetadataEntry> metadata,
8179
@JsonProperty(required = true, value = JSON_PROPERTY_STORAGE_CLASS)
8280
ObservabilityPipelineGoogleCloudStorageDestinationStorageClass storageClass,
8381
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
@@ -89,7 +87,6 @@ public ObservabilityPipelineGoogleCloudStorageDestination(
8987
this.bucket = bucket;
9088
this.id = id;
9189
this.inputs = inputs;
92-
this.metadata = metadata;
9390
this.storageClass = storageClass;
9491
this.unparsed |= !storageClass.isValid();
9592
this.type = type;
@@ -240,18 +237,22 @@ public ObservabilityPipelineGoogleCloudStorageDestination metadata(
240237

241238
public ObservabilityPipelineGoogleCloudStorageDestination addMetadataItem(
242239
ObservabilityPipelineMetadataEntry metadataItem) {
240+
if (this.metadata == null) {
241+
this.metadata = new ArrayList<>();
242+
}
243243
this.metadata.add(metadataItem);
244244
this.unparsed |= metadataItem.unparsed;
245245
return this;
246246
}
247247

248248
/**
249-
* Custom metadata key-value pairs added to each object.
249+
* Custom metadata to attach to each object uploaded to the GCS bucket.
250250
*
251251
* @return metadata
252252
*/
253+
@jakarta.annotation.Nullable
253254
@JsonProperty(JSON_PROPERTY_METADATA)
254-
@JsonInclude(value = JsonInclude.Include.ALWAYS)
255+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
255256
public List<ObservabilityPipelineMetadataEntry> getMetadata() {
256257
return metadata;
257258
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.util.Map;
1818
import java.util.Objects;
1919

20-
/** A custom metadata entry to attach to each object uploaded to the GCS bucket. */
20+
/** A custom metadata entry. */
2121
@JsonPropertyOrder({
2222
ObservabilityPipelineMetadataEntry.JSON_PROPERTY_NAME,
2323
ObservabilityPipelineMetadataEntry.JSON_PROPERTY_VALUE

src/test/resources/cassettes/features/v1/Create_a_user_returns_User_created_response_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "af617072-2860-ba27-e045-b00c8baf0188"
56+
"id": "af617072-2860-ba27-e045-b00c8baf0187"
5757
}
5858
]

src/test/resources/cassettes/features/v1/Create_a_user_returns_null_access_role.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "af617072-2860-ba27-e045-b00c8baf0187"
56+
"id": "af617072-2860-ba27-e045-b00c8baf0188"
5757
}
5858
]

src/test/resources/cassettes/features/v1/Get_all_hosts_with_metadata_deserializes_successfully.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"timeToLive": {
2929
"unlimited": true
3030
},
31-
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31e"
31+
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31d"
3232
}
3333
]

src/test/resources/cassettes/features/v1/Get_all_hosts_with_metadata_for_your_organization_returns_OK_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"timeToLive": {
2929
"unlimited": true
3030
},
31-
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31d"
31+
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31e"
3232
}
3333
]

src/test/resources/cassettes/features/v1/Validate_API_key_returns_Forbidden_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"timeToLive": {
2424
"unlimited": true
2525
},
26-
"id": "3f83caea-c405-97df-c554-ee2d9f9e4f02"
26+
"id": "3f83caea-c405-97df-c554-ee2d9f9e4f01"
2727
}
2828
]

src/test/resources/cassettes/features/v1/Validate_API_key_returns_OK_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"timeToLive": {
2424
"unlimited": true
2525
},
26-
"id": "3f83caea-c405-97df-c554-ee2d9f9e4f01"
26+
"id": "3f83caea-c405-97df-c554-ee2d9f9e4f02"
2727
}
2828
]

0 commit comments

Comments
 (0)