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

software.amazon.awssdk.services.cloudformation.model.StackSetOperationResultSummary 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 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.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.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 structure that contains information about a specified operation's results for a given account in a given region. *

*/ @Generated("software.amazon.awssdk:codegen") public final class StackSetOperationResultSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ACCOUNT_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(StackSetOperationResultSummary::account)).setter(setter(Builder::account)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Account").build()).build(); private static final SdkField REGION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(StackSetOperationResultSummary::region)).setter(setter(Builder::region)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Region").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(StackSetOperationResultSummary::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) .getter(getter(StackSetOperationResultSummary::statusReason)).setter(setter(Builder::statusReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusReason").build()).build(); private static final SdkField ACCOUNT_GATE_RESULT_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .getter(getter(StackSetOperationResultSummary::accountGateResult)).setter(setter(Builder::accountGateResult)) .constructor(AccountGateResult::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccountGateResult").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ACCOUNT_FIELD, REGION_FIELD, STATUS_FIELD, STATUS_REASON_FIELD, ACCOUNT_GATE_RESULT_FIELD)); private static final long serialVersionUID = 1L; private final String account; private final String region; private final String status; private final String statusReason; private final AccountGateResult accountGateResult; private StackSetOperationResultSummary(BuilderImpl builder) { this.account = builder.account; this.region = builder.region; this.status = builder.status; this.statusReason = builder.statusReason; this.accountGateResult = builder.accountGateResult; } /** *

* The name of the AWS account for this operation result. *

* * @return The name of the AWS account for this operation result. */ public String account() { return account; } /** *

* The name of the AWS region for this operation result. *

* * @return The name of the AWS region for this operation result. */ public String region() { return region; } /** *

* The result status of the stack set operation for the given account in the given region. *

*
    *
  • *

    * CANCELLED: The operation in the specified account and region has been cancelled. This is either * because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation * has been exceeded. *

    *
  • *
  • *

    * FAILED: The operation in the specified account and region failed. *

    *

    * If the stack set operation fails in enough accounts within a region, the failure tolerance for the stack set * operation as a whole might be exceeded. *

    *
  • *
  • *

    * RUNNING: The operation in the specified account and region is currently in progress. *

    *
  • *
  • *

    * PENDING: The operation in the specified account and region has yet to start. *

    *
  • *
  • *

    * SUCCEEDED: The operation in the specified account and region completed successfully. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link StackSetOperationResultStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #statusAsString}. *

* * @return The result status of the stack set operation for the given account in the given region.

*
    *
  • *

    * CANCELLED: The operation in the specified account and region has been cancelled. This is * either because a user has stopped the stack set operation, or because the failure tolerance of the stack * set operation has been exceeded. *

    *
  • *
  • *

    * FAILED: The operation in the specified account and region failed. *

    *

    * If the stack set operation fails in enough accounts within a region, the failure tolerance for the stack * set operation as a whole might be exceeded. *

    *
  • *
  • *

    * RUNNING: The operation in the specified account and region is currently in progress. *

    *
  • *
  • *

    * PENDING: The operation in the specified account and region has yet to start. *

    *
  • *
  • *

    * SUCCEEDED: The operation in the specified account and region completed successfully. *

    *
  • * @see StackSetOperationResultStatus */ public StackSetOperationResultStatus status() { return StackSetOperationResultStatus.fromValue(status); } /** *

    * The result status of the stack set operation for the given account in the given region. *

    *
      *
    • *

      * CANCELLED: The operation in the specified account and region has been cancelled. This is either * because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation * has been exceeded. *

      *
    • *
    • *

      * FAILED: The operation in the specified account and region failed. *

      *

      * If the stack set operation fails in enough accounts within a region, the failure tolerance for the stack set * operation as a whole might be exceeded. *

      *
    • *
    • *

      * RUNNING: The operation in the specified account and region is currently in progress. *

      *
    • *
    • *

      * PENDING: The operation in the specified account and region has yet to start. *

      *
    • *
    • *

      * SUCCEEDED: The operation in the specified account and region completed successfully. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link StackSetOperationResultStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #statusAsString}. *

    * * @return The result status of the stack set operation for the given account in the given region.

    *
      *
    • *

      * CANCELLED: The operation in the specified account and region has been cancelled. This is * either because a user has stopped the stack set operation, or because the failure tolerance of the stack * set operation has been exceeded. *

      *
    • *
    • *

      * FAILED: The operation in the specified account and region failed. *

      *

      * If the stack set operation fails in enough accounts within a region, the failure tolerance for the stack * set operation as a whole might be exceeded. *

      *
    • *
    • *

      * RUNNING: The operation in the specified account and region is currently in progress. *

      *
    • *
    • *

      * PENDING: The operation in the specified account and region has yet to start. *

      *
    • *
    • *

      * SUCCEEDED: The operation in the specified account and region completed successfully. *

      *
    • * @see StackSetOperationResultStatus */ public String statusAsString() { return status; } /** *

      * The reason for the assigned result status. *

      * * @return The reason for the assigned result status. */ public String statusReason() { return statusReason; } /** *

      * The results of the account gate function AWS CloudFormation invokes, if present, before proceeding with stack set * operations in an account *

      * * @return The results of the account gate function AWS CloudFormation invokes, if present, before proceeding with * stack set operations in an account */ public AccountGateResult accountGateResult() { return accountGateResult; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(account()); hashCode = 31 * hashCode + Objects.hashCode(region()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusReason()); hashCode = 31 * hashCode + Objects.hashCode(accountGateResult()); 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 StackSetOperationResultSummary)) { return false; } StackSetOperationResultSummary other = (StackSetOperationResultSummary) obj; return Objects.equals(account(), other.account()) && Objects.equals(region(), other.region()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(statusReason(), other.statusReason()) && Objects.equals(accountGateResult(), other.accountGateResult()); } /** * 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("StackSetOperationResultSummary").add("Account", account()).add("Region", region()) .add("Status", statusAsString()).add("StatusReason", statusReason()) .add("AccountGateResult", accountGateResult()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Account": return Optional.ofNullable(clazz.cast(account())); case "Region": return Optional.ofNullable(clazz.cast(region())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "StatusReason": return Optional.ofNullable(clazz.cast(statusReason())); case "AccountGateResult": return Optional.ofNullable(clazz.cast(accountGateResult())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((StackSetOperationResultSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The name of the AWS account for this operation result. *

      * * @param account * The name of the AWS account for this operation result. * @return Returns a reference to this object so that method calls can be chained together. */ Builder account(String account); /** *

      * The name of the AWS region for this operation result. *

      * * @param region * The name of the AWS region for this operation result. * @return Returns a reference to this object so that method calls can be chained together. */ Builder region(String region); /** *

      * The result status of the stack set operation for the given account in the given region. *

      *
        *
      • *

        * CANCELLED: The operation in the specified account and region has been cancelled. This is either * because a user has stopped the stack set operation, or because the failure tolerance of the stack set * operation has been exceeded. *

        *
      • *
      • *

        * FAILED: The operation in the specified account and region failed. *

        *

        * If the stack set operation fails in enough accounts within a region, the failure tolerance for the stack set * operation as a whole might be exceeded. *

        *
      • *
      • *

        * RUNNING: The operation in the specified account and region is currently in progress. *

        *
      • *
      • *

        * PENDING: The operation in the specified account and region has yet to start. *

        *
      • *
      • *

        * SUCCEEDED: The operation in the specified account and region completed successfully. *

        *
      • *
      * * @param status * The result status of the stack set operation for the given account in the given region.

      *
        *
      • *

        * CANCELLED: The operation in the specified account and region has been cancelled. This is * either because a user has stopped the stack set operation, or because the failure tolerance of the * stack set operation has been exceeded. *

        *
      • *
      • *

        * FAILED: The operation in the specified account and region failed. *

        *

        * If the stack set operation fails in enough accounts within a region, the failure tolerance for the * stack set operation as a whole might be exceeded. *

        *
      • *
      • *

        * RUNNING: The operation in the specified account and region is currently in progress. *

        *
      • *
      • *

        * PENDING: The operation in the specified account and region has yet to start. *

        *
      • *
      • *

        * SUCCEEDED: The operation in the specified account and region completed successfully. *

        *
      • * @see StackSetOperationResultStatus * @return Returns a reference to this object so that method calls can be chained together. * @see StackSetOperationResultStatus */ Builder status(String status); /** *

        * The result status of the stack set operation for the given account in the given region. *

        *
          *
        • *

          * CANCELLED: The operation in the specified account and region has been cancelled. This is either * because a user has stopped the stack set operation, or because the failure tolerance of the stack set * operation has been exceeded. *

          *
        • *
        • *

          * FAILED: The operation in the specified account and region failed. *

          *

          * If the stack set operation fails in enough accounts within a region, the failure tolerance for the stack set * operation as a whole might be exceeded. *

          *
        • *
        • *

          * RUNNING: The operation in the specified account and region is currently in progress. *

          *
        • *
        • *

          * PENDING: The operation in the specified account and region has yet to start. *

          *
        • *
        • *

          * SUCCEEDED: The operation in the specified account and region completed successfully. *

          *
        • *
        * * @param status * The result status of the stack set operation for the given account in the given region.

        *
          *
        • *

          * CANCELLED: The operation in the specified account and region has been cancelled. This is * either because a user has stopped the stack set operation, or because the failure tolerance of the * stack set operation has been exceeded. *

          *
        • *
        • *

          * FAILED: The operation in the specified account and region failed. *

          *

          * If the stack set operation fails in enough accounts within a region, the failure tolerance for the * stack set operation as a whole might be exceeded. *

          *
        • *
        • *

          * RUNNING: The operation in the specified account and region is currently in progress. *

          *
        • *
        • *

          * PENDING: The operation in the specified account and region has yet to start. *

          *
        • *
        • *

          * SUCCEEDED: The operation in the specified account and region completed successfully. *

          *
        • * @see StackSetOperationResultStatus * @return Returns a reference to this object so that method calls can be chained together. * @see StackSetOperationResultStatus */ Builder status(StackSetOperationResultStatus status); /** *

          * The reason for the assigned result status. *

          * * @param statusReason * The reason for the assigned result status. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusReason(String statusReason); /** *

          * The results of the account gate function AWS CloudFormation invokes, if present, before proceeding with stack * set operations in an account *

          * * @param accountGateResult * The results of the account gate function AWS CloudFormation invokes, if present, before proceeding * with stack set operations in an account * @return Returns a reference to this object so that method calls can be chained together. */ Builder accountGateResult(AccountGateResult accountGateResult); /** *

          * The results of the account gate function AWS CloudFormation invokes, if present, before proceeding with stack * set operations in an account *

          * This is a convenience that creates an instance of the {@link AccountGateResult.Builder} avoiding the need to * create one manually via {@link AccountGateResult#builder()}. * * When the {@link Consumer} completes, {@link AccountGateResult.Builder#build()} is called immediately and its * result is passed to {@link #accountGateResult(AccountGateResult)}. * * @param accountGateResult * a consumer that will call methods on {@link AccountGateResult.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #accountGateResult(AccountGateResult) */ default Builder accountGateResult(Consumer accountGateResult) { return accountGateResult(AccountGateResult.builder().applyMutation(accountGateResult).build()); } } static final class BuilderImpl implements Builder { private String account; private String region; private String status; private String statusReason; private AccountGateResult accountGateResult; private BuilderImpl() { } private BuilderImpl(StackSetOperationResultSummary model) { account(model.account); region(model.region); status(model.status); statusReason(model.statusReason); accountGateResult(model.accountGateResult); } public final String getAccount() { return account; } @Override public final Builder account(String account) { this.account = account; return this; } public final void setAccount(String account) { this.account = account; } public final String getRegion() { return region; } @Override public final Builder region(String region) { this.region = region; return this; } public final void setRegion(String region) { this.region = region; } public final String getStatusAsString() { return status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(StackSetOperationResultStatus status) { this.status(status == null ? null : status.toString()); return this; } public final void setStatus(String status) { this.status = status; } public final String getStatusReason() { return statusReason; } @Override public final Builder statusReason(String statusReason) { this.statusReason = statusReason; return this; } public final void setStatusReason(String statusReason) { this.statusReason = statusReason; } public final AccountGateResult.Builder getAccountGateResult() { return accountGateResult != null ? accountGateResult.toBuilder() : null; } @Override public final Builder accountGateResult(AccountGateResult accountGateResult) { this.accountGateResult = accountGateResult; return this; } public final void setAccountGateResult(AccountGateResult.BuilderImpl accountGateResult) { this.accountGateResult = accountGateResult != null ? accountGateResult.build() : null; } @Override public StackSetOperationResultSummary build() { return new StackSetOperationResultSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy