Skip to content

Commit 9e95587

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cccacff of spec repo
1 parent 9abe619 commit 9e95587

File tree

27 files changed

+409
-135
lines changed

27 files changed

+409
-135
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17523,6 +17523,13 @@ components:
1752317523
format: date-time
1752417524
readOnly: true
1752517525
type: string
17526+
date_last_used:
17527+
description: Date the API Key was last used
17528+
example: '2020-11-27T10:00:00.000Z'
17529+
format: date-time
17530+
nullable: true
17531+
readOnly: true
17532+
type: string
1752617533
key:
1752717534
description: The API key.
1752817535
readOnly: true
@@ -17581,6 +17588,13 @@ components:
1758117588
minLength: 4
1758217589
readOnly: true
1758317590
type: string
17591+
last_used_at:
17592+
description: Last usage timestamp of the application key.
17593+
example: '2020-12-20T10:00:00.000Z'
17594+
format: date-time
17595+
nullable: true
17596+
readOnly: true
17597+
type: string
1758417598
name:
1758517599
description: Name of the application key.
1758617600
example: Application Key for managing dashboards
@@ -33114,6 +33128,13 @@ components:
3311433128
example: '2020-11-23T10:00:00.000Z'
3311533129
readOnly: true
3311633130
type: string
33131+
date_last_used:
33132+
description: Date the API Key was last used.
33133+
example: '2020-11-27T10:00:00.000Z'
33134+
format: date-time
33135+
nullable: true
33136+
readOnly: true
33137+
type: string
3311733138
last4:
3311833139
description: The last four characters of the API key.
3311933140
example: abcd
@@ -33162,6 +33183,12 @@ components:
3316233183
minLength: 4
3316333184
readOnly: true
3316433185
type: string
33186+
last_used_at:
33187+
description: Last usage timestamp of the application key.
33188+
example: '2020-12-20T10:00:00.000Z'
33189+
nullable: true
33190+
readOnly: true
33191+
type: string
3316533192
name:
3316633193
description: Name of the application key.
3316733194
example: Application Key for managing dashboards

