com.amazonaws.services.personalize.model.MetricAttributionSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-personalize 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.personalize.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides a summary of the properties of a metric attribution. For a complete listing, call the DescribeMetricAttribution.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class MetricAttributionSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the metric attribution.
*
*/
private String name;
/**
*
* The metric attribution's Amazon Resource Name (ARN).
*
*/
private String metricAttributionArn;
/**
*
* The metric attribution's status.
*
*/
private String status;
/**
*
* The metric attribution's creation date time.
*
*/
private java.util.Date creationDateTime;
/**
*
* The metric attribution's last updated date time.
*
*/
private java.util.Date lastUpdatedDateTime;
/**
*
* The metric attribution's failure reason.
*
*/
private String failureReason;
/**
*
* The name of the metric attribution.
*
*
* @param name
* The name of the metric attribution.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the metric attribution.
*
*
* @return The name of the metric attribution.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the metric attribution.
*
*
* @param name
* The name of the metric attribution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricAttributionSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The metric attribution's Amazon Resource Name (ARN).
*
*
* @param metricAttributionArn
* The metric attribution's Amazon Resource Name (ARN).
*/
public void setMetricAttributionArn(String metricAttributionArn) {
this.metricAttributionArn = metricAttributionArn;
}
/**
*
* The metric attribution's Amazon Resource Name (ARN).
*
*
* @return The metric attribution's Amazon Resource Name (ARN).
*/
public String getMetricAttributionArn() {
return this.metricAttributionArn;
}
/**
*
* The metric attribution's Amazon Resource Name (ARN).
*
*
* @param metricAttributionArn
* The metric attribution's Amazon Resource Name (ARN).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricAttributionSummary withMetricAttributionArn(String metricAttributionArn) {
setMetricAttributionArn(metricAttributionArn);
return this;
}
/**
*
* The metric attribution's status.
*
*
* @param status
* The metric attribution's status.
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The metric attribution's status.
*
*
* @return The metric attribution's status.
*/
public String getStatus() {
return this.status;
}
/**
*
* The metric attribution's status.
*
*
* @param status
* The metric attribution's status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricAttributionSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The metric attribution's creation date time.
*
*
* @param creationDateTime
* The metric attribution's creation date time.
*/
public void setCreationDateTime(java.util.Date creationDateTime) {
this.creationDateTime = creationDateTime;
}
/**
*
* The metric attribution's creation date time.
*
*
* @return The metric attribution's creation date time.
*/
public java.util.Date getCreationDateTime() {
return this.creationDateTime;
}
/**
*
* The metric attribution's creation date time.
*
*
* @param creationDateTime
* The metric attribution's creation date time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricAttributionSummary withCreationDateTime(java.util.Date creationDateTime) {
setCreationDateTime(creationDateTime);
return this;
}
/**
*
* The metric attribution's last updated date time.
*
*
* @param lastUpdatedDateTime
* The metric attribution's last updated date time.
*/
public void setLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) {
this.lastUpdatedDateTime = lastUpdatedDateTime;
}
/**
*
* The metric attribution's last updated date time.
*
*
* @return The metric attribution's last updated date time.
*/
public java.util.Date getLastUpdatedDateTime() {
return this.lastUpdatedDateTime;
}
/**
*
* The metric attribution's last updated date time.
*
*
* @param lastUpdatedDateTime
* The metric attribution's last updated date time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricAttributionSummary withLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) {
setLastUpdatedDateTime(lastUpdatedDateTime);
return this;
}
/**
*
* The metric attribution's failure reason.
*
*
* @param failureReason
* The metric attribution's failure reason.
*/
public void setFailureReason(String failureReason) {
this.failureReason = failureReason;
}
/**
*
* The metric attribution's failure reason.
*
*
* @return The metric attribution's failure reason.
*/
public String getFailureReason() {
return this.failureReason;
}
/**
*
* The metric attribution's failure reason.
*
*
* @param failureReason
* The metric attribution's failure reason.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricAttributionSummary withFailureReason(String failureReason) {
setFailureReason(failureReason);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getMetricAttributionArn() != null)
sb.append("MetricAttributionArn: ").append(getMetricAttributionArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCreationDateTime() != null)
sb.append("CreationDateTime: ").append(getCreationDateTime()).append(",");
if (getLastUpdatedDateTime() != null)
sb.append("LastUpdatedDateTime: ").append(getLastUpdatedDateTime()).append(",");
if (getFailureReason() != null)
sb.append("FailureReason: ").append(getFailureReason());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof MetricAttributionSummary == false)
return false;
MetricAttributionSummary other = (MetricAttributionSummary) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getMetricAttributionArn() == null ^ this.getMetricAttributionArn() == null)
return false;
if (other.getMetricAttributionArn() != null && other.getMetricAttributionArn().equals(this.getMetricAttributionArn()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null)
return false;
if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false)
return false;
if (other.getLastUpdatedDateTime() == null ^ this.getLastUpdatedDateTime() == null)
return false;
if (other.getLastUpdatedDateTime() != null && other.getLastUpdatedDateTime().equals(this.getLastUpdatedDateTime()) == false)
return false;
if (other.getFailureReason() == null ^ this.getFailureReason() == null)
return false;
if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getMetricAttributionArn() == null) ? 0 : getMetricAttributionArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedDateTime() == null) ? 0 : getLastUpdatedDateTime().hashCode());
hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode());
return hashCode;
}
@Override
public MetricAttributionSummary clone() {
try {
return (MetricAttributionSummary) 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.personalize.model.transform.MetricAttributionSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}