com.amazonaws.services.lookoutmetrics.model.MetricSetSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-lookoutmetrics Show documentation
/*
* 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;
/**
*
* Contains information about a dataset.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class MetricSetSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ARN of the dataset.
*
*/
private String metricSetArn;
/**
*
* The ARN of the detector to which the dataset belongs.
*
*/
private String anomalyDetectorArn;
/**
*
* The description of the dataset.
*
*/
private String metricSetDescription;
/**
*
* The name of the dataset.
*
*/
private String metricSetName;
/**
*
* The time at which the dataset was created.
*
*/
private java.util.Date creationTime;
/**
*
* The time at which the dataset was last modified.
*
*/
private java.util.Date lastModificationTime;
/**
*
* The dataset's tags.
*
*/
private java.util.Map tags;
/**
*
* The ARN of the dataset.
*
*
* @param metricSetArn
* The ARN of the dataset.
*/
public void setMetricSetArn(String metricSetArn) {
this.metricSetArn = metricSetArn;
}
/**
*
* The ARN of the dataset.
*
*
* @return The ARN of the dataset.
*/
public String getMetricSetArn() {
return this.metricSetArn;
}
/**
*
* The ARN of the dataset.
*
*
* @param metricSetArn
* The ARN of the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withMetricSetArn(String metricSetArn) {
setMetricSetArn(metricSetArn);
return this;
}
/**
*
* The ARN of the detector to which the dataset belongs.
*
*
* @param anomalyDetectorArn
* The ARN of the detector to which the dataset belongs.
*/
public void setAnomalyDetectorArn(String anomalyDetectorArn) {
this.anomalyDetectorArn = anomalyDetectorArn;
}
/**
*
* The ARN of the detector to which the dataset belongs.
*
*
* @return The ARN of the detector to which the dataset belongs.
*/
public String getAnomalyDetectorArn() {
return this.anomalyDetectorArn;
}
/**
*
* The ARN of the detector to which the dataset belongs.
*
*
* @param anomalyDetectorArn
* The ARN of the detector to which the dataset belongs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withAnomalyDetectorArn(String anomalyDetectorArn) {
setAnomalyDetectorArn(anomalyDetectorArn);
return this;
}
/**
*
* The description of the dataset.
*
*
* @param metricSetDescription
* The description of the dataset.
*/
public void setMetricSetDescription(String metricSetDescription) {
this.metricSetDescription = metricSetDescription;
}
/**
*
* The description of the dataset.
*
*
* @return The description of the dataset.
*/
public String getMetricSetDescription() {
return this.metricSetDescription;
}
/**
*
* The description of the dataset.
*
*
* @param metricSetDescription
* The description of the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withMetricSetDescription(String metricSetDescription) {
setMetricSetDescription(metricSetDescription);
return this;
}
/**
*
* The name of the dataset.
*
*
* @param metricSetName
* The name of the dataset.
*/
public void setMetricSetName(String metricSetName) {
this.metricSetName = metricSetName;
}
/**
*
* The name of the dataset.
*
*
* @return The name of the dataset.
*/
public String getMetricSetName() {
return this.metricSetName;
}
/**
*
* The name of the dataset.
*
*
* @param metricSetName
* The name of the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withMetricSetName(String metricSetName) {
setMetricSetName(metricSetName);
return this;
}
/**
*
* The time at which the dataset was created.
*
*
* @param creationTime
* The time at which the dataset was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time at which the dataset was created.
*
*
* @return The time at which the dataset was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time at which the dataset was created.
*
*
* @param creationTime
* The time at which the dataset was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The time at which the dataset was last modified.
*
*
* @param lastModificationTime
* The time at which the dataset was last modified.
*/
public void setLastModificationTime(java.util.Date lastModificationTime) {
this.lastModificationTime = lastModificationTime;
}
/**
*
* The time at which the dataset was last modified.
*
*
* @return The time at which the dataset was last modified.
*/
public java.util.Date getLastModificationTime() {
return this.lastModificationTime;
}
/**
*
* The time at which the dataset was last modified.
*
*
* @param lastModificationTime
* The time at which the dataset was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withLastModificationTime(java.util.Date lastModificationTime) {
setLastModificationTime(lastModificationTime);
return this;
}
/**
*
* The dataset's tags.
*
*
* @return The dataset's tags.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The dataset's tags.
*
*
* @param tags
* The dataset's tags.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The dataset's tags.
*
*
* @param tags
* The dataset's tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see MetricSetSummary#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public MetricSetSummary 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 MetricSetSummary 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 (getMetricSetArn() != null)
sb.append("MetricSetArn: ").append(getMetricSetArn()).append(",");
if (getAnomalyDetectorArn() != null)
sb.append("AnomalyDetectorArn: ").append(getAnomalyDetectorArn()).append(",");
if (getMetricSetDescription() != null)
sb.append("MetricSetDescription: ").append(getMetricSetDescription()).append(",");
if (getMetricSetName() != null)
sb.append("MetricSetName: ").append(getMetricSetName()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastModificationTime() != null)
sb.append("LastModificationTime: ").append(getLastModificationTime()).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 MetricSetSummary == false)
return false;
MetricSetSummary other = (MetricSetSummary) obj;
if (other.getMetricSetArn() == null ^ this.getMetricSetArn() == null)
return false;
if (other.getMetricSetArn() != null && other.getMetricSetArn().equals(this.getMetricSetArn()) == 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.getMetricSetDescription() == null ^ this.getMetricSetDescription() == null)
return false;
if (other.getMetricSetDescription() != null && other.getMetricSetDescription().equals(this.getMetricSetDescription()) == false)
return false;
if (other.getMetricSetName() == null ^ this.getMetricSetName() == null)
return false;
if (other.getMetricSetName() != null && other.getMetricSetName().equals(this.getMetricSetName()) == 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.getLastModificationTime() == null ^ this.getLastModificationTime() == null)
return false;
if (other.getLastModificationTime() != null && other.getLastModificationTime().equals(this.getLastModificationTime()) == 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 + ((getMetricSetArn() == null) ? 0 : getMetricSetArn().hashCode());
hashCode = prime * hashCode + ((getAnomalyDetectorArn() == null) ? 0 : getAnomalyDetectorArn().hashCode());
hashCode = prime * hashCode + ((getMetricSetDescription() == null) ? 0 : getMetricSetDescription().hashCode());
hashCode = prime * hashCode + ((getMetricSetName() == null) ? 0 : getMetricSetName().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastModificationTime() == null) ? 0 : getLastModificationTime().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public MetricSetSummary clone() {
try {
return (MetricSetSummary) 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.MetricSetSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}