From b30e1a32313e78cc46bcb51d42fbe7b1f0783b66 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 8 Jun 2023 17:38:42 +0000 Subject: [PATCH] Regenerate client from commit 9a0ffb6a of spec repo --- .apigentools-info | 8 +++--- .generator/schemas/v1/openapi.yaml | 1 + .../client/v1/model/MonitorUpdateRequest.java | 28 ++++++++++++++----- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 4eef0f79b83..4851142c724 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-08 14:17:43.072737", - "spec_repo_commit": "11592711" + "regenerated": "2023-06-08 17:37:22.034469", + "spec_repo_commit": "9a0ffb6a" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-08 14:17:43.088504", - "spec_repo_commit": "11592711" + "regenerated": "2023-06-08 17:37:22.047281", + "spec_repo_commit": "9a0ffb6a" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 167733f2b18..e02119657ca 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -7248,6 +7248,7 @@ components: items: description: A role UUID. type: string + nullable: true type: array state: $ref: '#/components/schemas/MonitorState' diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java index e4e0f6ec7aa..786f4288ca0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java @@ -76,7 +76,7 @@ public class MonitorUpdateRequest { private String query; public static final String JSON_PROPERTY_RESTRICTED_ROLES = "restricted_roles"; - private List restrictedRoles = null; + private JsonNullable> restrictedRoles = JsonNullable.>undefined(); public static final String JSON_PROPERTY_STATE = "state"; private MonitorState state; @@ -292,15 +292,19 @@ public void setQuery(String query) { } public MonitorUpdateRequest restrictedRoles(List restrictedRoles) { - this.restrictedRoles = restrictedRoles; + this.restrictedRoles = JsonNullable.>of(restrictedRoles); return this; } public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) { - if (this.restrictedRoles == null) { - this.restrictedRoles = new ArrayList<>(); + if (this.restrictedRoles == null || !this.restrictedRoles.isPresent()) { + this.restrictedRoles = JsonNullable.>of(new ArrayList<>()); + } + try { + this.restrictedRoles.get().add(restrictedRolesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.restrictedRoles.add(restrictedRolesItem); return this; } @@ -318,16 +322,26 @@ public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) { * @return restrictedRoles */ @jakarta.annotation.Nullable + @JsonIgnore + public List getRestrictedRoles() { + return restrictedRoles.orElse(null); + } + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRestrictedRoles() { + public JsonNullable> getRestrictedRoles_JsonNullable() { return restrictedRoles; } - public void setRestrictedRoles(List restrictedRoles) { + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) + public void setRestrictedRoles_JsonNullable(JsonNullable> restrictedRoles) { this.restrictedRoles = restrictedRoles; } + public void setRestrictedRoles(List restrictedRoles) { + this.restrictedRoles = JsonNullable.>of(restrictedRoles); + } + /** * Wrapper object with the different monitor states. *