
com.amazonaws.services.sagemaker.model.MonitoringAlertSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-sagemaker Show documentation
/*
* Copyright 2019-2024 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.sagemaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides summary information about a monitor alert.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class MonitoringAlertSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of a monitoring alert.
*
*/
private String monitoringAlertName;
/**
*
* A timestamp that indicates when a monitor alert was created.
*
*/
private java.util.Date creationTime;
/**
*
* A timestamp that indicates when a monitor alert was last updated.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The current status of an alert.
*
*/
private String alertStatus;
/**
*
* Within EvaluationPeriod
, how many execution failures will raise an alert.
*
*/
private Integer datapointsToAlert;
/**
*
* The number of most recent monitoring executions to consider when evaluating alert status.
*
*/
private Integer evaluationPeriod;
/**
*
* A list of alert actions taken in response to an alert going into InAlert
status.
*
*/
private MonitoringAlertActions actions;
/**
*
* The name of a monitoring alert.
*
*
* @param monitoringAlertName
* The name of a monitoring alert.
*/
public void setMonitoringAlertName(String monitoringAlertName) {
this.monitoringAlertName = monitoringAlertName;
}
/**
*
* The name of a monitoring alert.
*
*
* @return The name of a monitoring alert.
*/
public String getMonitoringAlertName() {
return this.monitoringAlertName;
}
/**
*
* The name of a monitoring alert.
*
*
* @param monitoringAlertName
* The name of a monitoring alert.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MonitoringAlertSummary withMonitoringAlertName(String monitoringAlertName) {
setMonitoringAlertName(monitoringAlertName);
return this;
}
/**
*
* A timestamp that indicates when a monitor alert was created.
*
*
* @param creationTime
* A timestamp that indicates when a monitor alert was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* A timestamp that indicates when a monitor alert was created.
*
*
* @return A timestamp that indicates when a monitor alert was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* A timestamp that indicates when a monitor alert was created.
*
*
* @param creationTime
* A timestamp that indicates when a monitor alert was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MonitoringAlertSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* A timestamp that indicates when a monitor alert was last updated.
*
*
* @param lastModifiedTime
* A timestamp that indicates when a monitor alert was last updated.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* A timestamp that indicates when a monitor alert was last updated.
*
*
* @return A timestamp that indicates when a monitor alert was last updated.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* A timestamp that indicates when a monitor alert was last updated.
*
*
* @param lastModifiedTime
* A timestamp that indicates when a monitor alert was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MonitoringAlertSummary withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The current status of an alert.
*
*
* @param alertStatus
* The current status of an alert.
* @see MonitoringAlertStatus
*/
public void setAlertStatus(String alertStatus) {
this.alertStatus = alertStatus;
}
/**
*
* The current status of an alert.
*
*
* @return The current status of an alert.
* @see MonitoringAlertStatus
*/
public String getAlertStatus() {
return this.alertStatus;
}
/**
*
* The current status of an alert.
*
*
* @param alertStatus
* The current status of an alert.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MonitoringAlertStatus
*/
public MonitoringAlertSummary withAlertStatus(String alertStatus) {
setAlertStatus(alertStatus);
return this;
}
/**
*
* The current status of an alert.
*
*
* @param alertStatus
* The current status of an alert.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MonitoringAlertStatus
*/
public MonitoringAlertSummary withAlertStatus(MonitoringAlertStatus alertStatus) {
this.alertStatus = alertStatus.toString();
return this;
}
/**
*
* Within EvaluationPeriod
, how many execution failures will raise an alert.
*
*
* @param datapointsToAlert
* Within EvaluationPeriod
, how many execution failures will raise an alert.
*/
public void setDatapointsToAlert(Integer datapointsToAlert) {
this.datapointsToAlert = datapointsToAlert;
}
/**
*
* Within EvaluationPeriod
, how many execution failures will raise an alert.
*
*
* @return Within EvaluationPeriod
, how many execution failures will raise an alert.
*/
public Integer getDatapointsToAlert() {
return this.datapointsToAlert;
}
/**
*
* Within EvaluationPeriod
, how many execution failures will raise an alert.
*
*
* @param datapointsToAlert
* Within EvaluationPeriod
, how many execution failures will raise an alert.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MonitoringAlertSummary withDatapointsToAlert(Integer datapointsToAlert) {
setDatapointsToAlert(datapointsToAlert);
return this;
}
/**
*
* The number of most recent monitoring executions to consider when evaluating alert status.
*
*
* @param evaluationPeriod
* The number of most recent monitoring executions to consider when evaluating alert status.
*/
public void setEvaluationPeriod(Integer evaluationPeriod) {
this.evaluationPeriod = evaluationPeriod;
}
/**
*
* The number of most recent monitoring executions to consider when evaluating alert status.
*
*
* @return The number of most recent monitoring executions to consider when evaluating alert status.
*/
public Integer getEvaluationPeriod() {
return this.evaluationPeriod;
}
/**
*
* The number of most recent monitoring executions to consider when evaluating alert status.
*
*
* @param evaluationPeriod
* The number of most recent monitoring executions to consider when evaluating alert status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MonitoringAlertSummary withEvaluationPeriod(Integer evaluationPeriod) {
setEvaluationPeriod(evaluationPeriod);
return this;
}
/**
*
* A list of alert actions taken in response to an alert going into InAlert
status.
*
*
* @param actions
* A list of alert actions taken in response to an alert going into InAlert
status.
*/
public void setActions(MonitoringAlertActions actions) {
this.actions = actions;
}
/**
*
* A list of alert actions taken in response to an alert going into InAlert
status.
*
*
* @return A list of alert actions taken in response to an alert going into InAlert
status.
*/
public MonitoringAlertActions getActions() {
return this.actions;
}
/**
*
* A list of alert actions taken in response to an alert going into InAlert
status.
*
*
* @param actions
* A list of alert actions taken in response to an alert going into InAlert
status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MonitoringAlertSummary withActions(MonitoringAlertActions actions) {
setActions(actions);
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 (getMonitoringAlertName() != null)
sb.append("MonitoringAlertName: ").append(getMonitoringAlertName()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(",");
if (getAlertStatus() != null)
sb.append("AlertStatus: ").append(getAlertStatus()).append(",");
if (getDatapointsToAlert() != null)
sb.append("DatapointsToAlert: ").append(getDatapointsToAlert()).append(",");
if (getEvaluationPeriod() != null)
sb.append("EvaluationPeriod: ").append(getEvaluationPeriod()).append(",");
if (getActions() != null)
sb.append("Actions: ").append(getActions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof MonitoringAlertSummary == false)
return false;
MonitoringAlertSummary other = (MonitoringAlertSummary) obj;
if (other.getMonitoringAlertName() == null ^ this.getMonitoringAlertName() == null)
return false;
if (other.getMonitoringAlertName() != null && other.getMonitoringAlertName().equals(this.getMonitoringAlertName()) == 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.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == 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.getDatapointsToAlert() == null ^ this.getDatapointsToAlert() == null)
return false;
if (other.getDatapointsToAlert() != null && other.getDatapointsToAlert().equals(this.getDatapointsToAlert()) == false)
return false;
if (other.getEvaluationPeriod() == null ^ this.getEvaluationPeriod() == null)
return false;
if (other.getEvaluationPeriod() != null && other.getEvaluationPeriod().equals(this.getEvaluationPeriod()) == false)
return false;
if (other.getActions() == null ^ this.getActions() == null)
return false;
if (other.getActions() != null && other.getActions().equals(this.getActions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMonitoringAlertName() == null) ? 0 : getMonitoringAlertName().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode + ((getAlertStatus() == null) ? 0 : getAlertStatus().hashCode());
hashCode = prime * hashCode + ((getDatapointsToAlert() == null) ? 0 : getDatapointsToAlert().hashCode());
hashCode = prime * hashCode + ((getEvaluationPeriod() == null) ? 0 : getEvaluationPeriod().hashCode());
hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode());
return hashCode;
}
@Override
public MonitoringAlertSummary clone() {
try {
return (MonitoringAlertSummary) 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.sagemaker.model.transform.MonitoringAlertSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}