software.amazon.awssdk.services.cloudformation.model.DescribeChangeSetResponse Maven / Gradle / Ivy
Show all versions of cloudformation Show documentation
/*
* 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.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 output for the DescribeChangeSet action.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DescribeChangeSetResponse extends CloudFormationResponse implements
ToCopyableBuilder {
private static final SdkField CHANGE_SET_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ChangeSetName").getter(getter(DescribeChangeSetResponse::changeSetName))
.setter(setter(Builder::changeSetName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChangeSetName").build()).build();
private static final SdkField CHANGE_SET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ChangeSetId").getter(getter(DescribeChangeSetResponse::changeSetId))
.setter(setter(Builder::changeSetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChangeSetId").build()).build();
private static final SdkField STACK_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StackId").getter(getter(DescribeChangeSetResponse::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)
.memberName("StackName").getter(getter(DescribeChangeSetResponse::stackName)).setter(setter(Builder::stackName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackName").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Description").getter(getter(DescribeChangeSetResponse::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)
.memberName("Parameters")
.getter(getter(DescribeChangeSetResponse::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)
.memberName("CreationTime").getter(getter(DescribeChangeSetResponse::creationTime))
.setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField EXECUTION_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ExecutionStatus").getter(getter(DescribeChangeSetResponse::executionStatusAsString))
.setter(setter(Builder::executionStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExecutionStatus").build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status")
.getter(getter(DescribeChangeSetResponse::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build();
private static final SdkField STATUS_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StatusReason").getter(getter(DescribeChangeSetResponse::statusReason))
.setter(setter(Builder::statusReason))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusReason").build()).build();
private static final SdkField> NOTIFICATION_AR_NS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("NotificationARNs")
.getter(getter(DescribeChangeSetResponse::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 ROLLBACK_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RollbackConfiguration")
.getter(getter(DescribeChangeSetResponse::rollbackConfiguration)).setter(setter(Builder::rollbackConfiguration))
.constructor(RollbackConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RollbackConfiguration").build())
.build();
private static final SdkField> CAPABILITIES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Capabilities")
.getter(getter(DescribeChangeSetResponse::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> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Tags")
.getter(getter(DescribeChangeSetResponse::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> CHANGES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Changes")
.getter(getter(DescribeChangeSetResponse::changes))
.setter(setter(Builder::changes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Changes").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Change::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField NEXT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("NextToken").getter(getter(DescribeChangeSetResponse::nextToken)).setter(setter(Builder::nextToken))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NextToken").build()).build();
private static final SdkField INCLUDE_NESTED_STACKS_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("IncludeNestedStacks").getter(getter(DescribeChangeSetResponse::includeNestedStacks))
.setter(setter(Builder::includeNestedStacks))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IncludeNestedStacks").build())
.build();
private static final SdkField PARENT_CHANGE_SET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ParentChangeSetId").getter(getter(DescribeChangeSetResponse::parentChangeSetId))
.setter(setter(Builder::parentChangeSetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParentChangeSetId").build()).build();
private static final SdkField ROOT_CHANGE_SET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RootChangeSetId").getter(getter(DescribeChangeSetResponse::rootChangeSetId))
.setter(setter(Builder::rootChangeSetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RootChangeSetId").build()).build();
private static final SdkField ON_STACK_FAILURE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("OnStackFailure").getter(getter(DescribeChangeSetResponse::onStackFailureAsString))
.setter(setter(Builder::onStackFailure))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OnStackFailure").build()).build();
private static final SdkField IMPORT_EXISTING_RESOURCES_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("ImportExistingResources").getter(getter(DescribeChangeSetResponse::importExistingResources))
.setter(setter(Builder::importExistingResources))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImportExistingResources").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CHANGE_SET_NAME_FIELD,
CHANGE_SET_ID_FIELD, STACK_ID_FIELD, STACK_NAME_FIELD, DESCRIPTION_FIELD, PARAMETERS_FIELD, CREATION_TIME_FIELD,
EXECUTION_STATUS_FIELD, STATUS_FIELD, STATUS_REASON_FIELD, NOTIFICATION_AR_NS_FIELD, ROLLBACK_CONFIGURATION_FIELD,
CAPABILITIES_FIELD, TAGS_FIELD, CHANGES_FIELD, NEXT_TOKEN_FIELD, INCLUDE_NESTED_STACKS_FIELD,
PARENT_CHANGE_SET_ID_FIELD, ROOT_CHANGE_SET_ID_FIELD, ON_STACK_FAILURE_FIELD, IMPORT_EXISTING_RESOURCES_FIELD));
private final String changeSetName;
private final String changeSetId;
private final String stackId;
private final String stackName;
private final String description;
private final List parameters;
private final Instant creationTime;
private final String executionStatus;
private final String status;
private final String statusReason;
private final List notificationARNs;
private final RollbackConfiguration rollbackConfiguration;
private final List capabilities;
private final List tags;
private final List changes;
private final String nextToken;
private final Boolean includeNestedStacks;
private final String parentChangeSetId;
private final String rootChangeSetId;
private final String onStackFailure;
private final Boolean importExistingResources;
private DescribeChangeSetResponse(BuilderImpl builder) {
super(builder);
this.changeSetName = builder.changeSetName;
this.changeSetId = builder.changeSetId;
this.stackId = builder.stackId;
this.stackName = builder.stackName;
this.description = builder.description;
this.parameters = builder.parameters;
this.creationTime = builder.creationTime;
this.executionStatus = builder.executionStatus;
this.status = builder.status;
this.statusReason = builder.statusReason;
this.notificationARNs = builder.notificationARNs;
this.rollbackConfiguration = builder.rollbackConfiguration;
this.capabilities = builder.capabilities;
this.tags = builder.tags;
this.changes = builder.changes;
this.nextToken = builder.nextToken;
this.includeNestedStacks = builder.includeNestedStacks;
this.parentChangeSetId = builder.parentChangeSetId;
this.rootChangeSetId = builder.rootChangeSetId;
this.onStackFailure = builder.onStackFailure;
this.importExistingResources = builder.importExistingResources;
}
/**
*
* The name of the change set.
*
*
* @return The name of the change set.
*/
public final String changeSetName() {
return changeSetName;
}
/**
*
* The Amazon Resource Name (ARN) of the change set.
*
*
* @return The Amazon Resource Name (ARN) of the change set.
*/
public final String changeSetId() {
return changeSetId;
}
/**
*
* The Amazon Resource Name (ARN) of the stack that's associated with the change set.
*
*
* @return The Amazon Resource Name (ARN) of the stack that's associated with the change set.
*/
public final String stackId() {
return stackId;
}
/**
*
* The name of the stack that's associated with the change set.
*
*
* @return The name of the stack that's associated with the change set.
*/
public final String stackName() {
return stackName;
}
/**
*
* Information about the change set.
*
*
* @return Information about the change set.
*/
public final String description() {
return description;
}
/**
* 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
structures that describes the input parameters and their values used to create
* the change set. For more information, see the
* Parameter
data type.
*
*
* 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
structures that describes the input parameters and their values used to
* create the change set. For more information, see the
* Parameter
data type.
*/
public final List parameters() {
return parameters;
}
/**
*
* The start time when the change set was created, in UTC.
*
*
* @return The start time when the change set was created, in UTC.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can't
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because CloudFormation is still creating it or in an OBSOLETE
state
* because the stack was already updated.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #executionStatus}
* will return {@link ExecutionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #executionStatusAsString}.
*
*
* @return If the change set execution status is AVAILABLE
, you can execute the change set. If you
* can't execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
* @see ExecutionStatus
*/
public final ExecutionStatus executionStatus() {
return ExecutionStatus.fromValue(executionStatus);
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can't
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because CloudFormation is still creating it or in an OBSOLETE
state
* because the stack was already updated.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #executionStatus}
* will return {@link ExecutionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #executionStatusAsString}.
*
*
* @return If the change set execution status is AVAILABLE
, you can execute the change set. If you
* can't execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
* @see ExecutionStatus
*/
public final String executionStatusAsString() {
return executionStatus;
}
/**
*
* The current status of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link ChangeSetStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The current status of the change set, such as CREATE_IN_PROGRESS
,
* CREATE_COMPLETE
, or FAILED
.
* @see ChangeSetStatus
*/
public final ChangeSetStatus status() {
return ChangeSetStatus.fromValue(status);
}
/**
*
* The current status of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link ChangeSetStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The current status of the change set, such as CREATE_IN_PROGRESS
,
* CREATE_COMPLETE
, or FAILED
.
* @see ChangeSetStatus
*/
public final String statusAsString() {
return status;
}
/**
*
* A description of the change set's status. For example, if your attempt to create a change set failed,
* CloudFormation shows the error message.
*
*
* @return A description of the change set's status. For example, if your attempt to create a change set failed,
* CloudFormation shows the error message.
*/
public final String statusReason() {
return statusReason;
}
/**
* For responses, this returns true if the service returned a value for the NotificationARNs 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 hasNotificationARNs() {
return notificationARNs != null && !(notificationARNs instanceof SdkAutoConstructList);
}
/**
*
* The ARNs of the Amazon Simple Notification Service (Amazon SNS) topics that will be associated with the stack if
* you execute the change set.
*
*
* 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 #hasNotificationARNs} method.
*
*
* @return The ARNs of the Amazon Simple Notification Service (Amazon SNS) topics that will be associated with the
* stack if you execute the change set.
*/
public final List notificationARNs() {
return notificationARNs;
}
/**
*
* The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the
* specified monitoring period afterwards.
*
*
* @return The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and
* for the specified monitoring period afterwards.
*/
public final RollbackConfiguration rollbackConfiguration() {
return rollbackConfiguration;
}
/**
*
* If you execute the change set, the list of capabilities that were explicitly acknowledged when the change set was
* created.
*
*
* 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 If you execute the change set, the list of capabilities that were explicitly acknowledged when the change
* set was created.
*/
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);
}
/**
*
* If you execute the change set, the list of capabilities that were explicitly acknowledged when the change set was
* created.
*
*
* 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 If you execute the change set, the list of capabilities that were explicitly acknowledged when the change
* set was created.
*/
public final List capabilitiesAsStrings() {
return capabilities;
}
/**
* For responses, this returns true if the service returned a value for the Tags 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 hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* If you execute the change set, the tags that will be associated with the stack.
*
*
* 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 #hasTags} method.
*
*
* @return If you execute the change set, the tags that will be associated with the stack.
*/
public final List tags() {
return tags;
}
/**
* For responses, this returns true if the service returned a value for the Changes 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 hasChanges() {
return changes != null && !(changes instanceof SdkAutoConstructList);
}
/**
*
* A list of Change
structures that describes the resources CloudFormation changes if you execute the
* change set.
*
*
* 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 #hasChanges} method.
*
*
* @return A list of Change
structures that describes the resources CloudFormation changes if you
* execute the change set.
*/
public final List changes() {
return changes;
}
/**
*
* If the output exceeds 1 MB, a string that identifies the next page of changes. If there is no additional page,
* this value is null.
*
*
* @return If the output exceeds 1 MB, a string that identifies the next page of changes. If there is no additional
* page, this value is null.
*/
public final String nextToken() {
return nextToken;
}
/**
*
* Verifies if IncludeNestedStacks
is set to True
.
*
*
* @return Verifies if IncludeNestedStacks
is set to True
.
*/
public final Boolean includeNestedStacks() {
return includeNestedStacks;
}
/**
*
* Specifies the change set ID of the parent change set in the current nested change set hierarchy.
*
*
* @return Specifies the change set ID of the parent change set in the current nested change set hierarchy.
*/
public final String parentChangeSetId() {
return parentChangeSetId;
}
/**
*
* Specifies the change set ID of the root change set in the current nested change set hierarchy.
*
*
* @return Specifies the change set ID of the root change set in the current nested change set hierarchy.
*/
public final String rootChangeSetId() {
return rootChangeSetId;
}
/**
*
* Determines what action will be taken if stack creation fails. When this parameter is specified, the
* DisableRollback
parameter to the
* ExecuteChangeSet
API operation must not be specified. This must be one of these values:
*
*
* -
*
* DELETE
- Deletes the change set if the stack creation fails. This is only valid when the
* ChangeSetType
parameter is set to CREATE
. If the deletion of the stack fails, the
* status of the stack is DELETE_FAILED
.
*
*
* -
*
* DO_NOTHING
- if the stack creation fails, do nothing. This is equivalent to specifying
* true
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
* -
*
* ROLLBACK
- if the stack creation fails, roll back the stack. This is equivalent to specifying
* false
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #onStackFailure}
* will return {@link OnStackFailure#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #onStackFailureAsString}.
*
*
* @return Determines what action will be taken if stack creation fails. When this parameter is specified, the
* DisableRollback
parameter to the
* ExecuteChangeSet
API operation must not be specified. This must be one of these
* values:
*
* -
*
* DELETE
- Deletes the change set if the stack creation fails. This is only valid when the
* ChangeSetType
parameter is set to CREATE
. If the deletion of the stack fails,
* the status of the stack is DELETE_FAILED
.
*
*
* -
*
* DO_NOTHING
- if the stack creation fails, do nothing. This is equivalent to specifying
* true
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
* -
*
* ROLLBACK
- if the stack creation fails, roll back the stack. This is equivalent to
* specifying false
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
* @see OnStackFailure
*/
public final OnStackFailure onStackFailure() {
return OnStackFailure.fromValue(onStackFailure);
}
/**
*
* Determines what action will be taken if stack creation fails. When this parameter is specified, the
* DisableRollback
parameter to the
* ExecuteChangeSet
API operation must not be specified. This must be one of these values:
*
*
* -
*
* DELETE
- Deletes the change set if the stack creation fails. This is only valid when the
* ChangeSetType
parameter is set to CREATE
. If the deletion of the stack fails, the
* status of the stack is DELETE_FAILED
.
*
*
* -
*
* DO_NOTHING
- if the stack creation fails, do nothing. This is equivalent to specifying
* true
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
* -
*
* ROLLBACK
- if the stack creation fails, roll back the stack. This is equivalent to specifying
* false
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #onStackFailure}
* will return {@link OnStackFailure#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #onStackFailureAsString}.
*
*
* @return Determines what action will be taken if stack creation fails. When this parameter is specified, the
* DisableRollback
parameter to the
* ExecuteChangeSet
API operation must not be specified. This must be one of these
* values:
*
* -
*
* DELETE
- Deletes the change set if the stack creation fails. This is only valid when the
* ChangeSetType
parameter is set to CREATE
. If the deletion of the stack fails,
* the status of the stack is DELETE_FAILED
.
*
*
* -
*
* DO_NOTHING
- if the stack creation fails, do nothing. This is equivalent to specifying
* true
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
* -
*
* ROLLBACK
- if the stack creation fails, roll back the stack. This is equivalent to
* specifying false
for the DisableRollback
parameter to the
* ExecuteChangeSet
API operation.
*
*
* @see OnStackFailure
*/
public final String onStackFailureAsString() {
return onStackFailure;
}
/**
*
* Indicates if the change set imports resources that already exist.
*
*
*
* This parameter can only import resources that have custom names
* in templates. To import resources that do not accept custom names, such as EC2 instances, use the resource import
* feature instead.
*
*
*
* @return Indicates if the change set imports resources that already exist.
*
* This parameter can only import resources that have custom
* names in templates. To import resources that do not accept custom names, such as EC2 instances, use
* the resource
* import feature instead.
*
*/
public final Boolean importExistingResources() {
return importExistingResources;
}
@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 final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(changeSetName());
hashCode = 31 * hashCode + Objects.hashCode(changeSetId());
hashCode = 31 * hashCode + Objects.hashCode(stackId());
hashCode = 31 * hashCode + Objects.hashCode(stackName());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(hasParameters() ? parameters() : null);
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(executionStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(statusReason());
hashCode = 31 * hashCode + Objects.hashCode(hasNotificationARNs() ? notificationARNs() : null);
hashCode = 31 * hashCode + Objects.hashCode(rollbackConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(hasCapabilities() ? capabilitiesAsStrings() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasChanges() ? changes() : null);
hashCode = 31 * hashCode + Objects.hashCode(nextToken());
hashCode = 31 * hashCode + Objects.hashCode(includeNestedStacks());
hashCode = 31 * hashCode + Objects.hashCode(parentChangeSetId());
hashCode = 31 * hashCode + Objects.hashCode(rootChangeSetId());
hashCode = 31 * hashCode + Objects.hashCode(onStackFailureAsString());
hashCode = 31 * hashCode + Objects.hashCode(importExistingResources());
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 DescribeChangeSetResponse)) {
return false;
}
DescribeChangeSetResponse other = (DescribeChangeSetResponse) obj;
return Objects.equals(changeSetName(), other.changeSetName()) && Objects.equals(changeSetId(), other.changeSetId())
&& Objects.equals(stackId(), other.stackId()) && Objects.equals(stackName(), other.stackName())
&& Objects.equals(description(), other.description()) && hasParameters() == other.hasParameters()
&& Objects.equals(parameters(), other.parameters()) && Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(executionStatusAsString(), other.executionStatusAsString())
&& Objects.equals(statusAsString(), other.statusAsString())
&& Objects.equals(statusReason(), other.statusReason()) && hasNotificationARNs() == other.hasNotificationARNs()
&& Objects.equals(notificationARNs(), other.notificationARNs())
&& Objects.equals(rollbackConfiguration(), other.rollbackConfiguration())
&& hasCapabilities() == other.hasCapabilities()
&& Objects.equals(capabilitiesAsStrings(), other.capabilitiesAsStrings()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags()) && hasChanges() == other.hasChanges()
&& Objects.equals(changes(), other.changes()) && Objects.equals(nextToken(), other.nextToken())
&& Objects.equals(includeNestedStacks(), other.includeNestedStacks())
&& Objects.equals(parentChangeSetId(), other.parentChangeSetId())
&& Objects.equals(rootChangeSetId(), other.rootChangeSetId())
&& Objects.equals(onStackFailureAsString(), other.onStackFailureAsString())
&& Objects.equals(importExistingResources(), other.importExistingResources());
}
/**
* 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("DescribeChangeSetResponse").add("ChangeSetName", changeSetName())
.add("ChangeSetId", changeSetId()).add("StackId", stackId()).add("StackName", stackName())
.add("Description", description()).add("Parameters", hasParameters() ? parameters() : null)
.add("CreationTime", creationTime()).add("ExecutionStatus", executionStatusAsString())
.add("Status", statusAsString()).add("StatusReason", statusReason())
.add("NotificationARNs", hasNotificationARNs() ? notificationARNs() : null)
.add("RollbackConfiguration", rollbackConfiguration())
.add("Capabilities", hasCapabilities() ? capabilitiesAsStrings() : null).add("Tags", hasTags() ? tags() : null)
.add("Changes", hasChanges() ? changes() : null).add("NextToken", nextToken())
.add("IncludeNestedStacks", includeNestedStacks()).add("ParentChangeSetId", parentChangeSetId())
.add("RootChangeSetId", rootChangeSetId()).add("OnStackFailure", onStackFailureAsString())
.add("ImportExistingResources", importExistingResources()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ChangeSetName":
return Optional.ofNullable(clazz.cast(changeSetName()));
case "ChangeSetId":
return Optional.ofNullable(clazz.cast(changeSetId()));
case "StackId":
return Optional.ofNullable(clazz.cast(stackId()));
case "StackName":
return Optional.ofNullable(clazz.cast(stackName()));
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 "ExecutionStatus":
return Optional.ofNullable(clazz.cast(executionStatusAsString()));
case "Status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "StatusReason":
return Optional.ofNullable(clazz.cast(statusReason()));
case "NotificationARNs":
return Optional.ofNullable(clazz.cast(notificationARNs()));
case "RollbackConfiguration":
return Optional.ofNullable(clazz.cast(rollbackConfiguration()));
case "Capabilities":
return Optional.ofNullable(clazz.cast(capabilitiesAsStrings()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "Changes":
return Optional.ofNullable(clazz.cast(changes()));
case "NextToken":
return Optional.ofNullable(clazz.cast(nextToken()));
case "IncludeNestedStacks":
return Optional.ofNullable(clazz.cast(includeNestedStacks()));
case "ParentChangeSetId":
return Optional.ofNullable(clazz.cast(parentChangeSetId()));
case "RootChangeSetId":
return Optional.ofNullable(clazz.cast(rootChangeSetId()));
case "OnStackFailure":
return Optional.ofNullable(clazz.cast(onStackFailureAsString()));
case "ImportExistingResources":
return Optional.ofNullable(clazz.cast(importExistingResources()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function