/* * 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.stepfunctions.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains details about items that were processed in all of the child workflow executions that were started by a Map * Run. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class MapRunItemCounts implements Serializable, Cloneable, StructuredPojo { /** ** The total number of items to process in child workflow executions that haven't started running yet. *
*/ private Long pending; /** ** The total number of items being processed in child workflow executions that are currently in-progress. *
*/ private Long running; /** ** The total number of items processed in child workflow executions that have completed successfully. *
*/ private Long succeeded; /** ** The total number of items processed in child workflow executions that have failed. *
*/ private Long failed; /** ** The total number of items processed in child workflow executions that have timed out. *
*/ private Long timedOut; /** ** The total number of items processed in child workflow executions that were either stopped by the user or by Step * Functions, because the Map Run failed. *
*/ private Long aborted; /** ** The total number of items processed in all the child workflow executions started by a Map Run. *
*/ private Long total; /** *
* Returns the count of items whose results were written by ResultWriter
. For more information, see ResultWriter in
* the Step Functions Developer Guide.
*
* The total number of items to process in child workflow executions that haven't started running yet. *
* * @param pending * The total number of items to process in child workflow executions that haven't started running yet. */ public void setPending(Long pending) { this.pending = pending; } /** ** The total number of items to process in child workflow executions that haven't started running yet. *
* * @return The total number of items to process in child workflow executions that haven't started running yet. */ public Long getPending() { return this.pending; } /** ** The total number of items to process in child workflow executions that haven't started running yet. *
* * @param pending * The total number of items to process in child workflow executions that haven't started running yet. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withPending(Long pending) { setPending(pending); return this; } /** ** The total number of items being processed in child workflow executions that are currently in-progress. *
* * @param running * The total number of items being processed in child workflow executions that are currently in-progress. */ public void setRunning(Long running) { this.running = running; } /** ** The total number of items being processed in child workflow executions that are currently in-progress. *
* * @return The total number of items being processed in child workflow executions that are currently in-progress. */ public Long getRunning() { return this.running; } /** ** The total number of items being processed in child workflow executions that are currently in-progress. *
* * @param running * The total number of items being processed in child workflow executions that are currently in-progress. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withRunning(Long running) { setRunning(running); return this; } /** ** The total number of items processed in child workflow executions that have completed successfully. *
* * @param succeeded * The total number of items processed in child workflow executions that have completed successfully. */ public void setSucceeded(Long succeeded) { this.succeeded = succeeded; } /** ** The total number of items processed in child workflow executions that have completed successfully. *
* * @return The total number of items processed in child workflow executions that have completed successfully. */ public Long getSucceeded() { return this.succeeded; } /** ** The total number of items processed in child workflow executions that have completed successfully. *
* * @param succeeded * The total number of items processed in child workflow executions that have completed successfully. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withSucceeded(Long succeeded) { setSucceeded(succeeded); return this; } /** ** The total number of items processed in child workflow executions that have failed. *
* * @param failed * The total number of items processed in child workflow executions that have failed. */ public void setFailed(Long failed) { this.failed = failed; } /** ** The total number of items processed in child workflow executions that have failed. *
* * @return The total number of items processed in child workflow executions that have failed. */ public Long getFailed() { return this.failed; } /** ** The total number of items processed in child workflow executions that have failed. *
* * @param failed * The total number of items processed in child workflow executions that have failed. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withFailed(Long failed) { setFailed(failed); return this; } /** ** The total number of items processed in child workflow executions that have timed out. *
* * @param timedOut * The total number of items processed in child workflow executions that have timed out. */ public void setTimedOut(Long timedOut) { this.timedOut = timedOut; } /** ** The total number of items processed in child workflow executions that have timed out. *
* * @return The total number of items processed in child workflow executions that have timed out. */ public Long getTimedOut() { return this.timedOut; } /** ** The total number of items processed in child workflow executions that have timed out. *
* * @param timedOut * The total number of items processed in child workflow executions that have timed out. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withTimedOut(Long timedOut) { setTimedOut(timedOut); return this; } /** ** The total number of items processed in child workflow executions that were either stopped by the user or by Step * Functions, because the Map Run failed. *
* * @param aborted * The total number of items processed in child workflow executions that were either stopped by the user or * by Step Functions, because the Map Run failed. */ public void setAborted(Long aborted) { this.aborted = aborted; } /** ** The total number of items processed in child workflow executions that were either stopped by the user or by Step * Functions, because the Map Run failed. *
* * @return The total number of items processed in child workflow executions that were either stopped by the user or * by Step Functions, because the Map Run failed. */ public Long getAborted() { return this.aborted; } /** ** The total number of items processed in child workflow executions that were either stopped by the user or by Step * Functions, because the Map Run failed. *
* * @param aborted * The total number of items processed in child workflow executions that were either stopped by the user or * by Step Functions, because the Map Run failed. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withAborted(Long aborted) { setAborted(aborted); return this; } /** ** The total number of items processed in all the child workflow executions started by a Map Run. *
* * @param total * The total number of items processed in all the child workflow executions started by a Map Run. */ public void setTotal(Long total) { this.total = total; } /** ** The total number of items processed in all the child workflow executions started by a Map Run. *
* * @return The total number of items processed in all the child workflow executions started by a Map Run. */ public Long getTotal() { return this.total; } /** ** The total number of items processed in all the child workflow executions started by a Map Run. *
* * @param total * The total number of items processed in all the child workflow executions started by a Map Run. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunItemCounts withTotal(Long total) { setTotal(total); return this; } /** *
* Returns the count of items whose results were written by ResultWriter
. For more information, see ResultWriter in
* the Step Functions Developer Guide.
*
ResultWriter
. For more information,
* see ResultWriter
* in the Step Functions Developer Guide.
*/
public void setResultsWritten(Long resultsWritten) {
this.resultsWritten = resultsWritten;
}
/**
*
* Returns the count of items whose results were written by ResultWriter
. For more information, see ResultWriter in
* the Step Functions Developer Guide.
*
ResultWriter
. For more information,
* see ResultWriter
* in the Step Functions Developer Guide.
*/
public Long getResultsWritten() {
return this.resultsWritten;
}
/**
*
* Returns the count of items whose results were written by ResultWriter
. For more information, see ResultWriter in
* the Step Functions Developer Guide.
*
ResultWriter
. For more information,
* see ResultWriter
* in the Step Functions Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MapRunItemCounts withResultsWritten(Long resultsWritten) {
setResultsWritten(resultsWritten);
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 (getPending() != null)
sb.append("Pending: ").append(getPending()).append(",");
if (getRunning() != null)
sb.append("Running: ").append(getRunning()).append(",");
if (getSucceeded() != null)
sb.append("Succeeded: ").append(getSucceeded()).append(",");
if (getFailed() != null)
sb.append("Failed: ").append(getFailed()).append(",");
if (getTimedOut() != null)
sb.append("TimedOut: ").append(getTimedOut()).append(",");
if (getAborted() != null)
sb.append("Aborted: ").append(getAborted()).append(",");
if (getTotal() != null)
sb.append("Total: ").append(getTotal()).append(",");
if (getResultsWritten() != null)
sb.append("ResultsWritten: ").append(getResultsWritten());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof MapRunItemCounts == false)
return false;
MapRunItemCounts other = (MapRunItemCounts) obj;
if (other.getPending() == null ^ this.getPending() == null)
return false;
if (other.getPending() != null && other.getPending().equals(this.getPending()) == false)
return false;
if (other.getRunning() == null ^ this.getRunning() == null)
return false;
if (other.getRunning() != null && other.getRunning().equals(this.getRunning()) == false)
return false;
if (other.getSucceeded() == null ^ this.getSucceeded() == null)
return false;
if (other.getSucceeded() != null && other.getSucceeded().equals(this.getSucceeded()) == false)
return false;
if (other.getFailed() == null ^ this.getFailed() == null)
return false;
if (other.getFailed() != null && other.getFailed().equals(this.getFailed()) == false)
return false;
if (other.getTimedOut() == null ^ this.getTimedOut() == null)
return false;
if (other.getTimedOut() != null && other.getTimedOut().equals(this.getTimedOut()) == false)
return false;
if (other.getAborted() == null ^ this.getAborted() == null)
return false;
if (other.getAborted() != null && other.getAborted().equals(this.getAborted()) == false)
return false;
if (other.getTotal() == null ^ this.getTotal() == null)
return false;
if (other.getTotal() != null && other.getTotal().equals(this.getTotal()) == false)
return false;
if (other.getResultsWritten() == null ^ this.getResultsWritten() == null)
return false;
if (other.getResultsWritten() != null && other.getResultsWritten().equals(this.getResultsWritten()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPending() == null) ? 0 : getPending().hashCode());
hashCode = prime * hashCode + ((getRunning() == null) ? 0 : getRunning().hashCode());
hashCode = prime * hashCode + ((getSucceeded() == null) ? 0 : getSucceeded().hashCode());
hashCode = prime * hashCode + ((getFailed() == null) ? 0 : getFailed().hashCode());
hashCode = prime * hashCode + ((getTimedOut() == null) ? 0 : getTimedOut().hashCode());
hashCode = prime * hashCode + ((getAborted() == null) ? 0 : getAborted().hashCode());
hashCode = prime * hashCode + ((getTotal() == null) ? 0 : getTotal().hashCode());
hashCode = prime * hashCode + ((getResultsWritten() == null) ? 0 : getResultsWritten().hashCode());
return hashCode;
}
@Override
public MapRunItemCounts clone() {
try {
return (MapRunItemCounts) 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.stepfunctions.model.transform.MapRunItemCountsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}