com.amazonaws.services.robomaker.model.FailureSummary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-robomaker Show documentation
Show all versions of aws-java-sdk-robomaker Show documentation
The AWS Java SDK for AWS RoboMaker module holds the client classes that are used for communicating with AWS RoboMaker Service
/*
* 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.robomaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about worlds that failed.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FailureSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The total number of failures.
*
*/
private Integer totalFailureCount;
/**
*
* The worlds that failed.
*
*/
private java.util.List failures;
/**
*
* The total number of failures.
*
*
* @param totalFailureCount
* The total number of failures.
*/
public void setTotalFailureCount(Integer totalFailureCount) {
this.totalFailureCount = totalFailureCount;
}
/**
*
* The total number of failures.
*
*
* @return The total number of failures.
*/
public Integer getTotalFailureCount() {
return this.totalFailureCount;
}
/**
*
* The total number of failures.
*
*
* @param totalFailureCount
* The total number of failures.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FailureSummary withTotalFailureCount(Integer totalFailureCount) {
setTotalFailureCount(totalFailureCount);
return this;
}
/**
*
* The worlds that failed.
*
*
* @return The worlds that failed.
*/
public java.util.List getFailures() {
return failures;
}
/**
*
* The worlds that failed.
*
*
* @param failures
* The worlds that failed.
*/
public void setFailures(java.util.Collection failures) {
if (failures == null) {
this.failures = null;
return;
}
this.failures = new java.util.ArrayList(failures);
}
/**
*
* The worlds that failed.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFailures(java.util.Collection)} or {@link #withFailures(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param failures
* The worlds that failed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FailureSummary withFailures(WorldFailure... failures) {
if (this.failures == null) {
setFailures(new java.util.ArrayList(failures.length));
}
for (WorldFailure ele : failures) {
this.failures.add(ele);
}
return this;
}
/**
*
* The worlds that failed.
*
*
* @param failures
* The worlds that failed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FailureSummary withFailures(java.util.Collection failures) {
setFailures(failures);
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 (getTotalFailureCount() != null)
sb.append("TotalFailureCount: ").append(getTotalFailureCount()).append(",");
if (getFailures() != null)
sb.append("Failures: ").append(getFailures());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FailureSummary == false)
return false;
FailureSummary other = (FailureSummary) obj;
if (other.getTotalFailureCount() == null ^ this.getTotalFailureCount() == null)
return false;
if (other.getTotalFailureCount() != null && other.getTotalFailureCount().equals(this.getTotalFailureCount()) == false)
return false;
if (other.getFailures() == null ^ this.getFailures() == null)
return false;
if (other.getFailures() != null && other.getFailures().equals(this.getFailures()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTotalFailureCount() == null) ? 0 : getTotalFailureCount().hashCode());
hashCode = prime * hashCode + ((getFailures() == null) ? 0 : getFailures().hashCode());
return hashCode;
}
@Override
public FailureSummary clone() {
try {
return (FailureSummary) 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.robomaker.model.transform.FailureSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy