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

software.amazon.awssdk.services.devopsguru.model.DescribeOrganizationResourceCollectionHealthResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Dev Ops Guru module holds the client classes that are used for communicating with Dev Ops Guru.

There is a newer version: 2.29.16
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.devopsguru.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class DescribeOrganizationResourceCollectionHealthResponse extends DevOpsGuruResponse
        implements
        ToCopyableBuilder {
    private static final SdkField> CLOUD_FORMATION_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("CloudFormation")
            .getter(getter(DescribeOrganizationResourceCollectionHealthResponse::cloudFormation))
            .setter(setter(Builder::cloudFormation))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CloudFormation").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(CloudFormationHealth::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> SERVICE_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Service")
            .getter(getter(DescribeOrganizationResourceCollectionHealthResponse::service))
            .setter(setter(Builder::service))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Service").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(ServiceHealth::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> ACCOUNT_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Account")
            .getter(getter(DescribeOrganizationResourceCollectionHealthResponse::account))
            .setter(setter(Builder::account))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Account").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(AccountHealth::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(DescribeOrganizationResourceCollectionHealthResponse::nextToken))
            .setter(setter(Builder::nextToken))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NextToken").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(DescribeOrganizationResourceCollectionHealthResponse::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(TagHealth::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CLOUD_FORMATION_FIELD,
            SERVICE_FIELD, ACCOUNT_FIELD, NEXT_TOKEN_FIELD, TAGS_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = Collections
            .unmodifiableMap(new HashMap>() {
                {
                    put("CloudFormation", CLOUD_FORMATION_FIELD);
                    put("Service", SERVICE_FIELD);
                    put("Account", ACCOUNT_FIELD);
                    put("NextToken", NEXT_TOKEN_FIELD);
                    put("Tags", TAGS_FIELD);
                }
            });

    private final List cloudFormation;

    private final List service;

    private final List account;

    private final String nextToken;

    private final List tags;

    private DescribeOrganizationResourceCollectionHealthResponse(BuilderImpl builder) {
        super(builder);
        this.cloudFormation = builder.cloudFormation;
        this.service = builder.service;
        this.account = builder.account;
        this.nextToken = builder.nextToken;
        this.tags = builder.tags;
    }

    /**
     * For responses, this returns true if the service returned a value for the CloudFormation 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 hasCloudFormation() {
        return cloudFormation != null && !(cloudFormation instanceof SdkAutoConstructList);
    }

    /**
     * 

* The returned CloudFormationHealthOverview object that contains an InsightHealthOverview * object with the requested system health information. *

*

* 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 #hasCloudFormation} method. *

* * @return The returned CloudFormationHealthOverview object that contains an * InsightHealthOverview object with the requested system health information. */ public final List cloudFormation() { return cloudFormation; } /** * For responses, this returns true if the service returned a value for the Service 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 hasService() { return service != null && !(service instanceof SdkAutoConstructList); } /** *

* An array of ServiceHealth objects that describes the health of the Amazon Web Services services * associated with the resources in the collection. *

*

* 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 #hasService} method. *

* * @return An array of ServiceHealth objects that describes the health of the Amazon Web Services * services associated with the resources in the collection. */ public final List service() { return service; } /** * For responses, this returns true if the service returned a value for the Account 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 hasAccount() { return account != null && !(account instanceof SdkAutoConstructList); } /** *

* The name of the organization's account. *

*

* 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 #hasAccount} method. *

* * @return The name of the organization's account. */ public final List account() { return account; } /** *

* The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, * this value is null. *

* * @return The pagination token to use to retrieve the next page of results for this operation. If there are no more * pages, this value is null. */ public final String nextToken() { return nextToken; } /** * 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); } /** *

* Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services services support * tagging, so you can assign the same tag to resources from different services to indicate that the resources are * related. For example, you can assign the same tag to an Amazon DynamoDB table resource that you assign to an * Lambda function. For more information about using tags, see the Tagging * best practices whitepaper. *

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project, or * Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, Production, * or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag * values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin with the * prefix Devops-guru-. The tag key might be DevOps-Guru-deployment-application or * devops-guru-rds-application. When you create a key, the case of characters in the key * can be whatever you choose. After you create a key, it is case-sensitive. For example, DevOps Guru works * with a key named devops-guru-rds and a key named DevOps-Guru-RDS, and * these act as two different keys. Possible key/value pairs in your application might be * Devops-Guru-production-application/RDS or Devops-Guru-production-application/containers * . *

*
*

* 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 Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services services * support tagging, so you can assign the same tag to resources from different services to indicate that the * resources are related. For example, you can assign the same tag to an Amazon DynamoDB table resource that * you assign to an Lambda function. For more information about using tags, see the Tagging best practices whitepaper.

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project, * or Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, * Production, or a team name). Omitting the tag value is the same as using an empty * string. Like tag keys, tag values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin with * the prefix Devops-guru-. The tag key might be * DevOps-Guru-deployment-application or devops-guru-rds-application. When you * create a key, the case of characters in the key can be whatever you choose. After you * create a key, it is case-sensitive. For example, DevOps Guru works with a key named * devops-guru-rds and a key named DevOps-Guru-RDS, and these act as two * different keys. Possible key/value pairs in your application might be * Devops-Guru-production-application/RDS or * Devops-Guru-production-application/containers. *

*/ public final List tags() { return tags; } @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(hasCloudFormation() ? cloudFormation() : null); hashCode = 31 * hashCode + Objects.hashCode(hasService() ? service() : null); hashCode = 31 * hashCode + Objects.hashCode(hasAccount() ? account() : null); hashCode = 31 * hashCode + Objects.hashCode(nextToken()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); 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 DescribeOrganizationResourceCollectionHealthResponse)) { return false; } DescribeOrganizationResourceCollectionHealthResponse other = (DescribeOrganizationResourceCollectionHealthResponse) obj; return hasCloudFormation() == other.hasCloudFormation() && Objects.equals(cloudFormation(), other.cloudFormation()) && hasService() == other.hasService() && Objects.equals(service(), other.service()) && hasAccount() == other.hasAccount() && Objects.equals(account(), other.account()) && Objects.equals(nextToken(), other.nextToken()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()); } /** * 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("DescribeOrganizationResourceCollectionHealthResponse") .add("CloudFormation", hasCloudFormation() ? cloudFormation() : null) .add("Service", hasService() ? service() : null).add("Account", hasAccount() ? account() : null) .add("NextToken", nextToken()).add("Tags", hasTags() ? tags() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "CloudFormation": return Optional.ofNullable(clazz.cast(cloudFormation())); case "Service": return Optional.ofNullable(clazz.cast(service())); case "Account": return Optional.ofNullable(clazz.cast(account())); case "NextToken": return Optional.ofNullable(clazz.cast(nextToken())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((DescribeOrganizationResourceCollectionHealthResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DevOpsGuruResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The returned CloudFormationHealthOverview object that contains an * InsightHealthOverview object with the requested system health information. *

* * @param cloudFormation * The returned CloudFormationHealthOverview object that contains an * InsightHealthOverview object with the requested system health information. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cloudFormation(Collection cloudFormation); /** *

* The returned CloudFormationHealthOverview object that contains an * InsightHealthOverview object with the requested system health information. *

* * @param cloudFormation * The returned CloudFormationHealthOverview object that contains an * InsightHealthOverview object with the requested system health information. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cloudFormation(CloudFormationHealth... cloudFormation); /** *

* The returned CloudFormationHealthOverview object that contains an * InsightHealthOverview object with the requested system health information. *

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

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

* An array of ServiceHealth objects that describes the health of the Amazon Web Services services * associated with the resources in the collection. *

* * @param service * An array of ServiceHealth objects that describes the health of the Amazon Web Services * services associated with the resources in the collection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder service(Collection service); /** *

* An array of ServiceHealth objects that describes the health of the Amazon Web Services services * associated with the resources in the collection. *

* * @param service * An array of ServiceHealth objects that describes the health of the Amazon Web Services * services associated with the resources in the collection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder service(ServiceHealth... service); /** *

* An array of ServiceHealth objects that describes the health of the Amazon Web Services services * associated with the resources in the collection. *

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

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

* The name of the organization's account. *

* * @param account * The name of the organization's account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder account(Collection account); /** *

* The name of the organization's account. *

* * @param account * The name of the organization's account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder account(AccountHealth... account); /** *

* The name of the organization's account. *

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

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

* The pagination token to use to retrieve the next page of results for this operation. If there are no more * pages, this value is null. *

* * @param nextToken * The pagination token to use to retrieve the next page of results for this operation. If there are no * more pages, this value is null. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nextToken(String nextToken); /** *

* Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services services * support tagging, so you can assign the same tag to resources from different services to indicate that the * resources are related. For example, you can assign the same tag to an Amazon DynamoDB table resource that you * assign to an Lambda function. For more information about using tags, see the Tagging best practices whitepaper. *

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project, or * Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, * Production, or a team name). Omitting the tag value is the same as using an empty string. * Like tag keys, tag values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin with the * prefix Devops-guru-. The tag key might be DevOps-Guru-deployment-application * or devops-guru-rds-application. When you create a key, the case of characters in the * key can be whatever you choose. After you create a key, it is case-sensitive. For example, * DevOps Guru works with a key named devops-guru-rds and a key named * DevOps-Guru-RDS, and these act as two different keys. Possible key/value * pairs in your application might be Devops-Guru-production-application/RDS or * Devops-Guru-production-application/containers. *

*
* * @param tags * Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services * services support tagging, so you can assign the same tag to resources from different services to * indicate that the resources are related. For example, you can assign the same tag to an Amazon * DynamoDB table resource that you assign to an Lambda function. For more information about using tags, * see the Tagging best practices whitepaper.

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project * , or Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, * Production, or a team name). Omitting the tag value is the same as using an empty * string. Like tag keys, tag values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin * with the prefix Devops-guru-. The tag key might be * DevOps-Guru-deployment-application or devops-guru-rds-application. When you * create a key, the case of characters in the key can be whatever you choose. After you * create a key, it is case-sensitive. For example, DevOps Guru works with a key named * devops-guru-rds and a key named DevOps-Guru-RDS, and these act as two * different keys. Possible key/value pairs in your application might be * Devops-Guru-production-application/RDS or * Devops-Guru-production-application/containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services services * support tagging, so you can assign the same tag to resources from different services to indicate that the * resources are related. For example, you can assign the same tag to an Amazon DynamoDB table resource that you * assign to an Lambda function. For more information about using tags, see the Tagging best practices whitepaper. *

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project, or * Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, * Production, or a team name). Omitting the tag value is the same as using an empty string. * Like tag keys, tag values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin with the * prefix Devops-guru-. The tag key might be DevOps-Guru-deployment-application * or devops-guru-rds-application. When you create a key, the case of characters in the * key can be whatever you choose. After you create a key, it is case-sensitive. For example, * DevOps Guru works with a key named devops-guru-rds and a key named * DevOps-Guru-RDS, and these act as two different keys. Possible key/value * pairs in your application might be Devops-Guru-production-application/RDS or * Devops-Guru-production-application/containers. *

*
* * @param tags * Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services * services support tagging, so you can assign the same tag to resources from different services to * indicate that the resources are related. For example, you can assign the same tag to an Amazon * DynamoDB table resource that you assign to an Lambda function. For more information about using tags, * see the Tagging best practices whitepaper.

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project * , or Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, * Production, or a team name). Omitting the tag value is the same as using an empty * string. Like tag keys, tag values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin * with the prefix Devops-guru-. The tag key might be * DevOps-Guru-deployment-application or devops-guru-rds-application. When you * create a key, the case of characters in the key can be whatever you choose. After you * create a key, it is case-sensitive. For example, DevOps Guru works with a key named * devops-guru-rds and a key named DevOps-Guru-RDS, and these act as two * different keys. Possible key/value pairs in your application might be * Devops-Guru-production-application/RDS or * Devops-Guru-production-application/containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(TagHealth... tags); /** *

* Tags help you identify and organize your Amazon Web Services resources. Many Amazon Web Services services * support tagging, so you can assign the same tag to resources from different services to indicate that the * resources are related. For example, you can assign the same tag to an Amazon DynamoDB table resource that you * assign to an Lambda function. For more information about using tags, see the Tagging best practices whitepaper. *

*

* Each Amazon Web Services tag has two parts. *

*
    *
  • *

    * A tag key (for example, CostCenter, Environment, Project, or * Secret). Tag keys are case-sensitive. *

    *
  • *
  • *

    * An optional field known as a tag value (for example, 111122223333, * Production, or a team name). Omitting the tag value is the same as using an empty string. * Like tag keys, tag values are case-sensitive. *

    *
  • *
*

* Together these are known as key-value pairs. *

* *

* The string used for a key in a tag that you use to define your resource coverage must begin with the * prefix Devops-guru-. The tag key might be DevOps-Guru-deployment-application * or devops-guru-rds-application. When you create a key, the case of characters in the * key can be whatever you choose. After you create a key, it is case-sensitive. For example, * DevOps Guru works with a key named devops-guru-rds and a key named * DevOps-Guru-RDS, and these act as two different keys. Possible key/value * pairs in your application might be Devops-Guru-production-application/RDS or * Devops-Guru-production-application/containers. *

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

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.devopsguru.model.TagHealth.Builder#build()} is called immediately and * its result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.devopsguru.model.TagHealth.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); } static final class BuilderImpl extends DevOpsGuruResponse.BuilderImpl implements Builder { private List cloudFormation = DefaultSdkAutoConstructList.getInstance(); private List service = DefaultSdkAutoConstructList.getInstance(); private List account = DefaultSdkAutoConstructList.getInstance(); private String nextToken; private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(DescribeOrganizationResourceCollectionHealthResponse model) { super(model); cloudFormation(model.cloudFormation); service(model.service); account(model.account); nextToken(model.nextToken); tags(model.tags); } public final List getCloudFormation() { List result = CloudFormationHealthsCopier.copyToBuilder(this.cloudFormation); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setCloudFormation(Collection cloudFormation) { this.cloudFormation = CloudFormationHealthsCopier.copyFromBuilder(cloudFormation); } @Override public final Builder cloudFormation(Collection cloudFormation) { this.cloudFormation = CloudFormationHealthsCopier.copy(cloudFormation); return this; } @Override @SafeVarargs public final Builder cloudFormation(CloudFormationHealth... cloudFormation) { cloudFormation(Arrays.asList(cloudFormation)); return this; } @Override @SafeVarargs public final Builder cloudFormation(Consumer... cloudFormation) { cloudFormation(Stream.of(cloudFormation).map(c -> CloudFormationHealth.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getService() { List result = ServiceHealthsCopier.copyToBuilder(this.service); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setService(Collection service) { this.service = ServiceHealthsCopier.copyFromBuilder(service); } @Override public final Builder service(Collection service) { this.service = ServiceHealthsCopier.copy(service); return this; } @Override @SafeVarargs public final Builder service(ServiceHealth... service) { service(Arrays.asList(service)); return this; } @Override @SafeVarargs public final Builder service(Consumer... service) { service(Stream.of(service).map(c -> ServiceHealth.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final List getAccount() { List result = AccountHealthsCopier.copyToBuilder(this.account); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAccount(Collection account) { this.account = AccountHealthsCopier.copyFromBuilder(account); } @Override public final Builder account(Collection account) { this.account = AccountHealthsCopier.copy(account); return this; } @Override @SafeVarargs public final Builder account(AccountHealth... account) { account(Arrays.asList(account)); return this; } @Override @SafeVarargs public final Builder account(Consumer... account) { account(Stream.of(account).map(c -> AccountHealth.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getNextToken() { return nextToken; } public final void setNextToken(String nextToken) { this.nextToken = nextToken; } @Override public final Builder nextToken(String nextToken) { this.nextToken = nextToken; return this; } public final List getTags() { List result = TagHealthsCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagHealthsCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagHealthsCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(TagHealth... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> TagHealth.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public DescribeOrganizationResourceCollectionHealthResponse build() { return new DescribeOrganizationResourceCollectionHealthResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy