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.cloudformation.model;
 

The output for the GetTemplateSummary action.

 
 public class GetTemplateSummaryResult implements SerializableCloneable {

    
A list of parameter declarations that describe various properties for each parameter.
 
The value that is defined in the Description property of the template.
 
     private String description;

    
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
 
The list of resources that generated the values in the Capabilities response element.
 
     private String capabilitiesReason;

    
The AWS template format version, which identifies the capabilities of the template.
 
     private String version;

    
The value that is defined for the Metadata property of the template.
 
     private String metadata;

    
A list of parameter declarations that describe various properties for each parameter.

Returns:
A list of parameter declarations that describe various properties for each parameter.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of parameter declarations that describe various properties for each parameter.

Parameters:
parameters A list of parameter declarations that describe various properties for each parameter.
 
     public void setParameters(java.util.Collection<ParameterDeclarationparameters) {
         if (parameters == null) {
             this. = null;
             return;
         }
         parametersCopy.addAll(parameters);
         this. = parametersCopy;
     }
    
    
A list of parameter declarations that describe various properties for each parameter.

NOTE: This method appends the values to the existing list (if any). Use setParameters(java.util.Collection) or withParameters(java.util.Collection) if you want to override the existing values.

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

Parameters:
parameters A list of parameter declarations that describe various properties for each parameter.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getParameters() == nullsetParameters(new java.util.ArrayList<ParameterDeclaration>(parameters.length));
        for (ParameterDeclaration value : parameters) {
            getParameters().add(value);
        }
        return this;
    }
    
    
A list of parameter declarations that describe various properties for each parameter.

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

Parameters:
parameters A list of parameter declarations that describe various properties for each parameter.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (parameters == null) {
            this. = null;
        } else {
            parametersCopy.addAll(parameters);
            this. = parametersCopy;
        }
        return this;
    }

    
The value that is defined in the Description property of the template.

Returns:
The value that is defined in the Description property of the template.
    public String getDescription() {
        return ;
    }
    
    
The value that is defined in the Description property of the template.

Parameters:
description The value that is defined in the Description property of the template.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The value that is defined in the Description property of the template.

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

Parameters:
description The value that is defined in the Description property of the template.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTemplateSummaryResult withDescription(String description) {
        this. = description;
        return this;
    }

    
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.

Returns:
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
    public java.util.List<StringgetCapabilities() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.

Parameters:
capabilities The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
    public void setCapabilities(java.util.Collection<Stringcapabilities) {
        if (capabilities == null) {
            this. = null;
            return;
        }
        capabilitiesCopy.addAll(capabilities);
        this. = capabilitiesCopy;
    }
    
    
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.

NOTE: This method appends the values to the existing list (if any). Use setCapabilities(java.util.Collection) or withCapabilities(java.util.Collection) if you want to override the existing values.

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

Parameters:
capabilities The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTemplateSummaryResult withCapabilities(String... capabilities) {
        if (getCapabilities() == nullsetCapabilities(new java.util.ArrayList<String>(capabilities.length));
        for (String value : capabilities) {
            getCapabilities().add(value);
        }
        return this;
    }
    
    
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.

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

Parameters:
capabilities The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (capabilities == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringcapabilitiesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(capabilities.size());
            capabilitiesCopy.addAll(capabilities);
            this. = capabilitiesCopy;
        }
        return this;
    }

    
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.

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

Parameters:
capabilities The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTemplateSummaryResult withCapabilities(Capability... capabilities) {
        java.util.ArrayList<StringcapabilitiesCopy = new java.util.ArrayList<String>(capabilities.length);
        for (Capability member : capabilities) {
            capabilitiesCopy.add(member.toString());
        }
        if (getCapabilities() == null) {
            setCapabilities(capabilitiesCopy);
        } else {
            getCapabilities().addAll(capabilitiesCopy);
        }
        return this;
    }

    
The list of resources that generated the values in the Capabilities response element.

Returns:
The list of resources that generated the values in the Capabilities response element.
    public String getCapabilitiesReason() {
        return ;
    }
    
    
The list of resources that generated the values in the Capabilities response element.

Parameters:
capabilitiesReason The list of resources that generated the values in the Capabilities response element.
    public void setCapabilitiesReason(String capabilitiesReason) {
        this. = capabilitiesReason;
    }
    
    
The list of resources that generated the values in the Capabilities response element.

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

Parameters:
capabilitiesReason The list of resources that generated the values in the Capabilities response element.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTemplateSummaryResult withCapabilitiesReason(String capabilitiesReason) {
        this. = capabilitiesReason;
        return this;
    }

    
The AWS template format version, which identifies the capabilities of the template.

Returns:
The AWS template format version, which identifies the capabilities of the template.
    public String getVersion() {
        return ;
    }
    
    
The AWS template format version, which identifies the capabilities of the template.

Parameters:
version The AWS template format version, which identifies the capabilities of the template.
    public void setVersion(String version) {
        this. = version;
    }
    
    
The AWS template format version, which identifies the capabilities of the template.

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

Parameters:
version The AWS template format version, which identifies the capabilities of the template.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTemplateSummaryResult withVersion(String version) {
        this. = version;
        return this;
    }

    
The value that is defined for the Metadata property of the template.

Returns:
The value that is defined for the Metadata property of the template.
    public String getMetadata() {
        return ;
    }
    
    
The value that is defined for the Metadata property of the template.

Parameters:
metadata The value that is defined for the Metadata property of the template.
    public void setMetadata(String metadata) {
        this. = metadata;
    }
    
    
The value that is defined for the Metadata property of the template.

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

Parameters:
metadata The value that is defined for the Metadata property of the template.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTemplateSummaryResult withMetadata(String metadata) {
        this. = metadata;
        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 (getParameters() != nullsb.append("Parameters: " + getParameters() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getCapabilities() != nullsb.append("Capabilities: " + getCapabilities() + ",");
        if (getCapabilitiesReason() != nullsb.append("CapabilitiesReason: " + getCapabilitiesReason() + ",");
        if (getVersion() != nullsb.append("Version: " + getVersion() + ",");
        if (getMetadata() != nullsb.append("Metadata: " + getMetadata() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getCapabilities() == null) ? 0 : getCapabilities().hashCode()); 
        hashCode = prime * hashCode + ((getCapabilitiesReason() == null) ? 0 : getCapabilitiesReason().hashCode()); 
        hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); 
        hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof GetTemplateSummaryResult == falsereturn false;
        GetTemplateSummaryResult other = (GetTemplateSummaryResult)obj;
        
        if (other.getParameters() == null ^ this.getParameters() == nullreturn false;
        if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getCapabilities() == null ^ this.getCapabilities() == nullreturn false;
        if (other.getCapabilities() != null && other.getCapabilities().equals(this.getCapabilities()) == falsereturn false
        if (other.getCapabilitiesReason() == null ^ this.getCapabilitiesReason() == nullreturn false;
        if (other.getCapabilitiesReason() != null && other.getCapabilitiesReason().equals(this.getCapabilitiesReason()) == falsereturn false
        if (other.getVersion() == null ^ this.getVersion() == nullreturn false;
        if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == falsereturn false
        if (other.getMetadata() == null ^ this.getMetadata() == nullreturn false;
        if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == falsereturn false
        return true;
    }
    
    @Override
    public GetTemplateSummaryResult clone() {
        try {
            return (GetTemplateSummaryResultsuper.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