Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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;
  

Describes a stack.

  
  public class Stack implements SerializableCloneable {

    
The stack ID.
  
      private String stackId;

    
The stack name.
  
      private String name;

    
The stack's ARN.
  
      private String arn;

    
The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.
  
      private String region;

    
The VPC ID, if the stack is running in a VPC.
  
      private String vpcId;

    
The stack's attributes.
  
      private java.util.Map<String,Stringattributes;

    
The stack AWS Identity and Access Management (IAM) role.
  
      private String serviceRoleArn;

    
The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
  
      private String defaultInstanceProfileArn;

    
The stack's default operating system.
  
      private String defaultOs;

    
The stack host name theme, with spaces replaced by underscores.
  
      private String hostnameTheme;

    
The stack's default Availability Zone. For more information, see Regions and Endpoints.
  
      private String defaultAvailabilityZone;

    
The default subnet ID, if the stack is running in a VPC.
  
      private String defaultSubnetId;

    
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 JSON.

 
     private String customJson;

    
The configuration manager.
 
A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.
 
     private ChefConfiguration chefConfiguration;

    
Whether the stack uses custom cookbooks.
 
     private Boolean useCustomCookbooks;

    
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.
 
     private Boolean useOpsworksSecurityGroups;

    
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.
 
     private Source customCookbooksSource;

    
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
 
     private String defaultSshKeyName;

    
Date when the stack was created.
 
     private String createdAt;

    
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

 
     private String defaultRootDeviceType;

    
The stack ID.

Returns:
The stack ID.
 
     public String getStackId() {
         return ;
     }
    
    
The stack ID.

Parameters:
stackId The stack ID.
 
     public void setStackId(String stackId) {
         this. = stackId;
     }
    
    
The stack ID.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stackId The stack ID.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withStackId(String stackId) {
         this. = stackId;
         return this;
     }

    
The stack name.

Returns:
The stack name.
 
     public String getName() {
         return ;
     }
    
    
The stack name.

Parameters:
name The stack name.
 
     public void setName(String name) {
         this. = name;
     }
    
    
The stack name.

Returns a reference to this object so that method calls can be chained together.

Parameters:
name The stack name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withName(String name) {
         this. = name;
         return this;
     }

    
The stack's ARN.

Returns:
The stack's ARN.
 
     public String getArn() {
         return ;
     }
    
    
The stack's ARN.

Parameters:
arn The stack's ARN.
 
     public void setArn(String arn) {
         this. = arn;
     }
    
    
The stack's ARN.

Returns a reference to this object so that method calls can be chained together.

Parameters:
arn The stack's ARN.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withArn(String arn) {
         this. = arn;
         return this;
     }

    
The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.

Returns:
The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.
 
     public String getRegion() {
         return ;
     }
    
    
The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.

Parameters:
region The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.
 
     public void setRegion(String region) {
         this. = region;
     }
    
    
The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.

Returns a reference to this object so that method calls can be chained together.

Parameters:
region The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withRegion(String region) {
         this. = region;
         return this;
     }

    
The VPC ID, if the stack is running in a VPC.

Returns:
The VPC ID, if the stack is running in a VPC.
 
     public String getVpcId() {
         return ;
     }
    
    
The VPC ID, if the stack is running in a VPC.

Parameters:
vpcId The VPC ID, if the stack is running in a VPC.
 
     public void setVpcId(String vpcId) {
         this. = vpcId;
     }
    
    
The VPC ID, if the stack is running in a VPC.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcId The VPC ID, if the stack is running in a VPC.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withVpcId(String vpcId) {
         this. = vpcId;
         return this;
     }

    
The stack's attributes.

Returns:
The stack's attributes.
 
     public java.util.Map<String,StringgetAttributes() {
         
         if ( == null) {
              = new java.util.HashMap<String,String>();
         }
         return ;
     }
    
    
The stack's attributes.

Parameters:
attributes The stack's attributes.
 
     public void setAttributes(java.util.Map<String,Stringattributes) {
         this. = attributes;
     }
    
    
The stack's attributes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributes The stack's attributes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withAttributes(java.util.Map<String,Stringattributes) {
         setAttributes(attributes);
         return this;
     }

    
The stack's attributes.

The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key The key of the entry to be added into Attributes.
value The corresponding value of the entry to be added into Attributes.
 
   public Stack addAttributesEntry(String keyString value) {
     if (null == this.) {
       this. = new java.util.HashMap<String,String>();
     }
     if (this..containsKey(key))
       throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
     this..put(keyvalue);
     return this;
   }

  
