diff --git a/.apigentools-info b/.apigentools-info index 3cd9653a1b8..8ddbd6e53bb 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2021-10-18 10:35:00.694439", - "spec_repo_commit": "303d2e3" + "regenerated": "2021-10-18 13:05:32.173095", + "spec_repo_commit": "3b56e2f" }, "v2": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2021-10-18 10:36:09.692595", - "spec_repo_commit": "303d2e3" + "regenerated": "2021-10-18 13:06:21.888029", + "spec_repo_commit": "3b56e2f" } } } \ No newline at end of file diff --git a/src/main/java/com/datadog/api/v1/client/model/Monitor.java b/src/main/java/com/datadog/api/v1/client/model/Monitor.java index e8b5b3de8cd..c3a8c79972d 100644 --- a/src/main/java/com/datadog/api/v1/client/model/Monitor.java +++ b/src/main/java/com/datadog/api/v1/client/model/Monitor.java @@ -77,13 +77,13 @@ public class Monitor { private MonitorOverallStates overallState; public static final String JSON_PROPERTY_PRIORITY = "priority"; - private Long priority; + private JsonNullable priority = JsonNullable.undefined(); public static final String JSON_PROPERTY_QUERY = "query"; 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; @@ -301,7 +301,7 @@ public void setOverallState(MonitorOverallStates overallState) { } public Monitor priority(Long priority) { - this.priority = priority; + this.priority = JsonNullable.of(priority); return this; } @@ -312,16 +312,26 @@ public Monitor priority(Long priority) { */ @javax.annotation.Nullable @ApiModelProperty(value = "Integer from 1 (high) to 5 (low) indicating alert severity.") + @JsonIgnore + public Long getPriority() { + return priority.orElse(null); + } + @JsonProperty(JSON_PROPERTY_PRIORITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPriority() { + public JsonNullable getPriority_JsonNullable() { return priority; } - public void setPriority(Long priority) { + @JsonProperty(JSON_PROPERTY_PRIORITY) + public void setPriority_JsonNullable(JsonNullable priority) { this.priority = priority; } + public void setPriority(Long priority) { + this.priority = JsonNullable.of(priority); + } + public Monitor query(String query) { this.query = query; return this; @@ -347,15 +357,19 @@ public void setQuery(String query) { } public Monitor restrictedRoles(List restrictedRoles) { - this.restrictedRoles = restrictedRoles; + this.restrictedRoles = JsonNullable.>of(restrictedRoles); return this; } public Monitor 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; } @@ -370,16 +384,26 @@ public Monitor addRestrictedRolesItem(String restrictedRolesItem) { value = "A list of role identifiers that can be pulled from the Roles API. Cannot be used with" + " `locked` option.") + @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); + } + public Monitor state(MonitorState state) { this.state = state; this.unparsed |= state.unparsed; diff --git a/src/main/java/com/datadog/api/v1/openapi.yaml b/src/main/java/com/datadog/api/v1/openapi.yaml index e2ee64c7988..b7865bcfcf4 100644 --- a/src/main/java/com/datadog/api/v1/openapi.yaml +++ b/src/main/java/com/datadog/api/v1/openapi.yaml @@ -17285,6 +17285,7 @@ components: format: int64 maximum: 5 minimum: 1 + nullable: true type: integer query: description: The monitor query. @@ -17296,6 +17297,7 @@ components: items: description: A role UUID. type: string + nullable: true type: array state: $ref: '#/components/schemas/MonitorState'