From ded53047af94f73c6bf1a45ccc7c6ee422eca679 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 19 Feb 2026 16:13:16 +0000 Subject: [PATCH] Regenerate client from commit 0d5ba16 of spec repo --- .generator/schemas/v2/openapi.yaml | 40 ++++ .../client/v2/model/IncidentCondition.java | 150 +++++++++++++ .../v2/model/IncidentScheduleTrigger.java | 200 ++++++++++++++++++ .../model/IncidentScheduleTriggerWrapper.java | 191 +++++++++++++++++ .../datadog/api/client/v2/model/Trigger.java | 99 +++++++-- 5 files changed, 667 insertions(+), 13 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCondition.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTrigger.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTriggerWrapper.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a484bec1a76..b380cb71468 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -28684,6 +28684,19 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentCondition: + description: A condition evaluated against incident tags. + properties: + tags: + description: Tags that must match for the condition to pass. + example: + - '' + items: + type: string + type: array + required: + - tags + type: object IncidentCreateAttributes: description: The incident's attributes for a create request. properties: @@ -30203,6 +30216,32 @@ components: user_defined_fields: $ref: '#/components/schemas/RelationshipToIncidentUserDefinedFields' type: object + IncidentScheduleTrigger: + description: Trigger a workflow from an Incident Schedule. The workflow must + be published. + properties: + incidentType: + description: Incident type filter for the schedule. + type: string + rrule: + description: Recurrence rule expression for scheduling. + example: '' + type: string + tagCondition: + $ref: '#/components/schemas/IncidentCondition' + required: + - rrule + type: object + IncidentScheduleTriggerWrapper: + description: Schema for an Incident Schedule-based trigger. + properties: + incidentScheduleTrigger: + $ref: '#/components/schemas/IncidentScheduleTrigger' + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - incidentScheduleTrigger + type: object IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -65465,6 +65504,7 @@ components: - $ref: '#/components/schemas/DashboardTriggerWrapper' - $ref: '#/components/schemas/GithubWebhookTriggerWrapper' - $ref: '#/components/schemas/IncidentTriggerWrapper' + - $ref: '#/components/schemas/IncidentScheduleTriggerWrapper' - $ref: '#/components/schemas/MonitorTriggerWrapper' - $ref: '#/components/schemas/NotebookTriggerWrapper' - $ref: '#/components/schemas/OnCallTriggerWrapper' 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..ebe6d8efa0c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCondition.java @@ -0,0 +1,150 @@ +/* + * 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; + +/** A condition evaluated against incident tags. */ +@JsonPropertyOrder({IncidentCondition.JSON_PROPERTY_TAGS}) +@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_TAGS = "tags"; + private List tags = new ArrayList<>(); + + public IncidentCondition() {} + + @JsonCreator + public IncidentCondition( + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { + this.tags = tags; + } + + public IncidentCondition tags(List tags) { + this.tags = tags; + return this; + } + + public IncidentCondition addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * Tags that must match for the condition to pass. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * 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.tags, incidentCondition.tags) + && Objects.equals(this.additionalProperties, incidentCondition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCondition {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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..8f59d5c321f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTrigger.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.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 from an Incident Schedule. The workflow must be published. */ +@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; + } + + /** + * Incident type filter for the schedule. + * + * @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; + } + + /** + * Recurrence rule expression for scheduling. + * + * @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; + } + + /** + * A condition evaluated against incident tags. + * + * @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; + } + + /** + * 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..3050f869424 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentScheduleTriggerWrapper.java @@ -0,0 +1,191 @@ +/* + * 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-based 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 from an Incident Schedule. The workflow must be published. + * + * @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; + } + + 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; + } + + /** + * A list of 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/Trigger.java b/src/main/java/com/datadog/api/client/v2/model/Trigger.java index 1702ec64053..ba9601ac0a3 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 @@ -480,6 +480,52 @@ public Trigger deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'IncidentTriggerWrapper'", 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 MonitorTriggerWrapper try { boolean attemptParsing = true; @@ -957,6 +1003,11 @@ public Trigger(IncidentTriggerWrapper o) { setActualInstance(o); } + public Trigger(IncidentScheduleTriggerWrapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public Trigger(MonitorTriggerWrapper o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1013,6 +1064,8 @@ public Trigger(WorkflowTriggerWrapper o) { schemas.put("DashboardTriggerWrapper", new GenericType() {}); schemas.put("GithubWebhookTriggerWrapper", new GenericType() {}); schemas.put("IncidentTriggerWrapper", new GenericType() {}); + schemas.put( + "IncidentScheduleTriggerWrapper", new GenericType() {}); schemas.put("MonitorTriggerWrapper", new GenericType() {}); schemas.put("NotebookTriggerWrapper", new GenericType() {}); schemas.put("OnCallTriggerWrapper", new GenericType() {}); @@ -1036,9 +1089,10 @@ public Map getSchemas() { * against the oneOf child schemas: APITriggerWrapper, AppTriggerWrapper, CaseTriggerWrapper, * ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper, DatastoreTriggerWrapper, * DashboardTriggerWrapper, GithubWebhookTriggerWrapper, IncidentTriggerWrapper, - * MonitorTriggerWrapper, NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, - * SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper, - * SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper + * IncidentScheduleTriggerWrapper, 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). @@ -1082,6 +1136,11 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf( + IncidentScheduleTriggerWrapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(MonitorTriggerWrapper.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1127,26 +1186,28 @@ public void setActualInstance(Object instance) { "Invalid instance type. Must be APITriggerWrapper, AppTriggerWrapper, CaseTriggerWrapper," + " ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper," + " DatastoreTriggerWrapper, DashboardTriggerWrapper, GithubWebhookTriggerWrapper," - + " IncidentTriggerWrapper, MonitorTriggerWrapper, NotebookTriggerWrapper," - + " OnCallTriggerWrapper, ScheduleTriggerWrapper, SecurityTriggerWrapper," - + " SelfServiceTriggerWrapper, SlackTriggerWrapper, SoftwareCatalogTriggerWrapper," - + " WorkflowTriggerWrapper"); + + " IncidentTriggerWrapper, IncidentScheduleTriggerWrapper, MonitorTriggerWrapper," + + " NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper," + + " SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper," + + " SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper"); } /** * Get the actual instance, which can be the following: APITriggerWrapper, AppTriggerWrapper, * CaseTriggerWrapper, ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper, * DatastoreTriggerWrapper, DashboardTriggerWrapper, GithubWebhookTriggerWrapper, - * IncidentTriggerWrapper, MonitorTriggerWrapper, NotebookTriggerWrapper, OnCallTriggerWrapper, - * ScheduleTriggerWrapper, SecurityTriggerWrapper, SelfServiceTriggerWrapper, SlackTriggerWrapper, - * SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper + * IncidentTriggerWrapper, IncidentScheduleTriggerWrapper, MonitorTriggerWrapper, + * NotebookTriggerWrapper, OnCallTriggerWrapper, ScheduleTriggerWrapper, SecurityTriggerWrapper, + * SelfServiceTriggerWrapper, SlackTriggerWrapper, SoftwareCatalogTriggerWrapper, + * WorkflowTriggerWrapper * * @return The actual instance (APITriggerWrapper, AppTriggerWrapper, CaseTriggerWrapper, * ChangeEventTriggerWrapper, DatabaseMonitoringTriggerWrapper, DatastoreTriggerWrapper, * DashboardTriggerWrapper, GithubWebhookTriggerWrapper, IncidentTriggerWrapper, - * MonitorTriggerWrapper, NotebookTriggerWrapper, OnCallTriggerWrapper, - * ScheduleTriggerWrapper, SecurityTriggerWrapper, SelfServiceTriggerWrapper, - * SlackTriggerWrapper, SoftwareCatalogTriggerWrapper, WorkflowTriggerWrapper) + * IncidentScheduleTriggerWrapper, MonitorTriggerWrapper, NotebookTriggerWrapper, + * OnCallTriggerWrapper, ScheduleTriggerWrapper, SecurityTriggerWrapper, + * SelfServiceTriggerWrapper, SlackTriggerWrapper, SoftwareCatalogTriggerWrapper, + * WorkflowTriggerWrapper) */ @Override public Object getActualInstance() { @@ -1253,6 +1314,18 @@ public IncidentTriggerWrapper getIncidentTriggerWrapper() throws ClassCastExcept return (IncidentTriggerWrapper) 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 `MonitorTriggerWrapper`. If the actual instance is not * `MonitorTriggerWrapper`, the ClassCastException will be thrown.