StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDeploymentId() != null) sb.append("DeploymentId: ").append(getDeploymentId()).append(","); if (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeploymentId() == null) ? 0 : getDeploymentId().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getCompletedAt() == null) ? 0 : getCompletedAt().hashCode()); hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode()); hashCode = prime * hashCode + ((getIamUserArn() == null) ? 0 : getIamUserArn().hashCode()); hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getInstanceIds() == null) ? 0 : getInstanceIds().hashCode()); return hashCode; }
return false; Deployment other = (Deployment) obj; if (other.getDeploymentId() == null ^ this.getDeploymentId() == null) return false; if (other.getDeploymentId() != null && other.getDeploymentId().equals(this.getDeploymentId()) == false) return false; if (other.getStackId() == null ^ this.getStackId() == null)
/** * Marshall the given parameter object. */ public void marshall(Deployment deployment, ProtocolMarshaller protocolMarshaller) { if (deployment == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deployment.getDeploymentId(), DEPLOYMENTID_BINDING); protocolMarshaller.marshall(deployment.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(deployment.getAppId(), APPID_BINDING); protocolMarshaller.marshall(deployment.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(deployment.getCompletedAt(), COMPLETEDAT_BINDING); protocolMarshaller.marshall(deployment.getDuration(), DURATION_BINDING); protocolMarshaller.marshall(deployment.getIamUserArn(), IAMUSERARN_BINDING); protocolMarshaller.marshall(deployment.getComment(), COMMENT_BINDING); protocolMarshaller.marshall(deployment.getCommand(), COMMAND_BINDING); protocolMarshaller.marshall(deployment.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(deployment.getCustomJson(), CUSTOMJSON_BINDING); protocolMarshaller.marshall(deployment.getInstanceIds(), INSTANCEIDS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
for (Deployment deployment : deployments) { String status = deployment.getStatus(); System.out.println(deployment.getDeploymentId() + " : " + status); if (status.equalsIgnoreCase("failed")) { throw new BuildException("Deployment " + deployment.getDeploymentId() + " failed"); } else if (status.equalsIgnoreCase("successful")) { deploymentIds.remove(deployment.getDeploymentId());
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDeploymentId() != null) sb.append("DeploymentId: ").append(getDeploymentId()).append(","); if (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeploymentId() == null) ? 0 : getDeploymentId().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getCompletedAt() == null) ? 0 : getCompletedAt().hashCode()); hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode()); hashCode = prime * hashCode + ((getIamUserArn() == null) ? 0 : getIamUserArn().hashCode()); hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getInstanceIds() == null) ? 0 : getInstanceIds().hashCode()); return hashCode; }
return false; Deployment other = (Deployment) obj; if (other.getDeploymentId() == null ^ this.getDeploymentId() == null) return false; if (other.getDeploymentId() != null && other.getDeploymentId().equals(this.getDeploymentId()) == false) return false; if (other.getStackId() == null ^ this.getStackId() == null)
/** * Marshall the given parameter object. */ public void marshall(Deployment deployment, ProtocolMarshaller protocolMarshaller) { if (deployment == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deployment.getDeploymentId(), DEPLOYMENTID_BINDING); protocolMarshaller.marshall(deployment.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(deployment.getAppId(), APPID_BINDING); protocolMarshaller.marshall(deployment.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(deployment.getCompletedAt(), COMPLETEDAT_BINDING); protocolMarshaller.marshall(deployment.getDuration(), DURATION_BINDING); protocolMarshaller.marshall(deployment.getIamUserArn(), IAMUSERARN_BINDING); protocolMarshaller.marshall(deployment.getComment(), COMMENT_BINDING); protocolMarshaller.marshall(deployment.getCommand(), COMMAND_BINDING); protocolMarshaller.marshall(deployment.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(deployment.getCustomJson(), CUSTOMJSON_BINDING); protocolMarshaller.marshall(deployment.getInstanceIds(), INSTANCEIDS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }