Skip to content

Commit 2f4ed4e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cf154e2 of spec repo
1 parent 83b1d58 commit 2f4ed4e

4 files changed

Lines changed: 216 additions & 2 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24216,6 +24216,9 @@ components:
2421624216
properties:
2421724217
attributes:
2421824218
$ref: "#/components/schemas/CreateDegradationRequestDataAttributes"
24219+
meta:
24220+
$ref: "#/components/schemas/DegradationRequestDataMeta"
24221+
description: The supported metadata for creating a degradation.
2421924222
relationships:
2422024223
$ref: "#/components/schemas/CreateDegradationRequestDataRelationships"
2422124224
type:
@@ -32030,6 +32033,15 @@ components:
3203032033
oneOf:
3203132034
- $ref: "#/components/schemas/StatusPagesUser"
3203232035
- $ref: "#/components/schemas/StatusPageAsIncluded"
32036+
DegradationRequestDataMeta:
32037+
description: The supported metadata for a degradation request.
32038+
properties:
32039+
idempotency_key:
32040+
description: A unique key used to ensure idempotent requests.
32041+
example: 1e6a4b8e-4c2f-4a3d-8f1a-9c7d2e5b6f10
32042+
format: uuid
32043+
type: string
32044+
type: object
3203332045
DegradationTemplate:
3203432046
description: Response object for a single degradation template.
3203532047
properties:
@@ -79913,6 +79925,9 @@ components:
7991379925
example: "1234abcd-12ab-34cd-56ef-123456abcdef"
7991479926
format: uuid
7991579927
type: string
79928+
meta:
79929+
$ref: "#/components/schemas/DegradationRequestDataMeta"
79930+
description: The supported metadata for updating a degradation.
7991679931
relationships:
7991779932
$ref: "#/components/schemas/PatchDegradationRequestDataRelationships"
7991879933
type:

‎src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestData.java‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/** The data object for creating a degradation. */
2121
@JsonPropertyOrder({
2222
CreateDegradationRequestData.JSON_PROPERTY_ATTRIBUTES,
23+
CreateDegradationRequestData.JSON_PROPERTY_META,
2324
CreateDegradationRequestData.JSON_PROPERTY_RELATIONSHIPS,
2425
CreateDegradationRequestData.JSON_PROPERTY_TYPE
2526
})
@@ -30,6 +31,9 @@ public class CreateDegradationRequestData {
3031
public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
3132
private CreateDegradationRequestDataAttributes attributes;
3233

34+
public static final String JSON_PROPERTY_META = "meta";
35+
private DegradationRequestDataMeta meta;
36+
3337
public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
3438
private CreateDegradationRequestDataRelationships relationships;
3539

@@ -75,6 +79,31 @@ public void setAttributes(CreateDegradationRequestDataAttributes attributes) {
7579
}
7680
}
7781