Removes all the entries added into Attributes.

Returns a reference to this object so that method calls can be chained together.

 
   public Stack clearAttributesEntries() {
     this. = null;
     return this;
   }
  
    
The stack AWS Identity and Access Management (IAM) role.

Returns:
The stack AWS Identity and Access Management (IAM) role.
 
     public String getServiceRoleArn() {
         return ;
     }
    
    
The stack AWS Identity and Access Management (IAM) role.

Parameters:
serviceRoleArn The stack AWS Identity and Access Management (IAM) role.
 
     public void setServiceRoleArn(String serviceRoleArn) {
         this. = serviceRoleArn;
     }
    
    
The stack AWS Identity and Access Management (IAM) role.

Returns a reference to this object so that method calls can be chained together.

Parameters:
serviceRoleArn The stack AWS Identity and Access Management (IAM) role.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withServiceRoleArn(String serviceRoleArn) {
         this. = serviceRoleArn;
         return this;
     }

    
The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

Returns:
The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
 
     public String getDefaultInstanceProfileArn() {
         return ;
     }
    
    
The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

Parameters:
defaultInstanceProfileArn The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
 
     public void setDefaultInstanceProfileArn(String defaultInstanceProfileArn) {
         this. = defaultInstanceProfileArn;
     }
    
    
The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

Returns a reference to this object so that method calls can be chained together.

Parameters:
defaultInstanceProfileArn The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withDefaultInstanceProfileArn(String defaultInstanceProfileArn) {
         this. = defaultInstanceProfileArn;
         return this;
     }

    
The stack's default operating system.

Returns:
The stack's default operating system.
 
     public String getDefaultOs() {
         return ;
     }
    
    
The stack's default operating system.

Parameters:
defaultOs The stack's default operating system.
 
     public void setDefaultOs(String defaultOs) {
         this. = defaultOs;
     }
    
    
The stack's default operating system.

Returns a reference to this object so that method calls can be chained together.

Parameters:
defaultOs The stack's default operating system.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withDefaultOs(String defaultOs) {
         this. = defaultOs;
         return this;
     }

    
The stack host name theme, with spaces replaced by underscores.

Returns:
The stack host name theme, with spaces replaced by underscores.
 
     public String getHostnameTheme() {
         return ;
     }
    
    
The stack host name theme, with spaces replaced by underscores.

Parameters:
hostnameTheme The stack host name theme, with spaces replaced by underscores.
 
     public void setHostnameTheme(String hostnameTheme) {
         this. = hostnameTheme;
     }
    
    
The stack host name theme, with spaces replaced by underscores.

Returns a reference to this object so that method calls can be chained together.

Parameters:
hostnameTheme The stack host name theme, with spaces replaced by underscores.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withHostnameTheme(String hostnameTheme) {
         this. = hostnameTheme;
         return this;
     }

    
The stack's default Availability Zone. For more information, see Regions and Endpoints.

Returns:
The stack's default Availability Zone. For more information, see Regions and Endpoints.
 
     public String getDefaultAvailabilityZone() {
         return ;
     }
    
    
The stack's default Availability Zone. For more information, see Regions and Endpoints.

Parameters:
defaultAvailabilityZone The stack's default Availability Zone. For more information, see Regions and Endpoints.
 
     public void setDefaultAvailabilityZone(String defaultAvailabilityZone) {
         this. = defaultAvailabilityZone;
     }
    
    
The stack's default Availability Zone. For more information, see Regions and Endpoints.

Returns a reference to this object so that method calls can be chained together.

Parameters:
defaultAvailabilityZone The stack's default Availability Zone. For more information, see Regions and Endpoints.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withDefaultAvailabilityZone(String defaultAvailabilityZone) {
         this. = defaultAvailabilityZone;
         return this;
     }

    
The default subnet ID, if the stack is running in a VPC.

Returns:
The default subnet ID, if the stack is running in a VPC.
 
     public String getDefaultSubnetId() {
         return ;
     }
    
    
The default subnet ID, if the stack is running in a VPC.

Parameters:
defaultSubnetId The default subnet ID, if the stack is running in a VPC.
 
     public void setDefaultSubnetId(String defaultSubnetId) {
         this. = defaultSubnetId;
     }
    
    
The default subnet ID, if the stack is running in a VPC.

Returns a reference to this object so that method calls can be chained together.

Parameters:
defaultSubnetId The default subnet ID, if the stack is running in a VPC.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withDefaultSubnetId(String defaultSubnetId) {
         this. = defaultSubnetId;
         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 JSON.

Returns:
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 JSON.

 
     public String getCustomJson() {
         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 JSON.

Parameters:
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 JSON.

 
     public void setCustomJson(String customJson) {
         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 JSON.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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 JSON.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withCustomJson(String customJson) {
         this. = customJson;
         return this;
     }

    
The configuration manager.

Returns:
The configuration manager.
 
         return ;
     }
    
    
The configuration manager.

Parameters:
configurationManager The configuration manager.
 
     public void setConfigurationManager(StackConfigurationManager configurationManager) {
         this. = configurationManager;
     }
    
    
The configuration manager.

Returns a reference to this object so that method calls can be chained together.

Parameters:
configurationManager The configuration manager.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withConfigurationManager(StackConfigurationManager configurationManager) {
         this. = configurationManager;
         return this;
     }

    
A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.

Returns:
A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.
 
         return ;
     }
    
    
A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.

Parameters:
chefConfiguration A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.
 
     public void setChefConfiguration(ChefConfiguration chefConfiguration) {
         this. = chefConfiguration;
     }
    
    
A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.

Returns a reference to this object so that method calls can be chained together.

Parameters:
chefConfiguration A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withChefConfiguration(ChefConfiguration chefConfiguration) {
         this. = chefConfiguration;
         return this;
     }

    
Whether the stack uses custom cookbooks.

Returns:
Whether the stack uses custom cookbooks.
 
     public Boolean isUseCustomCookbooks() {
         return ;
     }
    
    
Whether the stack uses custom cookbooks.

Parameters:
useCustomCookbooks Whether the stack uses custom cookbooks.
 
     public void setUseCustomCookbooks(Boolean useCustomCookbooks) {
         this. = useCustomCookbooks;
     }
    
    
Whether the stack uses custom cookbooks.

Returns a reference to this object so that method calls can be chained together.

Parameters:
useCustomCookbooks Whether the stack uses custom cookbooks.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withUseCustomCookbooks(Boolean useCustomCookbooks) {
         this. = useCustomCookbooks;
         return this;
     }

    
Whether the stack uses custom cookbooks.

Returns:
Whether the stack uses custom cookbooks.
 
     public Boolean getUseCustomCookbooks() {
         return ;
     }

    
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.

Returns:
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.
 
     public Boolean isUseOpsworksSecurityGroups() {
         return ;
     }
    
    
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.

Parameters:
useOpsworksSecurityGroups Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.
 
     public void setUseOpsworksSecurityGroups(Boolean useOpsworksSecurityGroups) {
         this. = useOpsworksSecurityGroups;
     }
    
    
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.

Returns a reference to this object so that method calls can be chained together.

Parameters:
useOpsworksSecurityGroups Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withUseOpsworksSecurityGroups(Boolean useOpsworksSecurityGroups) {
         this. = useOpsworksSecurityGroups;
         return this;
     }

    
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.

Returns:
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.
 
         return ;
     }

    
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.

Returns:
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.
 
     public Source getCustomCookbooksSource() {
         return ;
     }
    
    
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.

Parameters:
customCookbooksSource Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.
 
     public void setCustomCookbooksSource(Source customCookbooksSource) {
         this. = customCookbooksSource;
     }
    
    
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customCookbooksSource Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withCustomCookbooksSource(Source customCookbooksSource) {
         this. = customCookbooksSource;
         return this;
     }

    
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.

Returns:
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
 
     public String getDefaultSshKeyName() {
         return ;
     }
    
    
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.

Parameters:
defaultSshKeyName A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
 
     public void setDefaultSshKeyName(String defaultSshKeyName) {
         this. = defaultSshKeyName;
     }
    
    
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
defaultSshKeyName A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Stack withDefaultSshKeyName(String defaultSshKeyName) {
         this. = defaultSshKeyName;
         return this;
     }

    
Date when the stack was created.

Returns:
Date when the stack was created.
 
     public String getCreatedAt() {
        return ;
    }
    
    
Date when the stack was created.

Parameters:
createdAt Date when the stack was created.
    public void setCreatedAt(String createdAt) {
        this. = createdAt;
    }
    
    
Date when the stack was created.

Returns a reference to this object so that method calls can be chained together.

Parameters:
createdAt Date when the stack was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Stack withCreatedAt(String createdAt) {
        this. = createdAt;
        return this;
    }

    
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

