
com.azure.resourcemanager.datafactory.models.AmazonS3ReadSettings Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.datafactory.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Amazon S3 read settings.
*/
@Fluent
public final class AmazonS3ReadSettings extends StoreReadSettings {
/*
* The read setting type.
*/
private String type = "AmazonS3ReadSettings";
/*
* If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with
* resultType boolean).
*/
private Object recursive;
/*
* AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType string).
*/
private Object wildcardFolderPath;
/*
* AmazonS3 wildcardFileName. Type: string (or Expression with resultType string).
*/
private Object wildcardFileName;
/*
* The prefix filter for the S3 object name. Type: string (or Expression with resultType string).
*/
private Object prefix;
/*
* Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to
* copy. Type: string (or Expression with resultType string).
*/
private Object fileListPath;
/*
* Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean).
*/
private Object enablePartitionDiscovery;
/*
* Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string).
*/
private Object partitionRootPath;
/*
* Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or
* Expression with resultType boolean).
*/
private Object deleteFilesAfterCompletion;
/*
* The start of file's modified datetime. Type: string (or Expression with resultType string).
*/
private Object modifiedDatetimeStart;
/*
* The end of file's modified datetime. Type: string (or Expression with resultType string).
*/
private Object modifiedDatetimeEnd;
/**
* Creates an instance of AmazonS3ReadSettings class.
*/
public AmazonS3ReadSettings() {
}
/**
* Get the type property: The read setting type.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the recursive property: If true, files under the folder path will be read recursively. Default is true. Type:
* boolean (or Expression with resultType boolean).
*
* @return the recursive value.
*/
public Object recursive() {
return this.recursive;
}
/**
* Set the recursive property: If true, files under the folder path will be read recursively. Default is true. Type:
* boolean (or Expression with resultType boolean).
*
* @param recursive the recursive value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withRecursive(Object recursive) {
this.recursive = recursive;
return this;
}
/**
* Get the wildcardFolderPath property: AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType
* string).
*
* @return the wildcardFolderPath value.
*/
public Object wildcardFolderPath() {
return this.wildcardFolderPath;
}
/**
* Set the wildcardFolderPath property: AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType
* string).
*
* @param wildcardFolderPath the wildcardFolderPath value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withWildcardFolderPath(Object wildcardFolderPath) {
this.wildcardFolderPath = wildcardFolderPath;
return this;
}
/**
* Get the wildcardFileName property: AmazonS3 wildcardFileName. Type: string (or Expression with resultType
* string).
*
* @return the wildcardFileName value.
*/
public Object wildcardFileName() {
return this.wildcardFileName;
}
/**
* Set the wildcardFileName property: AmazonS3 wildcardFileName. Type: string (or Expression with resultType
* string).
*
* @param wildcardFileName the wildcardFileName value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withWildcardFileName(Object wildcardFileName) {
this.wildcardFileName = wildcardFileName;
return this;
}
/**
* Get the prefix property: The prefix filter for the S3 object name. Type: string (or Expression with resultType
* string).
*
* @return the prefix value.
*/
public Object prefix() {
return this.prefix;
}
/**
* Set the prefix property: The prefix filter for the S3 object name. Type: string (or Expression with resultType
* string).
*
* @param prefix the prefix value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withPrefix(Object prefix) {
this.prefix = prefix;
return this;
}
/**
* Get the fileListPath property: Point to a text file that lists each file (relative path to the path configured in
* the dataset) that you want to copy. Type: string (or Expression with resultType string).
*
* @return the fileListPath value.
*/
public Object fileListPath() {
return this.fileListPath;
}
/**
* Set the fileListPath property: Point to a text file that lists each file (relative path to the path configured in
* the dataset) that you want to copy. Type: string (or Expression with resultType string).
*
* @param fileListPath the fileListPath value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withFileListPath(Object fileListPath) {
this.fileListPath = fileListPath;
return this;
}
/**
* Get the enablePartitionDiscovery property: Indicates whether to enable partition discovery. Type: boolean (or
* Expression with resultType boolean).
*
* @return the enablePartitionDiscovery value.
*/
public Object enablePartitionDiscovery() {
return this.enablePartitionDiscovery;
}
/**
* Set the enablePartitionDiscovery property: Indicates whether to enable partition discovery. Type: boolean (or
* Expression with resultType boolean).
*
* @param enablePartitionDiscovery the enablePartitionDiscovery value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withEnablePartitionDiscovery(Object enablePartitionDiscovery) {
this.enablePartitionDiscovery = enablePartitionDiscovery;
return this;
}
/**
* Get the partitionRootPath property: Specify the root path where partition discovery starts from. Type: string (or
* Expression with resultType string).
*
* @return the partitionRootPath value.
*/
public Object partitionRootPath() {
return this.partitionRootPath;
}
/**
* Set the partitionRootPath property: Specify the root path where partition discovery starts from. Type: string (or
* Expression with resultType string).
*
* @param partitionRootPath the partitionRootPath value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withPartitionRootPath(Object partitionRootPath) {
this.partitionRootPath = partitionRootPath;
return this;
}
/**
* Get the deleteFilesAfterCompletion property: Indicates whether the source files need to be deleted after copy
* completion. Default is false. Type: boolean (or Expression with resultType boolean).
*
* @return the deleteFilesAfterCompletion value.
*/
public Object deleteFilesAfterCompletion() {
return this.deleteFilesAfterCompletion;
}
/**
* Set the deleteFilesAfterCompletion property: Indicates whether the source files need to be deleted after copy
* completion. Default is false. Type: boolean (or Expression with resultType boolean).
*
* @param deleteFilesAfterCompletion the deleteFilesAfterCompletion value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withDeleteFilesAfterCompletion(Object deleteFilesAfterCompletion) {
this.deleteFilesAfterCompletion = deleteFilesAfterCompletion;
return this;
}
/**
* Get the modifiedDatetimeStart property: The start of file's modified datetime. Type: string (or Expression with
* resultType string).
*
* @return the modifiedDatetimeStart value.
*/
public Object modifiedDatetimeStart() {
return this.modifiedDatetimeStart;
}
/**
* Set the modifiedDatetimeStart property: The start of file's modified datetime. Type: string (or Expression with
* resultType string).
*
* @param modifiedDatetimeStart the modifiedDatetimeStart value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withModifiedDatetimeStart(Object modifiedDatetimeStart) {
this.modifiedDatetimeStart = modifiedDatetimeStart;
return this;
}
/**
* Get the modifiedDatetimeEnd property: The end of file's modified datetime. Type: string (or Expression with
* resultType string).
*
* @return the modifiedDatetimeEnd value.
*/
public Object modifiedDatetimeEnd() {
return this.modifiedDatetimeEnd;
}
/**
* Set the modifiedDatetimeEnd property: The end of file's modified datetime. Type: string (or Expression with
* resultType string).
*
* @param modifiedDatetimeEnd the modifiedDatetimeEnd value to set.
* @return the AmazonS3ReadSettings object itself.
*/
public AmazonS3ReadSettings withModifiedDatetimeEnd(Object modifiedDatetimeEnd) {
this.modifiedDatetimeEnd = modifiedDatetimeEnd;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AmazonS3ReadSettings withMaxConcurrentConnections(Object maxConcurrentConnections) {
super.withMaxConcurrentConnections(maxConcurrentConnections);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AmazonS3ReadSettings withDisableMetricsCollection(Object disableMetricsCollection) {
super.withDisableMetricsCollection(disableMetricsCollection);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("maxConcurrentConnections", maxConcurrentConnections());
jsonWriter.writeUntypedField("disableMetricsCollection", disableMetricsCollection());
jsonWriter.writeStringField("type", this.type);
jsonWriter.writeUntypedField("recursive", this.recursive);
jsonWriter.writeUntypedField("wildcardFolderPath", this.wildcardFolderPath);
jsonWriter.writeUntypedField("wildcardFileName", this.wildcardFileName);
jsonWriter.writeUntypedField("prefix", this.prefix);
jsonWriter.writeUntypedField("fileListPath", this.fileListPath);
jsonWriter.writeUntypedField("enablePartitionDiscovery", this.enablePartitionDiscovery);
jsonWriter.writeUntypedField("partitionRootPath", this.partitionRootPath);
jsonWriter.writeUntypedField("deleteFilesAfterCompletion", this.deleteFilesAfterCompletion);
jsonWriter.writeUntypedField("modifiedDatetimeStart", this.modifiedDatetimeStart);
jsonWriter.writeUntypedField("modifiedDatetimeEnd", this.modifiedDatetimeEnd);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AmazonS3ReadSettings from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AmazonS3ReadSettings if the JsonReader was pointing to an instance of it, or null if it
* was pointing to JSON null.
* @throws IOException If an error occurs while reading the AmazonS3ReadSettings.
*/
public static AmazonS3ReadSettings fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AmazonS3ReadSettings deserializedAmazonS3ReadSettings = new AmazonS3ReadSettings();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("maxConcurrentConnections".equals(fieldName)) {
deserializedAmazonS3ReadSettings.withMaxConcurrentConnections(reader.readUntyped());
} else if ("disableMetricsCollection".equals(fieldName)) {
deserializedAmazonS3ReadSettings.withDisableMetricsCollection(reader.readUntyped());
} else if ("type".equals(fieldName)) {
deserializedAmazonS3ReadSettings.type = reader.getString();
} else if ("recursive".equals(fieldName)) {
deserializedAmazonS3ReadSettings.recursive = reader.readUntyped();
} else if ("wildcardFolderPath".equals(fieldName)) {
deserializedAmazonS3ReadSettings.wildcardFolderPath = reader.readUntyped();
} else if ("wildcardFileName".equals(fieldName)) {
deserializedAmazonS3ReadSettings.wildcardFileName = reader.readUntyped();
} else if ("prefix".equals(fieldName)) {
deserializedAmazonS3ReadSettings.prefix = reader.readUntyped();
} else if ("fileListPath".equals(fieldName)) {
deserializedAmazonS3ReadSettings.fileListPath = reader.readUntyped();
} else if ("enablePartitionDiscovery".equals(fieldName)) {
deserializedAmazonS3ReadSettings.enablePartitionDiscovery = reader.readUntyped();
} else if ("partitionRootPath".equals(fieldName)) {
deserializedAmazonS3ReadSettings.partitionRootPath = reader.readUntyped();
} else if ("deleteFilesAfterCompletion".equals(fieldName)) {
deserializedAmazonS3ReadSettings.deleteFilesAfterCompletion = reader.readUntyped();
} else if ("modifiedDatetimeStart".equals(fieldName)) {
deserializedAmazonS3ReadSettings.modifiedDatetimeStart = reader.readUntyped();
} else if ("modifiedDatetimeEnd".equals(fieldName)) {
deserializedAmazonS3ReadSettings.modifiedDatetimeEnd = reader.readUntyped();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedAmazonS3ReadSettings.withAdditionalProperties(additionalProperties);
return deserializedAmazonS3ReadSettings;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy