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

software.amazon.awssdk.services.apigateway.model.CreateDomainNameResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon API Gateway module holds the client classes that are used for communicating with Amazon API Gateway

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

import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
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 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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents a custom domain name as a user-friendly host name of an API (RestApi). *

*
*

* When you deploy an API, API Gateway creates a default host name for the API. This default API host name is of the * {restapi-id}.execute-api.{region}.amazonaws.com format. With the default host name, you can access the * API's root resource with the URL of https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}/. * When you set up a custom domain name of apis.example.com for this API, you can then access the same * resource using the URL of the https://apis.examples.com/myApi, where myApi is the base path * mapping (BasePathMapping) of your API under the custom domain name. *

*
*/ @Generated("software.amazon.awssdk:codegen") public final class CreateDomainNameResponse extends ApiGatewayResponse implements ToCopyableBuilder { private static final SdkField DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::domainName)).setter(setter(Builder::domainName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("domainName").build()).build(); private static final SdkField CERTIFICATE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::certificateName)).setter(setter(Builder::certificateName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateName").build()).build(); private static final SdkField CERTIFICATE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::certificateArn)).setter(setter(Builder::certificateArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateArn").build()).build(); private static final SdkField CERTIFICATE_UPLOAD_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(CreateDomainNameResponse::certificateUploadDate)).setter(setter(Builder::certificateUploadDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateUploadDate").build()) .build(); private static final SdkField REGIONAL_DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::regionalDomainName)).setter(setter(Builder::regionalDomainName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("regionalDomainName").build()) .build(); private static final SdkField REGIONAL_HOSTED_ZONE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::regionalHostedZoneId)).setter(setter(Builder::regionalHostedZoneId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("regionalHostedZoneId").build()) .build(); private static final SdkField REGIONAL_CERTIFICATE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::regionalCertificateName)).setter(setter(Builder::regionalCertificateName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("regionalCertificateName").build()) .build(); private static final SdkField REGIONAL_CERTIFICATE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::regionalCertificateArn)).setter(setter(Builder::regionalCertificateArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("regionalCertificateArn").build()) .build(); private static final SdkField DISTRIBUTION_DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::distributionDomainName)).setter(setter(Builder::distributionDomainName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("distributionDomainName").build()) .build(); private static final SdkField DISTRIBUTION_HOSTED_ZONE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::distributionHostedZoneId)).setter(setter(Builder::distributionHostedZoneId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("distributionHostedZoneId").build()) .build(); private static final SdkField ENDPOINT_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .getter(getter(CreateDomainNameResponse::endpointConfiguration)).setter(setter(Builder::endpointConfiguration)) .constructor(EndpointConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("endpointConfiguration").build()) .build(); private static final SdkField DOMAIN_NAME_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::domainNameStatusAsString)).setter(setter(Builder::domainNameStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("domainNameStatus").build()).build(); private static final SdkField DOMAIN_NAME_STATUS_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::domainNameStatusMessage)).setter(setter(Builder::domainNameStatusMessage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("domainNameStatusMessage").build()) .build(); private static final SdkField SECURITY_POLICY_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateDomainNameResponse::securityPolicyAsString)).setter(setter(Builder::securityPolicy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("securityPolicy").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .getter(getter(CreateDomainNameResponse::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DOMAIN_NAME_FIELD, CERTIFICATE_NAME_FIELD, CERTIFICATE_ARN_FIELD, CERTIFICATE_UPLOAD_DATE_FIELD, REGIONAL_DOMAIN_NAME_FIELD, REGIONAL_HOSTED_ZONE_ID_FIELD, REGIONAL_CERTIFICATE_NAME_FIELD, REGIONAL_CERTIFICATE_ARN_FIELD, DISTRIBUTION_DOMAIN_NAME_FIELD, DISTRIBUTION_HOSTED_ZONE_ID_FIELD, ENDPOINT_CONFIGURATION_FIELD, DOMAIN_NAME_STATUS_FIELD, DOMAIN_NAME_STATUS_MESSAGE_FIELD, SECURITY_POLICY_FIELD, TAGS_FIELD)); private final String domainName; private final String certificateName; private final String certificateArn; private final Instant certificateUploadDate; private final String regionalDomainName; private final String regionalHostedZoneId; private final String regionalCertificateName; private final String regionalCertificateArn; private final String distributionDomainName; private final String distributionHostedZoneId; private final EndpointConfiguration endpointConfiguration; private final String domainNameStatus; private final String domainNameStatusMessage; private final String securityPolicy; private final Map tags; private CreateDomainNameResponse(BuilderImpl builder) { super(builder); this.domainName = builder.domainName; this.certificateName = builder.certificateName; this.certificateArn = builder.certificateArn; this.certificateUploadDate = builder.certificateUploadDate; this.regionalDomainName = builder.regionalDomainName; this.regionalHostedZoneId = builder.regionalHostedZoneId; this.regionalCertificateName = builder.regionalCertificateName; this.regionalCertificateArn = builder.regionalCertificateArn; this.distributionDomainName = builder.distributionDomainName; this.distributionHostedZoneId = builder.distributionHostedZoneId; this.endpointConfiguration = builder.endpointConfiguration; this.domainNameStatus = builder.domainNameStatus; this.domainNameStatusMessage = builder.domainNameStatusMessage; this.securityPolicy = builder.securityPolicy; this.tags = builder.tags; } /** *

* The custom domain name as an API host name, for example, my-api.example.com. *

* * @return The custom domain name as an API host name, for example, my-api.example.com. */ public String domainName() { return domainName; } /** *

* The name of the certificate that will be used by edge-optimized endpoint for this domain name. *

* * @return The name of the certificate that will be used by edge-optimized endpoint for this domain name. */ public String certificateName() { return certificateName; } /** *

* The reference to an AWS-managed certificate that will be used by edge-optimized endpoint for this domain name. * AWS Certificate Manager is the only supported source. *

* * @return The reference to an AWS-managed certificate that will be used by edge-optimized endpoint for this domain * name. AWS Certificate Manager is the only supported source. */ public String certificateArn() { return certificateArn; } /** *

* The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded. *

* * @return The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was * uploaded. */ public Instant certificateUploadDate() { return certificateUploadDate; } /** *

* The domain name associated with the regional endpoint for this custom domain name. You set up this association by * adding a DNS record that points the custom domain name to this regional domain name. The regional domain name is * returned by API Gateway when you create a regional endpoint. *

* * @return The domain name associated with the regional endpoint for this custom domain name. You set up this * association by adding a DNS record that points the custom domain name to this regional domain name. The * regional domain name is returned by API Gateway when you create a regional endpoint. */ public String regionalDomainName() { return regionalDomainName; } /** *

* The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for * API Gateway. *

* * @return The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see Set up a Regional Custom Domain Name and AWS Regions and * Endpoints for API Gateway. */ public String regionalHostedZoneId() { return regionalHostedZoneId; } /** *

* The name of the certificate that will be used for validating the regional domain name. *

* * @return The name of the certificate that will be used for validating the regional domain name. */ public String regionalCertificateName() { return regionalCertificateName; } /** *

* The reference to an AWS-managed certificate that will be used for validating the regional domain name. AWS * Certificate Manager is the only supported source. *

* * @return The reference to an AWS-managed certificate that will be used for validating the regional domain name. * AWS Certificate Manager is the only supported source. */ public String regionalCertificateArn() { return regionalCertificateArn; } /** *

* The domain name of the Amazon CloudFront distribution associated with this custom domain name for an * edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom domain name to * this distribution name. For more information about CloudFront distributions, see the Amazon CloudFront documentation. *

* * @return The domain name of the Amazon CloudFront distribution associated with this custom domain name for an * edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom domain * name to this distribution name. For more information about CloudFront distributions, see the Amazon CloudFront * documentation. */ public String distributionDomainName() { return distributionDomainName; } /** *

* The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is * Z2FDTNDATAQYW2 for all the regions. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for * API Gateway. *

* * @return The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is * Z2FDTNDATAQYW2 for all the regions. For more information, see Set up a Regional Custom Domain Name and AWS Regions and * Endpoints for API Gateway. */ public String distributionHostedZoneId() { return distributionHostedZoneId; } /** *

* The endpoint configuration of this DomainName showing the endpoint types of the domain name. *

* * @return The endpoint configuration of this DomainName showing the endpoint types of the domain name. */ public EndpointConfiguration endpointConfiguration() { return endpointConfiguration; } /** *

* The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further until the * existing operation is complete. If it is AVAILABLE, the domain can be updated. *

*

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

* * @return The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further * until the existing operation is complete. If it is AVAILABLE, the domain can be updated. * @see DomainNameStatus */ public DomainNameStatus domainNameStatus() { return DomainNameStatus.fromValue(domainNameStatus); } /** *

* The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further until the * existing operation is complete. If it is AVAILABLE, the domain can be updated. *

*

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

* * @return The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further * until the existing operation is complete. If it is AVAILABLE, the domain can be updated. * @see DomainNameStatus */ public String domainNameStatusAsString() { return domainNameStatus; } /** *

* An optional text message containing detailed information about status of the DomainName migration. *

* * @return An optional text message containing detailed information about status of the DomainName migration. */ public String domainNameStatusMessage() { return domainNameStatusMessage; } /** *

* The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are * TLS_1_0 and TLS_1_2. *

*

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

* * @return The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values * are TLS_1_0 and TLS_1_2. * @see SecurityPolicy */ public SecurityPolicy securityPolicy() { return SecurityPolicy.fromValue(securityPolicy); } /** *

* The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are * TLS_1_0 and TLS_1_2. *

*

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

* * @return The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values * are TLS_1_0 and TLS_1_2. * @see SecurityPolicy */ public String securityPolicyAsString() { return securityPolicy; } /** * Returns true if the Tags property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* The collection of tags. Each tag element is associated with a given resource. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasTags()} to see if a value was sent in this field. *

* * @return The collection of tags. Each tag element is associated with a given resource. */ public Map 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 int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(domainName()); hashCode = 31 * hashCode + Objects.hashCode(certificateName()); hashCode = 31 * hashCode + Objects.hashCode(certificateArn()); hashCode = 31 * hashCode + Objects.hashCode(certificateUploadDate()); hashCode = 31 * hashCode + Objects.hashCode(regionalDomainName()); hashCode = 31 * hashCode + Objects.hashCode(regionalHostedZoneId()); hashCode = 31 * hashCode + Objects.hashCode(regionalCertificateName()); hashCode = 31 * hashCode + Objects.hashCode(regionalCertificateArn()); hashCode = 31 * hashCode + Objects.hashCode(distributionDomainName()); hashCode = 31 * hashCode + Objects.hashCode(distributionHostedZoneId()); hashCode = 31 * hashCode + Objects.hashCode(endpointConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(domainNameStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(domainNameStatusMessage()); hashCode = 31 * hashCode + Objects.hashCode(securityPolicyAsString()); hashCode = 31 * hashCode + Objects.hashCode(tags()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateDomainNameResponse)) { return false; } CreateDomainNameResponse other = (CreateDomainNameResponse) obj; return Objects.equals(domainName(), other.domainName()) && Objects.equals(certificateName(), other.certificateName()) && Objects.equals(certificateArn(), other.certificateArn()) && Objects.equals(certificateUploadDate(), other.certificateUploadDate()) && Objects.equals(regionalDomainName(), other.regionalDomainName()) && Objects.equals(regionalHostedZoneId(), other.regionalHostedZoneId()) && Objects.equals(regionalCertificateName(), other.regionalCertificateName()) && Objects.equals(regionalCertificateArn(), other.regionalCertificateArn()) && Objects.equals(distributionDomainName(), other.distributionDomainName()) && Objects.equals(distributionHostedZoneId(), other.distributionHostedZoneId()) && Objects.equals(endpointConfiguration(), other.endpointConfiguration()) && Objects.equals(domainNameStatusAsString(), other.domainNameStatusAsString()) && Objects.equals(domainNameStatusMessage(), other.domainNameStatusMessage()) && Objects.equals(securityPolicyAsString(), other.securityPolicyAsString()) && 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 String toString() { return ToString.builder("CreateDomainNameResponse").add("DomainName", domainName()) .add("CertificateName", certificateName()).add("CertificateArn", certificateArn()) .add("CertificateUploadDate", certificateUploadDate()).add("RegionalDomainName", regionalDomainName()) .add("RegionalHostedZoneId", regionalHostedZoneId()).add("RegionalCertificateName", regionalCertificateName()) .add("RegionalCertificateArn", regionalCertificateArn()).add("DistributionDomainName", distributionDomainName()) .add("DistributionHostedZoneId", distributionHostedZoneId()) .add("EndpointConfiguration", endpointConfiguration()).add("DomainNameStatus", domainNameStatusAsString()) .add("DomainNameStatusMessage", domainNameStatusMessage()).add("SecurityPolicy", securityPolicyAsString()) .add("Tags", tags()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "domainName": return Optional.ofNullable(clazz.cast(domainName())); case "certificateName": return Optional.ofNullable(clazz.cast(certificateName())); case "certificateArn": return Optional.ofNullable(clazz.cast(certificateArn())); case "certificateUploadDate": return Optional.ofNullable(clazz.cast(certificateUploadDate())); case "regionalDomainName": return Optional.ofNullable(clazz.cast(regionalDomainName())); case "regionalHostedZoneId": return Optional.ofNullable(clazz.cast(regionalHostedZoneId())); case "regionalCertificateName": return Optional.ofNullable(clazz.cast(regionalCertificateName())); case "regionalCertificateArn": return Optional.ofNullable(clazz.cast(regionalCertificateArn())); case "distributionDomainName": return Optional.ofNullable(clazz.cast(distributionDomainName())); case "distributionHostedZoneId": return Optional.ofNullable(clazz.cast(distributionHostedZoneId())); case "endpointConfiguration": return Optional.ofNullable(clazz.cast(endpointConfiguration())); case "domainNameStatus": return Optional.ofNullable(clazz.cast(domainNameStatusAsString())); case "domainNameStatusMessage": return Optional.ofNullable(clazz.cast(domainNameStatusMessage())); case "securityPolicy": return Optional.ofNullable(clazz.cast(securityPolicyAsString())); case "tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateDomainNameResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends ApiGatewayResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The custom domain name as an API host name, for example, my-api.example.com. *

* * @param domainName * The custom domain name as an API host name, for example, my-api.example.com. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainName(String domainName); /** *

* The name of the certificate that will be used by edge-optimized endpoint for this domain name. *

* * @param certificateName * The name of the certificate that will be used by edge-optimized endpoint for this domain name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder certificateName(String certificateName); /** *

* The reference to an AWS-managed certificate that will be used by edge-optimized endpoint for this domain * name. AWS Certificate Manager is the only supported source. *

* * @param certificateArn * The reference to an AWS-managed certificate that will be used by edge-optimized endpoint for this * domain name. AWS Certificate Manager is the only supported source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder certificateArn(String certificateArn); /** *

* The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was * uploaded. *

* * @param certificateUploadDate * The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was * uploaded. * @return Returns a reference to this object so that method calls can be chained together. */ Builder certificateUploadDate(Instant certificateUploadDate); /** *

* The domain name associated with the regional endpoint for this custom domain name. You set up this * association by adding a DNS record that points the custom domain name to this regional domain name. The * regional domain name is returned by API Gateway when you create a regional endpoint. *

* * @param regionalDomainName * The domain name associated with the regional endpoint for this custom domain name. You set up this * association by adding a DNS record that points the custom domain name to this regional domain name. * The regional domain name is returned by API Gateway when you create a regional endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder regionalDomainName(String regionalDomainName); /** *

* The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints * for API Gateway. *

* * @param regionalHostedZoneId * The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see * Set up a Regional Custom Domain Name and AWS Regions and * Endpoints for API Gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder regionalHostedZoneId(String regionalHostedZoneId); /** *

* The name of the certificate that will be used for validating the regional domain name. *

* * @param regionalCertificateName * The name of the certificate that will be used for validating the regional domain name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder regionalCertificateName(String regionalCertificateName); /** *

* The reference to an AWS-managed certificate that will be used for validating the regional domain name. AWS * Certificate Manager is the only supported source. *

* * @param regionalCertificateArn * The reference to an AWS-managed certificate that will be used for validating the regional domain name. * AWS Certificate Manager is the only supported source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder regionalCertificateArn(String regionalCertificateArn); /** *

* The domain name of the Amazon CloudFront distribution associated with this custom domain name for an * edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom domain name * to this distribution name. For more information about CloudFront distributions, see the Amazon CloudFront documentation. *

* * @param distributionDomainName * The domain name of the Amazon CloudFront distribution associated with this custom domain name for an * edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom * domain name to this distribution name. For more information about CloudFront distributions, see the Amazon CloudFront * documentation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder distributionDomainName(String distributionDomainName); /** *

* The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is * Z2FDTNDATAQYW2 for all the regions. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints * for API Gateway. *

* * @param distributionHostedZoneId * The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is * Z2FDTNDATAQYW2 for all the regions. For more information, see Set up a Regional Custom Domain Name and AWS Regions and * Endpoints for API Gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder distributionHostedZoneId(String distributionHostedZoneId); /** *

* The endpoint configuration of this DomainName showing the endpoint types of the domain name. *

* * @param endpointConfiguration * The endpoint configuration of this DomainName showing the endpoint types of the domain name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder endpointConfiguration(EndpointConfiguration endpointConfiguration); /** *

* The endpoint configuration of this DomainName showing the endpoint types of the domain name. *

* This is a convenience that creates an instance of the {@link EndpointConfiguration.Builder} avoiding the need * to create one manually via {@link EndpointConfiguration#builder()}. * * When the {@link Consumer} completes, {@link EndpointConfiguration.Builder#build()} is called immediately and * its result is passed to {@link #endpointConfiguration(EndpointConfiguration)}. * * @param endpointConfiguration * a consumer that will call methods on {@link EndpointConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #endpointConfiguration(EndpointConfiguration) */ default Builder endpointConfiguration(Consumer endpointConfiguration) { return endpointConfiguration(EndpointConfiguration.builder().applyMutation(endpointConfiguration).build()); } /** *

* The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further until * the existing operation is complete. If it is AVAILABLE, the domain can be updated. *

* * @param domainNameStatus * The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further * until the existing operation is complete. If it is AVAILABLE, the domain can be updated. * @see DomainNameStatus * @return Returns a reference to this object so that method calls can be chained together. * @see DomainNameStatus */ Builder domainNameStatus(String domainNameStatus); /** *

* The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further until * the existing operation is complete. If it is AVAILABLE, the domain can be updated. *

* * @param domainNameStatus * The status of the DomainName migration. The valid values are AVAILABLE and * UPDATING. If the status is UPDATING, the domain cannot be modified further * until the existing operation is complete. If it is AVAILABLE, the domain can be updated. * @see DomainNameStatus * @return Returns a reference to this object so that method calls can be chained together. * @see DomainNameStatus */ Builder domainNameStatus(DomainNameStatus domainNameStatus); /** *

* An optional text message containing detailed information about status of the DomainName migration. *

* * @param domainNameStatusMessage * An optional text message containing detailed information about status of the DomainName * migration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainNameStatusMessage(String domainNameStatusMessage); /** *

* The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are * TLS_1_0 and TLS_1_2. *

* * @param securityPolicy * The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values * are TLS_1_0 and TLS_1_2. * @see SecurityPolicy * @return Returns a reference to this object so that method calls can be chained together. * @see SecurityPolicy */ Builder securityPolicy(String securityPolicy); /** *

* The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are * TLS_1_0 and TLS_1_2. *

* * @param securityPolicy * The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values * are TLS_1_0 and TLS_1_2. * @see SecurityPolicy * @return Returns a reference to this object so that method calls can be chained together. * @see SecurityPolicy */ Builder securityPolicy(SecurityPolicy securityPolicy); /** *

* The collection of tags. Each tag element is associated with a given resource. *

* * @param tags * The collection of tags. Each tag element is associated with a given resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); } static final class BuilderImpl extends ApiGatewayResponse.BuilderImpl implements Builder { private String domainName; private String certificateName; private String certificateArn; private Instant certificateUploadDate; private String regionalDomainName; private String regionalHostedZoneId; private String regionalCertificateName; private String regionalCertificateArn; private String distributionDomainName; private String distributionHostedZoneId; private EndpointConfiguration endpointConfiguration; private String domainNameStatus; private String domainNameStatusMessage; private String securityPolicy; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateDomainNameResponse model) { super(model); domainName(model.domainName); certificateName(model.certificateName); certificateArn(model.certificateArn); certificateUploadDate(model.certificateUploadDate); regionalDomainName(model.regionalDomainName); regionalHostedZoneId(model.regionalHostedZoneId); regionalCertificateName(model.regionalCertificateName); regionalCertificateArn(model.regionalCertificateArn); distributionDomainName(model.distributionDomainName); distributionHostedZoneId(model.distributionHostedZoneId); endpointConfiguration(model.endpointConfiguration); domainNameStatus(model.domainNameStatus); domainNameStatusMessage(model.domainNameStatusMessage); securityPolicy(model.securityPolicy); tags(model.tags); } public final String getDomainName() { return domainName; } @Override public final Builder domainName(String domainName) { this.domainName = domainName; return this; } public final void setDomainName(String domainName) { this.domainName = domainName; } public final String getCertificateName() { return certificateName; } @Override public final Builder certificateName(String certificateName) { this.certificateName = certificateName; return this; } public final void setCertificateName(String certificateName) { this.certificateName = certificateName; } public final String getCertificateArn() { return certificateArn; } @Override public final Builder certificateArn(String certificateArn) { this.certificateArn = certificateArn; return this; } public final void setCertificateArn(String certificateArn) { this.certificateArn = certificateArn; } public final Instant getCertificateUploadDate() { return certificateUploadDate; } @Override public final Builder certificateUploadDate(Instant certificateUploadDate) { this.certificateUploadDate = certificateUploadDate; return this; } public final void setCertificateUploadDate(Instant certificateUploadDate) { this.certificateUploadDate = certificateUploadDate; } public final String getRegionalDomainName() { return regionalDomainName; } @Override public final Builder regionalDomainName(String regionalDomainName) { this.regionalDomainName = regionalDomainName; return this; } public final void setRegionalDomainName(String regionalDomainName) { this.regionalDomainName = regionalDomainName; } public final String getRegionalHostedZoneId() { return regionalHostedZoneId; } @Override public final Builder regionalHostedZoneId(String regionalHostedZoneId) { this.regionalHostedZoneId = regionalHostedZoneId; return this; } public final void setRegionalHostedZoneId(String regionalHostedZoneId) { this.regionalHostedZoneId = regionalHostedZoneId; } public final String getRegionalCertificateName() { return regionalCertificateName; } @Override public final Builder regionalCertificateName(String regionalCertificateName) { this.regionalCertificateName = regionalCertificateName; return this; } public final void setRegionalCertificateName(String regionalCertificateName) { this.regionalCertificateName = regionalCertificateName; } public final String getRegionalCertificateArn() { return regionalCertificateArn; } @Override public final Builder regionalCertificateArn(String regionalCertificateArn) { this.regionalCertificateArn = regionalCertificateArn; return this; } public final void setRegionalCertificateArn(String regionalCertificateArn) { this.regionalCertificateArn = regionalCertificateArn; } public final String getDistributionDomainName() { return distributionDomainName; } @Override public final Builder distributionDomainName(String distributionDomainName) { this.distributionDomainName = distributionDomainName; return this; } public final void setDistributionDomainName(String distributionDomainName) { this.distributionDomainName = distributionDomainName; } public final String getDistributionHostedZoneId() { return distributionHostedZoneId; } @Override public final Builder distributionHostedZoneId(String distributionHostedZoneId) { this.distributionHostedZoneId = distributionHostedZoneId; return this; } public final void setDistributionHostedZoneId(String distributionHostedZoneId) { this.distributionHostedZoneId = distributionHostedZoneId; } public final EndpointConfiguration.Builder getEndpointConfiguration() { return endpointConfiguration != null ? endpointConfiguration.toBuilder() : null; } @Override public final Builder endpointConfiguration(EndpointConfiguration endpointConfiguration) { this.endpointConfiguration = endpointConfiguration; return this; } public final void setEndpointConfiguration(EndpointConfiguration.BuilderImpl endpointConfiguration) { this.endpointConfiguration = endpointConfiguration != null ? endpointConfiguration.build() : null; } public final String getDomainNameStatus() { return domainNameStatus; } @Override public final Builder domainNameStatus(String domainNameStatus) { this.domainNameStatus = domainNameStatus; return this; } @Override public final Builder domainNameStatus(DomainNameStatus domainNameStatus) { this.domainNameStatus(domainNameStatus == null ? null : domainNameStatus.toString()); return this; } public final void setDomainNameStatus(String domainNameStatus) { this.domainNameStatus = domainNameStatus; } public final String getDomainNameStatusMessage() { return domainNameStatusMessage; } @Override public final Builder domainNameStatusMessage(String domainNameStatusMessage) { this.domainNameStatusMessage = domainNameStatusMessage; return this; } public final void setDomainNameStatusMessage(String domainNameStatusMessage) { this.domainNameStatusMessage = domainNameStatusMessage; } public final String getSecurityPolicy() { return securityPolicy; } @Override public final Builder securityPolicy(String securityPolicy) { this.securityPolicy = securityPolicy; return this; } @Override public final Builder securityPolicy(SecurityPolicy securityPolicy) { this.securityPolicy(securityPolicy == null ? null : securityPolicy.toString()); return this; } public final void setSecurityPolicy(String securityPolicy) { this.securityPolicy = securityPolicy; } public final Map getTags() { return tags; } @Override public final Builder tags(Map tags) { this.tags = MapOfStringToStringCopier.copy(tags); return this; } public final void setTags(Map tags) { this.tags = MapOfStringToStringCopier.copy(tags); } @Override public CreateDomainNameResponse build() { return new CreateDomainNameResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy