Skip to content

Commit dca0730

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ae010524 of spec repo
1 parent 5777d31 commit dca0730

File tree

30 files changed

+63
-48
lines changed

30 files changed

+63
-48
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.4",
7-
"regenerated": "2023-06-07 15:44:36.182205",
8-
"spec_repo_commit": "1a43071a"
7+
"regenerated": "2023-06-08 13:33:12.149558",
8+
"spec_repo_commit": "ae010524"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-06-07 15:44:36.195617",
13-
"spec_repo_commit": "1a43071a"
12+
"regenerated": "2023-06-08 13:33:12.167611",
13+
"spec_repo_commit": "ae010524"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7248,6 +7248,7 @@ components:
72487248
items:
72497249
description: A role UUID.
72507250
type: string
7251+
nullable: true
72517252
type: array
72527253
state:
72537254
$ref: '#/components/schemas/MonitorState'

src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class MonitorUpdateRequest {
7676
private String query;
7777

7878
public static final String JSON_PROPERTY_RESTRICTED_ROLES = "restricted_roles";
79-
private List<String> restrictedRoles = null;
79+
private JsonNullable<List<String>> restrictedRoles = JsonNullable.<List<String>>undefined();
8080

8181
public static final String JSON_PROPERTY_STATE = "state";
8282
private MonitorState state;
@@ -292,15 +292,19 @@ public void setQuery(String query) {
292292
}
293293

294294
public MonitorUpdateRequest restrictedRoles(List<String> restrictedRoles) {
295-
this.restrictedRoles = restrictedRoles;
295+
this.restrictedRoles = JsonNullable.<List<String>>of(restrictedRoles);
296296
return this;
297297
}
298298

299299
public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) {
300-
if (this.restrictedRoles == null) {
301-
this.restrictedRoles = new ArrayList<>();
300+
if (this.restrictedRoles == null || !this.restrictedRoles.isPresent()) {
301+
this.restrictedRoles = JsonNullable.<List<String>>of(new ArrayList<>());
302+
}
303+
try {
304+
this.restrictedRoles.get().add(restrictedRolesItem);
305+
} catch (java.util.NoSuchElementException e) {
306+
// this can never happen, as we make sure above that the value is present
302307
}
303-
this.restrictedRoles.add(restrictedRolesItem);
304308
return this;
305309
}
306310

@@ -318,16 +322,26 @@ public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) {
318322
* @return restrictedRoles
319323
*/
320324
@jakarta.annotation.Nullable
325+
@JsonIgnore
326+
public List<String> getRestrictedRoles() {
327+
return restrictedRoles.orElse(null);
328+
}
329+
321330
@JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES)
322331
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
323-
public List<String> getRestrictedRoles() {
332+
public JsonNullable<List<String>> getRestrictedRoles_JsonNullable() {
324333
return restrictedRoles;
325334
}
326335

327-
public void setRestrictedRoles(List<String> restrictedRoles) {
336+
@JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES)
337+
public void setRestrictedRoles_JsonNullable(JsonNullable<List<String>> restrictedRoles) {
328338
this.restrictedRoles = restrictedRoles;
329339
}
330340

341+
public void setRestrictedRoles(List<String> restrictedRoles) {
342+
this.restrictedRoles = JsonNullable.<List<String>>of(restrictedRoles);
343+
}
344+
331345
/**
332346
* Wrapper object with the different monitor states.
333347
*

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-ee2d9f9e4f01"
26+
"id": "3f83caea-c405-97df-c554-ee2d9f9e4f02"
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-ee2d9f9e4f02"
26+
"id": "3f83caea-c405-97df-c554-ee2d9f9e4f01"
2727
}
2828
]

src/test/resources/cassettes/features/v2/Create_Scanning_Group_returns_OK_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"timeToLive": {
2424
"unlimited": true
2525
},
26-
"id": "01611a93-5e74-0630-3c51-f707c3b51e80"
26+
"id": "01611a93-5e74-0630-3c51-f707c3b51e7a"
2727
},
2828
{
2929
"httpRequest": {

src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"timeToLive": {
2424
"unlimited": true
2525
},
26-
"id": "01611a93-5e74-0630-3c51-f707c3b51e79"
26+
"id": "01611a93-5e74-0630-3c51-f707c3b51e81"
2727
},
2828
{
2929
"httpRequest": {
@@ -53,7 +53,7 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed159"
56+
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15f"
5757
},
5858
{
5959
"httpRequest": {

src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"timeToLive": {
2424
"unlimited": true
2525
},
26-
"id": "01611a93-5e74-0630-3c51-f707c3b51e7e"
26+
"id": "01611a93-5e74-0630-3c51-f707c3b51e7c"
2727
},
2828
{
2929
"httpRequest": {
@@ -53,7 +53,7 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15d"
56+
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15b"
5757
},
5858
{
5959
"httpRequest": {

src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"timeToLive": {
2424
"unlimited": true
2525
},
26-
"id": "01611a93-5e74-0630-3c51-f707c3b51e82"
26+
"id": "01611a93-5e74-0630-3c51-f707c3b51e7b"
2727
},
2828
{
2929
"httpRequest": {
@@ -53,7 +53,7 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed160"
56+
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15a"
5757
},
5858
{
5959
"httpRequest": {

src/test/resources/cassettes/features/v2/Delete_a_RUM_application_returns_No_Content_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "74945625-c01a-a598-e538-65a53ceb0688"
30+
"id": "74945625-c01a-a598-e538-65a53ceb0685"
3131
},
3232
{
3333
"httpRequest": {

0 commit comments

Comments
 (0)