Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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"
}
}
}
1 change: 1 addition & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7248,6 +7248,7 @@ components:
items:
description: A role UUID.
type: string
nullable: true
type: array
state:
$ref: '#/components/schemas/MonitorState'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class MonitorUpdateRequest {
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 @@ -292,15 +292,19 @@ public void setQuery(String query) {
}

public MonitorUpdateRequest restrictedRoles(List<String> restrictedRoles) {
this.restrictedRoles = restrictedRoles;
this.restrictedRoles = JsonNullable.<List<String>>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.<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 @@ -318,16 +322,26 @@ public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) {
* @return restrictedRoles
*/
@jakarta.annotation.Nullable
@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);
}

/**
* Wrapper object with the different monitor states.
*
Expand Down