All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.opsworks.model.CreateDeploymentRequest Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not
 * use this file except in compliance with the License. A copy of the License is
 * located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.services.opsworks.model;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 */
public class CreateDeploymentRequest extends AmazonWebServiceRequest implements
        Serializable, Cloneable {

    /**
     * 

* The stack ID. *

*/ private String stackId; /** *

* The app ID. This parameter is required for app deployments, but not for * other deployment commands. *

*/ private String appId; /** *

* The instance IDs for the deployment targets. *

*/ private com.amazonaws.internal.SdkInternalList instanceIds; /** *

* The layer IDs for the deployment targets. *

*/ private com.amazonaws.internal.SdkInternalList layerIds; /** *

* A DeploymentCommand object that specifies the deployment * command and any associated arguments. *

*/ private DeploymentCommand command; /** *

* A user-defined comment. *

*/ private String comment; /** *

* 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 and must escape characters such as '"': *

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes. *

*/ private String customJson; /** *

* The stack ID. *

* * @param stackId * The stack ID. */ public void setStackId(String stackId) { this.stackId = stackId; } /** *

* The stack ID. *

* * @return The stack ID. */ public String getStackId() { return this.stackId; } /** *

* The stack ID. *

* * @param stackId * The stack ID. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withStackId(String stackId) { setStackId(stackId); return this; } /** *

* The app ID. This parameter is required for app deployments, but not for * other deployment commands. *

* * @param appId * The app ID. This parameter is required for app deployments, but * not for other deployment commands. */ public void setAppId(String appId) { this.appId = appId; } /** *

* The app ID. This parameter is required for app deployments, but not for * other deployment commands. *

* * @return The app ID. This parameter is required for app deployments, but * not for other deployment commands. */ public String getAppId() { return this.appId; } /** *

* The app ID. This parameter is required for app deployments, but not for * other deployment commands. *

* * @param appId * The app ID. This parameter is required for app deployments, but * not for other deployment commands. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withAppId(String appId) { setAppId(appId); return this; } /** *

* The instance IDs for the deployment targets. *

* * @return The instance IDs for the deployment targets. */ public java.util.List getInstanceIds() { if (instanceIds == null) { instanceIds = new com.amazonaws.internal.SdkInternalList(); } return instanceIds; } /** *

* The instance IDs for the deployment targets. *

* * @param instanceIds * The instance IDs for the deployment targets. */ public void setInstanceIds(java.util.Collection instanceIds) { if (instanceIds == null) { this.instanceIds = null; return; } this.instanceIds = new com.amazonaws.internal.SdkInternalList( instanceIds); } /** *

* The instance IDs for the deployment targets. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setInstanceIds(java.util.Collection)} or * {@link #withInstanceIds(java.util.Collection)} if you want to override * the existing values. *

* * @param instanceIds * The instance IDs for the deployment targets. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withInstanceIds(String... instanceIds) { if (this.instanceIds == null) { setInstanceIds(new com.amazonaws.internal.SdkInternalList( instanceIds.length)); } for (String ele : instanceIds) { this.instanceIds.add(ele); } return this; } /** *

* The instance IDs for the deployment targets. *

* * @param instanceIds * The instance IDs for the deployment targets. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withInstanceIds( java.util.Collection instanceIds) { setInstanceIds(instanceIds); return this; } /** *

* The layer IDs for the deployment targets. *

* * @return The layer IDs for the deployment targets. */ public java.util.List getLayerIds() { if (layerIds == null) { layerIds = new com.amazonaws.internal.SdkInternalList(); } return layerIds; } /** *

* The layer IDs for the deployment targets. *

* * @param layerIds * The layer IDs for the deployment targets. */ public void setLayerIds(java.util.Collection layerIds) { if (layerIds == null) { this.layerIds = null; return; } this.layerIds = new com.amazonaws.internal.SdkInternalList( layerIds); } /** *

* The layer IDs for the deployment targets. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setLayerIds(java.util.Collection)} or * {@link #withLayerIds(java.util.Collection)} if you want to override the * existing values. *

* * @param layerIds * The layer IDs for the deployment targets. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withLayerIds(String... layerIds) { if (this.layerIds == null) { setLayerIds(new com.amazonaws.internal.SdkInternalList( layerIds.length)); } for (String ele : layerIds) { this.layerIds.add(ele); } return this; } /** *

* The layer IDs for the deployment targets. *

* * @param layerIds * The layer IDs for the deployment targets. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withLayerIds( java.util.Collection layerIds) { setLayerIds(layerIds); return this; } /** *

* A DeploymentCommand object that specifies the deployment * command and any associated arguments. *

* * @param command * A DeploymentCommand object that specifies the * deployment command and any associated arguments. */ public void setCommand(DeploymentCommand command) { this.command = command; } /** *

* A DeploymentCommand object that specifies the deployment * command and any associated arguments. *

* * @return A DeploymentCommand object that specifies the * deployment command and any associated arguments. */ public DeploymentCommand getCommand() { return this.command; } /** *

* A DeploymentCommand object that specifies the deployment * command and any associated arguments. *

* * @param command * A DeploymentCommand object that specifies the * deployment command and any associated arguments. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateDeploymentRequest withCommand(DeploymentCommand command) { setCommand(command); return this; } /** *

* A user-defined comment. *

* * @param comment * A user-defined comment. */ public void setComment(String comment) { this.comment = comment; } /** *

* A user-defined comment. *

* * @return A user-defined comment. */ public String getComment() { return this.comment; } /** *

* A user-defined comment. *

* * @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; } /** *

* 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 and must escape characters such as '"': *

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes. *

* * @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 and must * escape characters such as '"':

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes. */ public void setCustomJson(String customJson) { this.customJson = 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 and must escape characters such as '"': *

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes. *

* * @return 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 and must * escape characters such as '"':

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration * Attributes. */ public String getCustomJson() { return this.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 and must escape characters such as '"': *

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes. *

* * @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 and must * escape characters such as '"':

*

* "{\"key1\": \"value1\", \"key2\": \"value2\",...}" *

*

* For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes. * @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; useful for testing and * debugging. * * @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: " + getStackId() + ","); if (getAppId() != null) sb.append("AppId: " + getAppId() + ","); if (getInstanceIds() != null) sb.append("InstanceIds: " + getInstanceIds() + ","); if (getLayerIds() != null) sb.append("LayerIds: " + getLayerIds() + ","); if (getCommand() != null) sb.append("Command: " + getCommand() + ","); if (getComment() != null) sb.append("Comment: " + getComment() + ","); if (getCustomJson() != null) sb.append("CustomJson: " + getCustomJson()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDeploymentRequest == false) 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) return false; return true; } @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; } @Override public CreateDeploymentRequest clone() { return (CreateDeploymentRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy