Skip to content

Commit

Permalink
Regenerate client from commit 7d62ff2 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 18, 2021
1 parent d8e4b89 commit 6943bd3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-10-18 10:07:43.916322",
"spec_repo_commit": "532aa21"
"regenerated": "2021-10-18 11:11:44.636446",
"spec_repo_commit": "7d62ff2"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-10-18 10:08:46.084189",
"spec_repo_commit": "532aa21"
"regenerated": "2021-10-18 11:12:43.923939",
"spec_repo_commit": "7d62ff2"
}
}
}
46 changes: 35 additions & 11 deletions src/main/java/com/datadog/api/v1/client/model/Monitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ public class Monitor {
private MonitorOverallStates overallState;

public static final String JSON_PROPERTY_PRIORITY = "priority";
private Long priority;
private JsonNullable<Long> priority = JsonNullable.<Long>undefined();

public static final String JSON_PROPERTY_QUERY = "query";
private String query;

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

public static final String JSON_PROPERTY_STATE = "state";
private MonitorState state;
Expand Down Expand Up @@ -301,7 +301,7 @@ public void setOverallState(MonitorOverallStates overallState) {
}

public Monitor priority(Long priority) {
this.priority = priority;
this.priority = JsonNullable.<Long>of(priority);
return this;
}

Expand All @@ -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<Long> getPriority_JsonNullable() {
return priority;
}

public void setPriority(Long priority) {
@JsonProperty(JSON_PROPERTY_PRIORITY)
public void setPriority_JsonNullable(JsonNullable<Long> priority) {
this.priority = priority;
}

public void setPriority(Long priority) {
this.priority = JsonNullable.<Long>of(priority);
}

public Monitor query(String query) {
this.query = query;
return this;
Expand All @@ -347,15 +357,19 @@ public void setQuery(String query) {
}

public Monitor restrictedRoles(List<String> restrictedRoles) {
this.restrictedRoles = restrictedRoles;
this.restrictedRoles = JsonNullable.<List<String>>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.<List<String>>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;
}

Expand All @@ -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<String> getRestrictedRoles() {
return restrictedRoles.orElse(null);
}

@JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getRestrictedRoles() {
public JsonNullable<List<String>> getRestrictedRoles_JsonNullable() {
return restrictedRoles;
}

public void setRestrictedRoles(List<String> restrictedRoles) {
@JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES)
public void setRestrictedRoles_JsonNullable(JsonNullable<List<String>> restrictedRoles) {
this.restrictedRoles = restrictedRoles;
}

public void setRestrictedRoles(List<String> restrictedRoles) {
this.restrictedRoles = JsonNullable.<List<String>>of(restrictedRoles);
}

public Monitor state(MonitorState state) {
this.state = state;
this.unparsed |= state.unparsed;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/datadog/api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17285,6 +17285,7 @@ components:
format: int64
maximum: 5
minimum: 1
nullable: true
type: integer
query:
description: The monitor query.
Expand All @@ -17296,6 +17297,7 @@ components:
items:
description: A role UUID.
type: string
nullable: true
type: array
state:
$ref: '#/components/schemas/MonitorState'
Expand Down

0 comments on commit 6943bd3

Please sign in to comment.