examples/v2/key-management/GetCurrentUserApplicationKey.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ public static void main(String[] args) {
1010
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1111
KeyManagementApi apiInstance = new KeyManagementApi(defaultClient);
1212

13+
// there is a valid "application_key" in the system
14+
String APPLICATION_KEY_DATA_ID = System.getenv("APPLICATION_KEY_DATA_ID");
15+
1316
try {
14-
ApplicationKeyResponse result = apiInstance.getCurrentUserApplicationKey("app_key_id");
17+
ApplicationKeyResponse result =
18+
apiInstance.getCurrentUserApplicationKey(APPLICATION_KEY_DATA_ID);
1519
System.out.println(result);
1620
} catch (ApiException e) {
1721
System.err.println("Exception when calling KeyManagementApi#getCurrentUserApplicationKey");

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
import java.util.HashMap;
1717
import java.util.Map;
1818
import java.util.Objects;
19+
import org.openapitools.jackson.nullable.JsonNullable;
1920

2021
/** Attributes of a full API key. */
2122
@JsonPropertyOrder({
2223
FullAPIKeyAttributes.JSON_PROPERTY_CATEGORY,
2324
FullAPIKeyAttributes.JSON_PROPERTY_CREATED_AT,
25+
FullAPIKeyAttributes.JSON_PROPERTY_DATE_LAST_USED,
2426
FullAPIKeyAttributes.JSON_PROPERTY_KEY,
2527
FullAPIKeyAttributes.JSON_PROPERTY_LAST4,
2628
FullAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT,
@@ -37,6 +39,9 @@ public class FullAPIKeyAttributes {
3739
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
3840
private OffsetDateTime createdAt;
3941

42+
public static final String JSON_PROPERTY_DATE_LAST_USED = "date_last_used";
43+
private JsonNullable<OffsetDateTime> dateLastUsed = JsonNullable.<OffsetDateTime>undefined();
44+
4045
public static final String JSON_PROPERTY_KEY = "key";
4146
private String key;
4247

@@ -86,6 +91,32 @@ public OffsetDateTime getCreatedAt() {
8691
return createdAt;
8792
}
8893

94+
/**
95+
* Date the API Key was last used
96+
*
97+
* @return dateLastUsed
98+
*/
99+
@jakarta.annotation.Nullable
100+
@JsonIgnore
101+
public OffsetDateTime getDateLastUsed() {
102+
103+
if (dateLastUsed == null) {
104+
dateLastUsed = JsonNullable.<OffsetDateTime>undefined();
105+
}
106+
return dateLastUsed.orElse(null);
107+
}
108+
109+
@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
110+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
111+
public JsonNullable<OffsetDateTime> getDateLastUsed_JsonNullable() {
112+
return dateLastUsed;
113+
}
114+
115+
@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
116+
private void setDateLastUsed_JsonNullable(JsonNullable<OffsetDateTime> dateLastUsed) {
117+
this.dateLastUsed = dateLastUsed;
118+
}
119+
89120
/**
90121
* The API key.
91122
*
@@ -222,6 +253,7 @@ public boolean equals(Object o) {
222253
FullAPIKeyAttributes fullApiKeyAttributes = (FullAPIKeyAttributes) o;
223254
return Objects.equals(this.category, fullApiKeyAttributes.category)
224255
&& Objects.equals(this.createdAt, fullApiKeyAttributes.createdAt)
256+
&& Objects.equals(this.dateLastUsed, fullApiKeyAttributes.dateLastUsed)
225257
&& Objects.equals(this.key, fullApiKeyAttributes.key)
226258
&& Objects.equals(this.last4, fullApiKeyAttributes.last4)
227259
&& Objects.equals(this.modifiedAt, fullApiKeyAttributes.modifiedAt)
@@ -236,6 +268,7 @@ public int hashCode() {
236268
return Objects.hash(
237269
category,
238270
createdAt,
271+
dateLastUsed,
239272
key,
240273
last4,
241274
modifiedAt,
@@ -250,6 +283,7 @@ public String toString() {
250283
sb.append("class FullAPIKeyAttributes {\n");
251284
sb.append(" category: ").append(toIndentedString(category)).append("\n");
252285
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
286+
sb.append(" dateLastUsed: ").append(toIndentedString(dateLastUsed)).append("\n");
253287
sb.append(" key: ").append(toIndentedString(key)).append("\n");
254288
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
255289
sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n");

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

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
FullApplicationKeyAttributes.JSON_PROPERTY_CREATED_AT,
2626
FullApplicationKeyAttributes.JSON_PROPERTY_KEY,
2727
FullApplicationKeyAttributes.JSON_PROPERTY_LAST4,
28+
FullApplicationKeyAttributes.JSON_PROPERTY_LAST_USED_AT,
2829
FullApplicationKeyAttributes.JSON_PROPERTY_NAME,
2930
FullApplicationKeyAttributes.JSON_PROPERTY_SCOPES
3031
})
@@ -41,6 +42,9 @@ public class FullApplicationKeyAttributes {
4142
public static final String JSON_PROPERTY_LAST4 = "last4";
4243
private String last4;
4344

45+
public static final String JSON_PROPERTY_LAST_USED_AT = "last_used_at";
46+
private JsonNullable<OffsetDateTime> lastUsedAt = JsonNullable.<OffsetDateTime>undefined();
47+
4448
public static final String JSON_PROPERTY_NAME = "name";
4549
private String name;
4650

@@ -83,6 +87,32 @@ public String getLast4() {
8387
return last4;
8488
}
8589

90+
/**
91+
* Last usage timestamp of the application key.
92+
*
93+
* @return lastUsedAt
94+
*/
95+
@jakarta.annotation.Nullable
96+
@JsonIgnore
97+
public OffsetDateTime getLastUsedAt() {
98+
99+
if (lastUsedAt == null) {
100+
lastUsedAt = JsonNullable.<OffsetDateTime>undefined();
101+
}
102+
return lastUsedAt.orElse(null);
103+
}
104+
105+
@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
106+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
107+
public JsonNullable<OffsetDateTime> getLastUsedAt_JsonNullable() {
108+
return lastUsedAt;
109+
}
110+
111+
@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
112+
private void setLastUsedAt_JsonNullable(JsonNullable<OffsetDateTime> lastUsedAt) {
113+
this.lastUsedAt = lastUsedAt;
114+
}
115+
86116
public FullApplicationKeyAttributes name(String name) {
87117
this.name = name;
88118
return this;
@@ -206,6 +236,7 @@ public boolean equals(Object o) {
206236
return Objects.equals(this.createdAt, fullApplicationKeyAttributes.createdAt)
207237
&& Objects.equals(this.key, fullApplicationKeyAttributes.key)
208238
&& Objects.equals(this.last4, fullApplicationKeyAttributes.last4)
239+
&& Objects.equals(this.lastUsedAt, fullApplicationKeyAttributes.lastUsedAt)
209240
&& Objects.equals(this.name, fullApplicationKeyAttributes.name)
210241
&& Objects.equals(this.scopes, fullApplicationKeyAttributes.scopes)
211242
&& Objects.equals(
@@ -214,7 +245,7 @@ public boolean equals(Object o) {
214245

215246
@Override
216247
public int hashCode() {
217-
return Objects.hash(createdAt, key, last4, name, scopes, additionalProperties);
248+
return Objects.hash(createdAt, key, last4, lastUsedAt, name, scopes, additionalProperties);
218249
}
219250

220251
@Override
@@ -224,6 +255,7 @@ public String toString() {
224255
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
225256
sb.append(" key: ").append(toIndentedString(key)).append("\n");
226257
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
258+
sb.append(" lastUsedAt: ").append(toIndentedString(lastUsedAt)).append("\n");
227259
sb.append(" name: ").append(toIndentedString(name)).append("\n");
228260
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
229261
sb.append(" additionalProperties: ")

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
import com.fasterxml.jackson.annotation.JsonInclude;
1313
import com.fasterxml.jackson.annotation.JsonProperty;
1414
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.time.OffsetDateTime;
1516
import java.util.HashMap;
1617
import java.util.Map;
1718
import java.util.Objects;
19+
import org.openapitools.jackson.nullable.JsonNullable;
1820

1921
/** Attributes of a partial API key. */
2022
@JsonPropertyOrder({
2123
PartialAPIKeyAttributes.JSON_PROPERTY_CATEGORY,
2224
PartialAPIKeyAttributes.JSON_PROPERTY_CREATED_AT,
25+
PartialAPIKeyAttributes.JSON_PROPERTY_DATE_LAST_USED,
2326
PartialAPIKeyAttributes.JSON_PROPERTY_LAST4,
2427
PartialAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT,
2528
PartialAPIKeyAttributes.JSON_PROPERTY_NAME,
@@ -35,6 +38,9 @@ public class PartialAPIKeyAttributes {
3538
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
3639
private String createdAt;
3740

41+
public static final String JSON_PROPERTY_DATE_LAST_USED = "date_last_used";
42+
private JsonNullable<OffsetDateTime> dateLastUsed = JsonNullable.<OffsetDateTime>undefined();
43+
3844
public static final String JSON_PROPERTY_LAST4 = "last4";
3945
private String last4;
4046

@@ -81,6 +87,32 @@ public String getCreatedAt() {
8187
return createdAt;
8288
}
8389

90+
/**
91+
* Date the API Key was last used.
92+
*
93+
* @return dateLastUsed
94+
*/
95+
@jakarta.annotation.Nullable
96+
@JsonIgnore
97+
public OffsetDateTime getDateLastUsed() {
98+
99+
if (dateLastUsed == null) {
100+
dateLastUsed = JsonNullable.<OffsetDateTime>undefined();
101+
}
102+
return dateLastUsed.orElse(null);
103+
}
104+
105+
@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
106+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
107+
public JsonNullable<OffsetDateTime> getDateLastUsed_JsonNullable() {
108+
return dateLastUsed;
109+
}
110+
111+
@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
112+
private void setDateLastUsed_JsonNullable(JsonNullable<OffsetDateTime> dateLastUsed) {
113+
this.dateLastUsed = dateLastUsed;
114+
}
115+
84116
/**
85117
* The last four characters of the API key.
86118
*
@@ -205,6 +237,7 @@ public boolean equals(Object o) {
205237
PartialAPIKeyAttributes partialApiKeyAttributes = (PartialAPIKeyAttributes) o;
206238
return Objects.equals(this.category, partialApiKeyAttributes.category)
207239
&& Objects.equals(this.createdAt, partialApiKeyAttributes.createdAt)
240+
&& Objects.equals(this.dateLastUsed, partialApiKeyAttributes.dateLastUsed)
208241
&& Objects.equals(this.last4, partialApiKeyAttributes.last4)
209242
&& Objects.equals(this.modifiedAt, partialApiKeyAttributes.modifiedAt)
210243
&& Objects.equals(this.name, partialApiKeyAttributes.name)
@@ -218,6 +251,7 @@ public int hashCode() {
218251
return Objects.hash(
219252
category,
220253
createdAt,
254+
dateLastUsed,
221255
last4,
222256
modifiedAt,
223257
name,
@@ -231,6 +265,7 @@ public String toString() {
231265
sb.append("class PartialAPIKeyAttributes {\n");
232266
sb.append(" category: ").append(toIndentedString(category)).append("\n");
233267
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
268+
sb.append(" dateLastUsed: ").append(toIndentedString(dateLastUsed)).append("\n");
234269
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
235270
sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n");
236271
sb.append(" name: ").append(toIndentedString(name)).append("\n");

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

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
@JsonPropertyOrder({
2424
PartialApplicationKeyAttributes.JSON_PROPERTY_CREATED_AT,
2525
PartialApplicationKeyAttributes.JSON_PROPERTY_LAST4,
26+
PartialApplicationKeyAttributes.JSON_PROPERTY_LAST_USED_AT,
2627
PartialApplicationKeyAttributes.JSON_PROPERTY_NAME,
2728
PartialApplicationKeyAttributes.JSON_PROPERTY_SCOPES
2829
})
@@ -36,6 +37,9 @@ public class PartialApplicationKeyAttributes {
3637
public static final String JSON_PROPERTY_LAST4 = "last4";
3738
private String last4;
3839

40+
public static final String JSON_PROPERTY_LAST_USED_AT = "last_used_at";
41+
private JsonNullable<String> lastUsedAt = JsonNullable.<String>undefined();
42+
3943
public static final String JSON_PROPERTY_NAME = "name";
4044
private String name;
4145

@@ -66,6 +70,32 @@ public String getLast4() {
6670
return last4;
6771
}
6872

73+
/**
74+
* Last usage timestamp of the application key.
75+
*
76+
* @return lastUsedAt
77+
*/
78+
@jakarta.annotation.Nullable
79+
@JsonIgnore
80+
public String getLastUsedAt() {
81+
82+
if (lastUsedAt == null) {
83+
lastUsedAt = JsonNullable.<String>undefined();
84+
}
85+
return lastUsedAt.orElse(null);
86+
}
87+
88+
@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
89+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
90+
public JsonNullable<String> getLastUsedAt_JsonNullable() {
91+
return lastUsedAt;
92+
}
93+
94+
@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
95+
private void setLastUsedAt_JsonNullable(JsonNullable<String> lastUsedAt) {
96+
this.lastUsedAt = lastUsedAt;
97+
}
98+
6999
public PartialApplicationKeyAttributes name(String name) {
70100
this.name = name;
71101
return this;
@@ -189,6 +219,7 @@ public boolean equals(Object o) {
189219
(PartialApplicationKeyAttributes) o;
190220
return Objects.equals(this.createdAt, partialApplicationKeyAttributes.createdAt)
191221
&& Objects.equals(this.last4, partialApplicationKeyAttributes.last4)
222+
&& Objects.equals(this.lastUsedAt, partialApplicationKeyAttributes.lastUsedAt)
192223
&& Objects.equals(this.name, partialApplicationKeyAttributes.name)
193224
&& Objects.equals(this.scopes, partialApplicationKeyAttributes.scopes)
194225
&& Objects.equals(
@@ -197,7 +228,7 @@ public boolean equals(Object o) {
197228

198229
@Override
199230
public int hashCode() {
200-
return Objects.hash(createdAt, last4, name, scopes, additionalProperties);
231+
return Objects.hash(createdAt, last4, lastUsedAt, name, scopes, additionalProperties);
201232
}
202233

203234
@Override
@@ -206,6 +237,7 @@ public String toString() {
206237
sb.append("class PartialApplicationKeyAttributes {\n");
207238
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
208239
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
240+
sb.append(" lastUsedAt: ").append(toIndentedString(lastUsedAt)).append("\n");
209241
sb.append(" name: ").append(toIndentedString(name)).append("\n");
210242
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
211243
sb.append(" additionalProperties: ")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-08T09:24:42.052Z

0 commit comments

Comments
 (0)