diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 27ad049e17c..0a91df83bb9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -19304,10 +19304,6 @@ components: description: The title of the degradation. example: Elevated API Latency type: string - updates: - items: - $ref: "#/components/schemas/CreateDegradationRequestDataAttributesUpdatesItems" - type: array required: - components_affected - status @@ -19345,48 +19341,6 @@ components: - IDENTIFIED - MONITORING - RESOLVED - CreateDegradationRequestDataAttributesUpdatesItems: - description: A degradation update entry. - properties: - components_affected: - description: The components affected. - items: - $ref: "#/components/schemas/CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems" - type: array - description: - description: A description of the update. - example: "" - type: string - started_at: - description: Timestamp of when the update occurred. - example: "" - format: date-time - type: string - status: - $ref: "#/components/schemas/CreateDegradationRequestDataAttributesStatus" - required: - - components_affected - - description - - started_at - - status - type: object - CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems: - description: A component affected by a degradation update. - properties: - id: - description: The ID of the component. Must be a component of type `component`. - example: "" - type: string - name: - description: The name of the component. - readOnly: true - type: string - status: - $ref: "#/components/schemas/StatusPagesComponentDataAttributesStatus" - required: - - id - - status - type: object CreateDeploymentGateParams: description: Parameters for creating a deployment gate. properties: @@ -19755,10 +19709,6 @@ components: description: The title of the maintenance. example: "API Maintenance" type: string - updates: - items: - $ref: "#/components/schemas/CreateMaintenanceRequestDataAttributesUpdatesItems" - type: array required: - components_affected - title @@ -19786,48 +19736,6 @@ components: - id - status type: object - CreateMaintenanceRequestDataAttributesUpdatesItems: - description: A maintenance update entry. - properties: - components_affected: - description: The components affected. - items: - $ref: "#/components/schemas/CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems" - type: array - description: - description: A description of the update. - example: "" - type: string - started_at: - description: Timestamp of when the update occurred. - example: "" - format: date-time - type: string - status: - $ref: "#/components/schemas/CreateMaintenanceRequestDataAttributesUpdatesItemsStatus" - required: - - components_affected - - description - - started_at - - status - type: object - CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems: - description: A component affected by a maintenance update. - properties: - id: - description: The ID of the component. Must be a component of type `component`. - example: "" - type: string - name: - description: The name of the component. - readOnly: true - type: string - status: - $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus" - required: - - id - - status - type: object CreateMaintenanceRequestDataAttributesUpdatesItemsStatus: description: The status of a maintenance update. enum: @@ -25007,6 +24915,9 @@ components: format: uuid readOnly: true type: string + last_modified_by_user_uuid: + description: UUID of the user who last modified the resource. + type: string modified_at: description: Timestamp of when the update was last modified. format: date-time diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributes.java index 66219f32e52..bda54c008be 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributes.java @@ -24,8 +24,7 @@ CreateDegradationRequestDataAttributes.JSON_PROPERTY_COMPONENTS_AFFECTED, CreateDegradationRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, CreateDegradationRequestDataAttributes.JSON_PROPERTY_STATUS, - CreateDegradationRequestDataAttributes.JSON_PROPERTY_TITLE, - CreateDegradationRequestDataAttributes.JSON_PROPERTY_UPDATES + CreateDegradationRequestDataAttributes.JSON_PROPERTY_TITLE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -44,9 +43,6 @@ public class CreateDegradationRequestDataAttributes { public static final String JSON_PROPERTY_TITLE = "title"; private String title; - public static final String JSON_PROPERTY_UPDATES = "updates"; - private List updates = null; - public CreateDegradationRequestDataAttributes() {} @JsonCreator @@ -161,41 +157,6 @@ public void setTitle(String title) { this.title = title; } - public CreateDegradationRequestDataAttributes updates( - List updates) { - this.updates = updates; - for (CreateDegradationRequestDataAttributesUpdatesItems item : updates) { - this.unparsed |= item.unparsed; - } - return this; - } - - public CreateDegradationRequestDataAttributes addUpdatesItem( - CreateDegradationRequestDataAttributesUpdatesItems updatesItem) { - if (this.updates == null) { - this.updates = new ArrayList<>(); - } - this.updates.add(updatesItem); - this.unparsed |= updatesItem.unparsed; - return this; - } - - /** - * Getupdates - * - * @return updates - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUpdates() { - return updates; - } - - public void setUpdates(List updates) { - this.updates = updates; - } - /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -258,15 +219,13 @@ public boolean equals(Object o) { && Objects.equals(this.description, createDegradationRequestDataAttributes.description) && Objects.equals(this.status, createDegradationRequestDataAttributes.status) && Objects.equals(this.title, createDegradationRequestDataAttributes.title) - && Objects.equals(this.updates, createDegradationRequestDataAttributes.updates) && Objects.equals( this.additionalProperties, createDegradationRequestDataAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash( - componentsAffected, description, status, title, updates, additionalProperties); + return Objects.hash(componentsAffected, description, status, title, additionalProperties); } @Override @@ -277,7 +236,6 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" updates: ").append(toIndentedString(updates)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesUpdatesItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesUpdatesItems.java deleted file mode 100644 index 1f4cb92924d..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesUpdatesItems.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** A degradation update entry. */ -@JsonPropertyOrder({ - CreateDegradationRequestDataAttributesUpdatesItems.JSON_PROPERTY_COMPONENTS_AFFECTED, - CreateDegradationRequestDataAttributesUpdatesItems.JSON_PROPERTY_DESCRIPTION, - CreateDegradationRequestDataAttributesUpdatesItems.JSON_PROPERTY_STARTED_AT, - CreateDegradationRequestDataAttributesUpdatesItems.JSON_PROPERTY_STATUS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CreateDegradationRequestDataAttributesUpdatesItems { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected"; - private List - componentsAffected = new ArrayList<>(); - - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - - public static final String JSON_PROPERTY_STARTED_AT = "started_at"; - private OffsetDateTime startedAt; - - public static final String JSON_PROPERTY_STATUS = "status"; - private CreateDegradationRequestDataAttributesStatus status; - - public CreateDegradationRequestDataAttributesUpdatesItems() {} - - @JsonCreator - public CreateDegradationRequestDataAttributesUpdatesItems( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPONENTS_AFFECTED) - List - componentsAffected, - @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, - @JsonProperty(required = true, value = JSON_PROPERTY_STARTED_AT) OffsetDateTime startedAt, - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) - CreateDegradationRequestDataAttributesStatus status) { - this.componentsAffected = componentsAffected; - this.description = description; - this.startedAt = startedAt; - this.status = status; - this.unparsed |= !status.isValid(); - } - - public CreateDegradationRequestDataAttributesUpdatesItems componentsAffected( - List - componentsAffected) { - this.componentsAffected = componentsAffected; - for (CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems item : - componentsAffected) { - this.unparsed |= item.unparsed; - } - return this; - } - - public CreateDegradationRequestDataAttributesUpdatesItems addComponentsAffectedItem( - CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems - componentsAffectedItem) { - this.componentsAffected.add(componentsAffectedItem); - this.unparsed |= componentsAffectedItem.unparsed; - return this; - } - - /** - * The components affected. - * - * @return componentsAffected - */ - @JsonProperty(JSON_PROPERTY_COMPONENTS_AFFECTED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List - getComponentsAffected() { - return componentsAffected; - } - - public void setComponentsAffected( - List - componentsAffected) { - this.componentsAffected = componentsAffected; - } - - public CreateDegradationRequestDataAttributesUpdatesItems description(String description) { - this.description = description; - return this; - } - - /** - * A description of the update. - * - * @return description - */ - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateDegradationRequestDataAttributesUpdatesItems startedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; - return this; - } - - /** - * Timestamp of when the update occurred. - * - * @return startedAt - */ - @JsonProperty(JSON_PROPERTY_STARTED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getStartedAt() { - return startedAt; - } - - public void setStartedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; - } - - public CreateDegradationRequestDataAttributesUpdatesItems status( - CreateDegradationRequestDataAttributesStatus status) { - this.status = status; - this.unparsed |= !status.isValid(); - return this; - } - - /** - * The status of the degradation. - * - * @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CreateDegradationRequestDataAttributesStatus getStatus() { - return status; - } - - public void setStatus(CreateDegradationRequestDataAttributesStatus status) { - if (!status.isValid()) { - this.unparsed = true; - } - this.status = status; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return CreateDegradationRequestDataAttributesUpdatesItems - */ - @JsonAnySetter - public CreateDegradationRequestDataAttributesUpdatesItems putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** - * Return true if this CreateDegradationRequestDataAttributesUpdatesItems object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDegradationRequestDataAttributesUpdatesItems - createDegradationRequestDataAttributesUpdatesItems = - (CreateDegradationRequestDataAttributesUpdatesItems) o; - return Objects.equals( - this.componentsAffected, - createDegradationRequestDataAttributesUpdatesItems.componentsAffected) - && Objects.equals( - this.description, createDegradationRequestDataAttributesUpdatesItems.description) - && Objects.equals( - this.startedAt, createDegradationRequestDataAttributesUpdatesItems.startedAt) - && Objects.equals(this.status, createDegradationRequestDataAttributesUpdatesItems.status) - && Objects.equals( - this.additionalProperties, - createDegradationRequestDataAttributesUpdatesItems.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(componentsAffected, description, startedAt, status, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDegradationRequestDataAttributesUpdatesItems {\n"); - sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.java deleted file mode 100644 index 5c45b097b4c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** A component affected by a degradation update. */ -@JsonPropertyOrder({ - CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_ID, - CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_NAME, - CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_STATUS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusPagesComponentDataAttributesStatus status; - - public CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems() {} - - @JsonCreator - public CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) - StatusPagesComponentDataAttributesStatus status) { - this.id = id; - this.status = status; - this.unparsed |= !status.isValid(); - } - - public CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems id(String id) { - this.id = id; - return this; - } - - /** - * The ID of the component. Must be a component of type component. - * - * @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - /** - * The name of the component. - * - * @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - public CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems status( - StatusPagesComponentDataAttributesStatus status) { - this.status = status; - this.unparsed |= !status.isValid(); - return this; - } - - /** - * The status of the component. - * - * @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public StatusPagesComponentDataAttributesStatus getStatus() { - return status; - } - - public void setStatus(StatusPagesComponentDataAttributesStatus status) { - if (!status.isValid()) { - this.unparsed = true; - } - this.status = status; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems - */ - @JsonAnySetter - public CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems - putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** - * Return true if this CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems - * object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems - createDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems = - (CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems) o; - return Objects.equals( - this.id, createDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.id) - && Objects.equals( - this.name, - createDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.name) - && Objects.equals( - this.status, - createDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems.status) - && Objects.equals( - this.additionalProperties, - createDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems - .additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, status, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append( - "class CreateDegradationRequestDataAttributesUpdatesItemsComponentsAffectedItems {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributes.java index 912d2633137..db2a0c687af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributes.java @@ -28,8 +28,7 @@ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_IN_PROGRESS_DESCRIPTION, CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_SCHEDULED_DESCRIPTION, CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_START_DATE, - CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_TITLE, - CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_UPDATES + CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_TITLE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -57,9 +56,6 @@ public class CreateMaintenanceRequestDataAttributes { public static final String JSON_PROPERTY_TITLE = "title"; private String title; - public static final String JSON_PROPERTY_UPDATES = "updates"; - private List updates = null; - public CreateMaintenanceRequestDataAttributes() {} @JsonCreator @@ -239,41 +235,6 @@ public void setTitle(String title) { this.title = title; } - public CreateMaintenanceRequestDataAttributes updates( - List updates) { - this.updates = updates; - for (CreateMaintenanceRequestDataAttributesUpdatesItems item : updates) { - this.unparsed |= item.unparsed; - } - return this; - } - - public CreateMaintenanceRequestDataAttributes addUpdatesItem( - CreateMaintenanceRequestDataAttributesUpdatesItems updatesItem) { - if (this.updates == null) { - this.updates = new ArrayList<>(); - } - this.updates.add(updatesItem); - this.unparsed |= updatesItem.unparsed; - return this; - } - - /** - * Getupdates - * - * @return updates - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUpdates() { - return updates; - } - - public void setUpdates(List updates) { - this.updates = updates; - } - /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -343,7 +304,6 @@ public boolean equals(Object o) { this.scheduledDescription, createMaintenanceRequestDataAttributes.scheduledDescription) && Objects.equals(this.startDate, createMaintenanceRequestDataAttributes.startDate) && Objects.equals(this.title, createMaintenanceRequestDataAttributes.title) - && Objects.equals(this.updates, createMaintenanceRequestDataAttributes.updates) && Objects.equals( this.additionalProperties, createMaintenanceRequestDataAttributes.additionalProperties); } @@ -358,7 +318,6 @@ public int hashCode() { scheduledDescription, startDate, title, - updates, additionalProperties); } @@ -379,7 +338,6 @@ public String toString() { .append("\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" updates: ").append(toIndentedString(updates)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesUpdatesItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesUpdatesItems.java deleted file mode 100644 index d512d5df676..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesUpdatesItems.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** A maintenance update entry. */ -@JsonPropertyOrder({ - CreateMaintenanceRequestDataAttributesUpdatesItems.JSON_PROPERTY_COMPONENTS_AFFECTED, - CreateMaintenanceRequestDataAttributesUpdatesItems.JSON_PROPERTY_DESCRIPTION, - CreateMaintenanceRequestDataAttributesUpdatesItems.JSON_PROPERTY_STARTED_AT, - CreateMaintenanceRequestDataAttributesUpdatesItems.JSON_PROPERTY_STATUS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CreateMaintenanceRequestDataAttributesUpdatesItems { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected"; - private List - componentsAffected = new ArrayList<>(); - - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - - public static final String JSON_PROPERTY_STARTED_AT = "started_at"; - private OffsetDateTime startedAt; - - public static final String JSON_PROPERTY_STATUS = "status"; - private CreateMaintenanceRequestDataAttributesUpdatesItemsStatus status; - - public CreateMaintenanceRequestDataAttributesUpdatesItems() {} - - @JsonCreator - public CreateMaintenanceRequestDataAttributesUpdatesItems( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPONENTS_AFFECTED) - List - componentsAffected, - @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, - @JsonProperty(required = true, value = JSON_PROPERTY_STARTED_AT) OffsetDateTime startedAt, - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) - CreateMaintenanceRequestDataAttributesUpdatesItemsStatus status) { - this.componentsAffected = componentsAffected; - this.description = description; - this.startedAt = startedAt; - this.status = status; - this.unparsed |= !status.isValid(); - } - - public CreateMaintenanceRequestDataAttributesUpdatesItems componentsAffected( - List - componentsAffected) { - this.componentsAffected = componentsAffected; - for (CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems item : - componentsAffected) { - this.unparsed |= item.unparsed; - } - return this; - } - - public CreateMaintenanceRequestDataAttributesUpdatesItems addComponentsAffectedItem( - CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems - componentsAffectedItem) { - this.componentsAffected.add(componentsAffectedItem); - this.unparsed |= componentsAffectedItem.unparsed; - return this; - } - - /** - * The components affected. - * - * @return componentsAffected - */ - @JsonProperty(JSON_PROPERTY_COMPONENTS_AFFECTED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List - getComponentsAffected() { - return componentsAffected; - } - - public void setComponentsAffected( - List - componentsAffected) { - this.componentsAffected = componentsAffected; - } - - public CreateMaintenanceRequestDataAttributesUpdatesItems description(String description) { - this.description = description; - return this; - } - - /** - * A description of the update. - * - * @return description - */ - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateMaintenanceRequestDataAttributesUpdatesItems startedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; - return this; - } - - /** - * Timestamp of when the update occurred. - * - * @return startedAt - */ - @JsonProperty(JSON_PROPERTY_STARTED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getStartedAt() { - return startedAt; - } - - public void setStartedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; - } - - public CreateMaintenanceRequestDataAttributesUpdatesItems status( - CreateMaintenanceRequestDataAttributesUpdatesItemsStatus status) { - this.status = status; - this.unparsed |= !status.isValid(); - return this; - } - - /** - * The status of a maintenance update. - * - * @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CreateMaintenanceRequestDataAttributesUpdatesItemsStatus getStatus() { - return status; - } - - public void setStatus(CreateMaintenanceRequestDataAttributesUpdatesItemsStatus status) { - if (!status.isValid()) { - this.unparsed = true; - } - this.status = status; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return CreateMaintenanceRequestDataAttributesUpdatesItems - */ - @JsonAnySetter - public CreateMaintenanceRequestDataAttributesUpdatesItems putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** - * Return true if this CreateMaintenanceRequestDataAttributesUpdatesItems object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateMaintenanceRequestDataAttributesUpdatesItems - createMaintenanceRequestDataAttributesUpdatesItems = - (CreateMaintenanceRequestDataAttributesUpdatesItems) o; - return Objects.equals( - this.componentsAffected, - createMaintenanceRequestDataAttributesUpdatesItems.componentsAffected) - && Objects.equals( - this.description, createMaintenanceRequestDataAttributesUpdatesItems.description) - && Objects.equals( - this.startedAt, createMaintenanceRequestDataAttributesUpdatesItems.startedAt) - && Objects.equals(this.status, createMaintenanceRequestDataAttributesUpdatesItems.status) - && Objects.equals( - this.additionalProperties, - createMaintenanceRequestDataAttributesUpdatesItems.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(componentsAffected, description, startedAt, status, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateMaintenanceRequestDataAttributesUpdatesItems {\n"); - sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.java deleted file mode 100644 index 58ddeb87bcf..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** A component affected by a maintenance update. */ -@JsonPropertyOrder({ - CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_ID, - CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_NAME, - CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_STATUS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_STATUS = "status"; - private PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status; - - public CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems() {} - - @JsonCreator - public CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) - PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status) { - this.id = id; - this.status = status; - this.unparsed |= !status.isValid(); - } - - public CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems id(String id) { - this.id = id; - return this; - } - - /** - * The ID of the component. Must be a component of type component. - * - * @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - /** - * The name of the component. - * - * @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - public CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems status( - PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status) { - this.status = status; - this.unparsed |= !status.isValid(); - return this; - } - - /** - * The status of the component. - * - * @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus getStatus() { - return status; - } - - public void setStatus(PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status) { - if (!status.isValid()) { - this.unparsed = true; - } - this.status = status; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems - */ - @JsonAnySetter - public CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems - putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** - * Return true if this CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems - * object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems - createMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems = - (CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems) o; - return Objects.equals( - this.id, createMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.id) - && Objects.equals( - this.name, - createMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.name) - && Objects.equals( - this.status, - createMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems.status) - && Objects.equals( - this.additionalProperties, - createMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems - .additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, status, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append( - "class CreateMaintenanceRequestDataAttributesUpdatesItemsComponentsAffectedItems {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItems.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItems.java index 878da6b653a..cb39ebdbbd9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItems.java @@ -26,6 +26,7 @@ DegradationDataAttributesUpdatesItems.JSON_PROPERTY_CREATED_AT, DegradationDataAttributesUpdatesItems.JSON_PROPERTY_DESCRIPTION, DegradationDataAttributesUpdatesItems.JSON_PROPERTY_ID, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_LAST_MODIFIED_BY_USER_UUID, DegradationDataAttributesUpdatesItems.JSON_PROPERTY_MODIFIED_AT, DegradationDataAttributesUpdatesItems.JSON_PROPERTY_STARTED_AT, DegradationDataAttributesUpdatesItems.JSON_PROPERTY_STATUS @@ -47,6 +48,10 @@ public class DegradationDataAttributesUpdatesItems { public static final String JSON_PROPERTY_ID = "id"; private UUID id; + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER_UUID = + "last_modified_by_user_uuid"; + private String lastModifiedByUserUuid; + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; private OffsetDateTime modifiedAt; @@ -138,6 +143,28 @@ public UUID getId() { return id; } + public DegradationDataAttributesUpdatesItems lastModifiedByUserUuid( + String lastModifiedByUserUuid) { + this.lastModifiedByUserUuid = lastModifiedByUserUuid; + return this; + } + + /** + * UUID of the user who last modified the resource. + * + * @return lastModifiedByUserUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastModifiedByUserUuid() { + return lastModifiedByUserUuid; + } + + public void setLastModifiedByUserUuid(String lastModifiedByUserUuid) { + this.lastModifiedByUserUuid = lastModifiedByUserUuid; + } + /** * Timestamp of when the update was last modified. * @@ -259,6 +286,9 @@ public boolean equals(Object o) { && Objects.equals(this.createdAt, degradationDataAttributesUpdatesItems.createdAt) && Objects.equals(this.description, degradationDataAttributesUpdatesItems.description) && Objects.equals(this.id, degradationDataAttributesUpdatesItems.id) + && Objects.equals( + this.lastModifiedByUserUuid, + degradationDataAttributesUpdatesItems.lastModifiedByUserUuid) && Objects.equals(this.modifiedAt, degradationDataAttributesUpdatesItems.modifiedAt) && Objects.equals(this.startedAt, degradationDataAttributesUpdatesItems.startedAt) && Objects.equals(this.status, degradationDataAttributesUpdatesItems.status) @@ -273,6 +303,7 @@ public int hashCode() { createdAt, description, id, + lastModifiedByUserUuid, modifiedAt, startedAt, status, @@ -287,6 +318,9 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" lastModifiedByUserUuid: ") + .append(toIndentedString(lastModifiedByUserUuid)) + .append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n");