@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeStackSetOperationResult == false) return false; DescribeStackSetOperationResult other = (DescribeStackSetOperationResult) obj; if (other.getStackSetOperation() == null ^ this.getStackSetOperation() == null) return false; if (other.getStackSetOperation() != null && other.getStackSetOperation().equals(this.getStackSetOperation()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackSetOperation() == null) ? 0 : getStackSetOperation().hashCode()); return hashCode; }
/** * 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 (getStackSetOperation() != null) sb.append("StackSetOperation: ").append(getStackSetOperation()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeStackSetOperationResult == false) return false; DescribeStackSetOperationResult other = (DescribeStackSetOperationResult) obj; if (other.getStackSetOperation() == null ^ this.getStackSetOperation() == null) return false; if (other.getStackSetOperation() != null && other.getStackSetOperation().equals(this.getStackSetOperation()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackSetOperation() == null) ? 0 : getStackSetOperation().hashCode()); return hashCode; }
/** * 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 (getStackSetOperation() != null) sb.append("StackSetOperation: ").append(getStackSetOperation()); sb.append("}"); return sb.toString(); }
DescribeStackSetOperationResult waitForOperationToComplete(String operationId, Duration pollInterval) throws InterruptedException { this.listener.getLogger().println("Waiting on operationId=" + operationId); DescribeStackSetOperationResult result = describeStackOperation(operationId, 0); this.listener.getLogger().println("operationId=" + operationId + " status=" + result.getStackSetOperation().getStatus()); switch (StackSetOperationStatus.fromValue(result.getStackSetOperation().getStatus())) { case RUNNING: Thread.sleep(pollInterval.toMillis()); return waitForOperationToComplete(operationId, pollInterval); case SUCCEEDED: this.listener.getLogger().println("Stack set operation completed successfully"); return result; case FAILED: this.listener.getLogger().println("Stack set operation completed failed"); throw new StackSetOperationFailedException(operationId); default: throw new IllegalStateException("Invalid stack set state=" + result.getStackSetOperation().getStatus()); } }