software.amazon.awssdk.services.databasemigration.model.ModifyEndpointRequest Maven / Gradle / Ivy
Show all versions of databasemigration Show documentation
/*
* 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.databasemigration.model;
import java.util.Arrays;
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 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.LocationTrait;
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 ModifyEndpointRequest extends DatabaseMigrationRequest implements
ToCopyableBuilder {
private static final SdkField ENDPOINT_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::endpointArn)).setter(setter(Builder::endpointArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointArn").build()).build();
private static final SdkField ENDPOINT_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::endpointIdentifier)).setter(setter(Builder::endpointIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointIdentifier").build())
.build();
private static final SdkField ENDPOINT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::endpointTypeAsString)).setter(setter(Builder::endpointType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointType").build()).build();
private static final SdkField ENGINE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::engineName)).setter(setter(Builder::engineName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineName").build()).build();
private static final SdkField USERNAME_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::username)).setter(setter(Builder::username))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Username").build()).build();
private static final SdkField PASSWORD_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::password)).setter(setter(Builder::password))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Password").build()).build();
private static final SdkField SERVER_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::serverName)).setter(setter(Builder::serverName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServerName").build()).build();
private static final SdkField PORT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.getter(getter(ModifyEndpointRequest::port)).setter(setter(Builder::port))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Port").build()).build();
private static final SdkField DATABASE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::databaseName)).setter(setter(Builder::databaseName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DatabaseName").build()).build();
private static final SdkField EXTRA_CONNECTION_ATTRIBUTES_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::extraConnectionAttributes)).setter(setter(Builder::extraConnectionAttributes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExtraConnectionAttributes").build())
.build();
private static final SdkField CERTIFICATE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::certificateArn)).setter(setter(Builder::certificateArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CertificateArn").build()).build();
private static final SdkField SSL_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::sslModeAsString)).setter(setter(Builder::sslMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SslMode").build()).build();
private static final SdkField SERVICE_ACCESS_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::serviceAccessRoleArn)).setter(setter(Builder::serviceAccessRoleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceAccessRoleArn").build())
.build();
private static final SdkField EXTERNAL_TABLE_DEFINITION_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ModifyEndpointRequest::externalTableDefinition)).setter(setter(Builder::externalTableDefinition))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExternalTableDefinition").build())
.build();
private static final SdkField DYNAMO_DB_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::dynamoDbSettings))
.setter(setter(Builder::dynamoDbSettings)).constructor(DynamoDbSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DynamoDbSettings").build()).build();
private static final SdkField S3_SETTINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.getter(getter(ModifyEndpointRequest::s3Settings)).setter(setter(Builder::s3Settings))
.constructor(S3Settings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3Settings").build()).build();
private static final SdkField DMS_TRANSFER_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::dmsTransferSettings))
.setter(setter(Builder::dmsTransferSettings)).constructor(DmsTransferSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DmsTransferSettings").build())
.build();
private static final SdkField MONGO_DB_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::mongoDbSettings))
.setter(setter(Builder::mongoDbSettings)).constructor(MongoDbSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MongoDbSettings").build()).build();
private static final SdkField KINESIS_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::kinesisSettings))
.setter(setter(Builder::kinesisSettings)).constructor(KinesisSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KinesisSettings").build()).build();
private static final SdkField KAFKA_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::kafkaSettings))
.setter(setter(Builder::kafkaSettings)).constructor(KafkaSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KafkaSettings").build()).build();
private static final SdkField ELASTICSEARCH_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.getter(getter(ModifyEndpointRequest::elasticsearchSettings)).setter(setter(Builder::elasticsearchSettings))
.constructor(ElasticsearchSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ElasticsearchSettings").build())
.build();
private static final SdkField NEPTUNE_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::neptuneSettings))
.setter(setter(Builder::neptuneSettings)).constructor(NeptuneSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NeptuneSettings").build()).build();
private static final SdkField REDSHIFT_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(ModifyEndpointRequest::redshiftSettings))
.setter(setter(Builder::redshiftSettings)).constructor(RedshiftSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RedshiftSettings").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ENDPOINT_ARN_FIELD,
ENDPOINT_IDENTIFIER_FIELD, ENDPOINT_TYPE_FIELD, ENGINE_NAME_FIELD, USERNAME_FIELD, PASSWORD_FIELD, SERVER_NAME_FIELD,
PORT_FIELD, DATABASE_NAME_FIELD, EXTRA_CONNECTION_ATTRIBUTES_FIELD, CERTIFICATE_ARN_FIELD, SSL_MODE_FIELD,
SERVICE_ACCESS_ROLE_ARN_FIELD, EXTERNAL_TABLE_DEFINITION_FIELD, DYNAMO_DB_SETTINGS_FIELD, S3_SETTINGS_FIELD,
DMS_TRANSFER_SETTINGS_FIELD, MONGO_DB_SETTINGS_FIELD, KINESIS_SETTINGS_FIELD, KAFKA_SETTINGS_FIELD,
ELASTICSEARCH_SETTINGS_FIELD, NEPTUNE_SETTINGS_FIELD, REDSHIFT_SETTINGS_FIELD));
private final String endpointArn;
private final String endpointIdentifier;
private final String endpointType;
private final String engineName;
private final String username;
private final String password;
private final String serverName;
private final Integer port;
private final String databaseName;
private final String extraConnectionAttributes;
private final String certificateArn;
private final String sslMode;
private final String serviceAccessRoleArn;
private final String externalTableDefinition;
private final DynamoDbSettings dynamoDbSettings;
private final S3Settings s3Settings;
private final DmsTransferSettings dmsTransferSettings;
private final MongoDbSettings mongoDbSettings;
private final KinesisSettings kinesisSettings;
private final KafkaSettings kafkaSettings;
private final ElasticsearchSettings elasticsearchSettings;
private final NeptuneSettings neptuneSettings;
private final RedshiftSettings redshiftSettings;
private ModifyEndpointRequest(BuilderImpl builder) {
super(builder);
this.endpointArn = builder.endpointArn;
this.endpointIdentifier = builder.endpointIdentifier;
this.endpointType = builder.endpointType;
this.engineName = builder.engineName;
this.username = builder.username;
this.password = builder.password;
this.serverName = builder.serverName;
this.port = builder.port;
this.databaseName = builder.databaseName;
this.extraConnectionAttributes = builder.extraConnectionAttributes;
this.certificateArn = builder.certificateArn;
this.sslMode = builder.sslMode;
this.serviceAccessRoleArn = builder.serviceAccessRoleArn;
this.externalTableDefinition = builder.externalTableDefinition;
this.dynamoDbSettings = builder.dynamoDbSettings;
this.s3Settings = builder.s3Settings;
this.dmsTransferSettings = builder.dmsTransferSettings;
this.mongoDbSettings = builder.mongoDbSettings;
this.kinesisSettings = builder.kinesisSettings;
this.kafkaSettings = builder.kafkaSettings;
this.elasticsearchSettings = builder.elasticsearchSettings;
this.neptuneSettings = builder.neptuneSettings;
this.redshiftSettings = builder.redshiftSettings;
}
/**
*
* The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.
*
*
* @return The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.
*/
public String endpointArn() {
return endpointArn;
}
/**
*
* The database endpoint identifier. Identifiers must begin with a letter and must contain only ASCII letters,
* digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.
*
*
* @return The database endpoint identifier. Identifiers must begin with a letter and must contain only ASCII
* letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.
*/
public String endpointIdentifier() {
return endpointIdentifier;
}
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #endpointType} will
* return {@link ReplicationEndpointTypeValue#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #endpointTypeAsString}.
*
*
* @return The type of endpoint. Valid values are source
and target
.
* @see ReplicationEndpointTypeValue
*/
public ReplicationEndpointTypeValue endpointType() {
return ReplicationEndpointTypeValue.fromValue(endpointType);
}
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #endpointType} will
* return {@link ReplicationEndpointTypeValue#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #endpointTypeAsString}.
*
*
* @return The type of endpoint. Valid values are source
and target
.
* @see ReplicationEndpointTypeValue
*/
public String endpointTypeAsString() {
return endpointType;
}
/**
*
* The type of engine for the endpoint. Valid values, depending on the EndpointType, include "mysql"
,
* "oracle"
, "postgres"
, "mariadb"
, "aurora"
,
* "aurora-postgresql"
, "redshift"
, "s3"
, "db2"
,
* "azuredb"
, "sybase"
, "dynamodb"
, "mongodb"
,
* "kinesis"
, "kafka"
, "elasticsearch"
, "documentdb"
, and
* "sqlserver"
.
*
*
* @return The type of engine for the endpoint. Valid values, depending on the EndpointType, include
* "mysql"
, "oracle"
, "postgres"
, "mariadb"
,
* "aurora"
, "aurora-postgresql"
, "redshift"
, "s3"
,
* "db2"
, "azuredb"
, "sybase"
, "dynamodb"
,
* "mongodb"
, "kinesis"
, "kafka"
, "elasticsearch"
,
* "documentdb"
, and "sqlserver"
.
*/
public String engineName() {
return engineName;
}
/**
*
* The user name to be used to login to the endpoint database.
*
*
* @return The user name to be used to login to the endpoint database.
*/
public String username() {
return username;
}
/**
*
* The password to be used to login to the endpoint database.
*
*
* @return The password to be used to login to the endpoint database.
*/
public String password() {
return password;
}
/**
*
* The name of the server where the endpoint database resides.
*
*
* @return The name of the server where the endpoint database resides.
*/
public String serverName() {
return serverName;
}
/**
*
* The port used by the endpoint database.
*
*
* @return The port used by the endpoint database.
*/
public Integer port() {
return port;
}
/**
*
* The name of the endpoint database.
*
*
* @return The name of the endpoint database.
*/
public String databaseName() {
return databaseName;
}
/**
*
* Additional attributes associated with the connection. To reset this parameter, pass the empty string ("") as an
* argument.
*
*
* @return Additional attributes associated with the connection. To reset this parameter, pass the empty string ("")
* as an argument.
*/
public String extraConnectionAttributes() {
return extraConnectionAttributes;
}
/**
*
* The Amazon Resource Name (ARN) of the certificate used for SSL connection.
*
*
* @return The Amazon Resource Name (ARN) of the certificate used for SSL connection.
*/
public String certificateArn() {
return certificateArn;
}
/**
*
* The SSL mode used to connect to the endpoint. The default value is none
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #sslMode} will
* return {@link DmsSslModeValue#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #sslModeAsString}.
*
*
* @return The SSL mode used to connect to the endpoint. The default value is none
.
* @see DmsSslModeValue
*/
public DmsSslModeValue sslMode() {
return DmsSslModeValue.fromValue(sslMode);
}
/**
*
* The SSL mode used to connect to the endpoint. The default value is none
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #sslMode} will
* return {@link DmsSslModeValue#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #sslModeAsString}.
*
*
* @return The SSL mode used to connect to the endpoint. The default value is none
.
* @see DmsSslModeValue
*/
public String sslModeAsString() {
return sslMode;
}
/**
*
* The Amazon Resource Name (ARN) for the service access role you want to use to modify the endpoint.
*
*
* @return The Amazon Resource Name (ARN) for the service access role you want to use to modify the endpoint.
*/
public String serviceAccessRoleArn() {
return serviceAccessRoleArn;
}
/**
*
* The external table definition.
*
*
* @return The external table definition.
*/
public String externalTableDefinition() {
return externalTableDefinition;
}
/**
*
* Settings in JSON format for the target Amazon DynamoDB endpoint. For information about other available settings,
* see Using Object Mapping to
* Migrate Data to DynamoDB in the AWS Database Migration Service User Guide.
*
*
* @return Settings in JSON format for the target Amazon DynamoDB endpoint. For information about other available
* settings, see Using
* Object Mapping to Migrate Data to DynamoDB in the AWS Database Migration Service User Guide.
*/
public DynamoDbSettings dynamoDbSettings() {
return dynamoDbSettings;
}
/**
*
* Settings in JSON format for the target Amazon S3 endpoint. For more information about the available settings, see
* Extra
* Connection Attributes When Using Amazon S3 as a Target for AWS DMS in the AWS Database Migration Service
* User Guide.
*
*
* @return Settings in JSON format for the target Amazon S3 endpoint. For more information about the available
* settings, see Extra Connection Attributes When Using Amazon S3 as a Target for AWS DMS in the AWS Database
* Migration Service User Guide.
*/
public S3Settings s3Settings() {
return s3Settings;
}
/**
*
* The settings in JSON format for the DMS transfer type of source endpoint.
*
*
* Attributes include the following:
*
*
* -
*
* serviceAccessRoleArn - The AWS Identity and Access Management (IAM) role that has permission to access the Amazon
* S3 bucket.
*
*
* -
*
* BucketName - The name of the S3 bucket to use.
*
*
* -
*
* compressionType - An optional parameter to use GZIP to compress the target files. Either set this parameter to
* NONE (the default) or don't use it to leave the files uncompressed.
*
*
*
*
* Shorthand syntax for these settings is as follows:
* ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string
*
*
* JSON syntax for these settings is as follows:
* { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": "none"|"gzip" }
*
*
* @return The settings in JSON format for the DMS transfer type of source endpoint.
*
* Attributes include the following:
*
*
* -
*
* serviceAccessRoleArn - The AWS Identity and Access Management (IAM) role that has permission to access
* the Amazon S3 bucket.
*
*
* -
*
* BucketName - The name of the S3 bucket to use.
*
*
* -
*
* compressionType - An optional parameter to use GZIP to compress the target files. Either set this
* parameter to NONE (the default) or don't use it to leave the files uncompressed.
*
*
*
*
* Shorthand syntax for these settings is as follows:
* ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string
*
*
* JSON syntax for these settings is as follows:
* { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": "none"|"gzip" }
*/
public DmsTransferSettings dmsTransferSettings() {
return dmsTransferSettings;
}
/**
*
* Settings in JSON format for the source MongoDB endpoint. For more information about the available settings, see
* the configuration properties section in Using MongoDB as a Target for
* AWS Database Migration Service in the AWS Database Migration Service User Guide.
*
*
* @return Settings in JSON format for the source MongoDB endpoint. For more information about the available
* settings, see the configuration properties section in Using MongoDB as a
* Target for AWS Database Migration Service in the AWS Database Migration Service User Guide.
*/
public MongoDbSettings mongoDbSettings() {
return mongoDbSettings;
}
/**
*
* Settings in JSON format for the target endpoint for Amazon Kinesis Data Streams. For more information about the
* available settings, see Using
* Amazon Kinesis Data Streams as a Target for AWS Database Migration Service in the AWS Database Migration
* User Guide.
*
*
* @return Settings in JSON format for the target endpoint for Amazon Kinesis Data Streams. For more information
* about the available settings, see Using Amazon Kinesis
* Data Streams as a Target for AWS Database Migration Service in the AWS Database Migration User
* Guide.
*/
public KinesisSettings kinesisSettings() {
return kinesisSettings;
}
/**
*
* Settings in JSON format for the target Apache Kafka endpoint. For more information about the available settings,
* see Using Apache Kafka as a
* Target for AWS Database Migration Service in the AWS Database Migration User Guide.
*
*
* @return Settings in JSON format for the target Apache Kafka endpoint. For more information about the available
* settings, see Using
* Apache Kafka as a Target for AWS Database Migration Service in the AWS Database Migration User
* Guide.
*/
public KafkaSettings kafkaSettings() {
return kafkaSettings;
}
/**
*
* Settings in JSON format for the target Elasticsearch endpoint. For more information about the available settings,
* see Extra Connection Attributes When Using Elasticsearch as a Target for AWS DMS in the AWS Database
* Migration User Guide.
*
*
* @return Settings in JSON format for the target Elasticsearch endpoint. For more information about the available
* settings, see Extra Connection Attributes When Using Elasticsearch as a Target for AWS DMS in the AWS Database
* Migration User Guide.
*/
public ElasticsearchSettings elasticsearchSettings() {
return elasticsearchSettings;
}
/**
*
* Settings in JSON format for the target Amazon Neptune endpoint. For more information about the available
* settings, see https
* ://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings in
* the AWS Database Migration Service User Guide.
*
*
* @return Settings in JSON format for the target Amazon Neptune endpoint. For more information about the available
* settings, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.
* EndpointSettings in the AWS Database Migration Service User Guide.
*/
public NeptuneSettings neptuneSettings() {
return neptuneSettings;
}
/**
* Returns the value of the RedshiftSettings property for this object.
*
* @return The value of the RedshiftSettings property for this object.
*/
public RedshiftSettings redshiftSettings() {
return redshiftSettings;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(endpointArn());
hashCode = 31 * hashCode + Objects.hashCode(endpointIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(endpointTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(engineName());
hashCode = 31 * hashCode + Objects.hashCode(username());
hashCode = 31 * hashCode + Objects.hashCode(password());
hashCode = 31 * hashCode + Objects.hashCode(serverName());
hashCode = 31 * hashCode + Objects.hashCode(port());
hashCode = 31 * hashCode + Objects.hashCode(databaseName());
hashCode = 31 * hashCode + Objects.hashCode(extraConnectionAttributes());
hashCode = 31 * hashCode + Objects.hashCode(certificateArn());
hashCode = 31 * hashCode + Objects.hashCode(sslModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(serviceAccessRoleArn());
hashCode = 31 * hashCode + Objects.hashCode(externalTableDefinition());
hashCode = 31 * hashCode + Objects.hashCode(dynamoDbSettings());
hashCode = 31 * hashCode + Objects.hashCode(s3Settings());
hashCode = 31 * hashCode + Objects.hashCode(dmsTransferSettings());
hashCode = 31 * hashCode + Objects.hashCode(mongoDbSettings());
hashCode = 31 * hashCode + Objects.hashCode(kinesisSettings());
hashCode = 31 * hashCode + Objects.hashCode(kafkaSettings());
hashCode = 31 * hashCode + Objects.hashCode(elasticsearchSettings());
hashCode = 31 * hashCode + Objects.hashCode(neptuneSettings());
hashCode = 31 * hashCode + Objects.hashCode(redshiftSettings());
return hashCode;
}
@Override
public boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ModifyEndpointRequest)) {
return false;
}
ModifyEndpointRequest other = (ModifyEndpointRequest) obj;
return Objects.equals(endpointArn(), other.endpointArn())
&& Objects.equals(endpointIdentifier(), other.endpointIdentifier())
&& Objects.equals(endpointTypeAsString(), other.endpointTypeAsString())
&& Objects.equals(engineName(), other.engineName()) && Objects.equals(username(), other.username())
&& Objects.equals(password(), other.password()) && Objects.equals(serverName(), other.serverName())
&& Objects.equals(port(), other.port()) && Objects.equals(databaseName(), other.databaseName())
&& Objects.equals(extraConnectionAttributes(), other.extraConnectionAttributes())
&& Objects.equals(certificateArn(), other.certificateArn())
&& Objects.equals(sslModeAsString(), other.sslModeAsString())
&& Objects.equals(serviceAccessRoleArn(), other.serviceAccessRoleArn())
&& Objects.equals(externalTableDefinition(), other.externalTableDefinition())
&& Objects.equals(dynamoDbSettings(), other.dynamoDbSettings())
&& Objects.equals(s3Settings(), other.s3Settings())
&& Objects.equals(dmsTransferSettings(), other.dmsTransferSettings())
&& Objects.equals(mongoDbSettings(), other.mongoDbSettings())
&& Objects.equals(kinesisSettings(), other.kinesisSettings())
&& Objects.equals(kafkaSettings(), other.kafkaSettings())
&& Objects.equals(elasticsearchSettings(), other.elasticsearchSettings())
&& Objects.equals(neptuneSettings(), other.neptuneSettings())
&& Objects.equals(redshiftSettings(), other.redshiftSettings());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public String toString() {
return ToString.builder("ModifyEndpointRequest").add("EndpointArn", endpointArn())
.add("EndpointIdentifier", endpointIdentifier()).add("EndpointType", endpointTypeAsString())
.add("EngineName", engineName()).add("Username", username())
.add("Password", password() == null ? null : "*** Sensitive Data Redacted ***").add("ServerName", serverName())
.add("Port", port()).add("DatabaseName", databaseName())
.add("ExtraConnectionAttributes", extraConnectionAttributes()).add("CertificateArn", certificateArn())
.add("SslMode", sslModeAsString()).add("ServiceAccessRoleArn", serviceAccessRoleArn())
.add("ExternalTableDefinition", externalTableDefinition()).add("DynamoDbSettings", dynamoDbSettings())
.add("S3Settings", s3Settings()).add("DmsTransferSettings", dmsTransferSettings())
.add("MongoDbSettings", mongoDbSettings()).add("KinesisSettings", kinesisSettings())
.add("KafkaSettings", kafkaSettings()).add("ElasticsearchSettings", elasticsearchSettings())
.add("NeptuneSettings", neptuneSettings()).add("RedshiftSettings", redshiftSettings()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "EndpointArn":
return Optional.ofNullable(clazz.cast(endpointArn()));
case "EndpointIdentifier":
return Optional.ofNullable(clazz.cast(endpointIdentifier()));
case "EndpointType":
return Optional.ofNullable(clazz.cast(endpointTypeAsString()));
case "EngineName":
return Optional.ofNullable(clazz.cast(engineName()));
case "Username":
return Optional.ofNullable(clazz.cast(username()));
case "Password":
return Optional.ofNullable(clazz.cast(password()));
case "ServerName":
return Optional.ofNullable(clazz.cast(serverName()));
case "Port":
return Optional.ofNullable(clazz.cast(port()));
case "DatabaseName":
return Optional.ofNullable(clazz.cast(databaseName()));
case "ExtraConnectionAttributes":
return Optional.ofNullable(clazz.cast(extraConnectionAttributes()));
case "CertificateArn":
return Optional.ofNullable(clazz.cast(certificateArn()));
case "SslMode":
return Optional.ofNullable(clazz.cast(sslModeAsString()));
case "ServiceAccessRoleArn":
return Optional.ofNullable(clazz.cast(serviceAccessRoleArn()));
case "ExternalTableDefinition":
return Optional.ofNullable(clazz.cast(externalTableDefinition()));
case "DynamoDbSettings":
return Optional.ofNullable(clazz.cast(dynamoDbSettings()));
case "S3Settings":
return Optional.ofNullable(clazz.cast(s3Settings()));
case "DmsTransferSettings":
return Optional.ofNullable(clazz.cast(dmsTransferSettings()));
case "MongoDbSettings":
return Optional.ofNullable(clazz.cast(mongoDbSettings()));
case "KinesisSettings":
return Optional.ofNullable(clazz.cast(kinesisSettings()));
case "KafkaSettings":
return Optional.ofNullable(clazz.cast(kafkaSettings()));
case "ElasticsearchSettings":
return Optional.ofNullable(clazz.cast(elasticsearchSettings()));
case "NeptuneSettings":
return Optional.ofNullable(clazz.cast(neptuneSettings()));
case "RedshiftSettings":
return Optional.ofNullable(clazz.cast(redshiftSettings()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function