From a240a0f088a9bfee6a54fd502831ff5db1378770 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 24 Sep 2026 12:13:51 +0000 Subject: [PATCH] Regenerate client from commit 4147f43 of spec repo --- .generator/schemas/v2/openapi.yaml | 19 +++ .../model/TeamNotificationRuleAttributes.java | 34 +++- .../TeamNotificationRuleAttributesEmail.java | 34 +++- ...mNotificationRuleAttributesServiceNow.java | 148 ++++++++++++++++++ 4 files changed, 232 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesServiceNow.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4d2fffc0cf4..5c3bc033852 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -120947,6 +120947,8 @@ components: $ref: "#/components/schemas/TeamNotificationRuleAttributesMsTeams" pagerduty: $ref: "#/components/schemas/TeamNotificationRuleAttributesPagerduty" + servicenow: + $ref: "#/components/schemas/TeamNotificationRuleAttributesServiceNow" slack: $ref: "#/components/schemas/TeamNotificationRuleAttributesSlack" type: object @@ -120956,6 +120958,10 @@ components: enabled: description: Flag indicating email notification type: boolean + recipient_email: + description: >- + Email address to notify. When omitted and email notifications are enabled, notifications are sent to all team members. + type: string type: object TeamNotificationRuleAttributesMsTeams: description: MS Teams notification settings for the team @@ -120971,6 +120977,15 @@ components: description: Service name for PagerDuty type: string type: object + TeamNotificationRuleAttributesServiceNow: + description: ServiceNow notification settings for the team. + properties: + templates: + description: ServiceNow template handle names to use for notifications. + items: + type: string + type: array + type: object TeamNotificationRuleAttributesSlack: description: Slack notification settings for the team properties: @@ -227286,6 +227301,10 @@ paths: - attributes: email: enabled: true + recipient_email: alerts@example.com + servicenow: + templates: + - incident-template slack: channel: test-channel workspace: Datadog diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributes.java index 598f0d2a6c2..ff182d14ac8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributes.java @@ -21,6 +21,7 @@ TeamNotificationRuleAttributes.JSON_PROPERTY_EMAIL, TeamNotificationRuleAttributes.JSON_PROPERTY_MS_TEAMS, TeamNotificationRuleAttributes.JSON_PROPERTY_PAGERDUTY, + TeamNotificationRuleAttributes.JSON_PROPERTY_SERVICENOW, TeamNotificationRuleAttributes.JSON_PROPERTY_SLACK }) @jakarta.annotation.Generated( @@ -36,6 +37,9 @@ public class TeamNotificationRuleAttributes { public static final String JSON_PROPERTY_PAGERDUTY = "pagerduty"; private TeamNotificationRuleAttributesPagerduty pagerduty; + public static final String JSON_PROPERTY_SERVICENOW = "servicenow"; + private TeamNotificationRuleAttributesServiceNow servicenow; + public static final String JSON_PROPERTY_SLACK = "slack"; private TeamNotificationRuleAttributesSlack slack; @@ -115,6 +119,32 @@ public void setPagerduty(TeamNotificationRuleAttributesPagerduty pagerduty) { } } + public TeamNotificationRuleAttributes servicenow( + TeamNotificationRuleAttributesServiceNow servicenow) { + this.servicenow = servicenow; + this.unparsed |= servicenow.unparsed; + return this; + } + + /** + * ServiceNow notification settings for the team. + * + * @return servicenow + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICENOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TeamNotificationRuleAttributesServiceNow getServicenow() { + return servicenow; + } + + public void setServicenow(TeamNotificationRuleAttributesServiceNow servicenow) { + this.servicenow = servicenow; + if (servicenow != null) { + this.unparsed |= servicenow.unparsed; + } + } + public TeamNotificationRuleAttributes slack(TeamNotificationRuleAttributesSlack slack) { this.slack = slack; this.unparsed |= slack.unparsed; @@ -200,6 +230,7 @@ public boolean equals(Object o) { return Objects.equals(this.email, teamNotificationRuleAttributes.email) && Objects.equals(this.msTeams, teamNotificationRuleAttributes.msTeams) && Objects.equals(this.pagerduty, teamNotificationRuleAttributes.pagerduty) + && Objects.equals(this.servicenow, teamNotificationRuleAttributes.servicenow) && Objects.equals(this.slack, teamNotificationRuleAttributes.slack) && Objects.equals( this.additionalProperties, teamNotificationRuleAttributes.additionalProperties); @@ -207,7 +238,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(email, msTeams, pagerduty, slack, additionalProperties); + return Objects.hash(email, msTeams, pagerduty, servicenow, slack, additionalProperties); } @Override @@ -217,6 +248,7 @@ public String toString() { sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" msTeams: ").append(toIndentedString(msTeams)).append("\n"); sb.append(" pagerduty: ").append(toIndentedString(pagerduty)).append("\n"); + sb.append(" servicenow: ").append(toIndentedString(servicenow)).append("\n"); sb.append(" slack: ").append(toIndentedString(slack)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesEmail.java b/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesEmail.java index 85490e47749..104e0baee71 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesEmail.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesEmail.java @@ -17,7 +17,10 @@ import java.util.Objects; /** Email notification settings for the team */ -@JsonPropertyOrder({TeamNotificationRuleAttributesEmail.JSON_PROPERTY_ENABLED}) +@JsonPropertyOrder({ + TeamNotificationRuleAttributesEmail.JSON_PROPERTY_ENABLED, + TeamNotificationRuleAttributesEmail.JSON_PROPERTY_RECIPIENT_EMAIL +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TeamNotificationRuleAttributesEmail { @@ -25,6 +28,9 @@ public class TeamNotificationRuleAttributesEmail { public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; + public static final String JSON_PROPERTY_RECIPIENT_EMAIL = "recipient_email"; + private String recipientEmail; + public TeamNotificationRuleAttributesEmail enabled(Boolean enabled) { this.enabled = enabled; return this; @@ -46,6 +52,28 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } + public TeamNotificationRuleAttributesEmail recipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + return this; + } + + /** + * Email address to notify. When omitted and email notifications are enabled, notifications are + * sent to all team members. + * + * @return recipientEmail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECIPIENT_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecipientEmail() { + return recipientEmail; + } + + public void setRecipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -104,13 +132,14 @@ public boolean equals(Object o) { TeamNotificationRuleAttributesEmail teamNotificationRuleAttributesEmail = (TeamNotificationRuleAttributesEmail) o; return Objects.equals(this.enabled, teamNotificationRuleAttributesEmail.enabled) + && Objects.equals(this.recipientEmail, teamNotificationRuleAttributesEmail.recipientEmail) && Objects.equals( this.additionalProperties, teamNotificationRuleAttributesEmail.additionalProperties); } @Override public int hashCode() { - return Objects.hash(enabled, additionalProperties); + return Objects.hash(enabled, recipientEmail, additionalProperties); } @Override @@ -118,6 +147,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TeamNotificationRuleAttributesEmail {\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" recipientEmail: ").append(toIndentedString(recipientEmail)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesServiceNow.java b/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesServiceNow.java new file mode 100644 index 00000000000..fe1f4ffd195 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TeamNotificationRuleAttributesServiceNow.java @@ -0,0 +1,148 @@ +/* + * 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; + +/** ServiceNow notification settings for the team. */ +@JsonPropertyOrder({TeamNotificationRuleAttributesServiceNow.JSON_PROPERTY_TEMPLATES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TeamNotificationRuleAttributesServiceNow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TEMPLATES = "templates"; + private List templates = null; + + public TeamNotificationRuleAttributesServiceNow templates(List templates) { + this.templates = templates; + return this; + } + + public TeamNotificationRuleAttributesServiceNow addTemplatesItem(String templatesItem) { + if (this.templates == null) { + this.templates = new ArrayList<>(); + } + this.templates.add(templatesItem); + return this; + } + + /** + * ServiceNow template handle names to use for notifications. + * + * @return templates + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTemplates() { + return templates; + } + + public void setTemplates(List templates) { + this.templates = templates; + } + + /** + * 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 TeamNotificationRuleAttributesServiceNow + */ + @JsonAnySetter + public TeamNotificationRuleAttributesServiceNow 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 TeamNotificationRuleAttributesServiceNow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamNotificationRuleAttributesServiceNow teamNotificationRuleAttributesServiceNow = + (TeamNotificationRuleAttributesServiceNow) o; + return Objects.equals(this.templates, teamNotificationRuleAttributesServiceNow.templates) + && Objects.equals( + this.additionalProperties, + teamNotificationRuleAttributesServiceNow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(templates, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamNotificationRuleAttributesServiceNow {\n"); + sb.append(" templates: ").append(toIndentedString(templates)).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 "); + } +}