com.databricks.sdk.service.sql.CreateAlertRequestAlert Maven / Gradle / Ivy
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.sql;
import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.ToStringer;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
@Generated
public class CreateAlertRequestAlert {
/** Trigger conditions of the alert. */
@JsonProperty("condition")
private AlertCondition condition;
/**
* Custom body of alert notification, if it exists. See [here] for custom templating instructions.
*
* [here]: https://docs.databricks.com/sql/user/alerts/index.html
*/
@JsonProperty("custom_body")
private String customBody;
/**
* Custom subject of alert notification, if it exists. This can include email subject entries and
* Slack notification headers, for example. See [here] for custom templating instructions.
*
*
[here]: https://docs.databricks.com/sql/user/alerts/index.html
*/
@JsonProperty("custom_subject")
private String customSubject;
/** The display name of the alert. */
@JsonProperty("display_name")
private String displayName;
/** The workspace path of the folder containing the alert. */
@JsonProperty("parent_path")
private String parentPath;
/** UUID of the query attached to the alert. */
@JsonProperty("query_id")
private String queryId;
/**
* Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it
* can be triggered again. If 0 or not specified, the alert will not be triggered again.
*/
@JsonProperty("seconds_to_retrigger")
private Long secondsToRetrigger;
public CreateAlertRequestAlert setCondition(AlertCondition condition) {
this.condition = condition;
return this;
}
public AlertCondition getCondition() {
return condition;
}
public CreateAlertRequestAlert setCustomBody(String customBody) {
this.customBody = customBody;
return this;
}
public String getCustomBody() {
return customBody;
}
public CreateAlertRequestAlert setCustomSubject(String customSubject) {
this.customSubject = customSubject;
return this;
}
public String getCustomSubject() {
return customSubject;
}
public CreateAlertRequestAlert setDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
public String getDisplayName() {
return displayName;
}
public CreateAlertRequestAlert setParentPath(String parentPath) {
this.parentPath = parentPath;
return this;
}
public String getParentPath() {
return parentPath;
}
public CreateAlertRequestAlert setQueryId(String queryId) {
this.queryId = queryId;
return this;
}
public String getQueryId() {
return queryId;
}
public CreateAlertRequestAlert setSecondsToRetrigger(Long secondsToRetrigger) {
this.secondsToRetrigger = secondsToRetrigger;
return this;
}
public Long getSecondsToRetrigger() {
return secondsToRetrigger;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CreateAlertRequestAlert that = (CreateAlertRequestAlert) o;
return Objects.equals(condition, that.condition)
&& Objects.equals(customBody, that.customBody)
&& Objects.equals(customSubject, that.customSubject)
&& Objects.equals(displayName, that.displayName)
&& Objects.equals(parentPath, that.parentPath)
&& Objects.equals(queryId, that.queryId)
&& Objects.equals(secondsToRetrigger, that.secondsToRetrigger);
}
@Override
public int hashCode() {
return Objects.hash(
condition, customBody, customSubject, displayName, parentPath, queryId, secondsToRetrigger);
}
@Override
public String toString() {
return new ToStringer(CreateAlertRequestAlert.class)
.add("condition", condition)
.add("customBody", customBody)
.add("customSubject", customSubject)
.add("displayName", displayName)
.add("parentPath", parentPath)
.add("queryId", queryId)
.add("secondsToRetrigger", secondsToRetrigger)
.toString();
}
}