/** * <p> * A user-defined comment. * </p> * * @param comment * A user-defined comment. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDeploymentRequest withComment(String comment) { setComment(comment); return this; }
/** * <p> * A string that contains user-defined, custom JSON. It is used to override the corresponding default stack * configuration JSON values. The string should be in the following format: * </p> * <p> * <code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code> * </p> * <p> * For more information about custom JSON, see <a * href="http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to Modify the * Stack Configuration Attributes</a>. * </p> * * @param customJson * A string that contains user-defined, custom JSON. It is used to override the corresponding default stack * configuration JSON values. The string should be in the following format:</p> * <p> * <code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code> * </p> * <p> * For more information about custom JSON, see <a * href="http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to * Modify the Stack Configuration Attributes</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDeploymentRequest withCustomJson(String customJson) { setCustomJson(customJson); 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 + ((getInstanceIds() == null) ? 0 : getInstanceIds().hashCode()); hashCode = prime * hashCode + ((getLayerIds() == null) ? 0 : getLayerIds().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); return hashCode; }
checkParams(); AWSOpsWorksClient client = getOrCreateClient(AWSOpsWorksClient.class); CreateDeploymentRequest createDeploymentRequest = new CreateDeploymentRequest() .withStackId(stackId).withAppId(appId).withCommand(command) .withInstanceIds(instanceIds); if (comment != null) { createDeploymentRequest.setComment(comment); createDeploymentRequest.setCustomJson(customJson);
return false; CreateDeploymentRequest other = (CreateDeploymentRequest) 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.getInstanceIds() == null ^ this.getInstanceIds() == null) return false; if (other.getInstanceIds() != null && other.getInstanceIds().equals(this.getInstanceIds()) == false) return false; if (other.getLayerIds() == null ^ this.getLayerIds() == null) return false; if (other.getLayerIds() != null && other.getLayerIds().equals(this.getLayerIds()) == false) return false; if (other.getCommand() == null ^ this.getCommand() == null) return false; if (other.getCommand() != null && other.getCommand().equals(this.getCommand()) == false) return false; if (other.getComment() == null ^ this.getComment() == null) return false; if (other.getComment() != null && other.getComment().equals(this.getComment()) == false) return false; if (other.getCustomJson() == null ^ this.getCustomJson() == null) return false; if (other.getCustomJson() != null && other.getCustomJson().equals(this.getCustomJson()) == false)
/** * <p> * A user-defined comment. * </p> * * @param comment * A user-defined comment. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDeploymentRequest withComment(String comment) { setComment(comment); return this; }
/** * <p> * A string that contains user-defined, custom JSON. It is used to override the corresponding default stack * configuration JSON values. The string should be in the following format: * </p> * <p> * <code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code> * </p> * <p> * For more information about custom JSON, see <a * href="http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to Modify the * Stack Configuration Attributes</a>. * </p> * * @param customJson * A string that contains user-defined, custom JSON. It is used to override the corresponding default stack * configuration JSON values. The string should be in the following format:</p> * <p> * <code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code> * </p> * <p> * For more information about custom JSON, see <a * href="http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to * Modify the Stack Configuration Attributes</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDeploymentRequest withCustomJson(String customJson) { setCustomJson(customJson); 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 (getInstanceIds() != null) sb.append("InstanceIds: ").append(getInstanceIds()).append(","); if (getLayerIds() != null) sb.append("LayerIds: ").append(getLayerIds()).append(","); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getComment() != null) sb.append("Comment: ").append(getComment()).append(","); if (getCustomJson() != null) sb.append("CustomJson: ").append(getCustomJson()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CreateDeploymentRequest createDeploymentRequest, ProtocolMarshaller protocolMarshaller) { if (createDeploymentRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createDeploymentRequest.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getAppId(), APPID_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getInstanceIds(), INSTANCEIDS_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getLayerIds(), LAYERIDS_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getCommand(), COMMAND_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getComment(), COMMENT_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getCustomJson(), CUSTOMJSON_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@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 + ((getInstanceIds() == null) ? 0 : getInstanceIds().hashCode()); hashCode = prime * hashCode + ((getLayerIds() == null) ? 0 : getLayerIds().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); return hashCode; }
return false; CreateDeploymentRequest other = (CreateDeploymentRequest) 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.getInstanceIds() == null ^ this.getInstanceIds() == null) return false; if (other.getInstanceIds() != null && other.getInstanceIds().equals(this.getInstanceIds()) == false) return false; if (other.getLayerIds() == null ^ this.getLayerIds() == null) return false; if (other.getLayerIds() != null && other.getLayerIds().equals(this.getLayerIds()) == false) return false; if (other.getCommand() == null ^ this.getCommand() == null) return false; if (other.getCommand() != null && other.getCommand().equals(this.getCommand()) == false) return false; if (other.getComment() == null ^ this.getComment() == null) return false; if (other.getComment() != null && other.getComment().equals(this.getComment()) == false) return false; if (other.getCustomJson() == null ^ this.getCustomJson() == null) return false; if (other.getCustomJson() != null && other.getCustomJson().equals(this.getCustomJson()) == false)
/** * 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 (getInstanceIds() != null) sb.append("InstanceIds: ").append(getInstanceIds()).append(","); if (getLayerIds() != null) sb.append("LayerIds: ").append(getLayerIds()).append(","); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getComment() != null) sb.append("Comment: ").append(getComment()).append(","); if (getCustomJson() != null) sb.append("CustomJson: ").append(getCustomJson()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CreateDeploymentRequest createDeploymentRequest, ProtocolMarshaller protocolMarshaller) { if (createDeploymentRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createDeploymentRequest.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getAppId(), APPID_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getInstanceIds(), INSTANCEIDS_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getLayerIds(), LAYERIDS_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getCommand(), COMMAND_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getComment(), COMMENT_BINDING); protocolMarshaller.marshall(createDeploymentRequest.getCustomJson(), CUSTOMJSON_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }