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

software.amazon.awssdk.services.iot.model.CreateDomainConfigurationRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Iot Service module holds the client classes that are used for communicating with AWS IoT Service

The 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.iot.model;

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.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.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 CreateDomainConfigurationRequest extends IotRequest implements
        ToCopyableBuilder {
    private static final SdkField DOMAIN_CONFIGURATION_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("domainConfigurationName").getter(getter(CreateDomainConfigurationRequest::domainConfigurationName))
            .setter(setter(Builder::domainConfigurationName))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("domainConfigurationName").build())
            .build();

    private static final SdkField DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("domainName").getter(getter(CreateDomainConfigurationRequest::domainName))
            .setter(setter(Builder::domainName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("domainName").build()).build();

    private static final SdkField> SERVER_CERTIFICATE_ARNS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("serverCertificateArns")
            .getter(getter(CreateDomainConfigurationRequest::serverCertificateArns))
            .setter(setter(Builder::serverCertificateArns))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serverCertificateArns").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 VALIDATION_CERTIFICATE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("validationCertificateArn").getter(getter(CreateDomainConfigurationRequest::validationCertificateArn))
            .setter(setter(Builder::validationCertificateArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("validationCertificateArn").build())
            .build();

    private static final SdkField AUTHORIZER_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("authorizerConfig")
            .getter(getter(CreateDomainConfigurationRequest::authorizerConfig)).setter(setter(Builder::authorizerConfig))
            .constructor(AuthorizerConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authorizerConfig").build()).build();

    private static final SdkField SERVICE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("serviceType").getter(getter(CreateDomainConfigurationRequest::serviceTypeAsString))
            .setter(setter(Builder::serviceType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceType").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("tags")
            .getter(getter(CreateDomainConfigurationRequest::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 TLS_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("tlsConfig").getter(getter(CreateDomainConfigurationRequest::tlsConfig))
            .setter(setter(Builder::tlsConfig)).constructor(TlsConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tlsConfig").build()).build();

    private static final SdkField SERVER_CERTIFICATE_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("serverCertificateConfig")
            .getter(getter(CreateDomainConfigurationRequest::serverCertificateConfig))
            .setter(setter(Builder::serverCertificateConfig)).constructor(ServerCertificateConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serverCertificateConfig").build())
            .build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
            DOMAIN_CONFIGURATION_NAME_FIELD, DOMAIN_NAME_FIELD, SERVER_CERTIFICATE_ARNS_FIELD, VALIDATION_CERTIFICATE_ARN_FIELD,
            AUTHORIZER_CONFIG_FIELD, SERVICE_TYPE_FIELD, TAGS_FIELD, TLS_CONFIG_FIELD, SERVER_CERTIFICATE_CONFIG_FIELD));

    private final String domainConfigurationName;

    private final String domainName;

    private final List serverCertificateArns;

    private final String validationCertificateArn;

    private final AuthorizerConfig authorizerConfig;

    private final String serviceType;

    private final List tags;

    private final TlsConfig tlsConfig;

    private final ServerCertificateConfig serverCertificateConfig;

    private CreateDomainConfigurationRequest(BuilderImpl builder) {
        super(builder);
        this.domainConfigurationName = builder.domainConfigurationName;
        this.domainName = builder.domainName;
        this.serverCertificateArns = builder.serverCertificateArns;
        this.validationCertificateArn = builder.validationCertificateArn;
        this.authorizerConfig = builder.authorizerConfig;
        this.serviceType = builder.serviceType;
        this.tags = builder.tags;
        this.tlsConfig = builder.tlsConfig;
        this.serverCertificateConfig = builder.serverCertificateConfig;
    }

    /**
     * 

* The name of the domain configuration. This value must be unique to a region. *

* * @return The name of the domain configuration. This value must be unique to a region. */ public final String domainConfigurationName() { return domainConfigurationName; } /** *

* The name of the domain. *

* * @return The name of the domain. */ public final String domainName() { return domainName; } /** * For responses, this returns true if the service returned a value for the ServerCertificateArns 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 hasServerCertificateArns() { return serverCertificateArns != null && !(serverCertificateArns instanceof SdkAutoConstructList); } /** *

* The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify * only one certificate ARN. This value is not required for Amazon Web Services-managed domains. *

*

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

* * @return The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can * specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. */ public final List serverCertificateArns() { return serverCertificateArns; } /** *

* The certificate used to validate the server certificate and prove domain name ownership. This certificate must be * signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. *

* * @return The certificate used to validate the server certificate and prove domain name ownership. This certificate * must be signed by a public certificate authority. This value is not required for Amazon Web * Services-managed domains. */ public final String validationCertificateArn() { return validationCertificateArn; } /** *

* An object that specifies the authorization service for a domain. *

* * @return An object that specifies the authorization service for a domain. */ public final AuthorizerConfig authorizerConfig() { return authorizerConfig; } /** *

* The type of service delivered by the endpoint. *

* *

* Amazon Web Services IoT Core currently supports only the DATA service type. *

*
*

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

* * @return The type of service delivered by the endpoint.

*

* Amazon Web Services IoT Core currently supports only the DATA service type. *

* @see ServiceType */ public final ServiceType serviceType() { return ServiceType.fromValue(serviceType); } /** *

* The type of service delivered by the endpoint. *

* *

* Amazon Web Services IoT Core currently supports only the DATA service type. *

*
*

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

* * @return The type of service delivered by the endpoint.

*

* Amazon Web Services IoT Core currently supports only the DATA service type. *

* @see ServiceType */ public final String serviceTypeAsString() { return serviceType; } /** * 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); } /** *

* Metadata which can be used to manage the domain configuration. *

* *

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

*
*

* 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 Metadata which can be used to manage the domain configuration.

*

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

*/ public final List tags() { return tags; } /** *

* An object that specifies the TLS configuration for a domain. *

* * @return An object that specifies the TLS configuration for a domain. */ public final TlsConfig tlsConfig() { return tlsConfig; } /** *

* The server certificate configuration. *

* * @return The server certificate configuration. */ public final ServerCertificateConfig serverCertificateConfig() { return serverCertificateConfig; } @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(domainConfigurationName()); hashCode = 31 * hashCode + Objects.hashCode(domainName()); hashCode = 31 * hashCode + Objects.hashCode(hasServerCertificateArns() ? serverCertificateArns() : null); hashCode = 31 * hashCode + Objects.hashCode(validationCertificateArn()); hashCode = 31 * hashCode + Objects.hashCode(authorizerConfig()); hashCode = 31 * hashCode + Objects.hashCode(serviceTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(tlsConfig()); hashCode = 31 * hashCode + Objects.hashCode(serverCertificateConfig()); 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 CreateDomainConfigurationRequest)) { return false; } CreateDomainConfigurationRequest other = (CreateDomainConfigurationRequest) obj; return Objects.equals(domainConfigurationName(), other.domainConfigurationName()) && Objects.equals(domainName(), other.domainName()) && hasServerCertificateArns() == other.hasServerCertificateArns() && Objects.equals(serverCertificateArns(), other.serverCertificateArns()) && Objects.equals(validationCertificateArn(), other.validationCertificateArn()) && Objects.equals(authorizerConfig(), other.authorizerConfig()) && Objects.equals(serviceTypeAsString(), other.serviceTypeAsString()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(tlsConfig(), other.tlsConfig()) && Objects.equals(serverCertificateConfig(), other.serverCertificateConfig()); } /** * 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("CreateDomainConfigurationRequest").add("DomainConfigurationName", domainConfigurationName()) .add("DomainName", domainName()) .add("ServerCertificateArns", hasServerCertificateArns() ? serverCertificateArns() : null) .add("ValidationCertificateArn", validationCertificateArn()).add("AuthorizerConfig", authorizerConfig()) .add("ServiceType", serviceTypeAsString()).add("Tags", hasTags() ? tags() : null).add("TlsConfig", tlsConfig()) .add("ServerCertificateConfig", serverCertificateConfig()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "domainConfigurationName": return Optional.ofNullable(clazz.cast(domainConfigurationName())); case "domainName": return Optional.ofNullable(clazz.cast(domainName())); case "serverCertificateArns": return Optional.ofNullable(clazz.cast(serverCertificateArns())); case "validationCertificateArn": return Optional.ofNullable(clazz.cast(validationCertificateArn())); case "authorizerConfig": return Optional.ofNullable(clazz.cast(authorizerConfig())); case "serviceType": return Optional.ofNullable(clazz.cast(serviceTypeAsString())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "tlsConfig": return Optional.ofNullable(clazz.cast(tlsConfig())); case "serverCertificateConfig": return Optional.ofNullable(clazz.cast(serverCertificateConfig())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateDomainConfigurationRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends IotRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The name of the domain configuration. This value must be unique to a region. *

* * @param domainConfigurationName * The name of the domain configuration. This value must be unique to a region. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainConfigurationName(String domainConfigurationName); /** *

* The name of the domain. *

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

* The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can * specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. *

* * @param serverCertificateArns * The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can * specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serverCertificateArns(Collection serverCertificateArns); /** *

* The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can * specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. *

* * @param serverCertificateArns * The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can * specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serverCertificateArns(String... serverCertificateArns); /** *

* The certificate used to validate the server certificate and prove domain name ownership. This certificate * must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed * domains. *

* * @param validationCertificateArn * The certificate used to validate the server certificate and prove domain name ownership. This * certificate must be signed by a public certificate authority. This value is not required for Amazon * Web Services-managed domains. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validationCertificateArn(String validationCertificateArn); /** *

* An object that specifies the authorization service for a domain. *

* * @param authorizerConfig * An object that specifies the authorization service for a domain. * @return Returns a reference to this object so that method calls can be chained together. */ Builder authorizerConfig(AuthorizerConfig authorizerConfig); /** *

* An object that specifies the authorization service for a domain. *

* This is a convenience method that creates an instance of the {@link AuthorizerConfig.Builder} avoiding the * need to create one manually via {@link AuthorizerConfig#builder()}. * *

* When the {@link Consumer} completes, {@link AuthorizerConfig.Builder#build()} is called immediately and its * result is passed to {@link #authorizerConfig(AuthorizerConfig)}. * * @param authorizerConfig * a consumer that will call methods on {@link AuthorizerConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #authorizerConfig(AuthorizerConfig) */ default Builder authorizerConfig(Consumer authorizerConfig) { return authorizerConfig(AuthorizerConfig.builder().applyMutation(authorizerConfig).build()); } /** *

* The type of service delivered by the endpoint. *

* *

* Amazon Web Services IoT Core currently supports only the DATA service type. *

*
* * @param serviceType * The type of service delivered by the endpoint.

*

* Amazon Web Services IoT Core currently supports only the DATA service type. *

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

* The type of service delivered by the endpoint. *

* *

* Amazon Web Services IoT Core currently supports only the DATA service type. *

*
* * @param serviceType * The type of service delivered by the endpoint.

*

* Amazon Web Services IoT Core currently supports only the DATA service type. *

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

* Metadata which can be used to manage the domain configuration. *

* *

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

*
* * @param tags * Metadata which can be used to manage the domain configuration.

*

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

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

* Metadata which can be used to manage the domain configuration. *

* *

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

*
* * @param tags * Metadata which can be used to manage the domain configuration.

*

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

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

* Metadata which can be used to manage the domain configuration. *

* *

* For URI Request parameters use format: ...key1=value1&key2=value2... *

*

* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." *

*

* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." *

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

* When the {@link Consumer} completes, {@link software.amazon.awssdk.services.iot.model.Tag.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.iot.model.Tag.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); /** *

* An object that specifies the TLS configuration for a domain. *

* * @param tlsConfig * An object that specifies the TLS configuration for a domain. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tlsConfig(TlsConfig tlsConfig); /** *

* An object that specifies the TLS configuration for a domain. *

* This is a convenience method that creates an instance of the {@link TlsConfig.Builder} avoiding the need to * create one manually via {@link TlsConfig#builder()}. * *

* When the {@link Consumer} completes, {@link TlsConfig.Builder#build()} is called immediately and its result * is passed to {@link #tlsConfig(TlsConfig)}. * * @param tlsConfig * a consumer that will call methods on {@link TlsConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tlsConfig(TlsConfig) */ default Builder tlsConfig(Consumer tlsConfig) { return tlsConfig(TlsConfig.builder().applyMutation(tlsConfig).build()); } /** *

* The server certificate configuration. *

* * @param serverCertificateConfig * The server certificate configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serverCertificateConfig(ServerCertificateConfig serverCertificateConfig); /** *

* The server certificate configuration. *

* This is a convenience method that creates an instance of the {@link ServerCertificateConfig.Builder} avoiding * the need to create one manually via {@link ServerCertificateConfig#builder()}. * *

* When the {@link Consumer} completes, {@link ServerCertificateConfig.Builder#build()} is called immediately * and its result is passed to {@link #serverCertificateConfig(ServerCertificateConfig)}. * * @param serverCertificateConfig * a consumer that will call methods on {@link ServerCertificateConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #serverCertificateConfig(ServerCertificateConfig) */ default Builder serverCertificateConfig(Consumer serverCertificateConfig) { return serverCertificateConfig(ServerCertificateConfig.builder().applyMutation(serverCertificateConfig).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends IotRequest.BuilderImpl implements Builder { private String domainConfigurationName; private String domainName; private List serverCertificateArns = DefaultSdkAutoConstructList.getInstance(); private String validationCertificateArn; private AuthorizerConfig authorizerConfig; private String serviceType; private List tags = DefaultSdkAutoConstructList.getInstance(); private TlsConfig tlsConfig; private ServerCertificateConfig serverCertificateConfig; private BuilderImpl() { } private BuilderImpl(CreateDomainConfigurationRequest model) { super(model); domainConfigurationName(model.domainConfigurationName); domainName(model.domainName); serverCertificateArns(model.serverCertificateArns); validationCertificateArn(model.validationCertificateArn); authorizerConfig(model.authorizerConfig); serviceType(model.serviceType); tags(model.tags); tlsConfig(model.tlsConfig); serverCertificateConfig(model.serverCertificateConfig); } public final String getDomainConfigurationName() { return domainConfigurationName; } public final void setDomainConfigurationName(String domainConfigurationName) { this.domainConfigurationName = domainConfigurationName; } @Override public final Builder domainConfigurationName(String domainConfigurationName) { this.domainConfigurationName = domainConfigurationName; return this; } public final String getDomainName() { return domainName; } public final void setDomainName(String domainName) { this.domainName = domainName; } @Override public final Builder domainName(String domainName) { this.domainName = domainName; return this; } public final Collection getServerCertificateArns() { if (serverCertificateArns instanceof SdkAutoConstructList) { return null; } return serverCertificateArns; } public final void setServerCertificateArns(Collection serverCertificateArns) { this.serverCertificateArns = ServerCertificateArnsCopier.copy(serverCertificateArns); } @Override public final Builder serverCertificateArns(Collection serverCertificateArns) { this.serverCertificateArns = ServerCertificateArnsCopier.copy(serverCertificateArns); return this; } @Override @SafeVarargs public final Builder serverCertificateArns(String... serverCertificateArns) { serverCertificateArns(Arrays.asList(serverCertificateArns)); return this; } public final String getValidationCertificateArn() { return validationCertificateArn; } public final void setValidationCertificateArn(String validationCertificateArn) { this.validationCertificateArn = validationCertificateArn; } @Override public final Builder validationCertificateArn(String validationCertificateArn) { this.validationCertificateArn = validationCertificateArn; return this; } public final AuthorizerConfig.Builder getAuthorizerConfig() { return authorizerConfig != null ? authorizerConfig.toBuilder() : null; } public final void setAuthorizerConfig(AuthorizerConfig.BuilderImpl authorizerConfig) { this.authorizerConfig = authorizerConfig != null ? authorizerConfig.build() : null; } @Override public final Builder authorizerConfig(AuthorizerConfig authorizerConfig) { this.authorizerConfig = authorizerConfig; return this; } public final String getServiceType() { return serviceType; } public final void setServiceType(String serviceType) { this.serviceType = serviceType; } @Override public final Builder serviceType(String serviceType) { this.serviceType = serviceType; return this; } @Override public final Builder serviceType(ServiceType serviceType) { this.serviceType(serviceType == null ? null : serviceType.toString()); return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final TlsConfig.Builder getTlsConfig() { return tlsConfig != null ? tlsConfig.toBuilder() : null; } public final void setTlsConfig(TlsConfig.BuilderImpl tlsConfig) { this.tlsConfig = tlsConfig != null ? tlsConfig.build() : null; } @Override public final Builder tlsConfig(TlsConfig tlsConfig) { this.tlsConfig = tlsConfig; return this; } public final ServerCertificateConfig.Builder getServerCertificateConfig() { return serverCertificateConfig != null ? serverCertificateConfig.toBuilder() : null; } public final void setServerCertificateConfig(ServerCertificateConfig.BuilderImpl serverCertificateConfig) { this.serverCertificateConfig = serverCertificateConfig != null ? serverCertificateConfig.build() : null; } @Override public final Builder serverCertificateConfig(ServerCertificateConfig serverCertificateConfig) { this.serverCertificateConfig = serverCertificateConfig; 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 CreateDomainConfigurationRequest build() { return new CreateDomainConfigurationRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy