software.amazon.awssdk.services.glue.model.S3DirectSourceAdditionalOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue Show documentation
Show all versions of glue Show documentation
The AWS Java SDK for AWS Glue module holds the client classes that are used for communicating
with AWS Glue Service
/*
* 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.glue.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.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;
/**
*
* Specifies additional connection options for the Amazon S3 data store.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class S3DirectSourceAdditionalOptions implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField BOUNDED_SIZE_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("BoundedSize").getter(getter(S3DirectSourceAdditionalOptions::boundedSize))
.setter(setter(Builder::boundedSize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BoundedSize").build()).build();
private static final SdkField BOUNDED_FILES_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("BoundedFiles").getter(getter(S3DirectSourceAdditionalOptions::boundedFiles))
.setter(setter(Builder::boundedFiles))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BoundedFiles").build()).build();
private static final SdkField ENABLE_SAMPLE_PATH_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("EnableSamplePath").getter(getter(S3DirectSourceAdditionalOptions::enableSamplePath))
.setter(setter(Builder::enableSamplePath))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableSamplePath").build()).build();
private static final SdkField SAMPLE_PATH_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SamplePath").getter(getter(S3DirectSourceAdditionalOptions::samplePath))
.setter(setter(Builder::samplePath))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SamplePath").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BOUNDED_SIZE_FIELD,
BOUNDED_FILES_FIELD, ENABLE_SAMPLE_PATH_FIELD, SAMPLE_PATH_FIELD));
private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();
private static final long serialVersionUID = 1L;
private final Long boundedSize;
private final Long boundedFiles;
private final Boolean enableSamplePath;
private final String samplePath;
private S3DirectSourceAdditionalOptions(BuilderImpl builder) {
this.boundedSize = builder.boundedSize;
this.boundedFiles = builder.boundedFiles;
this.enableSamplePath = builder.enableSamplePath;
this.samplePath = builder.samplePath;
}
/**
*
* Sets the upper limit for the target size of the dataset in bytes that will be processed.
*
*
* @return Sets the upper limit for the target size of the dataset in bytes that will be processed.
*/
public final Long boundedSize() {
return boundedSize;
}
/**
*
* Sets the upper limit for the target number of files that will be processed.
*
*
* @return Sets the upper limit for the target number of files that will be processed.
*/
public final Long boundedFiles() {
return boundedFiles;
}
/**
*
* Sets option to enable a sample path.
*
*
* @return Sets option to enable a sample path.
*/
public final Boolean enableSamplePath() {
return enableSamplePath;
}
/**
*
* If enabled, specifies the sample path.
*
*
* @return If enabled, specifies the sample path.
*/
public final String samplePath() {
return samplePath;
}
@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 final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(boundedSize());
hashCode = 31 * hashCode + Objects.hashCode(boundedFiles());
hashCode = 31 * hashCode + Objects.hashCode(enableSamplePath());
hashCode = 31 * hashCode + Objects.hashCode(samplePath());
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 S3DirectSourceAdditionalOptions)) {
return false;
}
S3DirectSourceAdditionalOptions other = (S3DirectSourceAdditionalOptions) obj;
return Objects.equals(boundedSize(), other.boundedSize()) && Objects.equals(boundedFiles(), other.boundedFiles())
&& Objects.equals(enableSamplePath(), other.enableSamplePath())
&& Objects.equals(samplePath(), other.samplePath());
}
/**
* 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("S3DirectSourceAdditionalOptions").add("BoundedSize", boundedSize())
.add("BoundedFiles", boundedFiles()).add("EnableSamplePath", enableSamplePath()).add("SamplePath", samplePath())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "BoundedSize":
return Optional.ofNullable(clazz.cast(boundedSize()));
case "BoundedFiles":
return Optional.ofNullable(clazz.cast(boundedFiles()));
case "EnableSamplePath":
return Optional.ofNullable(clazz.cast(enableSamplePath()));
case "SamplePath":
return Optional.ofNullable(clazz.cast(samplePath()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Map> memberNameToFieldInitializer() {
Map> map = new HashMap<>();
map.put("BoundedSize", BOUNDED_SIZE_FIELD);
map.put("BoundedFiles", BOUNDED_FILES_FIELD);
map.put("EnableSamplePath", ENABLE_SAMPLE_PATH_FIELD);
map.put("SamplePath", SAMPLE_PATH_FIELD);
return Collections.unmodifiableMap(map);
}
private static Function
© 2015 - 2024 Weber Informatics LLC | Privacy Policy