All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.lookoutmetrics.model.AlertSummary Maven / Gradle / Ivy

/*
 * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.lookoutmetrics.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides a summary of an alert's configuration. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AlertSummary implements Serializable, Cloneable, StructuredPojo { /** *

* The ARN of the alert. *

*/ private String alertArn; /** *

* The ARN of the detector to which the alert is attached. *

*/ private String anomalyDetectorArn; /** *

* The name of the alert. *

*/ private String alertName; /** *

* The minimum severity for an anomaly to trigger the alert. *

*/ private Integer alertSensitivityThreshold; /** *

* The type of the alert. *

*/ private String alertType; /** *

* The status of the alert. *

*/ private String alertStatus; /** *

* The time at which the alert was last modified. *

*/ private java.util.Date lastModificationTime; /** *

* The time at which the alert was created. *

*/ private java.util.Date creationTime; /** *

* The alert's tags. *

*/ private java.util.Map tags; /** *

* The ARN of the alert. *

* * @param alertArn * The ARN of the alert. */ public void setAlertArn(String alertArn) { this.alertArn = alertArn; } /** *

* The ARN of the alert. *

* * @return The ARN of the alert. */ public String getAlertArn() { return this.alertArn; } /** *

* The ARN of the alert. *

* * @param alertArn * The ARN of the alert. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withAlertArn(String alertArn) { setAlertArn(alertArn); return this; } /** *

* The ARN of the detector to which the alert is attached. *

* * @param anomalyDetectorArn * The ARN of the detector to which the alert is attached. */ public void setAnomalyDetectorArn(String anomalyDetectorArn) { this.anomalyDetectorArn = anomalyDetectorArn; } /** *

* The ARN of the detector to which the alert is attached. *

* * @return The ARN of the detector to which the alert is attached. */ public String getAnomalyDetectorArn() { return this.anomalyDetectorArn; } /** *

* The ARN of the detector to which the alert is attached. *

* * @param anomalyDetectorArn * The ARN of the detector to which the alert is attached. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withAnomalyDetectorArn(String anomalyDetectorArn) { setAnomalyDetectorArn(anomalyDetectorArn); return this; } /** *

* The name of the alert. *

* * @param alertName * The name of the alert. */ public void setAlertName(String alertName) { this.alertName = alertName; } /** *

* The name of the alert. *

* * @return The name of the alert. */ public String getAlertName() { return this.alertName; } /** *

* The name of the alert. *

* * @param alertName * The name of the alert. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withAlertName(String alertName) { setAlertName(alertName); return this; } /** *

* The minimum severity for an anomaly to trigger the alert. *

* * @param alertSensitivityThreshold * The minimum severity for an anomaly to trigger the alert. */ public void setAlertSensitivityThreshold(Integer alertSensitivityThreshold) { this.alertSensitivityThreshold = alertSensitivityThreshold; } /** *

* The minimum severity for an anomaly to trigger the alert. *

* * @return The minimum severity for an anomaly to trigger the alert. */ public Integer getAlertSensitivityThreshold() { return this.alertSensitivityThreshold; } /** *

* The minimum severity for an anomaly to trigger the alert. *

* * @param alertSensitivityThreshold * The minimum severity for an anomaly to trigger the alert. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withAlertSensitivityThreshold(Integer alertSensitivityThreshold) { setAlertSensitivityThreshold(alertSensitivityThreshold); return this; } /** *

* The type of the alert. *

* * @param alertType * The type of the alert. * @see AlertType */ public void setAlertType(String alertType) { this.alertType = alertType; } /** *

* The type of the alert. *

* * @return The type of the alert. * @see AlertType */ public String getAlertType() { return this.alertType; } /** *

* The type of the alert. *

* * @param alertType * The type of the alert. * @return Returns a reference to this object so that method calls can be chained together. * @see AlertType */ public AlertSummary withAlertType(String alertType) { setAlertType(alertType); return this; } /** *

* The type of the alert. *

* * @param alertType * The type of the alert. * @return Returns a reference to this object so that method calls can be chained together. * @see AlertType */ public AlertSummary withAlertType(AlertType alertType) { this.alertType = alertType.toString(); return this; } /** *

* The status of the alert. *

* * @param alertStatus * The status of the alert. * @see AlertStatus */ public void setAlertStatus(String alertStatus) { this.alertStatus = alertStatus; } /** *

* The status of the alert. *

* * @return The status of the alert. * @see AlertStatus */ public String getAlertStatus() { return this.alertStatus; } /** *

* The status of the alert. *

* * @param alertStatus * The status of the alert. * @return Returns a reference to this object so that method calls can be chained together. * @see AlertStatus */ public AlertSummary withAlertStatus(String alertStatus) { setAlertStatus(alertStatus); return this; } /** *

* The status of the alert. *

* * @param alertStatus * The status of the alert. * @return Returns a reference to this object so that method calls can be chained together. * @see AlertStatus */ public AlertSummary withAlertStatus(AlertStatus alertStatus) { this.alertStatus = alertStatus.toString(); return this; } /** *

* The time at which the alert was last modified. *

* * @param lastModificationTime * The time at which the alert was last modified. */ public void setLastModificationTime(java.util.Date lastModificationTime) { this.lastModificationTime = lastModificationTime; } /** *

* The time at which the alert was last modified. *

* * @return The time at which the alert was last modified. */ public java.util.Date getLastModificationTime() { return this.lastModificationTime; } /** *

* The time at which the alert was last modified. *

* * @param lastModificationTime * The time at which the alert was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withLastModificationTime(java.util.Date lastModificationTime) { setLastModificationTime(lastModificationTime); return this; } /** *

* The time at which the alert was created. *

* * @param creationTime * The time at which the alert was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* The time at which the alert was created. *

* * @return The time at which the alert was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* The time at which the alert was created. *

* * @param creationTime * The time at which the alert was created. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* The alert's tags. *

* * @return The alert's tags. */ public java.util.Map getTags() { return tags; } /** *

* The alert's tags. *

* * @param tags * The alert's tags. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The alert's tags. *

* * @param tags * The alert's tags. * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see AlertSummary#withTags * @returns a reference to this object so that method calls can be chained together. */ public AlertSummary addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public AlertSummary clearTagsEntries() { this.tags = null; return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAlertArn() != null) sb.append("AlertArn: ").append(getAlertArn()).append(","); if (getAnomalyDetectorArn() != null) sb.append("AnomalyDetectorArn: ").append(getAnomalyDetectorArn()).append(","); if (getAlertName() != null) sb.append("AlertName: ").append(getAlertName()).append(","); if (getAlertSensitivityThreshold() != null) sb.append("AlertSensitivityThreshold: ").append(getAlertSensitivityThreshold()).append(","); if (getAlertType() != null) sb.append("AlertType: ").append(getAlertType()).append(","); if (getAlertStatus() != null) sb.append("AlertStatus: ").append(getAlertStatus()).append(","); if (getLastModificationTime() != null) sb.append("LastModificationTime: ").append(getLastModificationTime()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AlertSummary == false) return false; AlertSummary other = (AlertSummary) obj; if (other.getAlertArn() == null ^ this.getAlertArn() == null) return false; if (other.getAlertArn() != null && other.getAlertArn().equals(this.getAlertArn()) == false) return false; if (other.getAnomalyDetectorArn() == null ^ this.getAnomalyDetectorArn() == null) return false; if (other.getAnomalyDetectorArn() != null && other.getAnomalyDetectorArn().equals(this.getAnomalyDetectorArn()) == false) return false; if (other.getAlertName() == null ^ this.getAlertName() == null) return false; if (other.getAlertName() != null && other.getAlertName().equals(this.getAlertName()) == false) return false; if (other.getAlertSensitivityThreshold() == null ^ this.getAlertSensitivityThreshold() == null) return false; if (other.getAlertSensitivityThreshold() != null && other.getAlertSensitivityThreshold().equals(this.getAlertSensitivityThreshold()) == false) return false; if (other.getAlertType() == null ^ this.getAlertType() == null) return false; if (other.getAlertType() != null && other.getAlertType().equals(this.getAlertType()) == false) return false; if (other.getAlertStatus() == null ^ this.getAlertStatus() == null) return false; if (other.getAlertStatus() != null && other.getAlertStatus().equals(this.getAlertStatus()) == false) return false; if (other.getLastModificationTime() == null ^ this.getLastModificationTime() == null) return false; if (other.getLastModificationTime() != null && other.getLastModificationTime().equals(this.getLastModificationTime()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlertArn() == null) ? 0 : getAlertArn().hashCode()); hashCode = prime * hashCode + ((getAnomalyDetectorArn() == null) ? 0 : getAnomalyDetectorArn().hashCode()); hashCode = prime * hashCode + ((getAlertName() == null) ? 0 : getAlertName().hashCode()); hashCode = prime * hashCode + ((getAlertSensitivityThreshold() == null) ? 0 : getAlertSensitivityThreshold().hashCode()); hashCode = prime * hashCode + ((getAlertType() == null) ? 0 : getAlertType().hashCode()); hashCode = prime * hashCode + ((getAlertStatus() == null) ? 0 : getAlertStatus().hashCode()); hashCode = prime * hashCode + ((getLastModificationTime() == null) ? 0 : getLastModificationTime().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public AlertSummary clone() { try { return (AlertSummary) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lookoutmetrics.model.transform.AlertSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy