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

software.amazon.awssdk.services.transfer.model.CreateServerRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.transfer.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 CreateServerRequest extends TransferRequest implements
        ToCopyableBuilder {
    private static final SdkField CERTIFICATE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Certificate").getter(getter(CreateServerRequest::certificate)).setter(setter(Builder::certificate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Certificate").build()).build();

    private static final SdkField DOMAIN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Domain")
            .getter(getter(CreateServerRequest::domainAsString)).setter(setter(Builder::domain))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Domain").build()).build();

    private static final SdkField ENDPOINT_DETAILS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("EndpointDetails")
            .getter(getter(CreateServerRequest::endpointDetails)).setter(setter(Builder::endpointDetails))
            .constructor(EndpointDetails::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointDetails").build()).build();

    private static final SdkField ENDPOINT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("EndpointType").getter(getter(CreateServerRequest::endpointTypeAsString))
            .setter(setter(Builder::endpointType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointType").build()).build();

    private static final SdkField HOST_KEY_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("HostKey").getter(getter(CreateServerRequest::hostKey)).setter(setter(Builder::hostKey))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HostKey").build()).build();

    private static final SdkField IDENTITY_PROVIDER_DETAILS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("IdentityProviderDetails")
            .getter(getter(CreateServerRequest::identityProviderDetails)).setter(setter(Builder::identityProviderDetails))
            .constructor(IdentityProviderDetails::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdentityProviderDetails").build())
            .build();

    private static final SdkField IDENTITY_PROVIDER_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("IdentityProviderType").getter(getter(CreateServerRequest::identityProviderTypeAsString))
            .setter(setter(Builder::identityProviderType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdentityProviderType").build())
            .build();

    private static final SdkField LOGGING_ROLE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("LoggingRole").getter(getter(CreateServerRequest::loggingRole)).setter(setter(Builder::loggingRole))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LoggingRole").build()).build();

    private static final SdkField> PROTOCOLS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Protocols")
            .getter(getter(CreateServerRequest::protocolsAsStrings))
            .setter(setter(Builder::protocolsWithStrings))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Protocols").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 SECURITY_POLICY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SecurityPolicyName").getter(getter(CreateServerRequest::securityPolicyName))
            .setter(setter(Builder::securityPolicyName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityPolicyName").build())
            .build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(CreateServerRequest::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 List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CERTIFICATE_FIELD,
            DOMAIN_FIELD, ENDPOINT_DETAILS_FIELD, ENDPOINT_TYPE_FIELD, HOST_KEY_FIELD, IDENTITY_PROVIDER_DETAILS_FIELD,
            IDENTITY_PROVIDER_TYPE_FIELD, LOGGING_ROLE_FIELD, PROTOCOLS_FIELD, SECURITY_POLICY_NAME_FIELD, TAGS_FIELD));

    private final String certificate;

    private final String domain;

    private final EndpointDetails endpointDetails;

    private final String endpointType;

    private final String hostKey;

    private final IdentityProviderDetails identityProviderDetails;

    private final String identityProviderType;

    private final String loggingRole;

    private final List protocols;

    private final String securityPolicyName;

    private final List tags;

    private CreateServerRequest(BuilderImpl builder) {
        super(builder);
        this.certificate = builder.certificate;
        this.domain = builder.domain;
        this.endpointDetails = builder.endpointDetails;
        this.endpointType = builder.endpointType;
        this.hostKey = builder.hostKey;
        this.identityProviderDetails = builder.identityProviderDetails;
        this.identityProviderType = builder.identityProviderType;
        this.loggingRole = builder.loggingRole;
        this.protocols = builder.protocols;
        this.securityPolicyName = builder.securityPolicyName;
        this.tags = builder.tags;
    }

    /**
     * 

* The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS. *

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates into * ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and * information about the issuer. *

*
* * @return The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS.

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates * into ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and * information about the issuer. *

*/ public final String certificate() { return certificate; } /** * Returns the value of the Domain property for this object. *

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

* * @return The value of the Domain property for this object. * @see Domain */ public final Domain domain() { return Domain.fromValue(domain); } /** * Returns the value of the Domain property for this object. *

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

* * @return The value of the Domain property for this object. * @see Domain */ public final String domainAsString() { return domain; } /** *

* The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your * endpoint within your VPC, you can make it accessible only to resources within your VPC, or you can attach Elastic * IPs and make it accessible to clients over the internet. Your VPC's default security groups are automatically * assigned to your endpoint. *

* * @return The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your * endpoint within your VPC, you can make it accessible only to resources within your VPC, or you can attach * Elastic IPs and make it accessible to clients over the internet. Your VPC's default security groups are * automatically assigned to your endpoint. */ public final EndpointDetails endpointDetails() { return endpointDetails; } /** *

* The type of VPC endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only within * your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. With this endpoint type, you * have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's * endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible * with EndpointType set to VPC_ENDPOINT. *

*
*

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

* * @return The type of VPC endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources * only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. With this endpoint * type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with * your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. * This is not possible with EndpointType set to VPC_ENDPOINT. *

* @see EndpointType */ public final EndpointType endpointType() { return EndpointType.fromValue(endpointType); } /** *

* The type of VPC endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only within * your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. With this endpoint type, you * have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's * endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible * with EndpointType set to VPC_ENDPOINT. *

*
*

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

* * @return The type of VPC endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources * only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. With this endpoint * type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with * your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. * This is not possible with EndpointType set to VPC_ENDPOINT. *

* @see EndpointType */ public final String endpointTypeAsString() { return endpointType; } /** *

* The RSA private key as generated by the ssh-keygen -N "" -m PEM -f my-new-server-key command. *

* *

* If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't * update the host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. *

* * @return The RSA private key as generated by the ssh-keygen -N "" -m PEM -f my-new-server-key * command.

*

* If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, * don't update the host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. */ public final String hostKey() { return hostKey; } /** *

* Required when IdentityProviderType is set to API_GATEWAY. Accepts an array containing * all of the information required to call a customer-supplied authentication API, including the API Gateway URL. * Not required when IdentityProviderType is set to SERVICE_MANAGED. *

* * @return Required when IdentityProviderType is set to API_GATEWAY. Accepts an array * containing all of the information required to call a customer-supplied authentication API, including the * API Gateway URL. Not required when IdentityProviderType is set to * SERVICE_MANAGED. */ public final IdentityProviderDetails identityProviderDetails() { return identityProviderDetails; } /** *

* Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, which * allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for authentication * using the IdentityProviderDetails parameter. *

*

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

* * @return Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, * which allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for * authentication using the IdentityProviderDetails parameter. * @see IdentityProviderType */ public final IdentityProviderType identityProviderType() { return IdentityProviderType.fromValue(identityProviderType); } /** *

* Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, which * allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for authentication * using the IdentityProviderDetails parameter. *

*

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

* * @return Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, * which allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for * authentication using the IdentityProviderDetails parameter. * @see IdentityProviderType */ public final String identityProviderTypeAsString() { return identityProviderType; } /** *

* Allows the service to write your users' activity to your Amazon CloudWatch logs for monitoring and auditing * purposes. *

* * @return Allows the service to write your users' activity to your Amazon CloudWatch logs for monitoring and * auditing purposes. */ public final String loggingRole() { return loggingRole; } /** *

* Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to * your server's endpoint. The available protocols are: *

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which will * be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
*

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

*

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

* * @return Specifies the file transfer protocol or protocols over which your file transfer protocol client can * connect to your server's endpoint. The available protocols are:

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*/ public final List protocols() { return ProtocolsCopier.copyStringToEnum(protocols); } /** * Returns true if the Protocols 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 final boolean hasProtocols() { return protocols != null && !(protocols instanceof SdkAutoConstructList); } /** *

* Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to * your server's endpoint. The available protocols are: *

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which will * be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
*

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

*

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

* * @return Specifies the file transfer protocol or protocols over which your file transfer protocol client can * connect to your server's endpoint. The available protocols are:

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*/ public final List protocolsAsStrings() { return protocols; } /** *

* Specifies the name of the security policy that is attached to the server. *

* * @return Specifies the name of the security policy that is attached to the server. */ public final String securityPolicyName() { return securityPolicyName; } /** * 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 final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* Key-value pairs that can be used to group and search for servers. *

*

* 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 Key-value pairs that can be used to group and search for servers. */ 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(certificate()); hashCode = 31 * hashCode + Objects.hashCode(domainAsString()); hashCode = 31 * hashCode + Objects.hashCode(endpointDetails()); hashCode = 31 * hashCode + Objects.hashCode(endpointTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(hostKey()); hashCode = 31 * hashCode + Objects.hashCode(identityProviderDetails()); hashCode = 31 * hashCode + Objects.hashCode(identityProviderTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(loggingRole()); hashCode = 31 * hashCode + Objects.hashCode(hasProtocols() ? protocolsAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(securityPolicyName()); 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 CreateServerRequest)) { return false; } CreateServerRequest other = (CreateServerRequest) obj; return Objects.equals(certificate(), other.certificate()) && Objects.equals(domainAsString(), other.domainAsString()) && Objects.equals(endpointDetails(), other.endpointDetails()) && Objects.equals(endpointTypeAsString(), other.endpointTypeAsString()) && Objects.equals(hostKey(), other.hostKey()) && Objects.equals(identityProviderDetails(), other.identityProviderDetails()) && Objects.equals(identityProviderTypeAsString(), other.identityProviderTypeAsString()) && Objects.equals(loggingRole(), other.loggingRole()) && hasProtocols() == other.hasProtocols() && Objects.equals(protocolsAsStrings(), other.protocolsAsStrings()) && Objects.equals(securityPolicyName(), other.securityPolicyName()) && 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("CreateServerRequest").add("Certificate", certificate()).add("Domain", domainAsString()) .add("EndpointDetails", endpointDetails()).add("EndpointType", endpointTypeAsString()) .add("HostKey", hostKey() == null ? null : "*** Sensitive Data Redacted ***") .add("IdentityProviderDetails", identityProviderDetails()) .add("IdentityProviderType", identityProviderTypeAsString()).add("LoggingRole", loggingRole()) .add("Protocols", hasProtocols() ? protocolsAsStrings() : null).add("SecurityPolicyName", securityPolicyName()) .add("Tags", hasTags() ? tags() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Certificate": return Optional.ofNullable(clazz.cast(certificate())); case "Domain": return Optional.ofNullable(clazz.cast(domainAsString())); case "EndpointDetails": return Optional.ofNullable(clazz.cast(endpointDetails())); case "EndpointType": return Optional.ofNullable(clazz.cast(endpointTypeAsString())); case "HostKey": return Optional.ofNullable(clazz.cast(hostKey())); case "IdentityProviderDetails": return Optional.ofNullable(clazz.cast(identityProviderDetails())); case "IdentityProviderType": return Optional.ofNullable(clazz.cast(identityProviderTypeAsString())); case "LoggingRole": return Optional.ofNullable(clazz.cast(loggingRole())); case "Protocols": return Optional.ofNullable(clazz.cast(protocolsAsStrings())); case "SecurityPolicyName": return Optional.ofNullable(clazz.cast(securityPolicyName())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateServerRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends TransferRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS. *

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates into * ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and * information about the issuer. *

*
* * @param certificate * The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS.

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates * into ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified * and information about the issuer. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder certificate(String certificate); /** * Sets the value of the Domain property for this object. * * @param domain * The new value for the Domain property for this object. * @see Domain * @return Returns a reference to this object so that method calls can be chained together. * @see Domain */ Builder domain(String domain); /** * Sets the value of the Domain property for this object. * * @param domain * The new value for the Domain property for this object. * @see Domain * @return Returns a reference to this object so that method calls can be chained together. * @see Domain */ Builder domain(Domain domain); /** *

* The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your * endpoint within your VPC, you can make it accessible only to resources within your VPC, or you can attach * Elastic IPs and make it accessible to clients over the internet. Your VPC's default security groups are * automatically assigned to your endpoint. *

* * @param endpointDetails * The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host * your endpoint within your VPC, you can make it accessible only to resources within your VPC, or you * can attach Elastic IPs and make it accessible to clients over the internet. Your VPC's default * security groups are automatically assigned to your endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder endpointDetails(EndpointDetails endpointDetails); /** *

* The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your * endpoint within your VPC, you can make it accessible only to resources within your VPC, or you can attach * Elastic IPs and make it accessible to clients over the internet. Your VPC's default security groups are * automatically assigned to your endpoint. *

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

* The type of VPC endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only * within your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. With this endpoint type, * you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your * server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is * not possible with EndpointType set to VPC_ENDPOINT. *

*
* * @param endpointType * The type of VPC endpoint that you want your server to connect to. You can choose to connect to the * public internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and * resources only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. With this endpoint * type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) * with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP * address. This is not possible with EndpointType set to VPC_ENDPOINT. *

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

* The type of VPC endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only * within your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. With this endpoint type, * you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your * server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is * not possible with EndpointType set to VPC_ENDPOINT. *

*
* * @param endpointType * The type of VPC endpoint that you want your server to connect to. You can choose to connect to the * public internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and * resources only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. With this endpoint * type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) * with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP * address. This is not possible with EndpointType set to VPC_ENDPOINT. *

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

* The RSA private key as generated by the ssh-keygen -N "" -m PEM -f my-new-server-key command. *

* *

* If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't * update the host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. *

* * @param hostKey * The RSA private key as generated by the ssh-keygen -N "" -m PEM -f my-new-server-key * command.

*

* If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, * don't update the host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hostKey(String hostKey); /** *

* Required when IdentityProviderType is set to API_GATEWAY. Accepts an array * containing all of the information required to call a customer-supplied authentication API, including the API * Gateway URL. Not required when IdentityProviderType is set to SERVICE_MANAGED. *

* * @param identityProviderDetails * Required when IdentityProviderType is set to API_GATEWAY. Accepts an array * containing all of the information required to call a customer-supplied authentication API, including * the API Gateway URL. Not required when IdentityProviderType is set to * SERVICE_MANAGED. * @return Returns a reference to this object so that method calls can be chained together. */ Builder identityProviderDetails(IdentityProviderDetails identityProviderDetails); /** *

* Required when IdentityProviderType is set to API_GATEWAY. Accepts an array * containing all of the information required to call a customer-supplied authentication API, including the API * Gateway URL. Not required when IdentityProviderType is set to SERVICE_MANAGED. *

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

* Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, which * allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for * authentication using the IdentityProviderDetails parameter. *

* * @param identityProviderType * Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, * which allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for * authentication using the IdentityProviderDetails parameter. * @see IdentityProviderType * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityProviderType */ Builder identityProviderType(String identityProviderType); /** *

* Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, which * allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for * authentication using the IdentityProviderDetails parameter. *

* * @param identityProviderType * Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, * which allows you to store and access user credentials within the AWS Transfer Family service. Use the * API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for * authentication using the IdentityProviderDetails parameter. * @see IdentityProviderType * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityProviderType */ Builder identityProviderType(IdentityProviderType identityProviderType); /** *

* Allows the service to write your users' activity to your Amazon CloudWatch logs for monitoring and auditing * purposes. *

* * @param loggingRole * Allows the service to write your users' activity to your Amazon CloudWatch logs for monitoring and * auditing purposes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loggingRole(String loggingRole); /** *

* Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect * to your server's endpoint. The available protocols are: *

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * Specifies the file transfer protocol or protocols over which your file transfer protocol client can * connect to your server's endpoint. The available protocols are:

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

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

* Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect * to your server's endpoint. The available protocols are: *

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * Specifies the file transfer protocol or protocols over which your file transfer protocol client can * connect to your server's endpoint. The available protocols are:

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

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

* Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect * to your server's endpoint. The available protocols are: *

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * Specifies the file transfer protocol or protocols over which your file transfer protocol client can * connect to your server's endpoint. The available protocols are:

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

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

* Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect * to your server's endpoint. The available protocols are: *

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * Specifies the file transfer protocol or protocols over which your file transfer protocol client can * connect to your server's endpoint. The available protocols are:

*
    *
  • *

    * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH *

    *
  • *
  • *

    * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption *

    *
  • *
  • *

    * FTP (File Transfer Protocol): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

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

* Specifies the name of the security policy that is attached to the server. *

* * @param securityPolicyName * Specifies the name of the security policy that is attached to the server. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityPolicyName(String securityPolicyName); /** *

* Key-value pairs that can be used to group and search for servers. *

* * @param tags * Key-value pairs that can be used to group and search for servers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* Key-value pairs that can be used to group and search for servers. *

* * @param tags * Key-value pairs that can be used to group and search for servers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* Key-value pairs that can be used to group and search for servers. *

* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to create * one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result * is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(List) */ Builder tags(Consumer... tags); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends TransferRequest.BuilderImpl implements Builder { private String certificate; private String domain; private EndpointDetails endpointDetails; private String endpointType; private String hostKey; private IdentityProviderDetails identityProviderDetails; private String identityProviderType; private String loggingRole; private List protocols = DefaultSdkAutoConstructList.getInstance(); private String securityPolicyName; private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateServerRequest model) { super(model); certificate(model.certificate); domain(model.domain); endpointDetails(model.endpointDetails); endpointType(model.endpointType); hostKey(model.hostKey); identityProviderDetails(model.identityProviderDetails); identityProviderType(model.identityProviderType); loggingRole(model.loggingRole); protocolsWithStrings(model.protocols); securityPolicyName(model.securityPolicyName); tags(model.tags); } public final String getCertificate() { return certificate; } @Override public final Builder certificate(String certificate) { this.certificate = certificate; return this; } public final void setCertificate(String certificate) { this.certificate = certificate; } public final String getDomain() { return domain; } @Override public final Builder domain(String domain) { this.domain = domain; return this; } @Override public final Builder domain(Domain domain) { this.domain(domain == null ? null : domain.toString()); return this; } public final void setDomain(String domain) { this.domain = domain; } public final EndpointDetails.Builder getEndpointDetails() { return endpointDetails != null ? endpointDetails.toBuilder() : null; } @Override public final Builder endpointDetails(EndpointDetails endpointDetails) { this.endpointDetails = endpointDetails; return this; } public final void setEndpointDetails(EndpointDetails.BuilderImpl endpointDetails) { this.endpointDetails = endpointDetails != null ? endpointDetails.build() : null; } public final String getEndpointType() { return endpointType; } @Override public final Builder endpointType(String endpointType) { this.endpointType = endpointType; return this; } @Override public final Builder endpointType(EndpointType endpointType) { this.endpointType(endpointType == null ? null : endpointType.toString()); return this; } public final void setEndpointType(String endpointType) { this.endpointType = endpointType; } public final String getHostKey() { return hostKey; } @Override public final Builder hostKey(String hostKey) { this.hostKey = hostKey; return this; } public final void setHostKey(String hostKey) { this.hostKey = hostKey; } public final IdentityProviderDetails.Builder getIdentityProviderDetails() { return identityProviderDetails != null ? identityProviderDetails.toBuilder() : null; } @Override public final Builder identityProviderDetails(IdentityProviderDetails identityProviderDetails) { this.identityProviderDetails = identityProviderDetails; return this; } public final void setIdentityProviderDetails(IdentityProviderDetails.BuilderImpl identityProviderDetails) { this.identityProviderDetails = identityProviderDetails != null ? identityProviderDetails.build() : null; } public final String getIdentityProviderType() { return identityProviderType; } @Override public final Builder identityProviderType(String identityProviderType) { this.identityProviderType = identityProviderType; return this; } @Override public final Builder identityProviderType(IdentityProviderType identityProviderType) { this.identityProviderType(identityProviderType == null ? null : identityProviderType.toString()); return this; } public final void setIdentityProviderType(String identityProviderType) { this.identityProviderType = identityProviderType; } public final String getLoggingRole() { return loggingRole; } @Override public final Builder loggingRole(String loggingRole) { this.loggingRole = loggingRole; return this; } public final void setLoggingRole(String loggingRole) { this.loggingRole = loggingRole; } public final Collection getProtocols() { if (protocols instanceof SdkAutoConstructList) { return null; } return protocols; } @Override public final Builder protocolsWithStrings(Collection protocols) { this.protocols = ProtocolsCopier.copy(protocols); return this; } @Override @SafeVarargs public final Builder protocolsWithStrings(String... protocols) { protocolsWithStrings(Arrays.asList(protocols)); return this; } @Override public final Builder protocols(Collection protocols) { this.protocols = ProtocolsCopier.copyEnumToString(protocols); return this; } @Override @SafeVarargs public final Builder protocols(Protocol... protocols) { protocols(Arrays.asList(protocols)); return this; } public final void setProtocols(Collection protocols) { this.protocols = ProtocolsCopier.copy(protocols); } public final String getSecurityPolicyName() { return securityPolicyName; } @Override public final Builder securityPolicyName(String securityPolicyName) { this.securityPolicyName = securityPolicyName; return this; } public final void setSecurityPolicyName(String securityPolicyName) { this.securityPolicyName = securityPolicyName; } public final List getTags() { List result = TagsCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } @Override public final Builder tags(Collection tags) { this.tags = TagsCopier.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 void setTags(Collection tags) { this.tags = TagsCopier.copyFromBuilder(tags); } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateServerRequest build() { return new CreateServerRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy