Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.cloudformation.model.Stack 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
/*
* Copyright 2015-2020 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.io.Serializable;
import java.time.Instant;
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 Stack data type.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class Stack implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField STACK_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::stackId)).setter(setter(Builder::stackId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackId").build()).build();
private static final SdkField STACK_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::stackName)).setter(setter(Builder::stackName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackName").build()).build();
private static final SdkField CHANGE_SET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::changeSetId)).setter(setter(Builder::changeSetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChangeSetId").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();
private static final SdkField> PARAMETERS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(Stack::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(Parameter::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.getter(getter(Stack::creationTime)).setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField DELETION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.getter(getter(Stack::deletionTime)).setter(setter(Builder::deletionTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeletionTime").build()).build();
private static final SdkField LAST_UPDATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.getter(getter(Stack::lastUpdatedTime)).setter(setter(Builder::lastUpdatedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastUpdatedTime").build()).build();
private static final SdkField ROLLBACK_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(Stack::rollbackConfiguration))
.setter(setter(Builder::rollbackConfiguration)).constructor(RollbackConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RollbackConfiguration").build())
.build();
private static final SdkField STACK_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::stackStatusAsString)).setter(setter(Builder::stackStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackStatus").build()).build();
private static final SdkField STACK_STATUS_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::stackStatusReason)).setter(setter(Builder::stackStatusReason))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackStatusReason").build()).build();
private static final SdkField DISABLE_ROLLBACK_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.getter(getter(Stack::disableRollback)).setter(setter(Builder::disableRollback))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisableRollback").build()).build();
private static final SdkField> NOTIFICATION_AR_NS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(Stack::notificationARNs))
.setter(setter(Builder::notificationARNs))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NotificationARNs").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 TIMEOUT_IN_MINUTES_FIELD = SdkField. builder(MarshallingType.INTEGER)
.getter(getter(Stack::timeoutInMinutes)).setter(setter(Builder::timeoutInMinutes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TimeoutInMinutes").build()).build();
private static final SdkField> CAPABILITIES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(Stack::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> OUTPUTS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(Stack::outputs))
.setter(setter(Builder::outputs))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Outputs").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Output::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::roleARN)).setter(setter(Builder::roleARN))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleARN").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(Stack::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField ENABLE_TERMINATION_PROTECTION_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.getter(getter(Stack::enableTerminationProtection))
.setter(setter(Builder::enableTerminationProtection))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableTerminationProtection")
.build()).build();
private static final SdkField PARENT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::parentId)).setter(setter(Builder::parentId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParentId").build()).build();
private static final SdkField ROOT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(Stack::rootId)).setter(setter(Builder::rootId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RootId").build()).build();
private static final SdkField DRIFT_INFORMATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(Stack::driftInformation))
.setter(setter(Builder::driftInformation)).constructor(StackDriftInformation::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DriftInformation").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STACK_ID_FIELD,
STACK_NAME_FIELD, CHANGE_SET_ID_FIELD, DESCRIPTION_FIELD, PARAMETERS_FIELD, CREATION_TIME_FIELD, DELETION_TIME_FIELD,
LAST_UPDATED_TIME_FIELD, ROLLBACK_CONFIGURATION_FIELD, STACK_STATUS_FIELD, STACK_STATUS_REASON_FIELD,
DISABLE_ROLLBACK_FIELD, NOTIFICATION_AR_NS_FIELD, TIMEOUT_IN_MINUTES_FIELD, CAPABILITIES_FIELD, OUTPUTS_FIELD,
ROLE_ARN_FIELD, TAGS_FIELD, ENABLE_TERMINATION_PROTECTION_FIELD, PARENT_ID_FIELD, ROOT_ID_FIELD,
DRIFT_INFORMATION_FIELD));
private static final long serialVersionUID = 1L;
private final String stackId;
private final String stackName;
private final String changeSetId;
private final String description;
private final List parameters;
private final Instant creationTime;
private final Instant deletionTime;
private final Instant lastUpdatedTime;
private final RollbackConfiguration rollbackConfiguration;
private final String stackStatus;
private final String stackStatusReason;
private final Boolean disableRollback;
private final List notificationARNs;
private final Integer timeoutInMinutes;
private final List capabilities;
private final List outputs;
private final String roleARN;
private final List tags;
private final Boolean enableTerminationProtection;
private final String parentId;
private final String rootId;
private final StackDriftInformation driftInformation;
private Stack(BuilderImpl builder) {
this.stackId = builder.stackId;
this.stackName = builder.stackName;
this.changeSetId = builder.changeSetId;
this.description = builder.description;
this.parameters = builder.parameters;
this.creationTime = builder.creationTime;
this.deletionTime = builder.deletionTime;
this.lastUpdatedTime = builder.lastUpdatedTime;
this.rollbackConfiguration = builder.rollbackConfiguration;
this.stackStatus = builder.stackStatus;
this.stackStatusReason = builder.stackStatusReason;
this.disableRollback = builder.disableRollback;
this.notificationARNs = builder.notificationARNs;
this.timeoutInMinutes = builder.timeoutInMinutes;
this.capabilities = builder.capabilities;
this.outputs = builder.outputs;
this.roleARN = builder.roleARN;
this.tags = builder.tags;
this.enableTerminationProtection = builder.enableTerminationProtection;
this.parentId = builder.parentId;
this.rootId = builder.rootId;
this.driftInformation = builder.driftInformation;
}
/**
*
* Unique identifier of the stack.
*
*
* @return Unique identifier of the stack.
*/
public String stackId() {
return stackId;
}
/**
*
* The name associated with the stack.
*
*
* @return The name associated with the stack.
*/
public String stackName() {
return stackName;
}
/**
*
* The unique ID of the change set.
*
*
* @return The unique ID of the change set.
*/
public String changeSetId() {
return changeSetId;
}
/**
*
* A user-defined description associated with the stack.
*
*
* @return A user-defined description associated with the stack.
*/
public String description() {
return description;
}
/**
* Returns true if the Parameters property was specified by the sender (it may be empty), or false if the sender did
* not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasParameters() {
return parameters != null && !(parameters instanceof SdkAutoConstructList);
}
/**
*
* A list of Parameter
structures.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasParameters()} to see if a value was sent in this field.
*
*
* @return A list of Parameter
structures.
*/
public List parameters() {
return parameters;
}
/**
*
* The time at which the stack was created.
*
*
* @return The time at which the stack was created.
*/
public Instant creationTime() {
return creationTime;
}
/**
*
* The time the stack was deleted.
*
*
* @return The time the stack was deleted.
*/
public Instant deletionTime() {
return deletionTime;
}
/**
*
* The time the stack was last updated. This field will only be returned if the stack has been updated at least
* once.
*
*
* @return The time the stack was last updated. This field will only be returned if the stack has been updated at
* least once.
*/
public Instant lastUpdatedTime() {
return lastUpdatedTime;
}
/**
*
* The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and for
* the specified monitoring period afterwards.
*
*
* @return The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations,
* and for the specified monitoring period afterwards.
*/
public RollbackConfiguration rollbackConfiguration() {
return rollbackConfiguration;
}
/**
*
* Current status of the stack.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #stackStatus} will
* return {@link StackStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #stackStatusAsString}.
*
*
* @return Current status of the stack.
* @see StackStatus
*/
public StackStatus stackStatus() {
return StackStatus.fromValue(stackStatus);
}
/**
*
* Current status of the stack.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #stackStatus} will
* return {@link StackStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #stackStatusAsString}.
*
*
* @return Current status of the stack.
* @see StackStatus
*/
public String stackStatusAsString() {
return stackStatus;
}
/**
*
* Success/failure message associated with the stack status.
*
*
* @return Success/failure message associated with the stack status.
*/
public String stackStatusReason() {
return stackStatusReason;
}
/**
*
* Boolean to enable or disable rollback on stack creation failures:
*
*
*
* @return Boolean to enable or disable rollback on stack creation failures:
*
*
*
* true
: disable rollback
*
*
*
*
* false
: enable rollback
*
*
*/
public Boolean disableRollback() {
return disableRollback;
}
/**
* Returns true if the NotificationARNs property was specified by the sender (it may be empty), or false if the
* sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/
public boolean hasNotificationARNs() {
return notificationARNs != null && !(notificationARNs instanceof SdkAutoConstructList);
}
/**
*
* SNS topic ARNs to which stack related events are published.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasNotificationARNs()} to see if a value was sent in this field.
*
*
* @return SNS topic ARNs to which stack related events are published.
*/
public List notificationARNs() {
return notificationARNs;
}
/**
*
* The amount of time within which stack creation should complete.
*
*
* @return The amount of time within which stack creation should complete.
*/
public Integer timeoutInMinutes() {
return timeoutInMinutes;
}
/**
*
* The capabilities allowed in the stack.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasCapabilities()} to see if a value was sent in this field.
*
*
* @return The capabilities allowed in the stack.
*/
public List capabilities() {
return CapabilitiesCopier.copyStringToEnum(capabilities);
}
/**
* Returns true if the Capabilities property was specified by the sender (it may be empty), or false if the sender
* did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasCapabilities() {
return capabilities != null && !(capabilities instanceof SdkAutoConstructList);
}
/**
*
* The capabilities allowed in the stack.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasCapabilities()} to see if a value was sent in this field.
*
*
* @return The capabilities allowed in the stack.
*/
public List capabilitiesAsStrings() {
return capabilities;
}
/**
* Returns true if the Outputs property was specified by the sender (it may be empty), or false if the sender did
* not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasOutputs() {
return outputs != null && !(outputs instanceof SdkAutoConstructList);
}
/**
*
* A list of output structures.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasOutputs()} to see if a value was sent in this field.
*
*
* @return A list of output structures.
*/
public List outputs() {
return outputs;
}
/**
*
* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that is associated with the
* stack. During a stack operation, AWS CloudFormation uses this role's credentials to make calls on your behalf.
*
*
* @return The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that is associated
* with the stack. During a stack operation, AWS CloudFormation uses this role's credentials to make calls
* on your behalf.
*/
public String roleARN() {
return roleARN;
}
/**
* Returns true if the Tags property was specified by the sender (it may be empty), or false if the sender did not
* specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* A list of Tag
s that specify information about the stack.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasTags()} to see if a value was sent in this field.
*
*
* @return A list of Tag
s that specify information about the stack.
*/
public List tags() {
return tags;
}
/**
*
* Whether termination protection is enabled for the stack.
*
*
* For nested
* stacks , termination protection is set on the root stack and cannot be changed directly on the nested stack.
* For more information, see Protecting a
* Stack From Being Deleted in the AWS CloudFormation User Guide .
*
*
* @return Whether termination protection is enabled for the stack.
*
* For
* nested stacks , termination protection is set on the root stack and cannot be changed directly on the
* nested stack. For more information, see Protecting a Stack From Being Deleted in the AWS CloudFormation User Guide .
*/
public Boolean enableTerminationProtection() {
return enableTerminationProtection;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this
* stack. For the first level of nested stacks, the root stack is also the parent stack.
*
*
* For more information, see Working with
* Nested Stacks in the AWS CloudFormation User Guide .
*
*
* @return For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of
* this stack. For the first level of nested stacks, the root stack is also the parent stack.
*
* For more information, see Working
* with Nested Stacks in the AWS CloudFormation User Guide .
*/
public String parentId() {
return parentId;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which
* the nested stack ultimately belongs.
*
*
* For more information, see Working with
* Nested Stacks in the AWS CloudFormation User Guide .
*
*
* @return For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to
* which the nested stack ultimately belongs.
*
* For more information, see Working
* with Nested Stacks in the AWS CloudFormation User Guide .
*/
public String rootId() {
return rootId;
}
/**
*
* Information on whether a stack's actual configuration differs, or has drifted , from it's expected
* configuration, as defined in the stack template and any values specified as template parameters. For more
* information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources .
*
*
* @return Information on whether a stack's actual configuration differs, or has drifted , from it's expected
* configuration, as defined in the stack template and any values specified as template parameters. For more
* information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources .
*/
public StackDriftInformation driftInformation() {
return driftInformation;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(stackId());
hashCode = 31 * hashCode + Objects.hashCode(stackName());
hashCode = 31 * hashCode + Objects.hashCode(changeSetId());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(parameters());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(deletionTime());
hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTime());
hashCode = 31 * hashCode + Objects.hashCode(rollbackConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(stackStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(stackStatusReason());
hashCode = 31 * hashCode + Objects.hashCode(disableRollback());
hashCode = 31 * hashCode + Objects.hashCode(notificationARNs());
hashCode = 31 * hashCode + Objects.hashCode(timeoutInMinutes());
hashCode = 31 * hashCode + Objects.hashCode(capabilitiesAsStrings());
hashCode = 31 * hashCode + Objects.hashCode(outputs());
hashCode = 31 * hashCode + Objects.hashCode(roleARN());
hashCode = 31 * hashCode + Objects.hashCode(tags());
hashCode = 31 * hashCode + Objects.hashCode(enableTerminationProtection());
hashCode = 31 * hashCode + Objects.hashCode(parentId());
hashCode = 31 * hashCode + Objects.hashCode(rootId());
hashCode = 31 * hashCode + Objects.hashCode(driftInformation());
return hashCode;
}
@Override
public boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof Stack)) {
return false;
}
Stack other = (Stack) obj;
return Objects.equals(stackId(), other.stackId()) && Objects.equals(stackName(), other.stackName())
&& Objects.equals(changeSetId(), other.changeSetId()) && Objects.equals(description(), other.description())
&& Objects.equals(parameters(), other.parameters()) && Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(deletionTime(), other.deletionTime())
&& Objects.equals(lastUpdatedTime(), other.lastUpdatedTime())
&& Objects.equals(rollbackConfiguration(), other.rollbackConfiguration())
&& Objects.equals(stackStatusAsString(), other.stackStatusAsString())
&& Objects.equals(stackStatusReason(), other.stackStatusReason())
&& Objects.equals(disableRollback(), other.disableRollback())
&& Objects.equals(notificationARNs(), other.notificationARNs())
&& Objects.equals(timeoutInMinutes(), other.timeoutInMinutes())
&& Objects.equals(capabilitiesAsStrings(), other.capabilitiesAsStrings())
&& Objects.equals(outputs(), other.outputs()) && Objects.equals(roleARN(), other.roleARN())
&& Objects.equals(tags(), other.tags())
&& Objects.equals(enableTerminationProtection(), other.enableTerminationProtection())
&& Objects.equals(parentId(), other.parentId()) && Objects.equals(rootId(), other.rootId())
&& Objects.equals(driftInformation(), other.driftInformation());
}
/**
* 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 String toString() {
return ToString.builder("Stack").add("StackId", stackId()).add("StackName", stackName())
.add("ChangeSetId", changeSetId()).add("Description", description()).add("Parameters", parameters())
.add("CreationTime", creationTime()).add("DeletionTime", deletionTime())
.add("LastUpdatedTime", lastUpdatedTime()).add("RollbackConfiguration", rollbackConfiguration())
.add("StackStatus", stackStatusAsString()).add("StackStatusReason", stackStatusReason())
.add("DisableRollback", disableRollback()).add("NotificationARNs", notificationARNs())
.add("TimeoutInMinutes", timeoutInMinutes()).add("Capabilities", capabilitiesAsStrings())
.add("Outputs", outputs()).add("RoleARN", roleARN()).add("Tags", tags())
.add("EnableTerminationProtection", enableTerminationProtection()).add("ParentId", parentId())
.add("RootId", rootId()).add("DriftInformation", driftInformation()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "StackId":
return Optional.ofNullable(clazz.cast(stackId()));
case "StackName":
return Optional.ofNullable(clazz.cast(stackName()));
case "ChangeSetId":
return Optional.ofNullable(clazz.cast(changeSetId()));
case "Description":
return Optional.ofNullable(clazz.cast(description()));
case "Parameters":
return Optional.ofNullable(clazz.cast(parameters()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "DeletionTime":
return Optional.ofNullable(clazz.cast(deletionTime()));
case "LastUpdatedTime":
return Optional.ofNullable(clazz.cast(lastUpdatedTime()));
case "RollbackConfiguration":
return Optional.ofNullable(clazz.cast(rollbackConfiguration()));
case "StackStatus":
return Optional.ofNullable(clazz.cast(stackStatusAsString()));
case "StackStatusReason":
return Optional.ofNullable(clazz.cast(stackStatusReason()));
case "DisableRollback":
return Optional.ofNullable(clazz.cast(disableRollback()));
case "NotificationARNs":
return Optional.ofNullable(clazz.cast(notificationARNs()));
case "TimeoutInMinutes":
return Optional.ofNullable(clazz.cast(timeoutInMinutes()));
case "Capabilities":
return Optional.ofNullable(clazz.cast(capabilitiesAsStrings()));
case "Outputs":
return Optional.ofNullable(clazz.cast(outputs()));
case "RoleARN":
return Optional.ofNullable(clazz.cast(roleARN()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "EnableTerminationProtection":
return Optional.ofNullable(clazz.cast(enableTerminationProtection()));
case "ParentId":
return Optional.ofNullable(clazz.cast(parentId()));
case "RootId":
return Optional.ofNullable(clazz.cast(rootId()));
case "DriftInformation":
return Optional.ofNullable(clazz.cast(driftInformation()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((Stack) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* Unique identifier of the stack.
*
*
* @param stackId
* Unique identifier of the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder stackId(String stackId);
/**
*
* The name associated with the stack.
*
*
* @param stackName
* The name associated with the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder stackName(String stackName);
/**
*
* The unique ID of the change set.
*
*
* @param changeSetId
* The unique ID of the change set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder changeSetId(String changeSetId);
/**
*
* A user-defined description associated with the stack.
*
*
* @param description
* A user-defined description associated with the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder description(String description);
/**
*
* A list of Parameter
structures.
*
*
* @param parameters
* A list of Parameter
structures.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder parameters(Collection parameters);
/**
*
* A list of Parameter
structures.
*
*
* @param parameters
* A list of Parameter
structures.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder parameters(Parameter... parameters);
/**
*
* A list of Parameter
structures.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to
* create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its
* result is passed to {@link #parameters(List)}.
*
* @param parameters
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #parameters(List)
*/
Builder parameters(Consumer... parameters);
/**
*
* The time at which the stack was created.
*
*
* @param creationTime
* The time at which the stack was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder creationTime(Instant creationTime);
/**
*
* The time the stack was deleted.
*
*
* @param deletionTime
* The time the stack was deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder deletionTime(Instant deletionTime);
/**
*
* The time the stack was last updated. This field will only be returned if the stack has been updated at least
* once.
*
*
* @param lastUpdatedTime
* The time the stack was last updated. This field will only be returned if the stack has been updated at
* least once.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lastUpdatedTime(Instant lastUpdatedTime);
/**
*
* The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and
* for the specified monitoring period afterwards.
*
*
* @param rollbackConfiguration
* The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations,
* and for the specified monitoring period afterwards.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder rollbackConfiguration(RollbackConfiguration rollbackConfiguration);
/**
*
* The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and
* for the specified monitoring period afterwards.
*
* This is a convenience that creates an instance of the {@link RollbackConfiguration.Builder} avoiding the need
* to create one manually via {@link RollbackConfiguration#builder()}.
*
* When the {@link Consumer} completes, {@link RollbackConfiguration.Builder#build()} is called immediately and
* its result is passed to {@link #rollbackConfiguration(RollbackConfiguration)}.
*
* @param rollbackConfiguration
* a consumer that will call methods on {@link RollbackConfiguration.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #rollbackConfiguration(RollbackConfiguration)
*/
default Builder rollbackConfiguration(Consumer rollbackConfiguration) {
return rollbackConfiguration(RollbackConfiguration.builder().applyMutation(rollbackConfiguration).build());
}
/**
*
* Current status of the stack.
*
*
* @param stackStatus
* Current status of the stack.
* @see StackStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see StackStatus
*/
Builder stackStatus(String stackStatus);
/**
*
* Current status of the stack.
*
*
* @param stackStatus
* Current status of the stack.
* @see StackStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see StackStatus
*/
Builder stackStatus(StackStatus stackStatus);
/**
*
* Success/failure message associated with the stack status.
*
*
* @param stackStatusReason
* Success/failure message associated with the stack status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder stackStatusReason(String stackStatusReason);
/**
*
* Boolean to enable or disable rollback on stack creation failures:
*
*
*
* @param disableRollback
* Boolean to enable or disable rollback on stack creation failures:
*
*
*
* true
: disable rollback
*
*
*
*
* false
: enable rollback
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder disableRollback(Boolean disableRollback);
/**
*
* SNS topic ARNs to which stack related events are published.
*
*
* @param notificationARNs
* SNS topic ARNs to which stack related events are published.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder notificationARNs(Collection notificationARNs);
/**
*
* SNS topic ARNs to which stack related events are published.
*
*
* @param notificationARNs
* SNS topic ARNs to which stack related events are published.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder notificationARNs(String... notificationARNs);
/**
*
* The amount of time within which stack creation should complete.
*
*
* @param timeoutInMinutes
* The amount of time within which stack creation should complete.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder timeoutInMinutes(Integer timeoutInMinutes);
/**
*
* The capabilities allowed in the stack.
*
*
* @param capabilities
* The capabilities allowed in the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder capabilitiesWithStrings(Collection capabilities);
/**
*
* The capabilities allowed in the stack.
*
*
* @param capabilities
* The capabilities allowed in the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder capabilitiesWithStrings(String... capabilities);
/**
*
* The capabilities allowed in the stack.
*
*
* @param capabilities
* The capabilities allowed in the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder capabilities(Collection capabilities);
/**
*
* The capabilities allowed in the stack.
*
*
* @param capabilities
* The capabilities allowed in the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder capabilities(Capability... capabilities);
/**
*
* A list of output structures.
*
*
* @param outputs
* A list of output structures.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputs(Collection outputs);
/**
*
* A list of output structures.
*
*
* @param outputs
* A list of output structures.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputs(Output... outputs);
/**
*
* A list of output structures.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to
* create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its
* result is passed to {@link #outputs(List)}.
*
* @param outputs
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #outputs(List)
*/
Builder outputs(Consumer... outputs);
/**
*
* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that is associated with
* the stack. During a stack operation, AWS CloudFormation uses this role's credentials to make calls on your
* behalf.
*
*
* @param roleARN
* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that is associated
* with the stack. During a stack operation, AWS CloudFormation uses this role's credentials to make
* calls on your behalf.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder roleARN(String roleARN);
/**
*
* A list of Tag
s that specify information about the stack.
*
*
* @param tags
* A list of Tag
s that specify information about the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Collection tags);
/**
*
* A list of Tag
s that specify information about the stack.
*
*
* @param tags
* A list of Tag
s that specify information about the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Tag... tags);
/**
*
* A list of Tag
s that specify information about the stack.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to create
* one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result
* is passed to {@link #tags(List)}.
*
* @param tags
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #tags(List)
*/
Builder tags(Consumer... tags);
/**
*
* Whether termination protection is enabled for the stack.
*
*
* For nested
* stacks , termination protection is set on the root stack and cannot be changed directly on the nested
* stack. For more information, see Protecting
* a Stack From Being Deleted in the AWS CloudFormation User Guide .
*
*
* @param enableTerminationProtection
* Whether termination protection is enabled for the stack.
*
* For nested stacks , termination protection is set on the root stack and cannot be changed directly on
* the nested stack. For more information, see Protecting a Stack From Being Deleted in the AWS CloudFormation User Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder enableTerminationProtection(Boolean enableTerminationProtection);
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this
* stack. For the first level of nested stacks, the root stack is also the parent stack.
*
*
* For more information, see Working
* with Nested Stacks in the AWS CloudFormation User Guide .
*
*
* @param parentId
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of
* this stack. For the first level of nested stacks, the root stack is also the parent stack.
*
* For more information, see Working with Nested Stacks in the AWS CloudFormation User Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder parentId(String parentId);
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to
* which the nested stack ultimately belongs.
*
*
* For more information, see Working
* with Nested Stacks in the AWS CloudFormation User Guide .
*
*
* @param rootId
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack
* to which the nested stack ultimately belongs.
*
* For more information, see Working with Nested Stacks in the AWS CloudFormation User Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder rootId(String rootId);
/**
*
* Information on whether a stack's actual configuration differs, or has drifted , from it's expected
* configuration, as defined in the stack template and any values specified as template parameters. For more
* information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources .
*
*
* @param driftInformation
* Information on whether a stack's actual configuration differs, or has drifted , from it's
* expected configuration, as defined in the stack template and any values specified as template
* parameters. For more information, see Detecting Unregulated Configuration Changes to Stacks and Resources .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder driftInformation(StackDriftInformation driftInformation);
/**
*
* Information on whether a stack's actual configuration differs, or has drifted , from it's expected
* configuration, as defined in the stack template and any values specified as template parameters. For more
* information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources .
*
* This is a convenience that creates an instance of the {@link StackDriftInformation.Builder} avoiding the need
* to create one manually via {@link StackDriftInformation#builder()}.
*
* When the {@link Consumer} completes, {@link StackDriftInformation.Builder#build()} is called immediately and
* its result is passed to {@link #driftInformation(StackDriftInformation)}.
*
* @param driftInformation
* a consumer that will call methods on {@link StackDriftInformation.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #driftInformation(StackDriftInformation)
*/
default Builder driftInformation(Consumer driftInformation) {
return driftInformation(StackDriftInformation.builder().applyMutation(driftInformation).build());
}
}
static final class BuilderImpl implements Builder {
private String stackId;
private String stackName;
private String changeSetId;
private String description;
private List parameters = DefaultSdkAutoConstructList.getInstance();
private Instant creationTime;
private Instant deletionTime;
private Instant lastUpdatedTime;
private RollbackConfiguration rollbackConfiguration;
private String stackStatus;
private String stackStatusReason;
private Boolean disableRollback;
private List notificationARNs = DefaultSdkAutoConstructList.getInstance();
private Integer timeoutInMinutes;
private List capabilities = DefaultSdkAutoConstructList.getInstance();
private List outputs = DefaultSdkAutoConstructList.getInstance();
private String roleARN;
private List tags = DefaultSdkAutoConstructList.getInstance();
private Boolean enableTerminationProtection;
private String parentId;
private String rootId;
private StackDriftInformation driftInformation;
private BuilderImpl() {
}
private BuilderImpl(Stack model) {
stackId(model.stackId);
stackName(model.stackName);
changeSetId(model.changeSetId);
description(model.description);
parameters(model.parameters);
creationTime(model.creationTime);
deletionTime(model.deletionTime);
lastUpdatedTime(model.lastUpdatedTime);
rollbackConfiguration(model.rollbackConfiguration);
stackStatus(model.stackStatus);
stackStatusReason(model.stackStatusReason);
disableRollback(model.disableRollback);
notificationARNs(model.notificationARNs);
timeoutInMinutes(model.timeoutInMinutes);
capabilitiesWithStrings(model.capabilities);
outputs(model.outputs);
roleARN(model.roleARN);
tags(model.tags);
enableTerminationProtection(model.enableTerminationProtection);
parentId(model.parentId);
rootId(model.rootId);
driftInformation(model.driftInformation);
}
public final String getStackId() {
return stackId;
}
@Override
public final Builder stackId(String stackId) {
this.stackId = stackId;
return this;
}
public final void setStackId(String stackId) {
this.stackId = stackId;
}
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;
}
public final String getChangeSetId() {
return changeSetId;
}
@Override
public final Builder changeSetId(String changeSetId) {
this.changeSetId = changeSetId;
return this;
}
public final void setChangeSetId(String changeSetId) {
this.changeSetId = changeSetId;
}
public final String getDescription() {
return description;
}
@Override
public final Builder description(String description) {
this.description = description;
return this;
}
public final void setDescription(String description) {
this.description = description;
}
public final Collection getParameters() {
return parameters != null ? parameters.stream().map(Parameter::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder parameters(Collection parameters) {
this.parameters = ParametersCopier.copy(parameters);
return this;
}
@Override
@SafeVarargs
public final Builder parameters(Parameter... parameters) {
parameters(Arrays.asList(parameters));
return this;
}
@Override
@SafeVarargs
public final Builder parameters(Consumer... parameters) {
parameters(Stream.of(parameters).map(c -> Parameter.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
public final void setParameters(Collection parameters) {
this.parameters = ParametersCopier.copyFromBuilder(parameters);
}
public final Instant getCreationTime() {
return creationTime;
}
@Override
public final Builder creationTime(Instant creationTime) {
this.creationTime = creationTime;
return this;
}
public final void setCreationTime(Instant creationTime) {
this.creationTime = creationTime;
}
public final Instant getDeletionTime() {
return deletionTime;
}
@Override
public final Builder deletionTime(Instant deletionTime) {
this.deletionTime = deletionTime;
return this;
}
public final void setDeletionTime(Instant deletionTime) {
this.deletionTime = deletionTime;
}
public final Instant getLastUpdatedTime() {
return lastUpdatedTime;
}
@Override
public final Builder lastUpdatedTime(Instant lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
return this;
}
public final void setLastUpdatedTime(Instant lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
public final RollbackConfiguration.Builder getRollbackConfiguration() {
return rollbackConfiguration != null ? rollbackConfiguration.toBuilder() : null;
}
@Override
public final Builder rollbackConfiguration(RollbackConfiguration rollbackConfiguration) {
this.rollbackConfiguration = rollbackConfiguration;
return this;
}
public final void setRollbackConfiguration(RollbackConfiguration.BuilderImpl rollbackConfiguration) {
this.rollbackConfiguration = rollbackConfiguration != null ? rollbackConfiguration.build() : null;
}
public final String getStackStatusAsString() {
return stackStatus;
}
@Override
public final Builder stackStatus(String stackStatus) {
this.stackStatus = stackStatus;
return this;
}
@Override
public final Builder stackStatus(StackStatus stackStatus) {
this.stackStatus(stackStatus == null ? null : stackStatus.toString());
return this;
}
public final void setStackStatus(String stackStatus) {
this.stackStatus = stackStatus;
}
public final String getStackStatusReason() {
return stackStatusReason;
}
@Override
public final Builder stackStatusReason(String stackStatusReason) {
this.stackStatusReason = stackStatusReason;
return this;
}
public final void setStackStatusReason(String stackStatusReason) {
this.stackStatusReason = stackStatusReason;
}
public final Boolean getDisableRollback() {
return disableRollback;
}
@Override
public final Builder disableRollback(Boolean disableRollback) {
this.disableRollback = disableRollback;
return this;
}
public final void setDisableRollback(Boolean disableRollback) {
this.disableRollback = disableRollback;
}
public final Collection getNotificationARNs() {
return notificationARNs;
}
@Override
public final Builder notificationARNs(Collection notificationARNs) {
this.notificationARNs = NotificationARNsCopier.copy(notificationARNs);
return this;
}
@Override
@SafeVarargs
public final Builder notificationARNs(String... notificationARNs) {
notificationARNs(Arrays.asList(notificationARNs));
return this;
}
public final void setNotificationARNs(Collection notificationARNs) {
this.notificationARNs = NotificationARNsCopier.copy(notificationARNs);
}
public final Integer getTimeoutInMinutes() {
return timeoutInMinutes;
}
@Override
public final Builder timeoutInMinutes(Integer timeoutInMinutes) {
this.timeoutInMinutes = timeoutInMinutes;
return this;
}
public final void setTimeoutInMinutes(Integer timeoutInMinutes) {
this.timeoutInMinutes = timeoutInMinutes;
}
public final Collection getCapabilitiesAsStrings() {
return 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 void setCapabilitiesWithStrings(Collection capabilities) {
this.capabilities = CapabilitiesCopier.copy(capabilities);
}
public final Collection getOutputs() {
return outputs != null ? outputs.stream().map(Output::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder outputs(Collection outputs) {
this.outputs = OutputsCopier.copy(outputs);
return this;
}
@Override
@SafeVarargs
public final Builder outputs(Output... outputs) {
outputs(Arrays.asList(outputs));
return this;
}
@Override
@SafeVarargs
public final Builder outputs(Consumer... outputs) {
outputs(Stream.of(outputs).map(c -> Output.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
public final void setOutputs(Collection outputs) {
this.outputs = OutputsCopier.copyFromBuilder(outputs);
}
public final String getRoleARN() {
return roleARN;
}
@Override
public final Builder roleARN(String roleARN) {
this.roleARN = roleARN;
return this;
}
public final void setRoleARN(String roleARN) {
this.roleARN = roleARN;
}
public final Collection getTags() {
return tags != null ? tags.stream().map(Tag::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder tags(Collection tags) {
this.tags = TagsCopier.copy(tags);
return this;
}
@Override
@SafeVarargs
public final Builder tags(Tag... tags) {
tags(Arrays.asList(tags));
return this;
}
@Override
@SafeVarargs
public final Builder tags(Consumer... tags) {
tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
public final void setTags(Collection tags) {
this.tags = TagsCopier.copyFromBuilder(tags);
}
public final Boolean getEnableTerminationProtection() {
return enableTerminationProtection;
}
@Override
public final Builder enableTerminationProtection(Boolean enableTerminationProtection) {
this.enableTerminationProtection = enableTerminationProtection;
return this;
}
public final void setEnableTerminationProtection(Boolean enableTerminationProtection) {
this.enableTerminationProtection = enableTerminationProtection;
}
public final String getParentId() {
return parentId;
}
@Override
public final Builder parentId(String parentId) {
this.parentId = parentId;
return this;
}
public final void setParentId(String parentId) {
this.parentId = parentId;
}
public final String getRootId() {
return rootId;
}
@Override
public final Builder rootId(String rootId) {
this.rootId = rootId;
return this;
}
public final void setRootId(String rootId) {
this.rootId = rootId;
}
public final StackDriftInformation.Builder getDriftInformation() {
return driftInformation != null ? driftInformation.toBuilder() : null;
}
@Override
public final Builder driftInformation(StackDriftInformation driftInformation) {
this.driftInformation = driftInformation;
return this;
}
public final void setDriftInformation(StackDriftInformation.BuilderImpl driftInformation) {
this.driftInformation = driftInformation != null ? driftInformation.build() : null;
}
@Override
public Stack build() {
return new Stack(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}