Skip to content

Commit 2257ec7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5b5e690 of spec repo
1 parent 688019c commit 2257ec7

File tree

7 files changed

+155
-13
lines changed

7 files changed

+155
-13
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17455,6 +17455,12 @@ components:
1745517455
format: date-time
1745617456
readOnly: true
1745717457
type: string
17458+
date_last_used:
17459+
description: Date the API Key was last used
17460+
example: '2020-11-27T10:00:00.000Z'
17461+
format: date-time
17462+
readOnly: true
17463+
type: string
1745817464
key:
1745917465
description: The API key.
1746017466
readOnly: true
@@ -17513,6 +17519,13 @@ components:
1751317519
minLength: 4
1751417520
readOnly: true
1751517521
type: string
17522+
last_used_at:
17523+
description: Last usage timestamp of the application key.
17524+
example: '2020-12-20T10:00:00.000Z'
17525+
format: date-time
17526+
nullable: true
17527+
readOnly: true
17528+
type: string
1751617529
name:
1751717530
description: Name of the application key.
1751817531
example: Application Key for managing dashboards
@@ -32380,6 +32393,12 @@ components:
3238032393
example: '2020-11-23T10:00:00.000Z'
3238132394
readOnly: true
3238232395
type: string
32396+
date_last_used:
32397+
description: Date the API Key was last used.
32398+
example: '2020-11-27T10:00:00.000Z'
32399+
format: date-time
32400+
readOnly: true
32401+
type: string
3238332402
last4:
3238432403
description: The last four characters of the API key.
3238532404
example: abcd
@@ -32428,6 +32447,12 @@ components:
3242832447
minLength: 4
3242932448
readOnly: true
3243032449
type: string
32450+
last_used_at:
32451+
description: Last usage timestamp of the application key.
32452+
example: '2020-12-20T10:00:00.000Z'
32453+
nullable: true
32454+
readOnly: true
32455+
type: string
3243132456
name:
3243232457
description: Name of the application key.
3243332458
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
@JsonPropertyOrder({
2222
FullAPIKeyAttributes.JSON_PROPERTY_CATEGORY,
2323
FullAPIKeyAttributes.JSON_PROPERTY_CREATED_AT,
24+
FullAPIKeyAttributes.JSON_PROPERTY_DATE_LAST_USED,
2425
FullAPIKeyAttributes.JSON_PROPERTY_KEY,
2526
FullAPIKeyAttributes.JSON_PROPERTY_LAST4,
2627
FullAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT,
@@ -37,6 +38,9 @@ public class FullAPIKeyAttributes {
3738
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
3839
private OffsetDateTime createdAt;
3940

41+
public static final String JSON_PROPERTY_DATE_LAST_USED = "date_last_used";
42+
private OffsetDateTime dateLastUsed;
43+
4044
public static final String JSON_PROPERTY_KEY = "key";
4145
private String key;
4246

@@ -86,6 +90,18 @@ public OffsetDateTime getCreatedAt() {
8690
return createdAt;
8791
}
8892

93+
/**
94+
* Date the API Key was last used
95+
*
96+
* @return dateLastUsed
97+
*/
98+
@jakarta.annotation.Nullable
99+
@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
100+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
101+
public OffsetDateTime getDateLastUsed() {
102+
return dateLastUsed;
103+
}
104+
89105
/**
90106
* The API key.
91107
*
@@ -222,6 +238,7 @@ public boolean equals(Object o) {
222238
FullAPIKeyAttributes fullApiKeyAttributes = (FullAPIKeyAttributes) o;
223239
return Objects.equals(this.category, fullApiKeyAttributes.category)
224240
&& Objects.equals(this.createdAt, fullApiKeyAttributes.createdAt)
241+
&& Objects.equals(this.dateLastUsed, fullApiKeyAttributes.dateLastUsed)
225242
&& Objects.equals(this.key, fullApiKeyAttributes.key)
226243
&& Objects.equals(this.last4, fullApiKeyAttributes.last4)
227244
&& Objects.equals(this.modifiedAt, fullApiKeyAttributes.modifiedAt)
@@ -236,6 +253,7 @@ public int hashCode() {
236253
return Objects.hash(
237254
category,
238255
createdAt,
256+
dateLastUsed,
239257
key,
240258
last4,
241259
modifiedAt,
@@ -250,6 +268,7 @@ public String toString() {
250268
sb.append("class FullAPIKeyAttributes {\n");
251269
sb.append(" category: ").append(toIndentedString(category)).append("\n");
252270
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
271+
sb.append(" dateLastUsed: ").append(toIndentedString(dateLastUsed)).append("\n");
253272
sb.append(" key: ").append(toIndentedString(key)).append("\n");
254273
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
255274
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
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;
@@ -20,6 +21,7 @@
2021
@JsonPropertyOrder({
2122
PartialAPIKeyAttributes.JSON_PROPERTY_CATEGORY,
2223
PartialAPIKeyAttributes.JSON_PROPERTY_CREATED_AT,
24+
PartialAPIKeyAttributes.JSON_PROPERTY_DATE_LAST_USED,
2325
PartialAPIKeyAttributes.JSON_PROPERTY_LAST4,
2426
PartialAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT,
2527
PartialAPIKeyAttributes.JSON_PROPERTY_NAME,
@@ -35,6 +37,9 @@ public class PartialAPIKeyAttributes {
3537
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
3638
private String createdAt;
3739

40+
public static final String JSON_PROPERTY_DATE_LAST_USED = "date_last_used";
41+
private OffsetDateTime dateLastUsed;
42+
3843
public static final String JSON_PROPERTY_LAST4 = "last4";
3944
private String last4;
4045

@@ -81,6 +86,18 @@ public String getCreatedAt() {
8186
return createdAt;
8287
}
8388

89+
/**
90+
* Date the API Key was last used.
91+
*
92+
* @return dateLastUsed
93+
*/
94+
@jakarta.annotation.Nullable
95+
@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
96+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
97+
public OffsetDateTime getDateLastUsed() {
98+
return dateLastUsed;
99+
}
100+
84101
/**
85102
* The last four characters of the API key.
86103
*
@@ -205,6 +222,7 @@ public boolean equals(Object o) {
205222
PartialAPIKeyAttributes partialApiKeyAttributes = (PartialAPIKeyAttributes) o;
206223
return Objects.equals(this.category, partialApiKeyAttributes.category)
207224
&& Objects.equals(this.createdAt, partialApiKeyAttributes.createdAt)
225+
&& Objects.equals(this.dateLastUsed, partialApiKeyAttributes.dateLastUsed)
208226
&& Objects.equals(this.last4, partialApiKeyAttributes.last4)
209227
&& Objects.equals(this.modifiedAt, partialApiKeyAttributes.modifiedAt)
210228
&& Objects.equals(this.name, partialApiKeyAttributes.name)
@@ -218,6 +236,7 @@ public int hashCode() {
218236
return Objects.hash(
219237
category,
220238
createdAt,
239+
dateLastUsed,
221240
last4,
222241
modifiedAt,
223242
name,
@@ -231,6 +250,7 @@ public String toString() {
231250
sb.append("class PartialAPIKeyAttributes {\n");
232251
sb.append(" category: ").append(toIndentedString(category)).append("\n");
233252
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
253+
sb.append(" dateLastUsed: ").append(toIndentedString(dateLastUsed)).append("\n");
234254
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
235255
sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n");
236256
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: ")

0 commit comments

Comments
 (0)