software.amazon.awssdk.services.firehose.model.SnowflakeDestinationConfiguration Maven / Gradle / Ivy
Show all versions of firehose 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.firehose.model;
import java.io.Serializable;
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.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;
/**
*
* Configure Snowflake destination
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class SnowflakeDestinationConfiguration implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField ACCOUNT_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AccountUrl").getter(getter(SnowflakeDestinationConfiguration::accountUrl))
.setter(setter(Builder::accountUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccountUrl").build()).build();
private static final SdkField PRIVATE_KEY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PrivateKey").getter(getter(SnowflakeDestinationConfiguration::privateKey))
.setter(setter(Builder::privateKey))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PrivateKey").build()).build();
private static final SdkField KEY_PASSPHRASE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KeyPassphrase").getter(getter(SnowflakeDestinationConfiguration::keyPassphrase))
.setter(setter(Builder::keyPassphrase))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KeyPassphrase").build()).build();
private static final SdkField USER_FIELD = SdkField. builder(MarshallingType.STRING).memberName("User")
.getter(getter(SnowflakeDestinationConfiguration::user)).setter(setter(Builder::user))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("User").build()).build();
private static final SdkField DATABASE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Database").getter(getter(SnowflakeDestinationConfiguration::database)).setter(setter(Builder::database))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Database").build()).build();
private static final SdkField SCHEMA_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Schema")
.getter(getter(SnowflakeDestinationConfiguration::schema)).setter(setter(Builder::schema))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Schema").build()).build();
private static final SdkField TABLE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Table")
.getter(getter(SnowflakeDestinationConfiguration::table)).setter(setter(Builder::table))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Table").build()).build();
private static final SdkField SNOWFLAKE_ROLE_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("SnowflakeRoleConfiguration")
.getter(getter(SnowflakeDestinationConfiguration::snowflakeRoleConfiguration))
.setter(setter(Builder::snowflakeRoleConfiguration))
.constructor(SnowflakeRoleConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnowflakeRoleConfiguration").build())
.build();
private static final SdkField DATA_LOADING_OPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DataLoadingOption").getter(getter(SnowflakeDestinationConfiguration::dataLoadingOptionAsString))
.setter(setter(Builder::dataLoadingOption))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataLoadingOption").build()).build();
private static final SdkField META_DATA_COLUMN_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MetaDataColumnName").getter(getter(SnowflakeDestinationConfiguration::metaDataColumnName))
.setter(setter(Builder::metaDataColumnName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MetaDataColumnName").build())
.build();
private static final SdkField CONTENT_COLUMN_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ContentColumnName").getter(getter(SnowflakeDestinationConfiguration::contentColumnName))
.setter(setter(Builder::contentColumnName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ContentColumnName").build()).build();
private static final SdkField SNOWFLAKE_VPC_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SnowflakeVpcConfiguration")
.getter(getter(SnowflakeDestinationConfiguration::snowflakeVpcConfiguration))
.setter(setter(Builder::snowflakeVpcConfiguration)).constructor(SnowflakeVpcConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnowflakeVpcConfiguration").build())
.build();
private static final SdkField CLOUD_WATCH_LOGGING_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CloudWatchLoggingOptions")
.getter(getter(SnowflakeDestinationConfiguration::cloudWatchLoggingOptions))
.setter(setter(Builder::cloudWatchLoggingOptions)).constructor(CloudWatchLoggingOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CloudWatchLoggingOptions").build())
.build();
private static final SdkField PROCESSING_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ProcessingConfiguration")
.getter(getter(SnowflakeDestinationConfiguration::processingConfiguration))
.setter(setter(Builder::processingConfiguration)).constructor(ProcessingConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingConfiguration").build())
.build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RoleARN").getter(getter(SnowflakeDestinationConfiguration::roleARN)).setter(setter(Builder::roleARN))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleARN").build()).build();
private static final SdkField RETRY_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RetryOptions")
.getter(getter(SnowflakeDestinationConfiguration::retryOptions)).setter(setter(Builder::retryOptions))
.constructor(SnowflakeRetryOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RetryOptions").build()).build();
private static final SdkField S3_BACKUP_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("S3BackupMode").getter(getter(SnowflakeDestinationConfiguration::s3BackupModeAsString))
.setter(setter(Builder::s3BackupMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3BackupMode").build()).build();
private static final SdkField S3_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("S3Configuration")
.getter(getter(SnowflakeDestinationConfiguration::s3Configuration)).setter(setter(Builder::s3Configuration))
.constructor(S3DestinationConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3Configuration").build()).build();
private static final SdkField SECRETS_MANAGER_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("SecretsManagerConfiguration")
.getter(getter(SnowflakeDestinationConfiguration::secretsManagerConfiguration))
.setter(setter(Builder::secretsManagerConfiguration))
.constructor(SecretsManagerConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecretsManagerConfiguration")
.build()).build();
private static final SdkField BUFFERING_HINTS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("BufferingHints")
.getter(getter(SnowflakeDestinationConfiguration::bufferingHints)).setter(setter(Builder::bufferingHints))
.constructor(SnowflakeBufferingHints::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BufferingHints").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ACCOUNT_URL_FIELD,
PRIVATE_KEY_FIELD, KEY_PASSPHRASE_FIELD, USER_FIELD, DATABASE_FIELD, SCHEMA_FIELD, TABLE_FIELD,
SNOWFLAKE_ROLE_CONFIGURATION_FIELD, DATA_LOADING_OPTION_FIELD, META_DATA_COLUMN_NAME_FIELD,
CONTENT_COLUMN_NAME_FIELD, SNOWFLAKE_VPC_CONFIGURATION_FIELD, CLOUD_WATCH_LOGGING_OPTIONS_FIELD,
PROCESSING_CONFIGURATION_FIELD, ROLE_ARN_FIELD, RETRY_OPTIONS_FIELD, S3_BACKUP_MODE_FIELD, S3_CONFIGURATION_FIELD,
SECRETS_MANAGER_CONFIGURATION_FIELD, BUFFERING_HINTS_FIELD));
private static final long serialVersionUID = 1L;
private final String accountUrl;
private final String privateKey;
private final String keyPassphrase;
private final String user;
private final String database;
private final String schema;
private final String table;
private final SnowflakeRoleConfiguration snowflakeRoleConfiguration;
private final String dataLoadingOption;
private final String metaDataColumnName;
private final String contentColumnName;
private final SnowflakeVpcConfiguration snowflakeVpcConfiguration;
private final CloudWatchLoggingOptions cloudWatchLoggingOptions;
private final ProcessingConfiguration processingConfiguration;
private final String roleARN;
private final SnowflakeRetryOptions retryOptions;
private final String s3BackupMode;
private final S3DestinationConfiguration s3Configuration;
private final SecretsManagerConfiguration secretsManagerConfiguration;
private final SnowflakeBufferingHints bufferingHints;
private SnowflakeDestinationConfiguration(BuilderImpl builder) {
this.accountUrl = builder.accountUrl;
this.privateKey = builder.privateKey;
this.keyPassphrase = builder.keyPassphrase;
this.user = builder.user;
this.database = builder.database;
this.schema = builder.schema;
this.table = builder.table;
this.snowflakeRoleConfiguration = builder.snowflakeRoleConfiguration;
this.dataLoadingOption = builder.dataLoadingOption;
this.metaDataColumnName = builder.metaDataColumnName;
this.contentColumnName = builder.contentColumnName;
this.snowflakeVpcConfiguration = builder.snowflakeVpcConfiguration;
this.cloudWatchLoggingOptions = builder.cloudWatchLoggingOptions;
this.processingConfiguration = builder.processingConfiguration;
this.roleARN = builder.roleARN;
this.retryOptions = builder.retryOptions;
this.s3BackupMode = builder.s3BackupMode;
this.s3Configuration = builder.s3Configuration;
this.secretsManagerConfiguration = builder.secretsManagerConfiguration;
this.bufferingHints = builder.bufferingHints;
}
/**
*
* URL for accessing your Snowflake account. This URL must include your account identifier. Note that the
* protocol (https://) and port number are optional.
*
*
* @return URL for accessing your Snowflake account. This URL must include your account identifier. Note
* that the protocol (https://) and port number are optional.
*/
public final String accountUrl() {
return accountUrl;
}
/**
*
* The private key used to encrypt your Snowflake client. For information, see Using Key Pair Authentication & Key Rotation.
*
*
* @return The private key used to encrypt your Snowflake client. For information, see Using Key Pair Authentication & Key Rotation.
*/
public final String privateKey() {
return privateKey;
}
/**
*
* Passphrase to decrypt the private key when the key is encrypted. For information, see Using Key Pair Authentication & Key Rotation.
*
*
* @return Passphrase to decrypt the private key when the key is encrypted. For information, see Using Key Pair Authentication & Key Rotation.
*/
public final String keyPassphrase() {
return keyPassphrase;
}
/**
*
* User login name for the Snowflake account.
*
*
* @return User login name for the Snowflake account.
*/
public final String user() {
return user;
}
/**
*
* All data in Snowflake is maintained in databases.
*
*
* @return All data in Snowflake is maintained in databases.
*/
public final String database() {
return database;
}
/**
*
* Each database consists of one or more schemas, which are logical groupings of database objects, such as tables
* and views
*
*
* @return Each database consists of one or more schemas, which are logical groupings of database objects, such as
* tables and views
*/
public final String schema() {
return schema;
}
/**
*
* All data in Snowflake is stored in database tables, logically structured as collections of columns and rows.
*
*
* @return All data in Snowflake is stored in database tables, logically structured as collections of columns and
* rows.
*/
public final String table() {
return table;
}
/**
*
* Optionally configure a Snowflake role. Otherwise the default user role will be used.
*
*
* @return Optionally configure a Snowflake role. Otherwise the default user role will be used.
*/
public final SnowflakeRoleConfiguration snowflakeRoleConfiguration() {
return snowflakeRoleConfiguration;
}
/**
*
* Choose to load JSON keys mapped to table column names or choose to split the JSON payload where content is mapped
* to a record content column and source metadata is mapped to a record metadata column.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #dataLoadingOption}
* will return {@link SnowflakeDataLoadingOption#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #dataLoadingOptionAsString}.
*
*
* @return Choose to load JSON keys mapped to table column names or choose to split the JSON payload where content
* is mapped to a record content column and source metadata is mapped to a record metadata column.
* @see SnowflakeDataLoadingOption
*/
public final SnowflakeDataLoadingOption dataLoadingOption() {
return SnowflakeDataLoadingOption.fromValue(dataLoadingOption);
}
/**
*
* Choose to load JSON keys mapped to table column names or choose to split the JSON payload where content is mapped
* to a record content column and source metadata is mapped to a record metadata column.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #dataLoadingOption}
* will return {@link SnowflakeDataLoadingOption#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #dataLoadingOptionAsString}.
*
*
* @return Choose to load JSON keys mapped to table column names or choose to split the JSON payload where content
* is mapped to a record content column and source metadata is mapped to a record metadata column.
* @see SnowflakeDataLoadingOption
*/
public final String dataLoadingOptionAsString() {
return dataLoadingOption;
}
/**
*
* The name of the record metadata column
*
*
* @return The name of the record metadata column
*/
public final String metaDataColumnName() {
return metaDataColumnName;
}
/**
*
* The name of the record content column
*
*
* @return The name of the record content column
*/
public final String contentColumnName() {
return contentColumnName;
}
/**
*
* The VPCE ID for Firehose to privately connect with Snowflake. The ID format is
* com.amazonaws.vpce.[region].vpce-svc-<[id]>. For more information, see Amazon PrivateLink & Snowflake
*
*
* @return The VPCE ID for Firehose to privately connect with Snowflake. The ID format is
* com.amazonaws.vpce.[region].vpce-svc-<[id]>. For more information, see Amazon PrivateLink &
* Snowflake
*/
public final SnowflakeVpcConfiguration snowflakeVpcConfiguration() {
return snowflakeVpcConfiguration;
}
/**
* Returns the value of the CloudWatchLoggingOptions property for this object.
*
* @return The value of the CloudWatchLoggingOptions property for this object.
*/
public final CloudWatchLoggingOptions cloudWatchLoggingOptions() {
return cloudWatchLoggingOptions;
}
/**
* Returns the value of the ProcessingConfiguration property for this object.
*
* @return The value of the ProcessingConfiguration property for this object.
*/
public final ProcessingConfiguration processingConfiguration() {
return processingConfiguration;
}
/**
*
* The Amazon Resource Name (ARN) of the Snowflake role
*
*
* @return The Amazon Resource Name (ARN) of the Snowflake role
*/
public final String roleARN() {
return roleARN;
}
/**
*
* The time period where Firehose will retry sending data to the chosen HTTP endpoint.
*
*
* @return The time period where Firehose will retry sending data to the chosen HTTP endpoint.
*/
public final SnowflakeRetryOptions retryOptions() {
return retryOptions;
}
/**
*
* Choose an S3 backup mode
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #s3BackupMode} will
* return {@link SnowflakeS3BackupMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #s3BackupModeAsString}.
*
*
* @return Choose an S3 backup mode
* @see SnowflakeS3BackupMode
*/
public final SnowflakeS3BackupMode s3BackupMode() {
return SnowflakeS3BackupMode.fromValue(s3BackupMode);
}
/**
*
* Choose an S3 backup mode
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #s3BackupMode} will
* return {@link SnowflakeS3BackupMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #s3BackupModeAsString}.
*
*
* @return Choose an S3 backup mode
* @see SnowflakeS3BackupMode
*/
public final String s3BackupModeAsString() {
return s3BackupMode;
}
/**
* Returns the value of the S3Configuration property for this object.
*
* @return The value of the S3Configuration property for this object.
*/
public final S3DestinationConfiguration s3Configuration() {
return s3Configuration;
}
/**
*
* The configuration that defines how you access secrets for Snowflake.
*
*
* @return The configuration that defines how you access secrets for Snowflake.
*/
public final SecretsManagerConfiguration secretsManagerConfiguration() {
return secretsManagerConfiguration;
}
/**
*
* Describes the buffering to perform before delivering data to the Snowflake destination. If you do not specify any
* value, Firehose uses the default values.
*
*
* @return Describes the buffering to perform before delivering data to the Snowflake destination. If you do not
* specify any value, Firehose uses the default values.
*/
public final SnowflakeBufferingHints bufferingHints() {
return bufferingHints;
}
@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 + Objects.hashCode(accountUrl());
hashCode = 31 * hashCode + Objects.hashCode(privateKey());
hashCode = 31 * hashCode + Objects.hashCode(keyPassphrase());
hashCode = 31 * hashCode + Objects.hashCode(user());
hashCode = 31 * hashCode + Objects.hashCode(database());
hashCode = 31 * hashCode + Objects.hashCode(schema());
hashCode = 31 * hashCode + Objects.hashCode(table());
hashCode = 31 * hashCode + Objects.hashCode(snowflakeRoleConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(dataLoadingOptionAsString());
hashCode = 31 * hashCode + Objects.hashCode(metaDataColumnName());
hashCode = 31 * hashCode + Objects.hashCode(contentColumnName());
hashCode = 31 * hashCode + Objects.hashCode(snowflakeVpcConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(cloudWatchLoggingOptions());
hashCode = 31 * hashCode + Objects.hashCode(processingConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(roleARN());
hashCode = 31 * hashCode + Objects.hashCode(retryOptions());
hashCode = 31 * hashCode + Objects.hashCode(s3BackupModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(s3Configuration());
hashCode = 31 * hashCode + Objects.hashCode(secretsManagerConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(bufferingHints());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof SnowflakeDestinationConfiguration)) {
return false;
}
SnowflakeDestinationConfiguration other = (SnowflakeDestinationConfiguration) obj;
return Objects.equals(accountUrl(), other.accountUrl()) && Objects.equals(privateKey(), other.privateKey())
&& Objects.equals(keyPassphrase(), other.keyPassphrase()) && Objects.equals(user(), other.user())
&& Objects.equals(database(), other.database()) && Objects.equals(schema(), other.schema())
&& Objects.equals(table(), other.table())
&& Objects.equals(snowflakeRoleConfiguration(), other.snowflakeRoleConfiguration())
&& Objects.equals(dataLoadingOptionAsString(), other.dataLoadingOptionAsString())
&& Objects.equals(metaDataColumnName(), other.metaDataColumnName())
&& Objects.equals(contentColumnName(), other.contentColumnName())
&& Objects.equals(snowflakeVpcConfiguration(), other.snowflakeVpcConfiguration())
&& Objects.equals(cloudWatchLoggingOptions(), other.cloudWatchLoggingOptions())
&& Objects.equals(processingConfiguration(), other.processingConfiguration())
&& Objects.equals(roleARN(), other.roleARN()) && Objects.equals(retryOptions(), other.retryOptions())
&& Objects.equals(s3BackupModeAsString(), other.s3BackupModeAsString())
&& Objects.equals(s3Configuration(), other.s3Configuration())
&& Objects.equals(secretsManagerConfiguration(), other.secretsManagerConfiguration())
&& Objects.equals(bufferingHints(), other.bufferingHints());
}
/**
* 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("SnowflakeDestinationConfiguration")
.add("AccountUrl", accountUrl() == null ? null : "*** Sensitive Data Redacted ***")
.add("PrivateKey", privateKey() == null ? null : "*** Sensitive Data Redacted ***")
.add("KeyPassphrase", keyPassphrase() == null ? null : "*** Sensitive Data Redacted ***")
.add("User", user() == null ? null : "*** Sensitive Data Redacted ***")
.add("Database", database() == null ? null : "*** Sensitive Data Redacted ***")
.add("Schema", schema() == null ? null : "*** Sensitive Data Redacted ***")
.add("Table", table() == null ? null : "*** Sensitive Data Redacted ***")
.add("SnowflakeRoleConfiguration", snowflakeRoleConfiguration())
.add("DataLoadingOption", dataLoadingOptionAsString())
.add("MetaDataColumnName", metaDataColumnName() == null ? null : "*** Sensitive Data Redacted ***")
.add("ContentColumnName", contentColumnName() == null ? null : "*** Sensitive Data Redacted ***")
.add("SnowflakeVpcConfiguration", snowflakeVpcConfiguration())
.add("CloudWatchLoggingOptions", cloudWatchLoggingOptions())
.add("ProcessingConfiguration", processingConfiguration()).add("RoleARN", roleARN())
.add("RetryOptions", retryOptions()).add("S3BackupMode", s3BackupModeAsString())
.add("S3Configuration", s3Configuration()).add("SecretsManagerConfiguration", secretsManagerConfiguration())
.add("BufferingHints", bufferingHints()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AccountUrl":
return Optional.ofNullable(clazz.cast(accountUrl()));
case "PrivateKey":
return Optional.ofNullable(clazz.cast(privateKey()));
case "KeyPassphrase":
return Optional.ofNullable(clazz.cast(keyPassphrase()));
case "User":
return Optional.ofNullable(clazz.cast(user()));
case "Database":
return Optional.ofNullable(clazz.cast(database()));
case "Schema":
return Optional.ofNullable(clazz.cast(schema()));
case "Table":
return Optional.ofNullable(clazz.cast(table()));
case "SnowflakeRoleConfiguration":
return Optional.ofNullable(clazz.cast(snowflakeRoleConfiguration()));
case "DataLoadingOption":
return Optional.ofNullable(clazz.cast(dataLoadingOptionAsString()));
case "MetaDataColumnName":
return Optional.ofNullable(clazz.cast(metaDataColumnName()));
case "ContentColumnName":
return Optional.ofNullable(clazz.cast(contentColumnName()));
case "SnowflakeVpcConfiguration":
return Optional.ofNullable(clazz.cast(snowflakeVpcConfiguration()));
case "CloudWatchLoggingOptions":
return Optional.ofNullable(clazz.cast(cloudWatchLoggingOptions()));
case "ProcessingConfiguration":
return Optional.ofNullable(clazz.cast(processingConfiguration()));
case "RoleARN":
return Optional.ofNullable(clazz.cast(roleARN()));
case "RetryOptions":
return Optional.ofNullable(clazz.cast(retryOptions()));
case "S3BackupMode":
return Optional.ofNullable(clazz.cast(s3BackupModeAsString()));
case "S3Configuration":
return Optional.ofNullable(clazz.cast(s3Configuration()));
case "SecretsManagerConfiguration":
return Optional.ofNullable(clazz.cast(secretsManagerConfiguration()));
case "BufferingHints":
return Optional.ofNullable(clazz.cast(bufferingHints()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function