diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b6a3ce30c87..5fe94fe87a3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38188,6 +38188,19 @@ components: example: "One or several indexes are missing or invalid. Results hold data from the other indexes." type: string type: object + ExecutionLimit: + description: "The maximum number of times to execute a workflow for an incident." + properties: + count: + description: "The maximum number of workflow executions." + example: 1 + format: int32 + maximum: 9999 + minimum: 1 + type: integer + required: + - count + type: object ExecutionPolicyActionPattern: description: The set of actions this policy applies to. properties: @@ -47979,6 +47992,15 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentCondition: + description: "Conditions that determine which incidents trigger the workflow." + properties: + tagValues: + description: "Incident tags and values used to filter matching incidents." + items: + $ref: "#/components/schemas/IncidentTagValue" + type: array + type: object IncidentConfigurationDataAttributesRequest: description: Attributes for creating an incident configuration. properties: @@ -48332,6 +48354,25 @@ components: required: - data type: object + IncidentCreatedTrigger: + description: "Trigger a workflow when an incident is declared." + properties: + incidentType: + description: "The type of incident that triggers the workflow." + type: string + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + type: object + IncidentCreatedTriggerWrapper: + description: "Schema for an incident declared trigger." + properties: + incidentCreatedTrigger: + $ref: "#/components/schemas/IncidentCreatedTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentCreatedTrigger + type: object IncidentFieldAttributes: description: Dynamic fields for which selections can be made, with field names as keys. oneOf: @@ -49011,6 +49052,27 @@ components: required: - data type: object + IncidentImpactCreatedTrigger: + description: "Trigger a workflow when an impact is created for an incident." + properties: + executionLimit: + $ref: "#/components/schemas/ExecutionLimit" + incidentType: + description: "The type of incident that triggers the workflow." + type: string + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + type: object + IncidentImpactCreatedTriggerWrapper: + description: "Schema for an incident impact created trigger." + properties: + incidentImpactCreatedTrigger: + $ref: "#/components/schemas/IncidentImpactCreatedTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentImpactCreatedTrigger + type: object IncidentImpactFieldChoice: description: A choice option for a dropdown or multiselect impact field. properties: @@ -49309,6 +49371,27 @@ components: type: string x-enum-varnames: - INCIDENT_IMPACTS + IncidentImpactUpdatedTrigger: + description: "Trigger a workflow when an impact is updated for an incident." + properties: + executionLimit: + $ref: "#/components/schemas/ExecutionLimit" + incidentType: + description: "The type of incident that triggers the workflow." + type: string + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + type: object + IncidentImpactUpdatedTriggerWrapper: + description: "Schema for an incident impact updated trigger." + properties: + incidentImpactUpdatedTrigger: + $ref: "#/components/schemas/IncidentImpactUpdatedTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentImpactUpdatedTrigger + type: object IncidentImpactsResponse: description: Response with a list of incident impacts. properties: @@ -50530,6 +50613,27 @@ components: type: string x-enum-varnames: - INCIDENT_POSTMORTEMS + IncidentPostmortemUpdatedTrigger: + description: "Trigger a workflow when a postmortem is updated for an incident." + properties: + executionLimit: + $ref: "#/components/schemas/ExecutionLimit" + incidentType: + description: "The type of incident that triggers the workflow." + type: string + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + type: object + IncidentPostmortemUpdatedTriggerWrapper: + description: "Schema for an incident postmortem updated trigger." + properties: + incidentPostmortemUpdatedTrigger: + $ref: "#/components/schemas/IncidentPostmortemUpdatedTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentPostmortemUpdatedTrigger + type: object IncidentRelatedObject: description: Object related to an incident. enum: @@ -50560,6 +50664,27 @@ components: type: string x-enum-varnames: - INCIDENTS + IncidentResponderCreatedTrigger: + description: "Trigger a workflow when a responder is created for an incident." + properties: + executionLimit: + $ref: "#/components/schemas/ExecutionLimit" + incidentType: + description: "The type of incident that triggers the workflow." + type: string + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + type: object + IncidentResponderCreatedTriggerWrapper: + description: "Schema for an incident responder created trigger." + properties: + incidentResponderCreatedTrigger: + $ref: "#/components/schemas/IncidentResponderCreatedTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentResponderCreatedTrigger + type: object IncidentResponderDataAttributesResponse: description: Attributes of an incident responder in a response. properties: @@ -51313,6 +51438,55 @@ components: required: - data type: object + IncidentSavedTrigger: + description: "Trigger a workflow when an incident is declared or updated." + properties: + executionLimit: + $ref: "#/components/schemas/ExecutionLimit" + incidentType: + description: "The type of incident that triggers the workflow." + type: string + serialExecution: + $ref: "#/components/schemas/SerialExecution" + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + type: object + IncidentSavedTriggerWrapper: + description: "Schema for an incident declared or updated trigger." + properties: + incidentSavedTrigger: + $ref: "#/components/schemas/IncidentSavedTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentSavedTrigger + type: object + IncidentScheduleTrigger: + description: "Trigger a workflow on a schedule for an incident." + properties: + incidentType: + description: "The type of incident that triggers the workflow." + type: string + rrule: + description: "The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string." + example: "DTSTART:20241220T151700Z\nRRULE:FREQ=MONTHLY" + minLength: 1 + type: string + tagCondition: + $ref: "#/components/schemas/IncidentCondition" + required: + - rrule + type: object + IncidentScheduleTriggerWrapper: + description: "Schema for an incident schedule trigger." + properties: + incidentScheduleTrigger: + $ref: "#/components/schemas/IncidentScheduleTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - incidentScheduleTrigger + type: object IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -51606,6 +51780,24 @@ components: - SEV_3 - SEV_4 - SEV_5 + IncidentTagValue: + description: "An incident tag and its accepted values." + properties: + tag: + description: "The incident tag to match." + example: "" + type: string + values: + description: "The accepted values for the incident tag." + example: + - "" + items: + type: string + type: array + required: + - tag + - values + type: object IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -52025,13 +52217,16 @@ components: x-enum-varnames: - INCIDENT_TODOS IncidentTrigger: - description: "Trigger a workflow from an Incident. For automatic triggering a handle must be configured and the workflow must be published." + description: "Trigger a workflow from an incident. For automatic triggering a handle must be configured and the workflow must be published." properties: rateLimit: $ref: "#/components/schemas/TriggerRateLimit" + version: + description: "Version of the incident manual trigger." + type: string type: object IncidentTriggerWrapper: - description: "Schema for an Incident-based trigger." + description: "Schema for an incident-based trigger." properties: incidentTrigger: $ref: "#/components/schemas/IncidentTrigger" @@ -103923,6 +104118,16 @@ components: - REPLACEMENT_STRING - PARTIAL_REPLACEMENT_FROM_BEGINNING - PARTIAL_REPLACEMENT_FROM_END + SerialExecution: + description: "Whether to execute the workflow serially for an incident." + properties: + enabled: + description: "Whether serial execution is enabled." + example: false + type: boolean + required: + - enabled + type: object ServiceAccessToken: description: Datadog access token. properties: @@ -107006,12 +107211,38 @@ components: - channel_name - redirect_url type: object + SlackReactionConfig: + description: "Configuration for a Slack emoji reaction trigger." + properties: + reactionEmoji: + description: "The Slack emoji reaction name." + example: L + minLength: 1 + type: string + teamId: + description: "The Slack workspace ID." + example: L + minLength: 1 + type: string + required: + - teamId + - reactionEmoji + type: object + SlackTrigger: + description: "Trigger a workflow from Slack. The workflow must be published." + properties: + reactionTriggers: + description: "Slack emoji reactions that trigger the workflow." + items: + $ref: "#/components/schemas/SlackReactionConfig" + type: array + uniqueItems: true + type: object SlackTriggerWrapper: description: "Schema for a Slack-based trigger." properties: slackTrigger: - description: "Trigger a workflow from Slack. The workflow must be published." - type: object + $ref: "#/components/schemas/SlackTrigger" startStepNames: $ref: "#/components/schemas/StartStepNames" required: @@ -118899,6 +119130,13 @@ components: - $ref: "#/components/schemas/DashboardTriggerWrapper" - $ref: "#/components/schemas/FormTriggerWrapper" - $ref: "#/components/schemas/GithubWebhookTriggerWrapper" + - $ref: "#/components/schemas/IncidentCreatedTriggerWrapper" + - $ref: "#/components/schemas/IncidentImpactCreatedTriggerWrapper" + - $ref: "#/components/schemas/IncidentImpactUpdatedTriggerWrapper" + - $ref: "#/components/schemas/IncidentPostmortemUpdatedTriggerWrapper" + - $ref: "#/components/schemas/IncidentResponderCreatedTriggerWrapper" + - $ref: "#/components/schemas/IncidentSavedTriggerWrapper" + - $ref: "#/components/schemas/IncidentScheduleTriggerWrapper" - $ref: "#/components/schemas/IncidentTriggerWrapper" - $ref: "#/components/schemas/MonitorTriggerWrapper" - $ref: "#/components/schemas/NotebookTriggerWrapper" diff --git a/src/main/java/com/datadog/api/client/v2/model/ExecutionLimit.java b/src/main/java/com/datadog/api/client/v2/model/ExecutionLimit.java new file mode 100644 index 00000000000..f4208a245c0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExecutionLimit.java @@ -0,0 +1,142 @@ +/* + * 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; + +/** The maximum number of times to execute a workflow for an incident. */ +@JsonPropertyOrder({ExecutionLimit.JSON_PROPERTY_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ExecutionLimit { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COUNT = "count"; + private Integer count; + + public ExecutionLimit() {} + + @JsonCreator + public ExecutionLimit(@JsonProperty(required = true, value = JSON_PROPERTY_COUNT) Integer count) { + this.count = count; + } + + public ExecutionLimit count(Integer count) { + this.count = count; + return this; + } + + /** + * The maximum number of workflow executions. minimum: 1 maximum: 9999 + * + * @return count + */ + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + + /** + * 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 ExecutionLimit + */ + @JsonAnySetter + public ExecutionLimit 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 ExecutionLimit object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionLimit executionLimit = (ExecutionLimit) o; + return Objects.equals(this.count, executionLimit.count) + && Objects.equals(this.additionalProperties, executionLimit.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(count, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionLimit {\n"); + sb.append(" count: ").append(toIndentedString(count)).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/IncidentCondition.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCondition.java new file mode 100644 index 00000000000..e4a50c1031e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCondition.java @@ -0,0 +1,156 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Conditions that determine which incidents trigger the workflow. */ +@JsonPropertyOrder({IncidentCondition.JSON_PROPERTY_TAG_VALUES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCondition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TAG_VALUES = "tagValues"; + private List tagValues = null; + + public IncidentCondition tagValues(List tagValues) { + this.tagValues = tagValues; + if (tagValues != null) { + for (IncidentTagValue item : tagValues) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public IncidentCondition addTagValuesItem(IncidentTagValue tagValuesItem) { + if (this.tagValues == null) { + this.tagValues = new ArrayList<>(); + } + this.tagValues.add(tagValuesItem); + this.unparsed |= tagValuesItem.unparsed; + return this; + } + + /** + * Incident tags and values used to filter matching incidents. + * + * @return tagValues + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTagValues() { + return tagValues; + } + + public void setTagValues(List tagValues) { + this.tagValues = tagValues; + if (tagValues != null) { + for (IncidentTagValue item : tagValues) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 IncidentCondition + */ + @JsonAnySetter + public IncidentCondition 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 IncidentCondition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCondition incidentCondition = (IncidentCondition) o; + return Objects.equals(this.tagValues, incidentCondition.tagValues) + && Objects.equals(this.additionalProperties, incidentCondition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tagValues, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCondition {\n"); + sb.append(" tagValues: ").append(toIndentedString(tagValues)).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/IncidentCreatedTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatedTrigger.java new file mode 100644 index 00000000000..0a0737e82a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatedTrigger.java @@ -0,0 +1,168 @@ +/* + * 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.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; + +/** Trigger a workflow when an incident is declared. */ +@JsonPropertyOrder({ + IncidentCreatedTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentCreatedTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreatedTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentCreatedTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentCreatedTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentCreatedTrigger + */ + @JsonAnySetter + public IncidentCreatedTrigger 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 IncidentCreatedTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreatedTrigger incidentCreatedTrigger = (IncidentCreatedTrigger) o; + return Objects.equals(this.incidentType, incidentCreatedTrigger.incidentType) + && Objects.equals(this.tagCondition, incidentCreatedTrigger.tagCondition) + && Objects.equals(this.additionalProperties, incidentCreatedTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreatedTrigger {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentCreatedTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatedTriggerWrapper.java new file mode 100644 index 00000000000..360236d284e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatedTriggerWrapper.java @@ -0,0 +1,193 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident declared trigger. */ +@JsonPropertyOrder({ + IncidentCreatedTriggerWrapper.JSON_PROPERTY_INCIDENT_CREATED_TRIGGER, + IncidentCreatedTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreatedTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_CREATED_TRIGGER = "incidentCreatedTrigger"; + private IncidentCreatedTrigger incidentCreatedTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentCreatedTriggerWrapper() {} + + @JsonCreator + public IncidentCreatedTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_CREATED_TRIGGER) + IncidentCreatedTrigger incidentCreatedTrigger) { + this.incidentCreatedTrigger = incidentCreatedTrigger; + this.unparsed |= incidentCreatedTrigger.unparsed; + } + + public IncidentCreatedTriggerWrapper incidentCreatedTrigger( + IncidentCreatedTrigger incidentCreatedTrigger) { + this.incidentCreatedTrigger = incidentCreatedTrigger; + this.unparsed |= incidentCreatedTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow when an incident is declared. + * + * @return incidentCreatedTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_CREATED_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreatedTrigger getIncidentCreatedTrigger() { + return incidentCreatedTrigger; + } + + public void setIncidentCreatedTrigger(IncidentCreatedTrigger incidentCreatedTrigger) { + this.incidentCreatedTrigger = incidentCreatedTrigger; + if (incidentCreatedTrigger != null) { + this.unparsed |= incidentCreatedTrigger.unparsed; + } + } + + public IncidentCreatedTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentCreatedTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentCreatedTriggerWrapper + */ + @JsonAnySetter + public IncidentCreatedTriggerWrapper 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 IncidentCreatedTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreatedTriggerWrapper incidentCreatedTriggerWrapper = (IncidentCreatedTriggerWrapper) o; + return Objects.equals( + this.incidentCreatedTrigger, incidentCreatedTriggerWrapper.incidentCreatedTrigger) + && Objects.equals(this.startStepNames, incidentCreatedTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, incidentCreatedTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentCreatedTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreatedTriggerWrapper {\n"); + sb.append(" incidentCreatedTrigger: ") + .append(toIndentedString(incidentCreatedTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentImpactCreatedTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactCreatedTrigger.java new file mode 100644 index 00000000000..2b59417cbc5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactCreatedTrigger.java @@ -0,0 +1,200 @@ +/* + * 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.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; + +/** Trigger a workflow when an impact is created for an incident. */ +@JsonPropertyOrder({ + IncidentImpactCreatedTrigger.JSON_PROPERTY_EXECUTION_LIMIT, + IncidentImpactCreatedTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentImpactCreatedTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactCreatedTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTION_LIMIT = "executionLimit"; + private ExecutionLimit executionLimit; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentImpactCreatedTrigger executionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + this.unparsed |= executionLimit.unparsed; + return this; + } + + /** + * The maximum number of times to execute a workflow for an incident. + * + * @return executionLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionLimit getExecutionLimit() { + return executionLimit; + } + + public void setExecutionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + if (executionLimit != null) { + this.unparsed |= executionLimit.unparsed; + } + } + + public IncidentImpactCreatedTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentImpactCreatedTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentImpactCreatedTrigger + */ + @JsonAnySetter + public IncidentImpactCreatedTrigger 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 IncidentImpactCreatedTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactCreatedTrigger incidentImpactCreatedTrigger = (IncidentImpactCreatedTrigger) o; + return Objects.equals(this.executionLimit, incidentImpactCreatedTrigger.executionLimit) + && Objects.equals(this.incidentType, incidentImpactCreatedTrigger.incidentType) + && Objects.equals(this.tagCondition, incidentImpactCreatedTrigger.tagCondition) + && Objects.equals( + this.additionalProperties, incidentImpactCreatedTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(executionLimit, incidentType, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactCreatedTrigger {\n"); + sb.append(" executionLimit: ").append(toIndentedString(executionLimit)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentImpactCreatedTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactCreatedTriggerWrapper.java new file mode 100644 index 00000000000..e0660b63d0e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactCreatedTriggerWrapper.java @@ -0,0 +1,197 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident impact created trigger. */ +@JsonPropertyOrder({ + IncidentImpactCreatedTriggerWrapper.JSON_PROPERTY_INCIDENT_IMPACT_CREATED_TRIGGER, + IncidentImpactCreatedTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactCreatedTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_IMPACT_CREATED_TRIGGER = + "incidentImpactCreatedTrigger"; + private IncidentImpactCreatedTrigger incidentImpactCreatedTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentImpactCreatedTriggerWrapper() {} + + @JsonCreator + public IncidentImpactCreatedTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_IMPACT_CREATED_TRIGGER) + IncidentImpactCreatedTrigger incidentImpactCreatedTrigger) { + this.incidentImpactCreatedTrigger = incidentImpactCreatedTrigger; + this.unparsed |= incidentImpactCreatedTrigger.unparsed; + } + + public IncidentImpactCreatedTriggerWrapper incidentImpactCreatedTrigger( + IncidentImpactCreatedTrigger incidentImpactCreatedTrigger) { + this.incidentImpactCreatedTrigger = incidentImpactCreatedTrigger; + this.unparsed |= incidentImpactCreatedTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow when an impact is created for an incident. + * + * @return incidentImpactCreatedTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_IMPACT_CREATED_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactCreatedTrigger getIncidentImpactCreatedTrigger() { + return incidentImpactCreatedTrigger; + } + + public void setIncidentImpactCreatedTrigger( + IncidentImpactCreatedTrigger incidentImpactCreatedTrigger) { + this.incidentImpactCreatedTrigger = incidentImpactCreatedTrigger; + if (incidentImpactCreatedTrigger != null) { + this.unparsed |= incidentImpactCreatedTrigger.unparsed; + } + } + + public IncidentImpactCreatedTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentImpactCreatedTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentImpactCreatedTriggerWrapper + */ + @JsonAnySetter + public IncidentImpactCreatedTriggerWrapper 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 IncidentImpactCreatedTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactCreatedTriggerWrapper incidentImpactCreatedTriggerWrapper = + (IncidentImpactCreatedTriggerWrapper) o; + return Objects.equals( + this.incidentImpactCreatedTrigger, + incidentImpactCreatedTriggerWrapper.incidentImpactCreatedTrigger) + && Objects.equals(this.startStepNames, incidentImpactCreatedTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, incidentImpactCreatedTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentImpactCreatedTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactCreatedTriggerWrapper {\n"); + sb.append(" incidentImpactCreatedTrigger: ") + .append(toIndentedString(incidentImpactCreatedTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentImpactUpdatedTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactUpdatedTrigger.java new file mode 100644 index 00000000000..b2187a61ddd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactUpdatedTrigger.java @@ -0,0 +1,200 @@ +/* + * 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.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; + +/** Trigger a workflow when an impact is updated for an incident. */ +@JsonPropertyOrder({ + IncidentImpactUpdatedTrigger.JSON_PROPERTY_EXECUTION_LIMIT, + IncidentImpactUpdatedTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentImpactUpdatedTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactUpdatedTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTION_LIMIT = "executionLimit"; + private ExecutionLimit executionLimit; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentImpactUpdatedTrigger executionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + this.unparsed |= executionLimit.unparsed; + return this; + } + + /** + * The maximum number of times to execute a workflow for an incident. + * + * @return executionLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionLimit getExecutionLimit() { + return executionLimit; + } + + public void setExecutionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + if (executionLimit != null) { + this.unparsed |= executionLimit.unparsed; + } + } + + public IncidentImpactUpdatedTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentImpactUpdatedTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentImpactUpdatedTrigger + */ + @JsonAnySetter + public IncidentImpactUpdatedTrigger 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 IncidentImpactUpdatedTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactUpdatedTrigger incidentImpactUpdatedTrigger = (IncidentImpactUpdatedTrigger) o; + return Objects.equals(this.executionLimit, incidentImpactUpdatedTrigger.executionLimit) + && Objects.equals(this.incidentType, incidentImpactUpdatedTrigger.incidentType) + && Objects.equals(this.tagCondition, incidentImpactUpdatedTrigger.tagCondition) + && Objects.equals( + this.additionalProperties, incidentImpactUpdatedTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(executionLimit, incidentType, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactUpdatedTrigger {\n"); + sb.append(" executionLimit: ").append(toIndentedString(executionLimit)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentImpactUpdatedTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactUpdatedTriggerWrapper.java new file mode 100644 index 00000000000..12bcae1f14d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactUpdatedTriggerWrapper.java @@ -0,0 +1,197 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident impact updated trigger. */ +@JsonPropertyOrder({ + IncidentImpactUpdatedTriggerWrapper.JSON_PROPERTY_INCIDENT_IMPACT_UPDATED_TRIGGER, + IncidentImpactUpdatedTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactUpdatedTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_IMPACT_UPDATED_TRIGGER = + "incidentImpactUpdatedTrigger"; + private IncidentImpactUpdatedTrigger incidentImpactUpdatedTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentImpactUpdatedTriggerWrapper() {} + + @JsonCreator + public IncidentImpactUpdatedTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_IMPACT_UPDATED_TRIGGER) + IncidentImpactUpdatedTrigger incidentImpactUpdatedTrigger) { + this.incidentImpactUpdatedTrigger = incidentImpactUpdatedTrigger; + this.unparsed |= incidentImpactUpdatedTrigger.unparsed; + } + + public IncidentImpactUpdatedTriggerWrapper incidentImpactUpdatedTrigger( + IncidentImpactUpdatedTrigger incidentImpactUpdatedTrigger) { + this.incidentImpactUpdatedTrigger = incidentImpactUpdatedTrigger; + this.unparsed |= incidentImpactUpdatedTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow when an impact is updated for an incident. + * + * @return incidentImpactUpdatedTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_IMPACT_UPDATED_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactUpdatedTrigger getIncidentImpactUpdatedTrigger() { + return incidentImpactUpdatedTrigger; + } + + public void setIncidentImpactUpdatedTrigger( + IncidentImpactUpdatedTrigger incidentImpactUpdatedTrigger) { + this.incidentImpactUpdatedTrigger = incidentImpactUpdatedTrigger; + if (incidentImpactUpdatedTrigger != null) { + this.unparsed |= incidentImpactUpdatedTrigger.unparsed; + } + } + + public IncidentImpactUpdatedTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentImpactUpdatedTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentImpactUpdatedTriggerWrapper + */ + @JsonAnySetter + public IncidentImpactUpdatedTriggerWrapper 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 IncidentImpactUpdatedTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactUpdatedTriggerWrapper incidentImpactUpdatedTriggerWrapper = + (IncidentImpactUpdatedTriggerWrapper) o; + return Objects.equals( + this.incidentImpactUpdatedTrigger, + incidentImpactUpdatedTriggerWrapper.incidentImpactUpdatedTrigger) + && Objects.equals(this.startStepNames, incidentImpactUpdatedTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, incidentImpactUpdatedTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentImpactUpdatedTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactUpdatedTriggerWrapper {\n"); + sb.append(" incidentImpactUpdatedTrigger: ") + .append(toIndentedString(incidentImpactUpdatedTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentPostmortemUpdatedTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemUpdatedTrigger.java new file mode 100644 index 00000000000..21145ac6cee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemUpdatedTrigger.java @@ -0,0 +1,201 @@ +/* + * 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.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; + +/** Trigger a workflow when a postmortem is updated for an incident. */ +@JsonPropertyOrder({ + IncidentPostmortemUpdatedTrigger.JSON_PROPERTY_EXECUTION_LIMIT, + IncidentPostmortemUpdatedTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentPostmortemUpdatedTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPostmortemUpdatedTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTION_LIMIT = "executionLimit"; + private ExecutionLimit executionLimit; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentPostmortemUpdatedTrigger executionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + this.unparsed |= executionLimit.unparsed; + return this; + } + + /** + * The maximum number of times to execute a workflow for an incident. + * + * @return executionLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionLimit getExecutionLimit() { + return executionLimit; + } + + public void setExecutionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + if (executionLimit != null) { + this.unparsed |= executionLimit.unparsed; + } + } + + public IncidentPostmortemUpdatedTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentPostmortemUpdatedTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentPostmortemUpdatedTrigger + */ + @JsonAnySetter + public IncidentPostmortemUpdatedTrigger 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 IncidentPostmortemUpdatedTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPostmortemUpdatedTrigger incidentPostmortemUpdatedTrigger = + (IncidentPostmortemUpdatedTrigger) o; + return Objects.equals(this.executionLimit, incidentPostmortemUpdatedTrigger.executionLimit) + && Objects.equals(this.incidentType, incidentPostmortemUpdatedTrigger.incidentType) + && Objects.equals(this.tagCondition, incidentPostmortemUpdatedTrigger.tagCondition) + && Objects.equals( + this.additionalProperties, incidentPostmortemUpdatedTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(executionLimit, incidentType, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPostmortemUpdatedTrigger {\n"); + sb.append(" executionLimit: ").append(toIndentedString(executionLimit)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentPostmortemUpdatedTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemUpdatedTriggerWrapper.java new file mode 100644 index 00000000000..2466fa70e60 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemUpdatedTriggerWrapper.java @@ -0,0 +1,199 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident postmortem updated trigger. */ +@JsonPropertyOrder({ + IncidentPostmortemUpdatedTriggerWrapper.JSON_PROPERTY_INCIDENT_POSTMORTEM_UPDATED_TRIGGER, + IncidentPostmortemUpdatedTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPostmortemUpdatedTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_POSTMORTEM_UPDATED_TRIGGER = + "incidentPostmortemUpdatedTrigger"; + private IncidentPostmortemUpdatedTrigger incidentPostmortemUpdatedTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentPostmortemUpdatedTriggerWrapper() {} + + @JsonCreator + public IncidentPostmortemUpdatedTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_POSTMORTEM_UPDATED_TRIGGER) + IncidentPostmortemUpdatedTrigger incidentPostmortemUpdatedTrigger) { + this.incidentPostmortemUpdatedTrigger = incidentPostmortemUpdatedTrigger; + this.unparsed |= incidentPostmortemUpdatedTrigger.unparsed; + } + + public IncidentPostmortemUpdatedTriggerWrapper incidentPostmortemUpdatedTrigger( + IncidentPostmortemUpdatedTrigger incidentPostmortemUpdatedTrigger) { + this.incidentPostmortemUpdatedTrigger = incidentPostmortemUpdatedTrigger; + this.unparsed |= incidentPostmortemUpdatedTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow when a postmortem is updated for an incident. + * + * @return incidentPostmortemUpdatedTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_POSTMORTEM_UPDATED_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPostmortemUpdatedTrigger getIncidentPostmortemUpdatedTrigger() { + return incidentPostmortemUpdatedTrigger; + } + + public void setIncidentPostmortemUpdatedTrigger( + IncidentPostmortemUpdatedTrigger incidentPostmortemUpdatedTrigger) { + this.incidentPostmortemUpdatedTrigger = incidentPostmortemUpdatedTrigger; + if (incidentPostmortemUpdatedTrigger != null) { + this.unparsed |= incidentPostmortemUpdatedTrigger.unparsed; + } + } + + public IncidentPostmortemUpdatedTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentPostmortemUpdatedTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentPostmortemUpdatedTriggerWrapper + */ + @JsonAnySetter + public IncidentPostmortemUpdatedTriggerWrapper 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 IncidentPostmortemUpdatedTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPostmortemUpdatedTriggerWrapper incidentPostmortemUpdatedTriggerWrapper = + (IncidentPostmortemUpdatedTriggerWrapper) o; + return Objects.equals( + this.incidentPostmortemUpdatedTrigger, + incidentPostmortemUpdatedTriggerWrapper.incidentPostmortemUpdatedTrigger) + && Objects.equals( + this.startStepNames, incidentPostmortemUpdatedTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, + incidentPostmortemUpdatedTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentPostmortemUpdatedTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPostmortemUpdatedTriggerWrapper {\n"); + sb.append(" incidentPostmortemUpdatedTrigger: ") + .append(toIndentedString(incidentPostmortemUpdatedTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentResponderCreatedTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderCreatedTrigger.java new file mode 100644 index 00000000000..59f7baf3254 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderCreatedTrigger.java @@ -0,0 +1,201 @@ +/* + * 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.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; + +/** Trigger a workflow when a responder is created for an incident. */ +@JsonPropertyOrder({ + IncidentResponderCreatedTrigger.JSON_PROPERTY_EXECUTION_LIMIT, + IncidentResponderCreatedTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentResponderCreatedTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderCreatedTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTION_LIMIT = "executionLimit"; + private ExecutionLimit executionLimit; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentResponderCreatedTrigger executionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + this.unparsed |= executionLimit.unparsed; + return this; + } + + /** + * The maximum number of times to execute a workflow for an incident. + * + * @return executionLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionLimit getExecutionLimit() { + return executionLimit; + } + + public void setExecutionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + if (executionLimit != null) { + this.unparsed |= executionLimit.unparsed; + } + } + + public IncidentResponderCreatedTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentResponderCreatedTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentResponderCreatedTrigger + */ + @JsonAnySetter + public IncidentResponderCreatedTrigger 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 IncidentResponderCreatedTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderCreatedTrigger incidentResponderCreatedTrigger = + (IncidentResponderCreatedTrigger) o; + return Objects.equals(this.executionLimit, incidentResponderCreatedTrigger.executionLimit) + && Objects.equals(this.incidentType, incidentResponderCreatedTrigger.incidentType) + && Objects.equals(this.tagCondition, incidentResponderCreatedTrigger.tagCondition) + && Objects.equals( + this.additionalProperties, incidentResponderCreatedTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(executionLimit, incidentType, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderCreatedTrigger {\n"); + sb.append(" executionLimit: ").append(toIndentedString(executionLimit)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentResponderCreatedTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderCreatedTriggerWrapper.java new file mode 100644 index 00000000000..9ec0385a19f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderCreatedTriggerWrapper.java @@ -0,0 +1,198 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident responder created trigger. */ +@JsonPropertyOrder({ + IncidentResponderCreatedTriggerWrapper.JSON_PROPERTY_INCIDENT_RESPONDER_CREATED_TRIGGER, + IncidentResponderCreatedTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderCreatedTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_RESPONDER_CREATED_TRIGGER = + "incidentResponderCreatedTrigger"; + private IncidentResponderCreatedTrigger incidentResponderCreatedTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentResponderCreatedTriggerWrapper() {} + + @JsonCreator + public IncidentResponderCreatedTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_RESPONDER_CREATED_TRIGGER) + IncidentResponderCreatedTrigger incidentResponderCreatedTrigger) { + this.incidentResponderCreatedTrigger = incidentResponderCreatedTrigger; + this.unparsed |= incidentResponderCreatedTrigger.unparsed; + } + + public IncidentResponderCreatedTriggerWrapper incidentResponderCreatedTrigger( + IncidentResponderCreatedTrigger incidentResponderCreatedTrigger) { + this.incidentResponderCreatedTrigger = incidentResponderCreatedTrigger; + this.unparsed |= incidentResponderCreatedTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow when a responder is created for an incident. + * + * @return incidentResponderCreatedTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_RESPONDER_CREATED_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderCreatedTrigger getIncidentResponderCreatedTrigger() { + return incidentResponderCreatedTrigger; + } + + public void setIncidentResponderCreatedTrigger( + IncidentResponderCreatedTrigger incidentResponderCreatedTrigger) { + this.incidentResponderCreatedTrigger = incidentResponderCreatedTrigger; + if (incidentResponderCreatedTrigger != null) { + this.unparsed |= incidentResponderCreatedTrigger.unparsed; + } + } + + public IncidentResponderCreatedTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentResponderCreatedTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentResponderCreatedTriggerWrapper + */ + @JsonAnySetter + public IncidentResponderCreatedTriggerWrapper 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 IncidentResponderCreatedTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderCreatedTriggerWrapper incidentResponderCreatedTriggerWrapper = + (IncidentResponderCreatedTriggerWrapper) o; + return Objects.equals( + this.incidentResponderCreatedTrigger, + incidentResponderCreatedTriggerWrapper.incidentResponderCreatedTrigger) + && Objects.equals( + this.startStepNames, incidentResponderCreatedTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, incidentResponderCreatedTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentResponderCreatedTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderCreatedTriggerWrapper {\n"); + sb.append(" incidentResponderCreatedTrigger: ") + .append(toIndentedString(incidentResponderCreatedTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentSavedTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSavedTrigger.java new file mode 100644 index 00000000000..8dd043d0cc7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSavedTrigger.java @@ -0,0 +1,231 @@ +/* + * 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.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; + +/** Trigger a workflow when an incident is declared or updated. */ +@JsonPropertyOrder({ + IncidentSavedTrigger.JSON_PROPERTY_EXECUTION_LIMIT, + IncidentSavedTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentSavedTrigger.JSON_PROPERTY_SERIAL_EXECUTION, + IncidentSavedTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentSavedTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTION_LIMIT = "executionLimit"; + private ExecutionLimit executionLimit; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_SERIAL_EXECUTION = "serialExecution"; + private SerialExecution serialExecution; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentSavedTrigger executionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + this.unparsed |= executionLimit.unparsed; + return this; + } + + /** + * The maximum number of times to execute a workflow for an incident. + * + * @return executionLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionLimit getExecutionLimit() { + return executionLimit; + } + + public void setExecutionLimit(ExecutionLimit executionLimit) { + this.executionLimit = executionLimit; + if (executionLimit != null) { + this.unparsed |= executionLimit.unparsed; + } + } + + public IncidentSavedTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentSavedTrigger serialExecution(SerialExecution serialExecution) { + this.serialExecution = serialExecution; + this.unparsed |= serialExecution.unparsed; + return this; + } + + /** + * Whether to execute the workflow serially for an incident. + * + * @return serialExecution + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERIAL_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SerialExecution getSerialExecution() { + return serialExecution; + } + + public void setSerialExecution(SerialExecution serialExecution) { + this.serialExecution = serialExecution; + if (serialExecution != null) { + this.unparsed |= serialExecution.unparsed; + } + } + + public IncidentSavedTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentSavedTrigger + */ + @JsonAnySetter + public IncidentSavedTrigger 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 IncidentSavedTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentSavedTrigger incidentSavedTrigger = (IncidentSavedTrigger) o; + return Objects.equals(this.executionLimit, incidentSavedTrigger.executionLimit) + && Objects.equals(this.incidentType, incidentSavedTrigger.incidentType) + && Objects.equals(this.serialExecution, incidentSavedTrigger.serialExecution) + && Objects.equals(this.tagCondition, incidentSavedTrigger.tagCondition) + && Objects.equals(this.additionalProperties, incidentSavedTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + executionLimit, incidentType, serialExecution, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentSavedTrigger {\n"); + sb.append(" executionLimit: ").append(toIndentedString(executionLimit)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" serialExecution: ").append(toIndentedString(serialExecution)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentSavedTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSavedTriggerWrapper.java new file mode 100644 index 00000000000..a88e310d492 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSavedTriggerWrapper.java @@ -0,0 +1,193 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident declared or updated trigger. */ +@JsonPropertyOrder({ + IncidentSavedTriggerWrapper.JSON_PROPERTY_INCIDENT_SAVED_TRIGGER, + IncidentSavedTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentSavedTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_SAVED_TRIGGER = "incidentSavedTrigger"; + private IncidentSavedTrigger incidentSavedTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentSavedTriggerWrapper() {} + + @JsonCreator + public IncidentSavedTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_SAVED_TRIGGER) + IncidentSavedTrigger incidentSavedTrigger) { + this.incidentSavedTrigger = incidentSavedTrigger; + this.unparsed |= incidentSavedTrigger.unparsed; + } + + public IncidentSavedTriggerWrapper incidentSavedTrigger( + IncidentSavedTrigger incidentSavedTrigger) { + this.incidentSavedTrigger = incidentSavedTrigger; + this.unparsed |= incidentSavedTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow when an incident is declared or updated. + * + * @return incidentSavedTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_SAVED_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentSavedTrigger getIncidentSavedTrigger() { + return incidentSavedTrigger; + } + + public void setIncidentSavedTrigger(IncidentSavedTrigger incidentSavedTrigger) { + this.incidentSavedTrigger = incidentSavedTrigger; + if (incidentSavedTrigger != null) { + this.unparsed |= incidentSavedTrigger.unparsed; + } + } + + public IncidentSavedTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentSavedTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentSavedTriggerWrapper + */ + @JsonAnySetter + public IncidentSavedTriggerWrapper 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 IncidentSavedTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentSavedTriggerWrapper incidentSavedTriggerWrapper = (IncidentSavedTriggerWrapper) o; + return Objects.equals( + this.incidentSavedTrigger, incidentSavedTriggerWrapper.incidentSavedTrigger) + && Objects.equals(this.startStepNames, incidentSavedTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, incidentSavedTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentSavedTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentSavedTriggerWrapper {\n"); + sb.append(" incidentSavedTrigger: ") + .append(toIndentedString(incidentSavedTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentScheduleTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTrigger.java new file mode 100644 index 00000000000..4b84b57ac96 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTrigger.java @@ -0,0 +1,203 @@ +/* + * 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; + +/** Trigger a workflow on a schedule for an incident. */ +@JsonPropertyOrder({ + IncidentScheduleTrigger.JSON_PROPERTY_INCIDENT_TYPE, + IncidentScheduleTrigger.JSON_PROPERTY_RRULE, + IncidentScheduleTrigger.JSON_PROPERTY_TAG_CONDITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentScheduleTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incidentType"; + private String incidentType; + + public static final String JSON_PROPERTY_RRULE = "rrule"; + private String rrule; + + public static final String JSON_PROPERTY_TAG_CONDITION = "tagCondition"; + private IncidentCondition tagCondition; + + public IncidentScheduleTrigger() {} + + @JsonCreator + public IncidentScheduleTrigger( + @JsonProperty(required = true, value = JSON_PROPERTY_RRULE) String rrule) { + this.rrule = rrule; + } + + public IncidentScheduleTrigger incidentType(String incidentType) { + this.incidentType = incidentType; + return this; + } + + /** + * The type of incident that triggers the workflow. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentType() { + return incidentType; + } + + public void setIncidentType(String incidentType) { + this.incidentType = incidentType; + } + + public IncidentScheduleTrigger rrule(String rrule) { + this.rrule = rrule; + return this; + } + + /** + * The recurrence rule for the schedule, expressed as an iCalendar RRULE string. + * + * @return rrule + */ + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRrule() { + return rrule; + } + + public void setRrule(String rrule) { + this.rrule = rrule; + } + + public IncidentScheduleTrigger tagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + this.unparsed |= tagCondition.unparsed; + return this; + } + + /** + * Conditions that determine which incidents trigger the workflow. + * + * @return tagCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCondition getTagCondition() { + return tagCondition; + } + + public void setTagCondition(IncidentCondition tagCondition) { + this.tagCondition = tagCondition; + if (tagCondition != null) { + this.unparsed |= tagCondition.unparsed; + } + } + + /** + * 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 IncidentScheduleTrigger + */ + @JsonAnySetter + public IncidentScheduleTrigger 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 IncidentScheduleTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentScheduleTrigger incidentScheduleTrigger = (IncidentScheduleTrigger) o; + return Objects.equals(this.incidentType, incidentScheduleTrigger.incidentType) + && Objects.equals(this.rrule, incidentScheduleTrigger.rrule) + && Objects.equals(this.tagCondition, incidentScheduleTrigger.tagCondition) + && Objects.equals(this.additionalProperties, incidentScheduleTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, rrule, tagCondition, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentScheduleTrigger {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); + sb.append(" tagCondition: ").append(toIndentedString(tagCondition)).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/IncidentScheduleTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTriggerWrapper.java new file mode 100644 index 00000000000..1c8c3a340e6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTriggerWrapper.java @@ -0,0 +1,194 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schema for an incident schedule trigger. */ +@JsonPropertyOrder({ + IncidentScheduleTriggerWrapper.JSON_PROPERTY_INCIDENT_SCHEDULE_TRIGGER, + IncidentScheduleTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentScheduleTriggerWrapper { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_SCHEDULE_TRIGGER = "incidentScheduleTrigger"; + private IncidentScheduleTrigger incidentScheduleTrigger; + + public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; + private List startStepNames = null; + + public IncidentScheduleTriggerWrapper() {} + + @JsonCreator + public IncidentScheduleTriggerWrapper( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_SCHEDULE_TRIGGER) + IncidentScheduleTrigger incidentScheduleTrigger) { + this.incidentScheduleTrigger = incidentScheduleTrigger; + this.unparsed |= incidentScheduleTrigger.unparsed; + } + + public IncidentScheduleTriggerWrapper incidentScheduleTrigger( + IncidentScheduleTrigger incidentScheduleTrigger) { + this.incidentScheduleTrigger = incidentScheduleTrigger; + this.unparsed |= incidentScheduleTrigger.unparsed; + return this; + } + + /** + * Trigger a workflow on a schedule for an incident. + * + * @return incidentScheduleTrigger + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_SCHEDULE_TRIGGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentScheduleTrigger getIncidentScheduleTrigger() { + return incidentScheduleTrigger; + } + + public void setIncidentScheduleTrigger(IncidentScheduleTrigger incidentScheduleTrigger) { + this.incidentScheduleTrigger = incidentScheduleTrigger; + if (incidentScheduleTrigger != null) { + this.unparsed |= incidentScheduleTrigger.unparsed; + } + } + + public IncidentScheduleTriggerWrapper startStepNames(List startStepNames) { + this.startStepNames = startStepNames; + return this; + } + + public IncidentScheduleTriggerWrapper addStartStepNamesItem(String startStepNamesItem) { + if (this.startStepNames == null) { + this.startStepNames = new ArrayList<>(); + } + this.startStepNames.add(startStepNamesItem); + return this; + } + + /** + * Names of existing workflow steps that run first after a trigger fires. + * + * @return startStepNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_STEP_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStartStepNames() { + return startStepNames; + } + + public void setStartStepNames(List startStepNames) { + this.startStepNames = startStepNames; + } + + /** + * 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 IncidentScheduleTriggerWrapper + */ + @JsonAnySetter + public IncidentScheduleTriggerWrapper 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 IncidentScheduleTriggerWrapper object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentScheduleTriggerWrapper incidentScheduleTriggerWrapper = + (IncidentScheduleTriggerWrapper) o; + return Objects.equals( + this.incidentScheduleTrigger, incidentScheduleTriggerWrapper.incidentScheduleTrigger) + && Objects.equals(this.startStepNames, incidentScheduleTriggerWrapper.startStepNames) + && Objects.equals( + this.additionalProperties, incidentScheduleTriggerWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentScheduleTrigger, startStepNames, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentScheduleTriggerWrapper {\n"); + sb.append(" incidentScheduleTrigger: ") + .append(toIndentedString(incidentScheduleTrigger)) + .append("\n"); + sb.append(" startStepNames: ").append(toIndentedString(startStepNames)).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/IncidentTagValue.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTagValue.java new file mode 100644 index 00000000000..e0e5ac10119 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTagValue.java @@ -0,0 +1,177 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** An incident tag and its accepted values. */ +@JsonPropertyOrder({IncidentTagValue.JSON_PROPERTY_TAG, IncidentTagValue.JSON_PROPERTY_VALUES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTagValue { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public IncidentTagValue() {} + + @JsonCreator + public IncidentTagValue( + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { + this.tag = tag; + this.values = values; + } + + public IncidentTagValue tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The incident tag to match. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public IncidentTagValue values(List values) { + this.values = values; + return this; + } + + public IncidentTagValue addValuesItem(String valuesItem) { + this.values.add(valuesItem); + return this; + } + + /** + * The accepted values for the incident tag. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * 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 IncidentTagValue + */ + @JsonAnySetter + public IncidentTagValue 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 IncidentTagValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTagValue incidentTagValue = (IncidentTagValue) o; + return Objects.equals(this.tag, incidentTagValue.tag) + && Objects.equals(this.values, incidentTagValue.values) + && Objects.equals(this.additionalProperties, incidentTagValue.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tag, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTagValue {\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).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/IncidentTrigger.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTrigger.java index 0eb307bda48..b78e0b76a93 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTrigger.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTrigger.java @@ -17,10 +17,13 @@ import java.util.Objects; /** - * Trigger a workflow from an Incident. For automatic triggering a handle must be configured and the + * Trigger a workflow from an incident. For automatic triggering a handle must be configured and the * workflow must be published. */ -@JsonPropertyOrder({IncidentTrigger.JSON_PROPERTY_RATE_LIMIT}) +@JsonPropertyOrder({ + IncidentTrigger.JSON_PROPERTY_RATE_LIMIT, + IncidentTrigger.JSON_PROPERTY_VERSION +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTrigger { @@ -28,6 +31,9 @@ public class IncidentTrigger { public static final String JSON_PROPERTY_RATE_LIMIT = "rateLimit"; private TriggerRateLimit rateLimit; + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + public IncidentTrigger rateLimit(TriggerRateLimit rateLimit) { this.rateLimit = rateLimit; this.unparsed |= rateLimit.unparsed; @@ -53,6 +59,27 @@ public void setRateLimit(TriggerRateLimit rateLimit) { } } + public IncidentTrigger version(String version) { + this.version = version; + return this; + } + + /** + * Version of the incident manual trigger. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -110,12 +137,13 @@ public boolean equals(Object o) { } IncidentTrigger incidentTrigger = (IncidentTrigger) o; return Objects.equals(this.rateLimit, incidentTrigger.rateLimit) + && Objects.equals(this.version, incidentTrigger.version) && Objects.equals(this.additionalProperties, incidentTrigger.additionalProperties); } @Override public int hashCode() { - return Objects.hash(rateLimit, additionalProperties); + return Objects.hash(rateLimit, version, additionalProperties); } @Override @@ -123,6 +151,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IncidentTrigger {\n"); sb.append(" rateLimit: ").append(toIndentedString(rateLimit)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTriggerWrapper.java index b799aa8bf5e..1d4e06852c7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTriggerWrapper.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTriggerWrapper.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** Schema for an Incident-based trigger. */ +/** Schema for an incident-based trigger. */ @JsonPropertyOrder({ IncidentTriggerWrapper.JSON_PROPERTY_INCIDENT_TRIGGER, IncidentTriggerWrapper.JSON_PROPERTY_START_STEP_NAMES @@ -51,7 +51,7 @@ public IncidentTriggerWrapper incidentTrigger(IncidentTrigger incidentTrigger) { } /** - * Trigger a workflow from an Incident. For automatic triggering a handle must be configured and + * Trigger a workflow from an incident. For automatic triggering a handle must be configured and * the workflow must be published. * * @return incidentTrigger diff --git a/src/main/java/com/datadog/api/client/v2/model/SerialExecution.java b/src/main/java/com/datadog/api/client/v2/model/SerialExecution.java new file mode 100644 index 00000000000..987c27a7e73 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SerialExecution.java @@ -0,0 +1,143 @@ +/* + * 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; + +/** Whether to execute the workflow serially for an incident. */ +@JsonPropertyOrder({SerialExecution.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SerialExecution { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public SerialExecution() {} + + @JsonCreator + public SerialExecution( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled) { + this.enabled = enabled; + } + + public SerialExecution enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether serial execution is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * 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 SerialExecution + */ + @JsonAnySetter + public SerialExecution 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 SerialExecution object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SerialExecution serialExecution = (SerialExecution) o; + return Objects.equals(this.enabled, serialExecution.enabled) + && Objects.equals(this.additionalProperties, serialExecution.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SerialExecution {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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/SlackReactionConfig.java b/src/main/java/com/datadog/api/client/v2/model/SlackReactionConfig.java new file mode 100644 index 00000000000..343bc3d5681 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SlackReactionConfig.java @@ -0,0 +1,173 @@ +/* + * 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; + +/** Configuration for a Slack emoji reaction trigger. */ +@JsonPropertyOrder({ + SlackReactionConfig.JSON_PROPERTY_REACTION_EMOJI, + SlackReactionConfig.JSON_PROPERTY_TEAM_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SlackReactionConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_REACTION_EMOJI = "reactionEmoji"; + private String reactionEmoji; + + public static final String JSON_PROPERTY_TEAM_ID = "teamId"; + private String teamId; + + public SlackReactionConfig() {} + + @JsonCreator + public SlackReactionConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_REACTION_EMOJI) String reactionEmoji, + @JsonProperty(required = true, value = JSON_PROPERTY_TEAM_ID) String teamId) { + this.reactionEmoji = reactionEmoji; + this.teamId = teamId; + } + + public SlackReactionConfig reactionEmoji(String reactionEmoji) { + this.reactionEmoji = reactionEmoji; + return this; + } + + /** + * The Slack emoji reaction name. + * + * @return reactionEmoji + */ + @JsonProperty(JSON_PROPERTY_REACTION_EMOJI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getReactionEmoji() { + return reactionEmoji; + } + + public void setReactionEmoji(String reactionEmoji) { + this.reactionEmoji = reactionEmoji; + } + + public SlackReactionConfig teamId(String teamId) { + this.teamId = teamId; + return this; + } + + /** + * The Slack workspace ID. + * + * @return teamId + */ + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTeamId() { + return teamId; + } + + public void setTeamId(String teamId) { + this.teamId = teamId; + } + + /** + * 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 SlackReactionConfig + */ + @JsonAnySetter + public SlackReactionConfig 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 SlackReactionConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SlackReactionConfig slackReactionConfig = (SlackReactionConfig) o; + return Objects.equals(this.reactionEmoji, slackReactionConfig.reactionEmoji) + && Objects.equals(this.teamId, slackReactionConfig.teamId) + && Objects.equals(this.additionalProperties, slackReactionConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reactionEmoji, teamId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SlackReactionConfig {\n"); + sb.append(" reactionEmoji: ").append(toIndentedString(reactionEmoji)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).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/SlackTrigger.java b/src/main/java/com/datadog/api/client/v2/model/SlackTrigger.java new file mode 100644 index 00000000000..9f3bd1e2db2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SlackTrigger.java @@ -0,0 +1,156 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Trigger a workflow from Slack. The workflow must be published. */ +@JsonPropertyOrder({SlackTrigger.JSON_PROPERTY_REACTION_TRIGGERS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SlackTrigger { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_REACTION_TRIGGERS = "reactionTriggers"; + private List reactionTriggers = null; + + public SlackTrigger reactionTriggers(List reactionTriggers) { + this.reactionTriggers = reactionTriggers; + if (reactionTriggers != null) { + for (SlackReactionConfig item : reactionTriggers) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public SlackTrigger addReactionTriggersItem(SlackReactionConfig reactionTriggersItem) { + if (this.reactionTriggers == null) { + this.reactionTriggers = new ArrayList<>(); + } + this.reactionTriggers.add(reactionTriggersItem); + this.unparsed |= reactionTriggersItem.unparsed; + return this; + } + + /** + * Slack emoji reactions that trigger the workflow. + * + * @return reactionTriggers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REACTION_TRIGGERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReactionTriggers() { + return reactionTriggers; + } + + public void setReactionTriggers(List reactionTriggers) { + this.reactionTriggers = reactionTriggers; + if (reactionTriggers != null) { + for (SlackReactionConfig item : reactionTriggers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 SlackTrigger + */ + @JsonAnySetter + public SlackTrigger 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 SlackTrigger object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SlackTrigger slackTrigger = (SlackTrigger) o; + return Objects.equals(this.reactionTriggers, slackTrigger.reactionTriggers) + && Objects.equals(this.additionalProperties, slackTrigger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reactionTriggers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SlackTrigger {\n"); + sb.append(" reactionTriggers: ").append(toIndentedString(reactionTriggers)).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/SlackTriggerWrapper.java b/src/main/java/com/datadog/api/client/v2/model/SlackTriggerWrapper.java index 2187fa0d2c7..418f610aad9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SlackTriggerWrapper.java +++ b/src/main/java/com/datadog/api/client/v2/model/SlackTriggerWrapper.java @@ -29,7 +29,7 @@ public class SlackTriggerWrapper { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_SLACK_TRIGGER = "slackTrigger"; - private Object slackTrigger; + private SlackTrigger slackTrigger; public static final String JSON_PROPERTY_START_STEP_NAMES = "startStepNames"; private List startStepNames = null; @@ -38,12 +38,15 @@ public SlackTriggerWrapper() {} @JsonCreator public SlackTriggerWrapper( - @JsonProperty(required = true, value = JSON_PROPERTY_SLACK_TRIGGER) Object slackTrigger) { + @JsonProperty(required = true, value = JSON_PROPERTY_SLACK_TRIGGER) + SlackTrigger slackTrigger) { this.slackTrigger = slackTrigger; + this.unparsed |= slackTrigger.unparsed; } - public SlackTriggerWrapper slackTrigger(Object slackTrigger) { + public SlackTriggerWrapper slackTrigger(SlackTrigger slackTrigger) { this.slackTrigger = slackTrigger; + this.unparsed |= slackTrigger.unparsed; return this; } @@ -54,12 +57,15 @@ public SlackTriggerWrapper slackTrigger(Object slackTrigger) { */ @JsonProperty(JSON_PROPERTY_SLACK_TRIGGER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Object getSlackTrigger() { + public SlackTrigger getSlackTrigger() { return slackTrigger; } - public void setSlackTrigger(Object slackTrigger) { + public void setSlackTrigger(SlackTrigger slackTrigger) { this.slackTrigger = slackTrigger; + if (slackTrigger != null) { + this.unparsed |= slackTrigger.unparsed; + } } public SlackTriggerWrapper startStepNames(List startStepNames) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Trigger.java b/src/main/java/com/datadog/api/client/v2/model/Trigger.java index b817e2d472b..ba008d502fc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Trigger.java +++ b/src/main/java/com/datadog/api/client/v2/model/Trigger.java @@ -523,6 +523,340 @@ public Trigger deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'GithubWebhookTriggerWrapper'", e); } + // deserialize IncidentCreatedTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentCreatedTriggerWrapper.class.equals(Integer.class) + || IncidentCreatedTriggerWrapper.class.equals(Long.class) + || IncidentCreatedTriggerWrapper.class.equals(Float.class) + || IncidentCreatedTriggerWrapper.class.equals(Double.class) + || IncidentCreatedTriggerWrapper.class.equals(Boolean.class) + || IncidentCreatedTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentCreatedTriggerWrapper.class.equals(Integer.class) + || IncidentCreatedTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentCreatedTriggerWrapper.class.equals(Float.class) + || IncidentCreatedTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentCreatedTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentCreatedTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentCreatedTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentCreatedTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentCreatedTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentCreatedTriggerWrapper'", e); + } + + // deserialize IncidentImpactCreatedTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentImpactCreatedTriggerWrapper.class.equals(Integer.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(Long.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(Float.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(Double.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(Boolean.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentImpactCreatedTriggerWrapper.class.equals(Integer.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentImpactCreatedTriggerWrapper.class.equals(Float.class) + || IncidentImpactCreatedTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentImpactCreatedTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentImpactCreatedTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentImpactCreatedTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentImpactCreatedTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentImpactCreatedTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IncidentImpactCreatedTriggerWrapper'", + e); + } + + // deserialize IncidentImpactUpdatedTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentImpactUpdatedTriggerWrapper.class.equals(Integer.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(Long.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(Float.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(Double.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(Boolean.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentImpactUpdatedTriggerWrapper.class.equals(Integer.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentImpactUpdatedTriggerWrapper.class.equals(Float.class) + || IncidentImpactUpdatedTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentImpactUpdatedTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentImpactUpdatedTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentImpactUpdatedTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentImpactUpdatedTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentImpactUpdatedTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IncidentImpactUpdatedTriggerWrapper'", + e); + } + + // deserialize IncidentPostmortemUpdatedTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentPostmortemUpdatedTriggerWrapper.class.equals(Integer.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(Long.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(Float.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(Double.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(Boolean.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentPostmortemUpdatedTriggerWrapper.class.equals(Integer.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentPostmortemUpdatedTriggerWrapper.class.equals(Float.class) + || IncidentPostmortemUpdatedTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentPostmortemUpdatedTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentPostmortemUpdatedTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(IncidentPostmortemUpdatedTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentPostmortemUpdatedTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, "Input data matches schema 'IncidentPostmortemUpdatedTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IncidentPostmortemUpdatedTriggerWrapper'", + e); + } + + // deserialize IncidentResponderCreatedTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentResponderCreatedTriggerWrapper.class.equals(Integer.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(Long.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(Float.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(Double.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(Boolean.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentResponderCreatedTriggerWrapper.class.equals(Integer.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentResponderCreatedTriggerWrapper.class.equals(Float.class) + || IncidentResponderCreatedTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentResponderCreatedTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentResponderCreatedTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(IncidentResponderCreatedTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentResponderCreatedTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, "Input data matches schema 'IncidentResponderCreatedTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IncidentResponderCreatedTriggerWrapper'", + e); + } + + // deserialize IncidentSavedTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentSavedTriggerWrapper.class.equals(Integer.class) + || IncidentSavedTriggerWrapper.class.equals(Long.class) + || IncidentSavedTriggerWrapper.class.equals(Float.class) + || IncidentSavedTriggerWrapper.class.equals(Double.class) + || IncidentSavedTriggerWrapper.class.equals(Boolean.class) + || IncidentSavedTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentSavedTriggerWrapper.class.equals(Integer.class) + || IncidentSavedTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentSavedTriggerWrapper.class.equals(Float.class) + || IncidentSavedTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentSavedTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentSavedTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentSavedTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentSavedTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentSavedTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentSavedTriggerWrapper'", e); + } + + // deserialize IncidentScheduleTriggerWrapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentScheduleTriggerWrapper.class.equals(Integer.class) + || IncidentScheduleTriggerWrapper.class.equals(Long.class) + || IncidentScheduleTriggerWrapper.class.equals(Float.class) + || IncidentScheduleTriggerWrapper.class.equals(Double.class) + || IncidentScheduleTriggerWrapper.class.equals(Boolean.class) + || IncidentScheduleTriggerWrapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentScheduleTriggerWrapper.class.equals(Integer.class) + || IncidentScheduleTriggerWrapper.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentScheduleTriggerWrapper.class.equals(Float.class) + || IncidentScheduleTriggerWrapper.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentScheduleTriggerWrapper.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentScheduleTriggerWrapper.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentScheduleTriggerWrapper.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentScheduleTriggerWrapper) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentScheduleTriggerWrapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, "Input data does not match schema 'IncidentScheduleTriggerWrapper'", e); + } + // deserialize IncidentTriggerWrapper try { boolean attemptParsing = true; @@ -1050,6 +1384,41 @@ public Trigger(GithubWebhookTriggerWrapper o) { setActualInstance(o); } + public Trigger(IncidentCreatedTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Trigger(IncidentImpactCreatedTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Trigger(IncidentImpactUpdatedTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Trigger(IncidentPostmortemUpdatedTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Trigger(IncidentResponderCreatedTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Trigger(IncidentSavedTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Trigger(IncidentScheduleTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public Trigger(IncidentTriggerWrapper o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1112,6 +1481,23 @@ public Trigger(WorkflowTriggerWrapper o) { schemas.put("DashboardTriggerWrapper", new GenericType() {}); schemas.put("FormTriggerWrapper", new GenericType() {}); schemas.put("GithubWebhookTriggerWrapper", new GenericType() {}); + schemas.put( + "IncidentCreatedTriggerWrapper", new GenericType() {}); + schemas.put( + "IncidentImpactCreatedTriggerWrapper", + new GenericType() {}); + schemas.put( + "IncidentImpactUpdatedTriggerWrapper", + new GenericType() {}); + schemas.put( + "IncidentPostmortemUpdatedTriggerWrapper", + new GenericType() {}); + schemas.put( + "IncidentResponderCreatedTriggerWrapper", + new GenericType() {}); + schemas.put("IncidentSavedTriggerWrapper", new GenericType() {}); + schemas.put( + "IncidentScheduleTriggerWrapper", new GenericType() {}); schemas.put("IncidentTriggerWrapper", new GenericType() {}); schemas.put("MonitorTriggerWrapper", new GenericType() {}); schemas.put("NotebookTriggerWrapper", new GenericType() {}); @@ -1136,10 +1522,13 @@ public Map getSchemas() { * against the oneOf child schemas: AgentTriggerWrapper, APITriggerWrapper, AppTriggerWrapper, * CaseTriggerWrapper, ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper, * DatastoreTriggerWrapper, DashboardTriggerWrapper, FormTriggerWrapper, - * GithubWebhookTriggerWrapper, IncidentTriggerWrapper, MonitorTriggerWrapper, - * NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, SecurityTriggerWrapper, - * SelfServiceTriggerWrapper, SlackTriggerWrapper, SoftwareCatalogTriggerWrapper, - * WorkflowTriggerWrapper + * GithubWebhookTriggerWrapper, IncidentCreatedTriggerWrapper, + * IncidentImpactCreatedTriggerWrapper, IncidentImpactUpdatedTriggerWrapper, + * IncidentPostmortemUpdatedTriggerWrapper, IncidentResponderCreatedTriggerWrapper, + * IncidentSavedTriggerWrapper, IncidentScheduleTriggerWrapper, IncidentTriggerWrapper, + * MonitorTriggerWrapper, NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, + * SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper, + * SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -1187,6 +1576,39 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(IncidentCreatedTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IncidentImpactCreatedTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IncidentImpactUpdatedTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IncidentPostmortemUpdatedTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IncidentResponderCreatedTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(IncidentSavedTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IncidentScheduleTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(IncidentTriggerWrapper.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1236,28 +1658,38 @@ public void setActualInstance(Object instance) { "Invalid instance type. Must be AgentTriggerWrapper, APITriggerWrapper, AppTriggerWrapper," + " CaseTriggerWrapper, ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper," + " DatastoreTriggerWrapper, DashboardTriggerWrapper, FormTriggerWrapper," - + " GithubWebhookTriggerWrapper, IncidentTriggerWrapper, MonitorTriggerWrapper," - + " NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper," - + " SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper," - + " SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper"); + + " GithubWebhookTriggerWrapper, IncidentCreatedTriggerWrapper," + + " IncidentImpactCreatedTriggerWrapper, IncidentImpactUpdatedTriggerWrapper," + + " IncidentPostmortemUpdatedTriggerWrapper, IncidentResponderCreatedTriggerWrapper," + + " IncidentSavedTriggerWrapper, IncidentScheduleTriggerWrapper," + + " IncidentTriggerWrapper, MonitorTriggerWrapper, NotebookTriggerWrapper," + + " OnCallTriggerWrapper, ScheduleTriggerWrapper, SecurityTriggerWrapper," + + " SelfServiceTriggerWrapper, SlackTriggerWrapper, SoftwareCatalogTriggerWrapper," + + " WorkflowTriggerWrapper"); } /** * Get the actual instance, which can be the following: AgentTriggerWrapper, APITriggerWrapper, * AppTriggerWrapper, CaseTriggerWrapper, ChangeEventTriggerWrapper, * DatabaseMonitoringTriggerWrapper, DatastoreTriggerWrapper, DashboardTriggerWrapper, - * FormTriggerWrapper, GithubWebhookTriggerWrapper, IncidentTriggerWrapper, MonitorTriggerWrapper, - * NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, SecurityTriggerWrapper, - * SelfServiceTriggerWrapper, SlackTriggerWrapper, SoftwareCatalogTriggerWrapper, - * WorkflowTriggerWrapper + * FormTriggerWrapper, GithubWebhookTriggerWrapper, IncidentCreatedTriggerWrapper, + * IncidentImpactCreatedTriggerWrapper, IncidentImpactUpdatedTriggerWrapper, + * IncidentPostmortemUpdatedTriggerWrapper, IncidentResponderCreatedTriggerWrapper, + * IncidentSavedTriggerWrapper, IncidentScheduleTriggerWrapper, IncidentTriggerWrapper, + * MonitorTriggerWrapper, NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, + * SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper, + * SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper * * @return The actual instance (AgentTriggerWrapper, APITriggerWrapper, AppTriggerWrapper, * CaseTriggerWrapper, ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper, * DatastoreTriggerWrapper, DashboardTriggerWrapper, FormTriggerWrapper, - * GithubWebhookTriggerWrapper, IncidentTriggerWrapper, MonitorTriggerWrapper, - * NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, - * SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper, - * SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper) + * GithubWebhookTriggerWrapper, IncidentCreatedTriggerWrapper, + * IncidentImpactCreatedTriggerWrapper, IncidentImpactUpdatedTriggerWrapper, + * IncidentPostmortemUpdatedTriggerWrapper, IncidentResponderCreatedTriggerWrapper, + * IncidentSavedTriggerWrapper, IncidentScheduleTriggerWrapper, IncidentTriggerWrapper, + * MonitorTriggerWrapper, NotebookTriggerWrapper, OnCallTriggerWrapper, + * ScheduleTriggerWrapper, SecurityTriggerWrapper, SelfServiceTriggerWrapper, + * SlackTriggerWrapper, SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper) */ @Override public Object getActualInstance() { @@ -1375,6 +1807,89 @@ public GithubWebhookTriggerWrapper getGithubWebhookTriggerWrapper() throws Class return (GithubWebhookTriggerWrapper) super.getActualInstance(); } + /** + * Get the actual instance of `IncidentCreatedTriggerWrapper`. If the actual instance is not + * `IncidentCreatedTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentCreatedTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentCreatedTriggerWrapper` + */ + public IncidentCreatedTriggerWrapper getIncidentCreatedTriggerWrapper() + throws ClassCastException { + return (IncidentCreatedTriggerWrapper) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentImpactCreatedTriggerWrapper`. If the actual instance is not + * `IncidentImpactCreatedTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentImpactCreatedTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentImpactCreatedTriggerWrapper` + */ + public IncidentImpactCreatedTriggerWrapper getIncidentImpactCreatedTriggerWrapper() + throws ClassCastException { + return (IncidentImpactCreatedTriggerWrapper) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentImpactUpdatedTriggerWrapper`. If the actual instance is not + * `IncidentImpactUpdatedTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentImpactUpdatedTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentImpactUpdatedTriggerWrapper` + */ + public IncidentImpactUpdatedTriggerWrapper getIncidentImpactUpdatedTriggerWrapper() + throws ClassCastException { + return (IncidentImpactUpdatedTriggerWrapper) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentPostmortemUpdatedTriggerWrapper`. If the actual instance is + * not `IncidentPostmortemUpdatedTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentPostmortemUpdatedTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentPostmortemUpdatedTriggerWrapper` + */ + public IncidentPostmortemUpdatedTriggerWrapper getIncidentPostmortemUpdatedTriggerWrapper() + throws ClassCastException { + return (IncidentPostmortemUpdatedTriggerWrapper) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentResponderCreatedTriggerWrapper`. If the actual instance is + * not `IncidentResponderCreatedTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentResponderCreatedTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentResponderCreatedTriggerWrapper` + */ + public IncidentResponderCreatedTriggerWrapper getIncidentResponderCreatedTriggerWrapper() + throws ClassCastException { + return (IncidentResponderCreatedTriggerWrapper) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentSavedTriggerWrapper`. If the actual instance is not + * `IncidentSavedTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentSavedTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentSavedTriggerWrapper` + */ + public IncidentSavedTriggerWrapper getIncidentSavedTriggerWrapper() throws ClassCastException { + return (IncidentSavedTriggerWrapper) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentScheduleTriggerWrapper`. If the actual instance is not + * `IncidentScheduleTriggerWrapper`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentScheduleTriggerWrapper` + * @throws ClassCastException if the instance is not `IncidentScheduleTriggerWrapper` + */ + public IncidentScheduleTriggerWrapper getIncidentScheduleTriggerWrapper() + throws ClassCastException { + return (IncidentScheduleTriggerWrapper) super.getActualInstance(); + } + /** * Get the actual instance of `IncidentTriggerWrapper`. If the actual instance is not * `IncidentTriggerWrapper`, the ClassCastException will be thrown.