82+
public CreateDegradationRequestData meta(DegradationRequestDataMeta meta) {
83+
this.meta = meta;
84+
this.unparsed |= meta.unparsed;
85+
return this;
86+
}
87+
88+
/**
89+
* The supported metadata for a degradation request.
90+
*
91+
* @return meta
92+
*/
93+
@jakarta.annotation.Nullable
94+
@JsonProperty(JSON_PROPERTY_META)
95+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
96+
public DegradationRequestDataMeta getMeta() {
97+
return meta;
98+
}
99+
100+
public void setMeta(DegradationRequestDataMeta meta) {
101+
this.meta = meta;
102+
if (meta != null) {
103+
this.unparsed |= meta.unparsed;
104+
}
105+
}
106+
78107
public CreateDegradationRequestData relationships(
79108
CreateDegradationRequestDataRelationships relationships) {
80109
this.relationships = relationships;
@@ -182,6 +211,7 @@ public boolean equals(Object o) {
182211
}
183212
CreateDegradationRequestData createDegradationRequestData = (CreateDegradationRequestData) o;
184213
return Objects.equals(this.attributes, createDegradationRequestData.attributes)
214+
&& Objects.equals(this.meta, createDegradationRequestData.meta)
185215
&& Objects.equals(this.relationships, createDegradationRequestData.relationships)
186216
&& Objects.equals(this.type, createDegradationRequestData.type)
187217
&& Objects.equals(
@@ -190,14 +220,15 @@ public boolean equals(Object o) {
190220

191221
@Override
192222
public int hashCode() {
193-
return Objects.hash(attributes, relationships, type, additionalProperties);
223+
return Objects.hash(attributes, meta, relationships, type, additionalProperties);
194224
}
195225

196226
@Override
197227
public String toString() {
198228
StringBuilder sb = new StringBuilder();
199229
sb.append("class CreateDegradationRequestData {\n");
200230
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
231+
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
201232
sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
202233
sb.append(" type: ").append(toIndentedString(type)).append("\n");
203234
sb.append(" additionalProperties: ")
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
import com.fasterxml.jackson.annotation.JsonInclude;
13+
import com.fasterxml.jackson.annotation.JsonProperty;
14+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.HashMap;
16+
import java.util.Map;
17+
import java.util.Objects;
18+
import java.util.UUID;
19+
20+
/** The supported metadata for a degradation request. */
21+
@JsonPropertyOrder({DegradationRequestDataMeta.JSON_PROPERTY_IDEMPOTENCY_KEY})
22+
@jakarta.annotation.Generated(
23+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
24+
public class DegradationRequestDataMeta {
25+
@JsonIgnore public boolean unparsed = false;
26+
public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotency_key";
27+
private UUID idempotencyKey;
28+
29+
public DegradationRequestDataMeta idempotencyKey(UUID idempotencyKey) {
30+
this.idempotencyKey = idempotencyKey;
31+
return this;
32+
}
33+
34+
/**
35+
* A unique key used to ensure idempotent requests.
36+
*
37+
* @return idempotencyKey
38+
*/
39+
@jakarta.annotation.Nullable
40+
@JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY)
41+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
42+
public UUID getIdempotencyKey() {
43+
return idempotencyKey;
44+
}
45+
46+
public void setIdempotencyKey(UUID idempotencyKey) {
47+
this.idempotencyKey = idempotencyKey;
48+
}
49+
50+
/**
51+
* A container for additional, undeclared properties. This is a holder for any undeclared
52+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
53+
*/
54+
private Map<String, Object> additionalProperties;
55+
56+
/**
57+
* Set the additional (undeclared) property with the specified name and value. If the property
58+
* does not already exist, create it otherwise replace it.
59+
*
60+
* @param key The arbitrary key to set
61+
* @param value The associated value
62+
* @return DegradationRequestDataMeta
63+
*/
64+
@JsonAnySetter
65+
public DegradationRequestDataMeta putAdditionalProperty(String key, Object value) {
66+
if (this.additionalProperties == null) {
67+
this.additionalProperties = new HashMap<String, Object>();
68+
}
69+
this.additionalProperties.put(key, value);
70+
return this;
71+
}
72+
73+
/**
74+
* Return the additional (undeclared) property.
75+
*
76+
* @return The additional properties
77+
*/
78+
@JsonAnyGetter
79+
public Map<String, Object> getAdditionalProperties() {
80+
return additionalProperties;
81+
}
82+
83+
/**
84+
* Return the additional (undeclared) property with the specified name.
85+
*
86+
* @param key The arbitrary key to get
87+
* @return The specific additional property for the given key
88+
*/
89+
public Object getAdditionalProperty(String key) {
90+
if (this.additionalProperties == null) {
91+
return null;
92+
}
93+
return this.additionalProperties.get(key);
94+
}
95+
96+
/** Return true if this DegradationRequestDataMeta object is equal to o. */
97+
@Override
98+
public boolean equals(Object o) {
99+
if (this == o) {
100+
return true;
101+
}
102+
if (o == null || getClass() != o.getClass()) {
103+
return false;
104+
}
105+
DegradationRequestDataMeta degradationRequestDataMeta = (DegradationRequestDataMeta) o;
106+
return Objects.equals(this.idempotencyKey, degradationRequestDataMeta.idempotencyKey)
107+
&& Objects.equals(
108+
this.additionalProperties, degradationRequestDataMeta.additionalProperties);
109+
}
110+
111+
@Override
112+
public int hashCode() {
113+
return Objects.hash(idempotencyKey, additionalProperties);
114+
}
115+
116+
@Override
117+
public String toString() {
118+
StringBuilder sb = new StringBuilder();
119+
sb.append("class DegradationRequestDataMeta {\n");
120+
sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n");
121+
sb.append(" additionalProperties: ")
122+
.append(toIndentedString(additionalProperties))
123+
.append("\n");
124+
sb.append('}');
125+
return sb.toString();
126+
}
127+
128+
/**
129+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
130+
*/
131+
private String toIndentedString(Object o) {
132+
if (o == null) {
133+
return "null";
134+
}
135+
return o.toString().replace("\n", "\n ");
136+
}
137+
}

‎src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestData.java‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@JsonPropertyOrder({
2323
PatchDegradationRequestData.JSON_PROPERTY_ATTRIBUTES,
2424
PatchDegradationRequestData.JSON_PROPERTY_ID,
25+
PatchDegradationRequestData.JSON_PROPERTY_META,
2526
PatchDegradationRequestData.JSON_PROPERTY_RELATIONSHIPS,
2627
PatchDegradationRequestData.JSON_PROPERTY_TYPE
2728
})
@@ -35,6 +36,9 @@ public class PatchDegradationRequestData {
3536
public static final String JSON_PROPERTY_ID = "id";
3637
private UUID id;
3738

39+
public static final String JSON_PROPERTY_META = "meta";
40+
private DegradationRequestDataMeta meta;
41+
3842
public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
3943
private PatchDegradationRequestDataRelationships relationships;
4044

@@ -101,6 +105,31 @@ public void setId(UUID id) {
101105
this.id = id;
102106
}
103107

108+
public PatchDegradationRequestData meta(DegradationRequestDataMeta meta) {
109+
this.meta = meta;
110+
this.unparsed |= meta.unparsed;
111+
return this;
112+
}
113+
114+
/**
115+
* The supported metadata for a degradation request.
116+
*
117+
* @return meta
118+
*/
119+
@jakarta.annotation.Nullable
120+
@JsonProperty(JSON_PROPERTY_META)
121+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122+
public DegradationRequestDataMeta getMeta() {
123+
return meta;
124+
}
125+
126+
public void setMeta(DegradationRequestDataMeta meta) {
127+
this.meta = meta;
128+
if (meta != null) {
129+
this.unparsed |= meta.unparsed;
130+
}
131+
}
132+
104133
public PatchDegradationRequestData relationships(
105134
PatchDegradationRequestDataRelationships relationships) {
106135
this.relationships = relationships;
@@ -209,6 +238,7 @@ public boolean equals(Object o) {
209238
PatchDegradationRequestData patchDegradationRequestData = (PatchDegradationRequestData) o;
210239
return Objects.equals(this.attributes, patchDegradationRequestData.attributes)
211240
&& Objects.equals(this.id, patchDegradationRequestData.id)
241+
&& Objects.equals(this.meta, patchDegradationRequestData.meta)
212242
&& Objects.equals(this.relationships, patchDegradationRequestData.relationships)
213243
&& Objects.equals(this.type, patchDegradationRequestData.type)
214244
&& Objects.equals(
@@ -217,7 +247,7 @@ public boolean equals(Object o) {
217247

218248
@Override
219249
public int hashCode() {
220-
return Objects.hash(attributes, id, relationships, type, additionalProperties);
250+
return Objects.hash(attributes, id, meta, relationships, type, additionalProperties);
221251
}
222252

223253
@Override
@@ -226,6 +256,7 @@ public String toString() {
226256
sb.append("class PatchDegradationRequestData {\n");
227257
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
228258
sb.append(" id: ").append(toIndentedString(id)).append("\n");
259+
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
229260
sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
230261
sb.append(" type: ").append(toIndentedString(type)).append("\n");
231262
sb.append(" additionalProperties: ")

0 commit comments

Comments
 (0)