Returns:
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
See also:
RootDeviceType
    public String getDefaultRootDeviceType() {
        return ;
    }
    
    
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
defaultRootDeviceType The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
See also:
RootDeviceType
    public void setDefaultRootDeviceType(String defaultRootDeviceType) {
        this. = defaultRootDeviceType;
    }
    
    
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
defaultRootDeviceType The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RootDeviceType
    public Stack withDefaultRootDeviceType(String defaultRootDeviceType) {
        this. = defaultRootDeviceType;
        return this;
    }

    
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
defaultRootDeviceType The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
See also:
RootDeviceType
    public void setDefaultRootDeviceType(RootDeviceType defaultRootDeviceType) {
        this. = defaultRootDeviceType.toString();
    }
    
    
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
defaultRootDeviceType The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RootDeviceType
    public Stack withDefaultRootDeviceType(RootDeviceType defaultRootDeviceType) {
        this. = defaultRootDeviceType.toString();
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getArn() != nullsb.append("Arn: " + getArn() + ",");
        if (getRegion() != nullsb.append("Region: " + getRegion() + ",");
        if (getVpcId() != nullsb.append("VpcId: " + getVpcId() + ",");
        if (getAttributes() != nullsb.append("Attributes: " + getAttributes() + ",");
        if (getServiceRoleArn() != nullsb.append("ServiceRoleArn: " + getServiceRoleArn() + ",");
        if (getDefaultInstanceProfileArn() != nullsb.append("DefaultInstanceProfileArn: " + getDefaultInstanceProfileArn() + ",");
        if (getDefaultOs() != nullsb.append("DefaultOs: " + getDefaultOs() + ",");
        if (getHostnameTheme() != nullsb.append("HostnameTheme: " + getHostnameTheme() + ",");
        if (getDefaultAvailabilityZone() != nullsb.append("DefaultAvailabilityZone: " + getDefaultAvailabilityZone() + ",");
        if (getDefaultSubnetId() != nullsb.append("DefaultSubnetId: " + getDefaultSubnetId() + ",");
        if (getCustomJson() != nullsb.append("CustomJson: " + getCustomJson() + ",");
        if (getConfigurationManager() != nullsb.append("ConfigurationManager: " + getConfigurationManager() + ",");
        if (getChefConfiguration() != nullsb.append("ChefConfiguration: " + getChefConfiguration() + ",");
        if (isUseCustomCookbooks() != nullsb.append("UseCustomCookbooks: " + isUseCustomCookbooks() + ",");
        if (isUseOpsworksSecurityGroups() != nullsb.append("UseOpsworksSecurityGroups: " + isUseOpsworksSecurityGroups() + ",");
        if (getCustomCookbooksSource() != nullsb.append("CustomCookbooksSource: " + getCustomCookbooksSource() + ",");
        if (getDefaultSshKeyName() != nullsb.append("DefaultSshKeyName: " + getDefaultSshKeyName() + ",");
        if (getCreatedAt() != nullsb.append("CreatedAt: " + getCreatedAt() + ",");
        if (getDefaultRootDeviceType() != nullsb.append("DefaultRootDeviceType: " + getDefaultRootDeviceType() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); 
        hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); 
        hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); 
        hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); 
        hashCode = prime * hashCode + ((getServiceRoleArn() == null) ? 0 : getServiceRoleArn().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultInstanceProfileArn() == null) ? 0 : getDefaultInstanceProfileArn().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultOs() == null) ? 0 : getDefaultOs().hashCode()); 
        hashCode = prime * hashCode + ((getHostnameTheme() == null) ? 0 : getHostnameTheme().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultAvailabilityZone() == null) ? 0 : getDefaultAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultSubnetId() == null) ? 0 : getDefaultSubnetId().hashCode()); 
        hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); 
        hashCode = prime * hashCode + ((getConfigurationManager() == null) ? 0 : getConfigurationManager().hashCode()); 
        hashCode = prime * hashCode + ((getChefConfiguration() == null) ? 0 : getChefConfiguration().hashCode()); 
        hashCode = prime * hashCode + ((isUseCustomCookbooks() == null) ? 0 : isUseCustomCookbooks().hashCode()); 
        hashCode = prime * hashCode + ((isUseOpsworksSecurityGroups() == null) ? 0 : isUseOpsworksSecurityGroups().hashCode()); 
        hashCode = prime * hashCode + ((getCustomCookbooksSource() == null) ? 0 : getCustomCookbooksSource().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultSshKeyName() == null) ? 0 : getDefaultSshKeyName().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultRootDeviceType() == null) ? 0 : getDefaultRootDeviceType().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Stack == falsereturn false;
        Stack other = (Stack)obj;
        
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getArn() == null ^ this.getArn() == nullreturn false;
        if (other.getArn() != null && other.getArn().equals(this.getArn()) == falsereturn false
        if (other.getRegion() == null ^ this.getRegion() == nullreturn false;
        if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == falsereturn false
        if (other.getVpcId() == null ^ this.getVpcId() == nullreturn false;
        if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == falsereturn false
        if (other.getAttributes() == null ^ this.getAttributes() == nullreturn false;
        if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == falsereturn false
        if (other.getServiceRoleArn() == null ^ this.getServiceRoleArn() == nullreturn false;
        if (other.getServiceRoleArn() != null && other.getServiceRoleArn().equals(this.getServiceRoleArn()) == falsereturn false
        if (other.getDefaultInstanceProfileArn() == null ^ this.getDefaultInstanceProfileArn() == nullreturn false;
        if (other.getDefaultInstanceProfileArn() != null && other.getDefaultInstanceProfileArn().equals(this.getDefaultInstanceProfileArn()) == falsereturn false
        if (other.getDefaultOs() == null ^ this.getDefaultOs() == nullreturn false;
        if (other.getDefaultOs() != null && other.getDefaultOs().equals(this.getDefaultOs()) == falsereturn false
        if (other.getHostnameTheme() == null ^ this.getHostnameTheme() == nullreturn false;
        if (other.getHostnameTheme() != null && other.getHostnameTheme().equals(this.getHostnameTheme()) == falsereturn false
        if (other.getDefaultAvailabilityZone() == null ^ this.getDefaultAvailabilityZone() == nullreturn false;
        if (other.getDefaultAvailabilityZone() != null && other.getDefaultAvailabilityZone().equals(this.getDefaultAvailabilityZone()) == falsereturn false
        if (other.getDefaultSubnetId() == null ^ this.getDefaultSubnetId() == nullreturn false;
        if (other.getDefaultSubnetId() != null && other.getDefaultSubnetId().equals(this.getDefaultSubnetId()) == falsereturn false
        if (other.getCustomJson() == null ^ this.getCustomJson() == nullreturn false;
        if (other.getCustomJson() != null && other.getCustomJson().equals(this.getCustomJson()) == falsereturn false
        if (other.getConfigurationManager() == null ^ this.getConfigurationManager() == nullreturn false;
        if (other.getConfigurationManager() != null && other.getConfigurationManager().equals(this.getConfigurationManager()) == falsereturn false
        if (other.getChefConfiguration() == null ^ this.getChefConfiguration() == nullreturn false;
        if (other.getChefConfiguration() != null && other.getChefConfiguration().equals(this.getChefConfiguration()) == falsereturn false
        if (other.isUseCustomCookbooks() == null ^ this.isUseCustomCookbooks() == nullreturn false;
        if (other.isUseCustomCookbooks() != null && other.isUseCustomCookbooks().equals(this.isUseCustomCookbooks()) == falsereturn false
        if (other.isUseOpsworksSecurityGroups() == null ^ this.isUseOpsworksSecurityGroups() == nullreturn false;
        if (other.isUseOpsworksSecurityGroups() != null && other.isUseOpsworksSecurityGroups().equals(this.isUseOpsworksSecurityGroups()) == falsereturn false
        if (other.getCustomCookbooksSource() == null ^ this.getCustomCookbooksSource() == nullreturn false;
        if (other.getCustomCookbooksSource() != null && other.getCustomCookbooksSource().equals(this.getCustomCookbooksSource()) == falsereturn false
        if (other.getDefaultSshKeyName() == null ^ this.getDefaultSshKeyName() == nullreturn false;
        if (other.getDefaultSshKeyName() != null && other.getDefaultSshKeyName().equals(this.getDefaultSshKeyName()) == falsereturn false
        if (other.getCreatedAt() == null ^ this.getCreatedAt() == nullreturn false;
        if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == falsereturn false
        if (other.getDefaultRootDeviceType() == null ^ this.getDefaultRootDeviceType() == nullreturn false;
        if (other.getDefaultRootDeviceType() != null && other.getDefaultRootDeviceType().equals(this.getDefaultRootDeviceType()) == falsereturn false
        return true;
    }
    
    @Override
    public Stack clone() {
        try {
            return (Stacksuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X