@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; }
/** * <p> * The specified stack set operation. * </p> * * @param stackSetOperation * The specified stack set operation. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStackSetOperationResult withStackSetOperation(StackSetOperation stackSetOperation) { setStackSetOperation(stackSetOperation); return this; }
public DescribeStackSetOperationResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeStackSetOperationResult describeStackSetOperationResult = new DescribeStackSetOperationResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeStackSetOperationResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("StackSetOperation", targetDepth)) { describeStackSetOperationResult.setStackSetOperation(StackSetOperationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeStackSetOperationResult; } } } }
public DescribeStackSetOperationResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeStackSetOperationResult describeStackSetOperationResult = new DescribeStackSetOperationResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeStackSetOperationResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("StackSetOperation", targetDepth)) { describeStackSetOperationResult.setStackSetOperation(StackSetOperationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeStackSetOperationResult; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackSetOperation() == null) ? 0 : getStackSetOperation().hashCode()); return hashCode; }
/** * <p> * The specified stack set operation. * </p> * * @param stackSetOperation * The specified stack set operation. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStackSetOperationResult withStackSetOperation(StackSetOperation stackSetOperation) { setStackSetOperation(stackSetOperation); 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 (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()); } }