@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getDeploymentIds() == null) ? 0 : getDeploymentIds().hashCode()); return hashCode; }
/** * <p> * The app ID. If you include this parameter, the command returns a description of the commands associated with the * specified app. * </p> * * @param appId * The app ID. If you include this parameter, the command returns a description of the commands associated * with the specified app. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withAppId(String appId) { setAppId(appId); return this; }
/** * <p> * An array of deployment IDs to be described. If you include this parameter, the command returns a description of * the specified deployments. Otherwise, it returns a description of every deployment. * </p> * * @param deploymentIds * An array of deployment IDs to be described. If you include this parameter, the command returns a * description of the specified deployments. Otherwise, it returns a description of every deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withDeploymentIds(java.util.Collection<String> deploymentIds) { setDeploymentIds(deploymentIds); return this; }
new DescribeDeploymentsRequest() .withDeploymentIds(deploymentIds)) .getDeployments(); for (Deployment deployment : deployments) {
/** * <p> * The stack ID. If you include this parameter, the command returns a description of the commands associated with * the specified stack. * </p> * * @param stackId * The stack ID. If you include this parameter, the command returns a description of the commands associated * with the specified stack. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withStackId(String stackId) { setStackId(stackId); return this; }
public static boolean wasSuccessfulDeployment(AWSOpsWorksClient opsClient, String deploymentId) { while (true) { Deployment deployment = opsClient .describeDeployments( new DescribeDeploymentsRequest() .withDeploymentIds(deploymentId)) .getDeployments().get(0); if (deployment.getStatus().equalsIgnoreCase("successful")) { System.out.println("Deployment " + deploymentId + " was successful"); return true; } else if (deployment.getStatus().equalsIgnoreCase("failed")) { return false; } } }
/** * <p> * The stack ID. If you include this parameter, the command returns a description of the commands associated with * the specified stack. * </p> * * @param stackId * The stack ID. If you include this parameter, the command returns a description of the commands associated * with the specified stack. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withStackId(String stackId) { setStackId(stackId); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeDeploymentsRequest == false) return false; DescribeDeploymentsRequest other = (DescribeDeploymentsRequest) obj; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getAppId() == null ^ this.getAppId() == null) return false; if (other.getAppId() != null && other.getAppId().equals(this.getAppId()) == false) return false; if (other.getDeploymentIds() == null ^ this.getDeploymentIds() == null) return false; if (other.getDeploymentIds() != null && other.getDeploymentIds().equals(this.getDeploymentIds()) == false) return false; return true; }
/** * <p> * An array of deployment IDs to be described. If you include this parameter, the command returns a description of * the specified deployments. Otherwise, it returns a description of every deployment. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDeploymentIds(java.util.Collection)} or {@link #withDeploymentIds(java.util.Collection)} if you want * to override the existing values. * </p> * * @param deploymentIds * An array of deployment IDs to be described. If you include this parameter, the command returns a * description of the specified deployments. Otherwise, it returns a description of every deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withDeploymentIds(String... deploymentIds) { if (this.deploymentIds == null) { setDeploymentIds(new com.amazonaws.internal.SdkInternalList<String>(deploymentIds.length)); } for (String ele : deploymentIds) { this.deploymentIds.add(ele); } return this; }
/** * <p> * The app ID. If you include this parameter, the command returns a description of the commands associated with the * specified app. * </p> * * @param appId * The app ID. If you include this parameter, the command returns a description of the commands associated * with the specified app. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withAppId(String appId) { setAppId(appId); 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 (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(","); if (getAppId() != null) sb.append("AppId: ").append(getAppId()).append(","); if (getDeploymentIds() != null) sb.append("DeploymentIds: ").append(getDeploymentIds()); sb.append("}"); return sb.toString(); }
/** * <p> * An array of deployment IDs to be described. If you include this parameter, the command returns a description of * the specified deployments. Otherwise, it returns a description of every deployment. * </p> * * @param deploymentIds * An array of deployment IDs to be described. If you include this parameter, the command returns a * description of the specified deployments. Otherwise, it returns a description of every deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withDeploymentIds(java.util.Collection<String> deploymentIds) { setDeploymentIds(deploymentIds); return this; }
/** * Marshall the given parameter object. */ public void marshall(DescribeDeploymentsRequest describeDeploymentsRequest, ProtocolMarshaller protocolMarshaller) { if (describeDeploymentsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeDeploymentsRequest.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(describeDeploymentsRequest.getAppId(), APPID_BINDING); protocolMarshaller.marshall(describeDeploymentsRequest.getDeploymentIds(), DEPLOYMENTIDS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * <p> * An array of deployment IDs to be described. If you include this parameter, the command returns a description of * the specified deployments. Otherwise, it returns a description of every deployment. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDeploymentIds(java.util.Collection)} or {@link #withDeploymentIds(java.util.Collection)} if you want * to override the existing values. * </p> * * @param deploymentIds * An array of deployment IDs to be described. If you include this parameter, the command returns a * description of the specified deployments. Otherwise, it returns a description of every deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsRequest withDeploymentIds(String... deploymentIds) { if (this.deploymentIds == null) { setDeploymentIds(new com.amazonaws.internal.SdkInternalList<String>(deploymentIds.length)); } for (String ele : deploymentIds) { this.deploymentIds.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getDeploymentIds() == null) ? 0 : getDeploymentIds().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeDeploymentsRequest == false) return false; DescribeDeploymentsRequest other = (DescribeDeploymentsRequest) obj; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getAppId() == null ^ this.getAppId() == null) return false; if (other.getAppId() != null && other.getAppId().equals(this.getAppId()) == false) return false; if (other.getDeploymentIds() == null ^ this.getDeploymentIds() == null) return false; if (other.getDeploymentIds() != null && other.getDeploymentIds().equals(this.getDeploymentIds()) == false) return false; return true; }
/** * 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 (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(","); if (getAppId() != null) sb.append("AppId: ").append(getAppId()).append(","); if (getDeploymentIds() != null) sb.append("DeploymentIds: ").append(getDeploymentIds()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(DescribeDeploymentsRequest describeDeploymentsRequest, ProtocolMarshaller protocolMarshaller) { if (describeDeploymentsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeDeploymentsRequest.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(describeDeploymentsRequest.getAppId(), APPID_BINDING); protocolMarshaller.marshall(describeDeploymentsRequest.getDeploymentIds(), DEPLOYMENTIDS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }