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

software.amazon.awssdk.services.rds.model.CreateDbProxyRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon RDS module holds the client classes that are used for communicating with Amazon Relational Database Service

There is a newer version: 2.29.15
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.rds.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 CreateDbProxyRequest extends RdsRequest implements
        ToCopyableBuilder {
    private static final SdkField DB_PROXY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("DBProxyName").getter(getter(CreateDbProxyRequest::dbProxyName)).setter(setter(Builder::dbProxyName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBProxyName").build()).build();

    private static final SdkField ENGINE_FAMILY_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("EngineFamily").getter(getter(CreateDbProxyRequest::engineFamilyAsString))
            .setter(setter(Builder::engineFamily))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineFamily").build()).build();

    private static final SdkField> AUTH_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Auth")
            .getter(getter(CreateDbProxyRequest::auth))
            .setter(setter(Builder::auth))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Auth").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(UserAuthConfig::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("RoleArn").getter(getter(CreateDbProxyRequest::roleArn)).setter(setter(Builder::roleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleArn").build()).build();

    private static final SdkField> VPC_SUBNET_IDS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("VpcSubnetIds")
            .getter(getter(CreateDbProxyRequest::vpcSubnetIds))
            .setter(setter(Builder::vpcSubnetIds))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcSubnetIds").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> VPC_SECURITY_GROUP_IDS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("VpcSecurityGroupIds")
            .getter(getter(CreateDbProxyRequest::vpcSecurityGroupIds))
            .setter(setter(Builder::vpcSecurityGroupIds))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcSecurityGroupIds").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 REQUIRE_TLS_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("RequireTLS").getter(getter(CreateDbProxyRequest::requireTLS)).setter(setter(Builder::requireTLS))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RequireTLS").build()).build();

    private static final SdkField IDLE_CLIENT_TIMEOUT_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("IdleClientTimeout").getter(getter(CreateDbProxyRequest::idleClientTimeout))
            .setter(setter(Builder::idleClientTimeout))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdleClientTimeout").build()).build();

    private static final SdkField DEBUG_LOGGING_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("DebugLogging").getter(getter(CreateDbProxyRequest::debugLogging)).setter(setter(Builder::debugLogging))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DebugLogging").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(CreateDbProxyRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    ListTrait
                            .builder()
                            .memberLocationName("Tag")
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(Tag::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("Tag").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DB_PROXY_NAME_FIELD,
            ENGINE_FAMILY_FIELD, AUTH_FIELD, ROLE_ARN_FIELD, VPC_SUBNET_IDS_FIELD, VPC_SECURITY_GROUP_IDS_FIELD,
            REQUIRE_TLS_FIELD, IDLE_CLIENT_TIMEOUT_FIELD, DEBUG_LOGGING_FIELD, TAGS_FIELD));

    private final String dbProxyName;

    private final String engineFamily;

    private final List auth;

    private final String roleArn;

    private final List vpcSubnetIds;

    private final List vpcSecurityGroupIds;

    private final Boolean requireTLS;

    private final Integer idleClientTimeout;

    private final Boolean debugLogging;

    private final List tags;

    private CreateDbProxyRequest(BuilderImpl builder) {
        super(builder);
        this.dbProxyName = builder.dbProxyName;
        this.engineFamily = builder.engineFamily;
        this.auth = builder.auth;
        this.roleArn = builder.roleArn;
        this.vpcSubnetIds = builder.vpcSubnetIds;
        this.vpcSecurityGroupIds = builder.vpcSecurityGroupIds;
        this.requireTLS = builder.requireTLS;
        this.idleClientTimeout = builder.idleClientTimeout;
        this.debugLogging = builder.debugLogging;
        this.tags = builder.tags;
    }

    /**
     * 

* The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account * in the specified Amazon Web Services Region. An identifier must begin with a letter and must contain only ASCII * letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. *

* * @return The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services * account in the specified Amazon Web Services Region. An identifier must begin with a letter and must * contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive * hyphens. */ public final String dbProxyName() { return dbProxyName; } /** *

* The kinds of databases that the proxy can connect to. This value determines which database network protocol the * proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, * and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for PostgreSQL databases, * specify POSTGRESQL. For RDS for Microsoft SQL Server, specify SQLSERVER. *

*

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

* * @return The kinds of databases that the proxy can connect to. This value determines which database network * protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora * MySQL, RDS for MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL * and RDS for PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, * specify SQLSERVER. * @see EngineFamily */ public final EngineFamily engineFamily() { return EngineFamily.fromValue(engineFamily); } /** *

* The kinds of databases that the proxy can connect to. This value determines which database network protocol the * proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, * and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for PostgreSQL databases, * specify POSTGRESQL. For RDS for Microsoft SQL Server, specify SQLSERVER. *

*

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

* * @return The kinds of databases that the proxy can connect to. This value determines which database network * protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora * MySQL, RDS for MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL * and RDS for PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, * specify SQLSERVER. * @see EngineFamily */ public final String engineFamilyAsString() { return engineFamily; } /** * For responses, this returns true if the service returned a value for the Auth property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasAuth() { return auth != null && !(auth instanceof SdkAutoConstructList); } /** *

* The authorization mechanism that the proxy uses. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasAuth} method. *

* * @return The authorization mechanism that the proxy uses. */ public final List auth() { return auth; } /** *

* The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services * Secrets Manager. *

* * @return The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web * Services Secrets Manager. */ public final String roleArn() { return roleArn; } /** * For responses, this returns true if the service returned a value for the VpcSubnetIds property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasVpcSubnetIds() { return vpcSubnetIds != null && !(vpcSubnetIds instanceof SdkAutoConstructList); } /** *

* One or more VPC subnet IDs to associate with the new proxy. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasVpcSubnetIds} method. *

* * @return One or more VPC subnet IDs to associate with the new proxy. */ public final List vpcSubnetIds() { return vpcSubnetIds; } /** * For responses, this returns true if the service returned a value for the VpcSecurityGroupIds property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasVpcSecurityGroupIds() { return vpcSecurityGroupIds != null && !(vpcSecurityGroupIds instanceof SdkAutoConstructList); } /** *

* One or more VPC security group IDs to associate with the new proxy. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasVpcSecurityGroupIds} method. *

* * @return One or more VPC security group IDs to associate with the new proxy. */ public final List vpcSecurityGroupIds() { return vpcSecurityGroupIds; } /** *

* Specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling * this setting, you can enforce encrypted TLS connections to the proxy. *

* * @return Specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By * enabling this setting, you can enforce encrypted TLS connections to the proxy. */ public final Boolean requireTLS() { return requireTLS; } /** *

* The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set * this value higher or lower than the connection timeout limit for the associated database. *

* * @return The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You * can set this value higher or lower than the connection timeout limit for the associated database. */ public final Integer idleClientTimeout() { return idleClientTimeout; } /** *

* Specifies whether the proxy includes detailed information about SQL statements in its logs. This information * helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The * debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this * setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive * information that appears in the logs. *

* * @return Specifies whether the proxy includes detailed information about SQL statements in its logs. This * information helps you to debug issues involving SQL behavior or the performance and scalability of the * proxy connections. The debug information includes the text of SQL statements that you submit through the * proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures * in place to safeguard any sensitive information that appears in the logs. */ public final Boolean debugLogging() { return debugLogging; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. */ 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(dbProxyName()); hashCode = 31 * hashCode + Objects.hashCode(engineFamilyAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasAuth() ? auth() : null); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(hasVpcSubnetIds() ? vpcSubnetIds() : null); hashCode = 31 * hashCode + Objects.hashCode(hasVpcSecurityGroupIds() ? vpcSecurityGroupIds() : null); hashCode = 31 * hashCode + Objects.hashCode(requireTLS()); hashCode = 31 * hashCode + Objects.hashCode(idleClientTimeout()); hashCode = 31 * hashCode + Objects.hashCode(debugLogging()); 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 CreateDbProxyRequest)) { return false; } CreateDbProxyRequest other = (CreateDbProxyRequest) obj; return Objects.equals(dbProxyName(), other.dbProxyName()) && Objects.equals(engineFamilyAsString(), other.engineFamilyAsString()) && hasAuth() == other.hasAuth() && Objects.equals(auth(), other.auth()) && Objects.equals(roleArn(), other.roleArn()) && hasVpcSubnetIds() == other.hasVpcSubnetIds() && Objects.equals(vpcSubnetIds(), other.vpcSubnetIds()) && hasVpcSecurityGroupIds() == other.hasVpcSecurityGroupIds() && Objects.equals(vpcSecurityGroupIds(), other.vpcSecurityGroupIds()) && Objects.equals(requireTLS(), other.requireTLS()) && Objects.equals(idleClientTimeout(), other.idleClientTimeout()) && Objects.equals(debugLogging(), other.debugLogging()) && 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("CreateDbProxyRequest").add("DBProxyName", dbProxyName()) .add("EngineFamily", engineFamilyAsString()).add("Auth", hasAuth() ? auth() : null).add("RoleArn", roleArn()) .add("VpcSubnetIds", hasVpcSubnetIds() ? vpcSubnetIds() : null) .add("VpcSecurityGroupIds", hasVpcSecurityGroupIds() ? vpcSecurityGroupIds() : null) .add("RequireTLS", requireTLS()).add("IdleClientTimeout", idleClientTimeout()) .add("DebugLogging", debugLogging()).add("Tags", hasTags() ? tags() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "DBProxyName": return Optional.ofNullable(clazz.cast(dbProxyName())); case "EngineFamily": return Optional.ofNullable(clazz.cast(engineFamilyAsString())); case "Auth": return Optional.ofNullable(clazz.cast(auth())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "VpcSubnetIds": return Optional.ofNullable(clazz.cast(vpcSubnetIds())); case "VpcSecurityGroupIds": return Optional.ofNullable(clazz.cast(vpcSecurityGroupIds())); case "RequireTLS": return Optional.ofNullable(clazz.cast(requireTLS())); case "IdleClientTimeout": return Optional.ofNullable(clazz.cast(idleClientTimeout())); case "DebugLogging": return Optional.ofNullable(clazz.cast(debugLogging())); 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((CreateDbProxyRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends RdsRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services * account in the specified Amazon Web Services Region. An identifier must begin with a letter and must contain * only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. *

* * @param dbProxyName * The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web * Services account in the specified Amazon Web Services Region. An identifier must begin with a letter * and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two * consecutive hyphens. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dbProxyName(String dbProxyName); /** *

* The kinds of databases that the proxy can connect to. This value determines which database network protocol * the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for * MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for * PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, specify * SQLSERVER. *

* * @param engineFamily * The kinds of databases that the proxy can connect to. This value determines which database network * protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora * MySQL, RDS for MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL * and RDS for PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, * specify SQLSERVER. * @see EngineFamily * @return Returns a reference to this object so that method calls can be chained together. * @see EngineFamily */ Builder engineFamily(String engineFamily); /** *

* The kinds of databases that the proxy can connect to. This value determines which database network protocol * the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for * MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for * PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, specify * SQLSERVER. *

* * @param engineFamily * The kinds of databases that the proxy can connect to. This value determines which database network * protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora * MySQL, RDS for MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL * and RDS for PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, * specify SQLSERVER. * @see EngineFamily * @return Returns a reference to this object so that method calls can be chained together. * @see EngineFamily */ Builder engineFamily(EngineFamily engineFamily); /** *

* The authorization mechanism that the proxy uses. *

* * @param auth * The authorization mechanism that the proxy uses. * @return Returns a reference to this object so that method calls can be chained together. */ Builder auth(Collection auth); /** *

* The authorization mechanism that the proxy uses. *

* * @param auth * The authorization mechanism that the proxy uses. * @return Returns a reference to this object so that method calls can be chained together. */ Builder auth(UserAuthConfig... auth); /** *

* The authorization mechanism that the proxy uses. *

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

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

* The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services * Secrets Manager. *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web * Services Secrets Manager. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleArn(String roleArn); /** *

* One or more VPC subnet IDs to associate with the new proxy. *

* * @param vpcSubnetIds * One or more VPC subnet IDs to associate with the new proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcSubnetIds(Collection vpcSubnetIds); /** *

* One or more VPC subnet IDs to associate with the new proxy. *

* * @param vpcSubnetIds * One or more VPC subnet IDs to associate with the new proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcSubnetIds(String... vpcSubnetIds); /** *

* One or more VPC security group IDs to associate with the new proxy. *

* * @param vpcSecurityGroupIds * One or more VPC security group IDs to associate with the new proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcSecurityGroupIds(Collection vpcSecurityGroupIds); /** *

* One or more VPC security group IDs to associate with the new proxy. *

* * @param vpcSecurityGroupIds * One or more VPC security group IDs to associate with the new proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcSecurityGroupIds(String... vpcSecurityGroupIds); /** *

* Specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By * enabling this setting, you can enforce encrypted TLS connections to the proxy. *

* * @param requireTLS * Specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. * By enabling this setting, you can enforce encrypted TLS connections to the proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requireTLS(Boolean requireTLS); /** *

* The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can * set this value higher or lower than the connection timeout limit for the associated database. *

* * @param idleClientTimeout * The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. * You can set this value higher or lower than the connection timeout limit for the associated database. * @return Returns a reference to this object so that method calls can be chained together. */ Builder idleClientTimeout(Integer idleClientTimeout); /** *

* Specifies whether the proxy includes detailed information about SQL statements in its logs. This information * helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. * The debug information includes the text of SQL statements that you submit through the proxy. Thus, only * enable this setting when needed for debugging, and only when you have security measures in place to safeguard * any sensitive information that appears in the logs. *

* * @param debugLogging * Specifies whether the proxy includes detailed information about SQL statements in its logs. This * information helps you to debug issues involving SQL behavior or the performance and scalability of the * proxy connections. The debug information includes the text of SQL statements that you submit through * the proxy. Thus, only enable this setting when needed for debugging, and only when you have security * measures in place to safeguard any sensitive information that appears in the logs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder debugLogging(Boolean debugLogging); /** *

* An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. *

* * @param tags * An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. *

* * @param tags * An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. *

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

* When the {@link Consumer} completes, {@link software.amazon.awssdk.services.rds.model.Tag.Builder#build()} is * called immediately and its result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link software.amazon.awssdk.services.rds.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends RdsRequest.BuilderImpl implements Builder { private String dbProxyName; private String engineFamily; private List auth = DefaultSdkAutoConstructList.getInstance(); private String roleArn; private List vpcSubnetIds = DefaultSdkAutoConstructList.getInstance(); private List vpcSecurityGroupIds = DefaultSdkAutoConstructList.getInstance(); private Boolean requireTLS; private Integer idleClientTimeout; private Boolean debugLogging; private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateDbProxyRequest model) { super(model); dbProxyName(model.dbProxyName); engineFamily(model.engineFamily); auth(model.auth); roleArn(model.roleArn); vpcSubnetIds(model.vpcSubnetIds); vpcSecurityGroupIds(model.vpcSecurityGroupIds); requireTLS(model.requireTLS); idleClientTimeout(model.idleClientTimeout); debugLogging(model.debugLogging); tags(model.tags); } public final String getDbProxyName() { return dbProxyName; } public final void setDbProxyName(String dbProxyName) { this.dbProxyName = dbProxyName; } @Override public final Builder dbProxyName(String dbProxyName) { this.dbProxyName = dbProxyName; return this; } public final String getEngineFamily() { return engineFamily; } public final void setEngineFamily(String engineFamily) { this.engineFamily = engineFamily; } @Override public final Builder engineFamily(String engineFamily) { this.engineFamily = engineFamily; return this; } @Override public final Builder engineFamily(EngineFamily engineFamily) { this.engineFamily(engineFamily == null ? null : engineFamily.toString()); return this; } public final List getAuth() { List result = UserAuthConfigListCopier.copyToBuilder(this.auth); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAuth(Collection auth) { this.auth = UserAuthConfigListCopier.copyFromBuilder(auth); } @Override public final Builder auth(Collection auth) { this.auth = UserAuthConfigListCopier.copy(auth); return this; } @Override @SafeVarargs public final Builder auth(UserAuthConfig... auth) { auth(Arrays.asList(auth)); return this; } @Override @SafeVarargs public final Builder auth(Consumer... auth) { auth(Stream.of(auth).map(c -> UserAuthConfig.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getRoleArn() { return roleArn; } public final void setRoleArn(String roleArn) { this.roleArn = roleArn; } @Override public final Builder roleArn(String roleArn) { this.roleArn = roleArn; return this; } public final Collection getVpcSubnetIds() { if (vpcSubnetIds instanceof SdkAutoConstructList) { return null; } return vpcSubnetIds; } public final void setVpcSubnetIds(Collection vpcSubnetIds) { this.vpcSubnetIds = StringListCopier.copy(vpcSubnetIds); } @Override public final Builder vpcSubnetIds(Collection vpcSubnetIds) { this.vpcSubnetIds = StringListCopier.copy(vpcSubnetIds); return this; } @Override @SafeVarargs public final Builder vpcSubnetIds(String... vpcSubnetIds) { vpcSubnetIds(Arrays.asList(vpcSubnetIds)); return this; } public final Collection getVpcSecurityGroupIds() { if (vpcSecurityGroupIds instanceof SdkAutoConstructList) { return null; } return vpcSecurityGroupIds; } public final void setVpcSecurityGroupIds(Collection vpcSecurityGroupIds) { this.vpcSecurityGroupIds = StringListCopier.copy(vpcSecurityGroupIds); } @Override public final Builder vpcSecurityGroupIds(Collection vpcSecurityGroupIds) { this.vpcSecurityGroupIds = StringListCopier.copy(vpcSecurityGroupIds); return this; } @Override @SafeVarargs public final Builder vpcSecurityGroupIds(String... vpcSecurityGroupIds) { vpcSecurityGroupIds(Arrays.asList(vpcSecurityGroupIds)); return this; } public final Boolean getRequireTLS() { return requireTLS; } public final void setRequireTLS(Boolean requireTLS) { this.requireTLS = requireTLS; } @Override public final Builder requireTLS(Boolean requireTLS) { this.requireTLS = requireTLS; return this; } public final Integer getIdleClientTimeout() { return idleClientTimeout; } public final void setIdleClientTimeout(Integer idleClientTimeout) { this.idleClientTimeout = idleClientTimeout; } @Override public final Builder idleClientTimeout(Integer idleClientTimeout) { this.idleClientTimeout = idleClientTimeout; return this; } public final Boolean getDebugLogging() { return debugLogging; } public final void setDebugLogging(Boolean debugLogging) { this.debugLogging = debugLogging; } @Override public final Builder debugLogging(Boolean debugLogging) { this.debugLogging = debugLogging; return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateDbProxyRequest build() { return new CreateDbProxyRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy