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

software.amazon.awssdk.services.cloudformation.model.GetTemplateSummaryResponse 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 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.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The output for the GetTemplateSummary action. *

*/ @Generated("software.amazon.awssdk:codegen") public final class GetTemplateSummaryResponse extends CloudFormationResponse implements ToCopyableBuilder { private static final SdkField> PARAMETERS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Parameters") .getter(getter(GetTemplateSummaryResponse::parameters)) .setter(setter(Builder::parameters)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Parameters").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ParameterDeclaration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(GetTemplateSummaryResponse::description)) .setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField> CAPABILITIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Capabilities") .getter(getter(GetTemplateSummaryResponse::capabilitiesAsStrings)) .setter(setter(Builder::capabilitiesWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Capabilities").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CAPABILITIES_REASON_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CapabilitiesReason").getter(getter(GetTemplateSummaryResponse::capabilitiesReason)) .setter(setter(Builder::capabilitiesReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CapabilitiesReason").build()) .build(); private static final SdkField> RESOURCE_TYPES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ResourceTypes") .getter(getter(GetTemplateSummaryResponse::resourceTypes)) .setter(setter(Builder::resourceTypes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceTypes").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Version") .getter(getter(GetTemplateSummaryResponse::version)).setter(setter(Builder::version)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Version").build()).build(); private static final SdkField METADATA_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Metadata").getter(getter(GetTemplateSummaryResponse::metadata)).setter(setter(Builder::metadata)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Metadata").build()).build(); private static final SdkField> DECLARED_TRANSFORMS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("DeclaredTransforms") .getter(getter(GetTemplateSummaryResponse::declaredTransforms)) .setter(setter(Builder::declaredTransforms)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeclaredTransforms").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> RESOURCE_IDENTIFIER_SUMMARIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ResourceIdentifierSummaries") .getter(getter(GetTemplateSummaryResponse::resourceIdentifierSummaries)) .setter(setter(Builder::resourceIdentifierSummaries)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceIdentifierSummaries") .build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ResourceIdentifierSummary::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField WARNINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Warnings").getter(getter(GetTemplateSummaryResponse::warnings)).setter(setter(Builder::warnings)) .constructor(Warnings::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Warnings").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(PARAMETERS_FIELD, DESCRIPTION_FIELD, CAPABILITIES_FIELD, CAPABILITIES_REASON_FIELD, RESOURCE_TYPES_FIELD, VERSION_FIELD, METADATA_FIELD, DECLARED_TRANSFORMS_FIELD, RESOURCE_IDENTIFIER_SUMMARIES_FIELD, WARNINGS_FIELD)); private final List parameters; private final String description; private final List capabilities; private final String capabilitiesReason; private final List resourceTypes; private final String version; private final String metadata; private final List declaredTransforms; private final List resourceIdentifierSummaries; private final Warnings warnings; private GetTemplateSummaryResponse(BuilderImpl builder) { super(builder); this.parameters = builder.parameters; this.description = builder.description; this.capabilities = builder.capabilities; this.capabilitiesReason = builder.capabilitiesReason; this.resourceTypes = builder.resourceTypes; this.version = builder.version; this.metadata = builder.metadata; this.declaredTransforms = builder.declaredTransforms; this.resourceIdentifierSummaries = builder.resourceIdentifierSummaries; this.warnings = builder.warnings; } /** * For responses, this returns true if the service returned a value for the Parameters property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasParameters() { return parameters != null && !(parameters instanceof SdkAutoConstructList); } /** *

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

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasParameters} method. *

* * @return A list of parameter declarations that describe various properties for each parameter. */ public final List parameters() { return parameters; } /** *

* The value that's defined in the Description property of the template. *

* * @return The value that's defined in the Description property of the template. */ public final String description() { return description; } /** *

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

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasCapabilities} method. *

* * @return The capabilities found within the template. If your template contains IAM resources, you must specify the * CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use * the CreateStack or UpdateStack actions with your template; otherwise, those actions return * an InsufficientCapabilities error.

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. */ public final List capabilities() { return CapabilitiesCopier.copyStringToEnum(capabilities); } /** * For responses, this returns true if the service returned a value for the Capabilities property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasCapabilities() { return capabilities != null && !(capabilities instanceof SdkAutoConstructList); } /** *

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

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasCapabilities} method. *

* * @return The capabilities found within the template. If your template contains IAM resources, you must specify the * CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use * the CreateStack or UpdateStack actions with your template; otherwise, those actions return * an InsufficientCapabilities error.

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. */ public final List capabilitiesAsStrings() { return capabilities; } /** *

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

* * @return The list of resources that generated the values in the Capabilities response element. */ public final String capabilitiesReason() { return capabilitiesReason; } /** * For responses, this returns true if the service returned a value for the ResourceTypes property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasResourceTypes() { return resourceTypes != null && !(resourceTypes instanceof SdkAutoConstructList); } /** *

* A list of all the template resource types that are defined in the template, such as * AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasResourceTypes} method. *

* * @return A list of all the template resource types that are defined in the template, such as * AWS::EC2::Instance, AWS::Dynamo::Table, and * Custom::MyCustomInstance. */ public final List resourceTypes() { return resourceTypes; } /** *

* The Amazon Web Services template format version, which identifies the capabilities of the template. *

* * @return The Amazon Web Services template format version, which identifies the capabilities of the template. */ public final String version() { return version; } /** *

* The value that's defined for the Metadata property of the template. *

* * @return The value that's defined for the Metadata property of the template. */ public final String metadata() { return metadata; } /** * For responses, this returns true if the service returned a value for the DeclaredTransforms property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasDeclaredTransforms() { return declaredTransforms != null && !(declaredTransforms instanceof SdkAutoConstructList); } /** *

* A list of the transforms that are declared in the template. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasDeclaredTransforms} method. *

* * @return A list of the transforms that are declared in the template. */ public final List declaredTransforms() { return declaredTransforms; } /** * For responses, this returns true if the service returned a value for the ResourceIdentifierSummaries property. * This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasResourceIdentifierSummaries() { return resourceIdentifierSummaries != null && !(resourceIdentifierSummaries instanceof SdkAutoConstructList); } /** *

* A list of resource identifier summaries that describe the target resources of an import operation and the * properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket resource. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasResourceIdentifierSummaries} method. *

* * @return A list of resource identifier summaries that describe the target resources of an import operation and the * properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket resource. */ public final List resourceIdentifierSummaries() { return resourceIdentifierSummaries; } /** *

* An object containing any warnings returned. *

* * @return An object containing any warnings returned. */ public final Warnings warnings() { return warnings; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(hasParameters() ? parameters() : null); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(hasCapabilities() ? capabilitiesAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(capabilitiesReason()); hashCode = 31 * hashCode + Objects.hashCode(hasResourceTypes() ? resourceTypes() : null); hashCode = 31 * hashCode + Objects.hashCode(version()); hashCode = 31 * hashCode + Objects.hashCode(metadata()); hashCode = 31 * hashCode + Objects.hashCode(hasDeclaredTransforms() ? declaredTransforms() : null); hashCode = 31 * hashCode + Objects.hashCode(hasResourceIdentifierSummaries() ? resourceIdentifierSummaries() : null); hashCode = 31 * hashCode + Objects.hashCode(warnings()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetTemplateSummaryResponse)) { return false; } GetTemplateSummaryResponse other = (GetTemplateSummaryResponse) obj; return hasParameters() == other.hasParameters() && Objects.equals(parameters(), other.parameters()) && Objects.equals(description(), other.description()) && hasCapabilities() == other.hasCapabilities() && Objects.equals(capabilitiesAsStrings(), other.capabilitiesAsStrings()) && Objects.equals(capabilitiesReason(), other.capabilitiesReason()) && hasResourceTypes() == other.hasResourceTypes() && Objects.equals(resourceTypes(), other.resourceTypes()) && Objects.equals(version(), other.version()) && Objects.equals(metadata(), other.metadata()) && hasDeclaredTransforms() == other.hasDeclaredTransforms() && Objects.equals(declaredTransforms(), other.declaredTransforms()) && hasResourceIdentifierSummaries() == other.hasResourceIdentifierSummaries() && Objects.equals(resourceIdentifierSummaries(), other.resourceIdentifierSummaries()) && Objects.equals(warnings(), other.warnings()); } /** * 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. */ @Override public final String toString() { return ToString.builder("GetTemplateSummaryResponse").add("Parameters", hasParameters() ? parameters() : null) .add("Description", description()).add("Capabilities", hasCapabilities() ? capabilitiesAsStrings() : null) .add("CapabilitiesReason", capabilitiesReason()) .add("ResourceTypes", hasResourceTypes() ? resourceTypes() : null).add("Version", version()) .add("Metadata", metadata()).add("DeclaredTransforms", hasDeclaredTransforms() ? declaredTransforms() : null) .add("ResourceIdentifierSummaries", hasResourceIdentifierSummaries() ? resourceIdentifierSummaries() : null) .add("Warnings", warnings()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Parameters": return Optional.ofNullable(clazz.cast(parameters())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "Capabilities": return Optional.ofNullable(clazz.cast(capabilitiesAsStrings())); case "CapabilitiesReason": return Optional.ofNullable(clazz.cast(capabilitiesReason())); case "ResourceTypes": return Optional.ofNullable(clazz.cast(resourceTypes())); case "Version": return Optional.ofNullable(clazz.cast(version())); case "Metadata": return Optional.ofNullable(clazz.cast(metadata())); case "DeclaredTransforms": return Optional.ofNullable(clazz.cast(declaredTransforms())); case "ResourceIdentifierSummaries": return Optional.ofNullable(clazz.cast(resourceIdentifierSummaries())); case "Warnings": return Optional.ofNullable(clazz.cast(warnings())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GetTemplateSummaryResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends CloudFormationResponse.Builder, SdkPojo, CopyableBuilder { /** *

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

* * @param parameters * A list of parameter declarations that describe various properties for each parameter. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parameters(Collection parameters); /** *

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

* * @param parameters * A list of parameter declarations that describe various properties for each parameter. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parameters(ParameterDeclaration... parameters); /** *

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

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.cloudformation.model.ParameterDeclaration.Builder} avoiding the need * to create one manually via * {@link software.amazon.awssdk.services.cloudformation.model.ParameterDeclaration#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.cloudformation.model.ParameterDeclaration.Builder#build()} is called * immediately and its result is passed to {@link #parameters(List)}. * * @param parameters * a consumer that will call methods on * {@link software.amazon.awssdk.services.cloudformation.model.ParameterDeclaration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #parameters(java.util.Collection) */ Builder parameters(Consumer... parameters); /** *

* The value that's defined in the Description property of the template. *

* * @param description * The value that's defined in the Description property of the template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

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

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. *

* * @param capabilities * The capabilities found within the template. If your template contains IAM resources, you must specify * the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you * use the CreateStack or UpdateStack actions with your template; otherwise, those actions * return an InsufficientCapabilities error.

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilitiesWithStrings(Collection capabilities); /** *

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

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. *

* * @param capabilities * The capabilities found within the template. If your template contains IAM resources, you must specify * the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you * use the CreateStack or UpdateStack actions with your template; otherwise, those actions * return an InsufficientCapabilities error.

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilitiesWithStrings(String... capabilities); /** *

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

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. *

* * @param capabilities * The capabilities found within the template. If your template contains IAM resources, you must specify * the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you * use the CreateStack or UpdateStack actions with your template; otherwise, those actions * return an InsufficientCapabilities error.

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilities(Collection capabilities); /** *

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

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. *

* * @param capabilities * The capabilities found within the template. If your template contains IAM resources, you must specify * the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you * use the CreateStack or UpdateStack actions with your template; otherwise, those actions * return an InsufficientCapabilities error.

*

* For more information, see Acknowledging IAM Resources in CloudFormation Templates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilities(Capability... capabilities); /** *

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

* * @param capabilitiesReason * The list of resources that generated the values in the Capabilities response element. * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilitiesReason(String capabilitiesReason); /** *

* A list of all the template resource types that are defined in the template, such as * AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance. *

* * @param resourceTypes * A list of all the template resource types that are defined in the template, such as * AWS::EC2::Instance, AWS::Dynamo::Table, and * Custom::MyCustomInstance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceTypes(Collection resourceTypes); /** *

* A list of all the template resource types that are defined in the template, such as * AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance. *

* * @param resourceTypes * A list of all the template resource types that are defined in the template, such as * AWS::EC2::Instance, AWS::Dynamo::Table, and * Custom::MyCustomInstance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceTypes(String... resourceTypes); /** *

* The Amazon Web Services template format version, which identifies the capabilities of the template. *

* * @param version * The Amazon Web Services template format version, which identifies the capabilities of the template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder version(String version); /** *

* The value that's defined for the Metadata property of the template. *

* * @param metadata * The value that's defined for the Metadata property of the template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder metadata(String metadata); /** *

* A list of the transforms that are declared in the template. *

* * @param declaredTransforms * A list of the transforms that are declared in the template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder declaredTransforms(Collection declaredTransforms); /** *

* A list of the transforms that are declared in the template. *

* * @param declaredTransforms * A list of the transforms that are declared in the template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder declaredTransforms(String... declaredTransforms); /** *

* A list of resource identifier summaries that describe the target resources of an import operation and the * properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket resource. *

* * @param resourceIdentifierSummaries * A list of resource identifier summaries that describe the target resources of an import operation and * the properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket * resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceIdentifierSummaries(Collection resourceIdentifierSummaries); /** *

* A list of resource identifier summaries that describe the target resources of an import operation and the * properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket resource. *

* * @param resourceIdentifierSummaries * A list of resource identifier summaries that describe the target resources of an import operation and * the properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket * resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceIdentifierSummaries(ResourceIdentifierSummary... resourceIdentifierSummaries); /** *

* A list of resource identifier summaries that describe the target resources of an import operation and the * properties you can provide during the import to identify the target resources. For example, * BucketName is a possible identifier property for an AWS::S3::Bucket resource. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.cloudformation.model.ResourceIdentifierSummary.Builder} avoiding the * need to create one manually via * {@link software.amazon.awssdk.services.cloudformation.model.ResourceIdentifierSummary#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.cloudformation.model.ResourceIdentifierSummary.Builder#build()} is * called immediately and its result is passed to {@link * #resourceIdentifierSummaries(List)}. * * @param resourceIdentifierSummaries * a consumer that will call methods on * {@link software.amazon.awssdk.services.cloudformation.model.ResourceIdentifierSummary.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #resourceIdentifierSummaries(java.util.Collection) */ Builder resourceIdentifierSummaries(Consumer... resourceIdentifierSummaries); /** *

* An object containing any warnings returned. *

* * @param warnings * An object containing any warnings returned. * @return Returns a reference to this object so that method calls can be chained together. */ Builder warnings(Warnings warnings); /** *

* An object containing any warnings returned. *

* This is a convenience method that creates an instance of the {@link Warnings.Builder} avoiding the need to * create one manually via {@link Warnings#builder()}. * *

* When the {@link Consumer} completes, {@link Warnings.Builder#build()} is called immediately and its result is * passed to {@link #warnings(Warnings)}. * * @param warnings * a consumer that will call methods on {@link Warnings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #warnings(Warnings) */ default Builder warnings(Consumer warnings) { return warnings(Warnings.builder().applyMutation(warnings).build()); } } static final class BuilderImpl extends CloudFormationResponse.BuilderImpl implements Builder { private List parameters = DefaultSdkAutoConstructList.getInstance(); private String description; private List capabilities = DefaultSdkAutoConstructList.getInstance(); private String capabilitiesReason; private List resourceTypes = DefaultSdkAutoConstructList.getInstance(); private String version; private String metadata; private List declaredTransforms = DefaultSdkAutoConstructList.getInstance(); private List resourceIdentifierSummaries = DefaultSdkAutoConstructList.getInstance(); private Warnings warnings; private BuilderImpl() { } private BuilderImpl(GetTemplateSummaryResponse model) { super(model); parameters(model.parameters); description(model.description); capabilitiesWithStrings(model.capabilities); capabilitiesReason(model.capabilitiesReason); resourceTypes(model.resourceTypes); version(model.version); metadata(model.metadata); declaredTransforms(model.declaredTransforms); resourceIdentifierSummaries(model.resourceIdentifierSummaries); warnings(model.warnings); } public final List getParameters() { List result = ParameterDeclarationsCopier.copyToBuilder(this.parameters); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setParameters(Collection parameters) { this.parameters = ParameterDeclarationsCopier.copyFromBuilder(parameters); } @Override public final Builder parameters(Collection parameters) { this.parameters = ParameterDeclarationsCopier.copy(parameters); return this; } @Override @SafeVarargs public final Builder parameters(ParameterDeclaration... parameters) { parameters(Arrays.asList(parameters)); return this; } @Override @SafeVarargs public final Builder parameters(Consumer... parameters) { parameters(Stream.of(parameters).map(c -> ParameterDeclaration.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final Collection getCapabilities() { if (capabilities instanceof SdkAutoConstructList) { return null; } return capabilities; } public final void setCapabilities(Collection capabilities) { this.capabilities = CapabilitiesCopier.copy(capabilities); } @Override public final Builder capabilitiesWithStrings(Collection capabilities) { this.capabilities = CapabilitiesCopier.copy(capabilities); return this; } @Override @SafeVarargs public final Builder capabilitiesWithStrings(String... capabilities) { capabilitiesWithStrings(Arrays.asList(capabilities)); return this; } @Override public final Builder capabilities(Collection capabilities) { this.capabilities = CapabilitiesCopier.copyEnumToString(capabilities); return this; } @Override @SafeVarargs public final Builder capabilities(Capability... capabilities) { capabilities(Arrays.asList(capabilities)); return this; } public final String getCapabilitiesReason() { return capabilitiesReason; } public final void setCapabilitiesReason(String capabilitiesReason) { this.capabilitiesReason = capabilitiesReason; } @Override public final Builder capabilitiesReason(String capabilitiesReason) { this.capabilitiesReason = capabilitiesReason; return this; } public final Collection getResourceTypes() { if (resourceTypes instanceof SdkAutoConstructList) { return null; } return resourceTypes; } public final void setResourceTypes(Collection resourceTypes) { this.resourceTypes = ResourceTypesCopier.copy(resourceTypes); } @Override public final Builder resourceTypes(Collection resourceTypes) { this.resourceTypes = ResourceTypesCopier.copy(resourceTypes); return this; } @Override @SafeVarargs public final Builder resourceTypes(String... resourceTypes) { resourceTypes(Arrays.asList(resourceTypes)); return this; } public final String getVersion() { return version; } public final void setVersion(String version) { this.version = version; } @Override public final Builder version(String version) { this.version = version; return this; } public final String getMetadata() { return metadata; } public final void setMetadata(String metadata) { this.metadata = metadata; } @Override public final Builder metadata(String metadata) { this.metadata = metadata; return this; } public final Collection getDeclaredTransforms() { if (declaredTransforms instanceof SdkAutoConstructList) { return null; } return declaredTransforms; } public final void setDeclaredTransforms(Collection declaredTransforms) { this.declaredTransforms = TransformsListCopier.copy(declaredTransforms); } @Override public final Builder declaredTransforms(Collection declaredTransforms) { this.declaredTransforms = TransformsListCopier.copy(declaredTransforms); return this; } @Override @SafeVarargs public final Builder declaredTransforms(String... declaredTransforms) { declaredTransforms(Arrays.asList(declaredTransforms)); return this; } public final List getResourceIdentifierSummaries() { List result = ResourceIdentifierSummariesCopier .copyToBuilder(this.resourceIdentifierSummaries); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setResourceIdentifierSummaries( Collection resourceIdentifierSummaries) { this.resourceIdentifierSummaries = ResourceIdentifierSummariesCopier.copyFromBuilder(resourceIdentifierSummaries); } @Override public final Builder resourceIdentifierSummaries(Collection resourceIdentifierSummaries) { this.resourceIdentifierSummaries = ResourceIdentifierSummariesCopier.copy(resourceIdentifierSummaries); return this; } @Override @SafeVarargs public final Builder resourceIdentifierSummaries(ResourceIdentifierSummary... resourceIdentifierSummaries) { resourceIdentifierSummaries(Arrays.asList(resourceIdentifierSummaries)); return this; } @Override @SafeVarargs public final Builder resourceIdentifierSummaries( Consumer... resourceIdentifierSummaries) { resourceIdentifierSummaries(Stream.of(resourceIdentifierSummaries) .map(c -> ResourceIdentifierSummary.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final Warnings.Builder getWarnings() { return warnings != null ? warnings.toBuilder() : null; } public final void setWarnings(Warnings.BuilderImpl warnings) { this.warnings = warnings != null ? warnings.build() : null; } @Override public final Builder warnings(Warnings warnings) { this.warnings = warnings; return this; } @Override public GetTemplateSummaryResponse build() { return new GetTemplateSummaryResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy