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

software.amazon.awssdk.services.cloudformation.model.ExecuteChangeSetRequest 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.beans.Transient;
import java.util.Arrays;
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 software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The input for the ExecuteChangeSet action. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ExecuteChangeSetRequest extends CloudFormationRequest implements ToCopyableBuilder { private static final SdkField CHANGE_SET_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ChangeSetName").getter(getter(ExecuteChangeSetRequest::changeSetName)) .setter(setter(Builder::changeSetName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChangeSetName").build()).build(); private static final SdkField STACK_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StackName").getter(getter(ExecuteChangeSetRequest::stackName)).setter(setter(Builder::stackName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackName").build()).build(); private static final SdkField CLIENT_REQUEST_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ClientRequestToken").getter(getter(ExecuteChangeSetRequest::clientRequestToken)) .setter(setter(Builder::clientRequestToken)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClientRequestToken").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CHANGE_SET_NAME_FIELD, STACK_NAME_FIELD, CLIENT_REQUEST_TOKEN_FIELD)); private final String changeSetName; private final String stackName; private final String clientRequestToken; private ExecuteChangeSetRequest(BuilderImpl builder) { super(builder); this.changeSetName = builder.changeSetName; this.stackName = builder.stackName; this.clientRequestToken = builder.clientRequestToken; } /** *

* The name or ARN of the change set that you want use to update the specified stack. *

* * @return The name or ARN of the change set that you want use to update the specified stack. */ public final String changeSetName() { return changeSetName; } /** *

* If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the change * set you want to execute. *

* * @return If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the * change set you want to execute. */ public final String stackName() { return stackName; } /** *

* A unique identifier for this ExecuteChangeSet request. Specify this token if you plan to retry * requests so that CloudFormation knows that you're not attempting to execute a change set to update a stack with * the same name. You might retry ExecuteChangeSet requests to ensure that CloudFormation successfully * received them. *

* * @return A unique identifier for this ExecuteChangeSet request. Specify this token if you plan to * retry requests so that CloudFormation knows that you're not attempting to execute a change set to update * a stack with the same name. You might retry ExecuteChangeSet requests to ensure that * CloudFormation successfully received them. */ public final String clientRequestToken() { return clientRequestToken; } @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(changeSetName()); hashCode = 31 * hashCode + Objects.hashCode(stackName()); hashCode = 31 * hashCode + Objects.hashCode(clientRequestToken()); 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 ExecuteChangeSetRequest)) { return false; } ExecuteChangeSetRequest other = (ExecuteChangeSetRequest) obj; return Objects.equals(changeSetName(), other.changeSetName()) && Objects.equals(stackName(), other.stackName()) && Objects.equals(clientRequestToken(), other.clientRequestToken()); } /** * 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("ExecuteChangeSetRequest").add("ChangeSetName", changeSetName()).add("StackName", stackName()) .add("ClientRequestToken", clientRequestToken()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ChangeSetName": return Optional.ofNullable(clazz.cast(changeSetName())); case "StackName": return Optional.ofNullable(clazz.cast(stackName())); case "ClientRequestToken": return Optional.ofNullable(clazz.cast(clientRequestToken())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ExecuteChangeSetRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends CloudFormationRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The name or ARN of the change set that you want use to update the specified stack. *

* * @param changeSetName * The name or ARN of the change set that you want use to update the specified stack. * @return Returns a reference to this object so that method calls can be chained together. */ Builder changeSetName(String changeSetName); /** *

* If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the * change set you want to execute. *

* * @param stackName * If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with * the change set you want to execute. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stackName(String stackName); /** *

* A unique identifier for this ExecuteChangeSet request. Specify this token if you plan to retry * requests so that CloudFormation knows that you're not attempting to execute a change set to update a stack * with the same name. You might retry ExecuteChangeSet requests to ensure that CloudFormation * successfully received them. *

* * @param clientRequestToken * A unique identifier for this ExecuteChangeSet request. Specify this token if you plan to * retry requests so that CloudFormation knows that you're not attempting to execute a change set to * update a stack with the same name. You might retry ExecuteChangeSet requests to ensure * that CloudFormation successfully received them. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clientRequestToken(String clientRequestToken); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends CloudFormationRequest.BuilderImpl implements Builder { private String changeSetName; private String stackName; private String clientRequestToken; private BuilderImpl() { } private BuilderImpl(ExecuteChangeSetRequest model) { super(model); changeSetName(model.changeSetName); stackName(model.stackName); clientRequestToken(model.clientRequestToken); } public final String getChangeSetName() { return changeSetName; } public final void setChangeSetName(String changeSetName) { this.changeSetName = changeSetName; } @Override @Transient public final Builder changeSetName(String changeSetName) { this.changeSetName = changeSetName; return this; } public final String getStackName() { return stackName; } public final void setStackName(String stackName) { this.stackName = stackName; } @Override @Transient public final Builder stackName(String stackName) { this.stackName = stackName; return this; } public final String getClientRequestToken() { return clientRequestToken; } public final void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } @Override @Transient public final Builder clientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public ExecuteChangeSetRequest build() { return new ExecuteChangeSetRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy