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

software.amazon.awssdk.services.cloudformation.model.GetTemplateSummaryRequest 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: 2.29.39
Show newest version
/*
 * Copyright 2012-2017 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 software.amazon.awssdk.services.cloudformation.model;

import java.util.Optional;
import javax.annotation.Generated;
import software.amazon.awssdk.core.AmazonWebServiceRequest;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The input for the GetTemplateSummary action. *

*/ @Generated("software.amazon.awssdk:codegen") public class GetTemplateSummaryRequest extends AmazonWebServiceRequest implements ToCopyableBuilder { private final String templateBody; private final String templateURL; private final String stackName; private GetTemplateSummaryRequest(BuilderImpl builder) { this.templateBody = builder.templateBody; this.templateURL = builder.templateURL; this.stackName = builder.stackName; } /** *

* Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For * more information about templates, see Template Anatomy * in the AWS CloudFormation User Guide. *

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. *

* * @return Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 * bytes. For more information about templates, see Template * Anatomy in the AWS CloudFormation User Guide.

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. */ public String templateBody() { return templateBody; } /** *

* Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that is * located in an Amazon S3 bucket. For more information about templates, see Template Anatomy * in the AWS CloudFormation User Guide. *

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. *

* * @return Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) * that is located in an Amazon S3 bucket. For more information about templates, see Template * Anatomy in the AWS CloudFormation User Guide.

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. */ public String templateURL() { return templateURL; } /** *

* The name or the stack ID that is associated with the stack, which are not always interchangeable. For running * stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify the * unique stack ID. *

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. *

* * @return The name or the stack ID that is associated with the stack, which are not always interchangeable. For * running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you * must specify the unique stack ID.

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. */ public String stackName() { return stackName; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + ((templateBody() == null) ? 0 : templateBody().hashCode()); hashCode = 31 * hashCode + ((templateURL() == null) ? 0 : templateURL().hashCode()); hashCode = 31 * hashCode + ((stackName() == null) ? 0 : stackName().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetTemplateSummaryRequest)) { return false; } GetTemplateSummaryRequest other = (GetTemplateSummaryRequest) obj; if (other.templateBody() == null ^ this.templateBody() == null) { return false; } if (other.templateBody() != null && !other.templateBody().equals(this.templateBody())) { return false; } if (other.templateURL() == null ^ this.templateURL() == null) { return false; } if (other.templateURL() != null && !other.templateURL().equals(this.templateURL())) { return false; } if (other.stackName() == null ^ this.stackName() == null) { return false; } if (other.stackName() != null && !other.stackName().equals(this.stackName())) { return false; } return true; } @Override public String toString() { StringBuilder sb = new StringBuilder("{"); if (templateBody() != null) { sb.append("TemplateBody: ").append(templateBody()).append(","); } if (templateURL() != null) { sb.append("TemplateURL: ").append(templateURL()).append(","); } if (stackName() != null) { sb.append("StackName: ").append(stackName()).append(","); } if (sb.length() > 1) { sb.setLength(sb.length() - 1); } sb.append("}"); return sb.toString(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "TemplateBody": return Optional.of(clazz.cast(templateBody())); case "TemplateURL": return Optional.of(clazz.cast(templateURL())); case "StackName": return Optional.of(clazz.cast(stackName())); default: return Optional.empty(); } } public interface Builder extends CopyableBuilder { /** *

* Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. * For more information about templates, see Template * Anatomy in the AWS CloudFormation User Guide. *

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. *

* * @param templateBody * Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 * bytes. For more information about templates, see Template * Anatomy in the AWS CloudFormation User Guide.

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateBody(String templateBody); /** *

* Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) * that is located in an Amazon S3 bucket. For more information about templates, see Template * Anatomy in the AWS CloudFormation User Guide. *

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. *

* * @param templateURL * Location of file containing the template body. The URL must point to a template (max size: 460,800 * bytes) that is located in an Amazon S3 bucket. For more information about templates, see Template * Anatomy in the AWS CloudFormation User Guide.

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateURL(String templateURL); /** *

* The name or the stack ID that is associated with the stack, which are not always interchangeable. For running * stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify * the unique stack ID. *

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. *

* * @param stackName * The name or the stack ID that is associated with the stack, which are not always interchangeable. For * running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you * must specify the unique stack ID.

*

* Conditional: You must specify only one of the following parameters: StackName, * TemplateBody, or TemplateURL. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stackName(String stackName); } static final class BuilderImpl implements Builder { private String templateBody; private String templateURL; private String stackName; private BuilderImpl() { } private BuilderImpl(GetTemplateSummaryRequest model) { templateBody(model.templateBody); templateURL(model.templateURL); stackName(model.stackName); } public final String getTemplateBody() { return templateBody; } @Override public final Builder templateBody(String templateBody) { this.templateBody = templateBody; return this; } public final void setTemplateBody(String templateBody) { this.templateBody = templateBody; } public final String getTemplateURL() { return templateURL; } @Override public final Builder templateURL(String templateURL) { this.templateURL = templateURL; return this; } public final void setTemplateURL(String templateURL) { this.templateURL = templateURL; } public final String getStackName() { return stackName; } @Override public final Builder stackName(String stackName) { this.stackName = stackName; return this; } public final void setStackName(String stackName) { this.stackName = stackName; } @Override public GetTemplateSummaryRequest build() { return new GetTemplateSummaryRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy