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

com.amazonaws.services.cloudformation.model.GetTemplateResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CloudFormation module holds the client classes that are used for communicating with AWS CloudFormation Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2017-2022 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;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* The output for GetTemplate action. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetTemplateResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* Structure containing the template body. (For more information, go to Template Anatomy * in the CloudFormation User Guide.) *

*

* CloudFormation returns the same template that was used when the stack was created. *

*/ private String templateBody; /** *

* The stage of the template that you can retrieve. For stacks, the Original and Processed * templates are always available. For change sets, the Original template is always available. After * CloudFormation finishes creating the change set, the Processed template becomes available. *

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

* Structure containing the template body. (For more information, go to Template Anatomy * in the CloudFormation User Guide.) *

*

* CloudFormation returns the same template that was used when the stack was created. *

* * @param templateBody * Structure containing the template body. (For more information, go to Template * Anatomy in the CloudFormation User Guide.)

*

* CloudFormation returns the same template that was used when the stack was created. */ public void setTemplateBody(String templateBody) { this.templateBody = templateBody; } /** *

* Structure containing the template body. (For more information, go to Template Anatomy * in the CloudFormation User Guide.) *

*

* CloudFormation returns the same template that was used when the stack was created. *

* * @return Structure containing the template body. (For more information, go to Template * Anatomy in the CloudFormation User Guide.)

*

* CloudFormation returns the same template that was used when the stack was created. */ public String getTemplateBody() { return this.templateBody; } /** *

* Structure containing the template body. (For more information, go to Template Anatomy * in the CloudFormation User Guide.) *

*

* CloudFormation returns the same template that was used when the stack was created. *

* * @param templateBody * Structure containing the template body. (For more information, go to Template * Anatomy in the CloudFormation User Guide.)

*

* CloudFormation returns the same template that was used when the stack was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetTemplateResult withTemplateBody(String templateBody) { setTemplateBody(templateBody); return this; } /** *

* The stage of the template that you can retrieve. For stacks, the Original and Processed * templates are always available. For change sets, the Original template is always available. After * CloudFormation finishes creating the change set, the Processed template becomes available. *

* * @return The stage of the template that you can retrieve. For stacks, the Original and * Processed templates are always available. For change sets, the Original * template is always available. After CloudFormation finishes creating the change set, the * Processed template becomes available. * @see TemplateStage */ public java.util.List getStagesAvailable() { if (stagesAvailable == null) { stagesAvailable = new com.amazonaws.internal.SdkInternalList(); } return stagesAvailable; } /** *

* The stage of the template that you can retrieve. For stacks, the Original and Processed * templates are always available. For change sets, the Original template is always available. After * CloudFormation finishes creating the change set, the Processed template becomes available. *

* * @param stagesAvailable * The stage of the template that you can retrieve. For stacks, the Original and * Processed templates are always available. For change sets, the Original template * is always available. After CloudFormation finishes creating the change set, the Processed * template becomes available. * @see TemplateStage */ public void setStagesAvailable(java.util.Collection stagesAvailable) { if (stagesAvailable == null) { this.stagesAvailable = null; return; } this.stagesAvailable = new com.amazonaws.internal.SdkInternalList(stagesAvailable); } /** *

* The stage of the template that you can retrieve. For stacks, the Original and Processed * templates are always available. For change sets, the Original template is always available. After * CloudFormation finishes creating the change set, the Processed template becomes available. *

*

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

* * @param stagesAvailable * The stage of the template that you can retrieve. For stacks, the Original and * Processed templates are always available. For change sets, the Original template * is always available. After CloudFormation finishes creating the change set, the Processed * template becomes available. * @return Returns a reference to this object so that method calls can be chained together. * @see TemplateStage */ public GetTemplateResult withStagesAvailable(String... stagesAvailable) { if (this.stagesAvailable == null) { setStagesAvailable(new com.amazonaws.internal.SdkInternalList(stagesAvailable.length)); } for (String ele : stagesAvailable) { this.stagesAvailable.add(ele); } return this; } /** *

* The stage of the template that you can retrieve. For stacks, the Original and Processed * templates are always available. For change sets, the Original template is always available. After * CloudFormation finishes creating the change set, the Processed template becomes available. *

* * @param stagesAvailable * The stage of the template that you can retrieve. For stacks, the Original and * Processed templates are always available. For change sets, the Original template * is always available. After CloudFormation finishes creating the change set, the Processed * template becomes available. * @return Returns a reference to this object so that method calls can be chained together. * @see TemplateStage */ public GetTemplateResult withStagesAvailable(java.util.Collection stagesAvailable) { setStagesAvailable(stagesAvailable); return this; } /** *

* The stage of the template that you can retrieve. For stacks, the Original and Processed * templates are always available. For change sets, the Original template is always available. After * CloudFormation finishes creating the change set, the Processed template becomes available. *

* * @param stagesAvailable * The stage of the template that you can retrieve. For stacks, the Original and * Processed templates are always available. For change sets, the Original template * is always available. After CloudFormation finishes creating the change set, the Processed * template becomes available. * @return Returns a reference to this object so that method calls can be chained together. * @see TemplateStage */ public GetTemplateResult withStagesAvailable(TemplateStage... stagesAvailable) { com.amazonaws.internal.SdkInternalList stagesAvailableCopy = new com.amazonaws.internal.SdkInternalList(stagesAvailable.length); for (TemplateStage value : stagesAvailable) { stagesAvailableCopy.add(value.toString()); } if (getStagesAvailable() == null) { setStagesAvailable(stagesAvailableCopy); } else { getStagesAvailable().addAll(stagesAvailableCopy); } 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 (getTemplateBody() != null) sb.append("TemplateBody: ").append(getTemplateBody()).append(","); if (getStagesAvailable() != null) sb.append("StagesAvailable: ").append(getStagesAvailable()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTemplateResult == false) return false; GetTemplateResult other = (GetTemplateResult) obj; if (other.getTemplateBody() == null ^ this.getTemplateBody() == null) return false; if (other.getTemplateBody() != null && other.getTemplateBody().equals(this.getTemplateBody()) == false) return false; if (other.getStagesAvailable() == null ^ this.getStagesAvailable() == null) return false; if (other.getStagesAvailable() != null && other.getStagesAvailable().equals(this.getStagesAvailable()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplateBody() == null) ? 0 : getTemplateBody().hashCode()); hashCode = prime * hashCode + ((getStagesAvailable() == null) ? 0 : getStagesAvailable().hashCode()); return hashCode; } @Override public GetTemplateResult clone() { try { return (GetTemplateResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy