/* * 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 all of the child workflow executions started by a Map Run. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class MapRunExecutionCounts implements Serializable, Cloneable, StructuredPojo { /** *

* The total number of child workflow executions that were started by a Map Run, but haven't started executing yet. *

*/ private Long pending; /** *

* The total number of child workflow executions that were started by a Map Run and are currently in-progress. *

*/ private Long running; /** *

* The total number of child workflow executions that were started by a Map Run and have completed successfully. *

*/ private Long succeeded; /** *

* The total number of child workflow executions that were started by a Map Run, but have failed. *

*/ private Long failed; /** *

* The total number of child workflow executions that were started by a Map Run and have timed out. *

*/ private Long timedOut; /** *

* The total number of child workflow executions that were started by a Map Run and were running, but were either * stopped by the user or by Step Functions because the Map Run failed. *

*/ private Long aborted; /** *

* The total number of child workflow executions that were started by a Map Run. *

*/ private Long total; /** *

* Returns the count of child workflow executions whose results were written by ResultWriter. For more * information, see ResultWriter in * the Step Functions Developer Guide. *

*/ private Long resultsWritten; /** *

* The total number of child workflow executions that were started by a Map Run, but haven't started executing yet. *

* * @param pending * The total number of child workflow executions that were started by a Map Run, but haven't started * executing yet. */ public void setPending(Long pending) { this.pending = pending; } /** *

* The total number of child workflow executions that were started by a Map Run, but haven't started executing yet. *

* * @return The total number of child workflow executions that were started by a Map Run, but haven't started * executing yet. */ public Long getPending() { return this.pending; } /** *

* The total number of child workflow executions that were started by a Map Run, but haven't started executing yet. *

* * @param pending * The total number of child workflow executions that were started by a Map Run, but haven't started * executing yet. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunExecutionCounts withPending(Long pending) { setPending(pending); return this; } /** *

* The total number of child workflow executions that were started by a Map Run and are currently in-progress. *

* * @param running * The total number of child workflow executions that were started by a Map Run and are currently * in-progress. */ public void setRunning(Long running) { this.running = running; } /** *

* The total number of child workflow executions that were started by a Map Run and are currently in-progress. *

* * @return The total number of child workflow executions that were started by a Map Run and are currently * in-progress. */ public Long getRunning() { return this.running; } /** *

* The total number of child workflow executions that were started by a Map Run and are currently in-progress. *

* * @param running * The total number of child workflow executions that were started by a Map Run and are currently * in-progress. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunExecutionCounts withRunning(Long running) { setRunning(running); return this; } /** *

* The total number of child workflow executions that were started by a Map Run and have completed successfully. *

* * @param succeeded * The total number of child workflow executions that were started by a Map Run and have completed * successfully. */ public void setSucceeded(Long succeeded) { this.succeeded = succeeded; } /** *

* The total number of child workflow executions that were started by a Map Run and have completed successfully. *

* * @return The total number of child workflow executions that were started by a Map Run and have completed * successfully. */ public Long getSucceeded() { return this.succeeded; } /** *

* The total number of child workflow executions that were started by a Map Run and have completed successfully. *

* * @param succeeded * The total number of child workflow executions that were started by a Map Run and have completed * successfully. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunExecutionCounts withSucceeded(Long succeeded) { setSucceeded(succeeded); return this; } /** *

* The total number of child workflow executions that were started by a Map Run, but have failed. *

* * @param failed * The total number of child workflow executions that were started by a Map Run, but have failed. */ public void setFailed(Long failed) { this.failed = failed; } /** *

* The total number of child workflow executions that were started by a Map Run, but have failed. *

* * @return The total number of child workflow executions that were started by a Map Run, but have failed. */ public Long getFailed() { return this.failed; } /** *

* The total number of child workflow executions that were started by a Map Run, but have failed. *

* * @param failed * The total number of child workflow executions that were started by a Map Run, but have failed. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunExecutionCounts withFailed(Long failed) { setFailed(failed); return this; } /** *

* The total number of child workflow executions that were started by a Map Run and have timed out. *

* * @param timedOut * The total number of child workflow executions that were started by a Map Run and have timed out. */ public void setTimedOut(Long timedOut) { this.timedOut = timedOut; } /** *

* The total number of child workflow executions that were started by a Map Run and have timed out. *

* * @return The total number of child workflow executions that were started by a Map Run and have timed out. */ public Long getTimedOut() { return this.timedOut; } /** *

* The total number of child workflow executions that were started by a Map Run and have timed out. *

* * @param timedOut * The total number of child workflow executions that were started by a Map Run and have timed out. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunExecutionCounts withTimedOut(Long timedOut) { setTimedOut(timedOut); return this; } /** *

* The total number of child workflow executions that were started by a Map Run and were running, but were either * stopped by the user or by Step Functions because the Map Run failed. *

* * @param aborted * The total number of child workflow executions that were started by a Map Run and were running, but 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 child workflow executions that were started by a Map Run and were running, but were either * stopped by the user or by Step Functions because the Map Run failed. *

* * @return The total number of child workflow executions that were started by a Map Run and were running, but 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 child workflow executions that were started by a Map Run and were running, but were either * stopped by the user or by Step Functions because the Map Run failed. *

* * @param aborted * The total number of child workflow executions that were started by a Map Run and were running, but 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 MapRunExecutionCounts withAborted(Long aborted) { setAborted(aborted); return this; } /** *

* The total number of child workflow executions that were started by a Map Run. *

* * @param total * The total number of child workflow executions that were started by a Map Run. */ public void setTotal(Long total) { this.total = total; } /** *

* The total number of child workflow executions that were started by a Map Run. *

* * @return The total number of child workflow executions that were started by a Map Run. */ public Long getTotal() { return this.total; } /** *

* The total number of child workflow executions that were started by a Map Run. *

* * @param total * The total number of child workflow executions that were started by a Map Run. * @return Returns a reference to this object so that method calls can be chained together. */ public MapRunExecutionCounts withTotal(Long total) { setTotal(total); return this; } /** *

* Returns the count of child workflow executions whose results were written by ResultWriter. For more * information, see ResultWriter in * the Step Functions Developer Guide. *

* * @param resultsWritten * Returns the count of child workflow executions whose results were written by ResultWriter. * For more information, see ResultWriter in the Step Functions Developer Guide. */ public void setResultsWritten(Long resultsWritten) { this.resultsWritten = resultsWritten; } /** *

* Returns the count of child workflow executions whose results were written by ResultWriter. For more * information, see ResultWriter in * the Step Functions Developer Guide. *

* * @return Returns the count of child workflow executions whose results were written by ResultWriter. * For more information, see ResultWriter in the Step Functions Developer Guide. */ public Long getResultsWritten() { return this.resultsWritten; } /** *

* Returns the count of child workflow executions whose results were written by ResultWriter. For more * information, see ResultWriter in * the Step Functions Developer Guide. *

* * @param resultsWritten * Returns the count of child workflow executions whose results were written by 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 MapRunExecutionCounts 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 MapRunExecutionCounts == false) return false; MapRunExecutionCounts other = (MapRunExecutionCounts) 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 MapRunExecutionCounts clone() { try { return (MapRunExecutionCounts) 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.MapRunExecutionCountsMarshaller.getInstance().marshall(this, protocolMarshaller); } }