
software.amazon.awssdk.services.datasync.model.Options Maven / Gradle / Ivy
/*
* 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.datasync.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.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;
/**
*
* Represents the options that are available to control the behavior of a StartTaskExecution
* operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and
* also overwriting files in the destination, data integrity verification, and so on.
*
*
* A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution, the
* default value is used. You can override the defaults options on each task execution by specifying an overriding
* Options
value to StartTaskExecution.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class Options implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField VERIFY_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("VerifyMode").getter(getter(Options::verifyModeAsString)).setter(setter(Builder::verifyMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VerifyMode").build()).build();
private static final SdkField OVERWRITE_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("OverwriteMode").getter(getter(Options::overwriteModeAsString)).setter(setter(Builder::overwriteMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OverwriteMode").build()).build();
private static final SdkField ATIME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Atime")
.getter(getter(Options::atimeAsString)).setter(setter(Builder::atime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Atime").build()).build();
private static final SdkField MTIME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Mtime")
.getter(getter(Options::mtimeAsString)).setter(setter(Builder::mtime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Mtime").build()).build();
private static final SdkField UID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Uid")
.getter(getter(Options::uidAsString)).setter(setter(Builder::uid))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Uid").build()).build();
private static final SdkField GID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Gid")
.getter(getter(Options::gidAsString)).setter(setter(Builder::gid))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Gid").build()).build();
private static final SdkField PRESERVE_DELETED_FILES_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PreserveDeletedFiles").getter(getter(Options::preserveDeletedFilesAsString))
.setter(setter(Builder::preserveDeletedFiles))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreserveDeletedFiles").build())
.build();
private static final SdkField PRESERVE_DEVICES_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PreserveDevices").getter(getter(Options::preserveDevicesAsString))
.setter(setter(Builder::preserveDevices))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreserveDevices").build()).build();
private static final SdkField POSIX_PERMISSIONS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PosixPermissions").getter(getter(Options::posixPermissionsAsString))
.setter(setter(Builder::posixPermissions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PosixPermissions").build()).build();
private static final SdkField BYTES_PER_SECOND_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("BytesPerSecond").getter(getter(Options::bytesPerSecond)).setter(setter(Builder::bytesPerSecond))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BytesPerSecond").build()).build();
private static final SdkField TASK_QUEUEING_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TaskQueueing").getter(getter(Options::taskQueueingAsString)).setter(setter(Builder::taskQueueing))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TaskQueueing").build()).build();
private static final SdkField LOG_LEVEL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LogLevel").getter(getter(Options::logLevelAsString)).setter(setter(Builder::logLevel))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogLevel").build()).build();
private static final SdkField TRANSFER_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TransferMode").getter(getter(Options::transferModeAsString)).setter(setter(Builder::transferMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransferMode").build()).build();
private static final SdkField SECURITY_DESCRIPTOR_COPY_FLAGS_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("SecurityDescriptorCopyFlags")
.getter(getter(Options::securityDescriptorCopyFlagsAsString))
.setter(setter(Builder::securityDescriptorCopyFlags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityDescriptorCopyFlags")
.build()).build();
private static final SdkField OBJECT_TAGS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ObjectTags").getter(getter(Options::objectTagsAsString)).setter(setter(Builder::objectTags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ObjectTags").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(VERIFY_MODE_FIELD,
OVERWRITE_MODE_FIELD, ATIME_FIELD, MTIME_FIELD, UID_FIELD, GID_FIELD, PRESERVE_DELETED_FILES_FIELD,
PRESERVE_DEVICES_FIELD, POSIX_PERMISSIONS_FIELD, BYTES_PER_SECOND_FIELD, TASK_QUEUEING_FIELD, LOG_LEVEL_FIELD,
TRANSFER_MODE_FIELD, SECURITY_DESCRIPTOR_COPY_FLAGS_FIELD, OBJECT_TAGS_FIELD));
private static final long serialVersionUID = 1L;
private final String verifyMode;
private final String overwriteMode;
private final String atime;
private final String mtime;
private final String uid;
private final String gid;
private final String preserveDeletedFiles;
private final String preserveDevices;
private final String posixPermissions;
private final Long bytesPerSecond;
private final String taskQueueing;
private final String logLevel;
private final String transferMode;
private final String securityDescriptorCopyFlags;
private final String objectTags;
private Options(BuilderImpl builder) {
this.verifyMode = builder.verifyMode;
this.overwriteMode = builder.overwriteMode;
this.atime = builder.atime;
this.mtime = builder.mtime;
this.uid = builder.uid;
this.gid = builder.gid;
this.preserveDeletedFiles = builder.preserveDeletedFiles;
this.preserveDevices = builder.preserveDevices;
this.posixPermissions = builder.posixPermissions;
this.bytesPerSecond = builder.bytesPerSecond;
this.taskQueueing = builder.taskQueueing;
this.logLevel = builder.logLevel;
this.transferMode = builder.transferMode;
this.securityDescriptorCopyFlags = builder.securityDescriptorCopyFlags;
this.objectTags = builder.objectTags;
}
/**
*
* A value that determines whether a data integrity verification should be performed at the end of a task execution
* after all data and metadata have been transferred. For more information, see Configure task settings.
*
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the transfer
* to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3
* Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data transmissions are
* integrity-checked with checksum verification during the transfer.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #verifyMode} will
* return {@link VerifyMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #verifyModeAsString}.
*
*
* @return A value that determines whether a data integrity verification should be performed at the end of a task
* execution after all data and metadata have been transferred. For more information, see Configure task
* settings.
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were
* transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the
* transfer to verify that source and destination are fully synchronized. This option isn't supported when
* transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data
* transmissions are integrity-checked with checksum verification during the transfer.
* @see VerifyMode
*/
public final VerifyMode verifyMode() {
return VerifyMode.fromValue(verifyMode);
}
/**
*
* A value that determines whether a data integrity verification should be performed at the end of a task execution
* after all data and metadata have been transferred. For more information, see Configure task settings.
*
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the transfer
* to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3
* Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data transmissions are
* integrity-checked with checksum verification during the transfer.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #verifyMode} will
* return {@link VerifyMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #verifyModeAsString}.
*
*
* @return A value that determines whether a data integrity verification should be performed at the end of a task
* execution after all data and metadata have been transferred. For more information, see Configure task
* settings.
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were
* transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the
* transfer to verify that source and destination are fully synchronized. This option isn't supported when
* transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data
* transmissions are integrity-checked with checksum verification during the transfer.
* @see VerifyMode
*/
public final String verifyModeAsString() {
return verifyMode;
}
/**
*
* A value that determines whether files at the destination should be overwritten or preserved when copying files.
* If set to NEVER
a destination file will not be replaced by a source file, even if the destination
* file differs from the source file. If you modify files in the destination and you sync the files, you can use
* this value to protect against overwriting those changes.
*
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see
*
* Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #overwriteMode}
* will return {@link OverwriteMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #overwriteModeAsString}.
*
*
* @return A value that determines whether files at the destination should be overwritten or preserved when copying
* files. If set to NEVER
a destination file will not be replaced by a source file, even if the
* destination file differs from the source file. If you modify files in the destination and you sync the
* files, you can use this value to protect against overwriting those changes.
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed
* information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
* @see OverwriteMode
*/
public final OverwriteMode overwriteMode() {
return OverwriteMode.fromValue(overwriteMode);
}
/**
*
* A value that determines whether files at the destination should be overwritten or preserved when copying files.
* If set to NEVER
a destination file will not be replaced by a source file, even if the destination
* file differs from the source file. If you modify files in the destination and you sync the files, you can use
* this value to protect against overwriting those changes.
*
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see
*
* Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #overwriteMode}
* will return {@link OverwriteMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #overwriteModeAsString}.
*
*
* @return A value that determines whether files at the destination should be overwritten or preserved when copying
* files. If set to NEVER
a destination file will not be replaced by a source file, even if the
* destination file differs from the source file. If you modify files in the destination and you sync the
* files, you can use this value to protect against overwriting those changes.
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed
* information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
* @see OverwriteMode
*/
public final String overwriteModeAsString() {
return overwriteMode;
}
/**
*
* A file metadata value that shows the last time a file was accessed (that is, when the file was read or written
* to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original
* Atime
attribute on all source files (that is, the version before the PREPARING
phase).
* However, Atime
's behavior is not fully standard across platforms, so DataSync can only do this on a
* best-effort basis.
*
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
* .
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #atime} will return
* {@link Atime#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #atimeAsString}.
*
*
* @return A file metadata value that shows the last time a file was accessed (that is, when the file was read or
* written to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the
* original Atime
attribute on all source files (that is, the version before the
* PREPARING
phase). However, Atime
's behavior is not fully standard across
* platforms, so DataSync can only do this on a best-effort basis.
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to
* PRESERVE
.
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
* @see Atime
*/
public final Atime atime() {
return Atime.fromValue(atime);
}
/**
*
* A file metadata value that shows the last time a file was accessed (that is, when the file was read or written
* to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original
* Atime
attribute on all source files (that is, the version before the PREPARING
phase).
* However, Atime
's behavior is not fully standard across platforms, so DataSync can only do this on a
* best-effort basis.
*
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
* .
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #atime} will return
* {@link Atime#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #atimeAsString}.
*
*
* @return A file metadata value that shows the last time a file was accessed (that is, when the file was read or
* written to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the
* original Atime
attribute on all source files (that is, the version before the
* PREPARING
phase). However, Atime
's behavior is not fully standard across
* platforms, so DataSync can only do this on a best-effort basis.
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to
* PRESERVE
.
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
* @see Atime
*/
public final String atimeAsString() {
return atime;
}
/**
*
* A value that indicates the last time that a file was modified (that is, a file was written to) before the
* PREPARING
phase. This option is required for cases when you need to run the same task more than one
* time.
*
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
* .
*
*
* If Mtime
is set to NONE
, Atime
must also be set to NONE
.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #mtime} will return
* {@link Mtime#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #mtimeAsString}.
*
*
* @return A value that indicates the last time that a file was modified (that is, a file was written to) before the
* PREPARING
phase. This option is required for cases when you need to run the same task more
* than one time.
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to
* BEST_EFFORT
.
*
*
* If Mtime
is set to NONE
, Atime
must also be set to
* NONE
.
*
* @see Mtime
*/
public final Mtime mtime() {
return Mtime.fromValue(mtime);
}
/**
*
* A value that indicates the last time that a file was modified (that is, a file was written to) before the
* PREPARING
phase. This option is required for cases when you need to run the same task more than one
* time.
*
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
* .
*
*
* If Mtime
is set to NONE
, Atime
must also be set to NONE
.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #mtime} will return
* {@link Mtime#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #mtimeAsString}.
*
*
* @return A value that indicates the last time that a file was modified (that is, a file was written to) before the
* PREPARING
phase. This option is required for cases when you need to run the same task more
* than one time.
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to
* BEST_EFFORT
.
*
*
* If Mtime
is set to NONE
, Atime
must also be set to
* NONE
.
*
* @see Mtime
*/
public final String mtimeAsString() {
return mtime;
}
/**
*
* The POSIX user ID (UID) of the file's owner.
*
*
* For more information, see Metadata copied
* by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #uid} will return
* {@link Uid#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from {@link #uidAsString}.
*
*
* @return The POSIX user ID (UID) of the file's owner.
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Uid
*/
public final Uid uid() {
return Uid.fromValue(uid);
}
/**
*
* The POSIX user ID (UID) of the file's owner.
*
*
* For more information, see Metadata copied
* by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #uid} will return
* {@link Uid#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from {@link #uidAsString}.
*
*
* @return The POSIX user ID (UID) of the file's owner.
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Uid
*/
public final String uidAsString() {
return uid;
}
/**
*
* The POSIX group ID (GID) of the file's owners.
*
*
* For more information, see Metadata copied
* by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #gid} will return
* {@link Gid#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from {@link #gidAsString}.
*
*
* @return The POSIX group ID (GID) of the file's owners.
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Gid
*/
public final Gid gid() {
return Gid.fromValue(gid);
}
/**
*
* The POSIX group ID (GID) of the file's owners.
*
*
* For more information, see Metadata copied
* by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #gid} will return
* {@link Gid#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from {@link #gidAsString}.
*
*
* @return The POSIX group ID (GID) of the file's owners.
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Gid
*/
public final String gidAsString() {
return gid;
}
/**
*
* A value that specifies whether files in the destination that don't exist in the source file system should be
* preserved. This option can affect your storage cost. If your task deletes objects, you might incur minimum
* storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #preserveDeletedFiles} will return {@link PreserveDeletedFiles#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #preserveDeletedFilesAsString}.
*
*
* @return A value that specifies whether files in the destination that don't exist in the source file system should
* be preserved. This option can affect your storage cost. If your task deletes objects, you might incur
* minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
* @see PreserveDeletedFiles
*/
public final PreserveDeletedFiles preserveDeletedFiles() {
return PreserveDeletedFiles.fromValue(preserveDeletedFiles);
}
/**
*
* A value that specifies whether files in the destination that don't exist in the source file system should be
* preserved. This option can affect your storage cost. If your task deletes objects, you might incur minimum
* storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #preserveDeletedFiles} will return {@link PreserveDeletedFiles#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #preserveDeletedFilesAsString}.
*
*
* @return A value that specifies whether files in the destination that don't exist in the source file system should
* be preserved. This option can affect your storage cost. If your task deletes objects, you might incur
* minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
* @see PreserveDeletedFiles
*/
public final String preserveDeletedFilesAsString() {
return preserveDeletedFiles;
}
/**
*
* A value that determines whether DataSync should preserve the metadata of block and character devices in the
* source file system, and re-create the files with that device name and metadata on the destination. DataSync does
* not copy the contents of such devices, only the name and metadata.
*
*
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an
* end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently supported for
* Amazon EFS.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #preserveDevices}
* will return {@link PreserveDevices#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #preserveDevicesAsString}.
*
*
* @return A value that determines whether DataSync should preserve the metadata of block and character devices in
* the source file system, and re-create the files with that device name and metadata on the destination.
* DataSync does not copy the contents of such devices, only the name and metadata.
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an
* end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently
* supported for Amazon EFS.
* @see PreserveDevices
*/
public final PreserveDevices preserveDevices() {
return PreserveDevices.fromValue(preserveDevices);
}
/**
*
* A value that determines whether DataSync should preserve the metadata of block and character devices in the
* source file system, and re-create the files with that device name and metadata on the destination. DataSync does
* not copy the contents of such devices, only the name and metadata.
*
*
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an
* end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently supported for
* Amazon EFS.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #preserveDevices}
* will return {@link PreserveDevices#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #preserveDevicesAsString}.
*
*
* @return A value that determines whether DataSync should preserve the metadata of block and character devices in
* the source file system, and re-create the files with that device name and metadata on the destination.
* DataSync does not copy the contents of such devices, only the name and metadata.
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an
* end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently
* supported for Amazon EFS.
* @see PreserveDevices
*/
public final String preserveDevicesAsString() {
return preserveDevices;
}
/**
*
* A value that determines which users or groups can access a file for a specific purpose such as reading, writing,
* or execution of the file.
*
*
* For more information, see Metadata copied
* by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #posixPermissions}
* will return {@link PosixPermissions#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #posixPermissionsAsString}.
*
*
* @return A value that determines which users or groups can access a file for a specific purpose such as reading,
* writing, or execution of the file.
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
* @see PosixPermissions
*/
public final PosixPermissions posixPermissions() {
return PosixPermissions.fromValue(posixPermissions);
}
/**
*
* A value that determines which users or groups can access a file for a specific purpose such as reading, writing,
* or execution of the file.
*
*
* For more information, see Metadata copied
* by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #posixPermissions}
* will return {@link PosixPermissions#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #posixPermissionsAsString}.
*
*
* @return A value that determines which users or groups can access a file for a specific purpose such as reading,
* writing, or execution of the file.
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
* @see PosixPermissions
*/
public final String posixPermissionsAsString() {
return posixPermissions;
}
/**
*
* A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB,
* set this value to 1048576
(=1024*1024
).
*
*
* @return A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of
* 1 MB, set this value to 1048576
(=1024*1024
).
*/
public final Long bytesPerSecond() {
return bytesPerSecond;
}
/**
*
* A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED
* , the tasks will be queued. The default is ENABLED
.
*
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information,
* see Queueing
* task executions.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #taskQueueing} will
* return {@link TaskQueueing#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #taskQueueingAsString}.
*
*
* @return A value that determines whether tasks should be queued before executing the tasks. If set to
* ENABLED
, the tasks will be queued. The default is ENABLED
.
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more
* information, see Queueing
* task executions.
* @see TaskQueueing
*/
public final TaskQueueing taskQueueing() {
return TaskQueueing.fromValue(taskQueueing);
}
/**
*
* A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED
* , the tasks will be queued. The default is ENABLED
.
*
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information,
* see Queueing
* task executions.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #taskQueueing} will
* return {@link TaskQueueing#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #taskQueueingAsString}.
*
*
* @return A value that determines whether tasks should be queued before executing the tasks. If set to
* ENABLED
, the tasks will be queued. The default is ENABLED
.
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more
* information, see Queueing
* task executions.
* @see TaskQueueing
*/
public final String taskQueueingAsString() {
return taskQueueing;
}
/**
*
* A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log
* group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
publishes logs
* on errors for individual files transferred, and TRANSFER
publishes logs for every file or object
* that is transferred and integrity checked.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #logLevel} will
* return {@link LogLevel#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #logLevelAsString}.
*
*
* @return A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch
* log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
* publishes logs on errors for individual files transferred, and TRANSFER
publishes logs for
* every file or object that is transferred and integrity checked.
* @see LogLevel
*/
public final LogLevel logLevel() {
return LogLevel.fromValue(logLevel);
}
/**
*
* A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log
* group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
publishes logs
* on errors for individual files transferred, and TRANSFER
publishes logs for every file or object
* that is transferred and integrity checked.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #logLevel} will
* return {@link LogLevel#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #logLevelAsString}.
*
*
* @return A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch
* log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
* publishes logs on errors for individual files transferred, and TRANSFER
publishes logs for
* every file or object that is transferred and integrity checked.
* @see LogLevel
*/
public final String logLevelAsString() {
return logLevel;
}
/**
*
* A value that determines whether DataSync transfers only the data and metadata that differ between the source and
* the destination location, or whether DataSync transfers all the content from the source, without comparing to the
* destination location.
*
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the source
* location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to existing
* content on the destination.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #transferMode} will
* return {@link TransferMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #transferModeAsString}.
*
*
* @return A value that determines whether DataSync transfers only the data and metadata that differ between the
* source and the destination location, or whether DataSync transfers all the content from the source,
* without comparing to the destination location.
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the
* source location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to
* existing content on the destination.
* @see TransferMode
*/
public final TransferMode transferMode() {
return TransferMode.fromValue(transferMode);
}
/**
*
* A value that determines whether DataSync transfers only the data and metadata that differ between the source and
* the destination location, or whether DataSync transfers all the content from the source, without comparing to the
* destination location.
*
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the source
* location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to existing
* content on the destination.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #transferMode} will
* return {@link TransferMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #transferModeAsString}.
*
*
* @return A value that determines whether DataSync transfers only the data and metadata that differ between the
* source and the destination location, or whether DataSync transfers all the content from the source,
* without comparing to the destination location.
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the
* source location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to
* existing content on the destination.
* @see TransferMode
*/
public final String transferModeAsString() {
return transferMode;
}
/**
*
* A value that determines which components of the SMB security descriptor are copied from source to destination
* objects.
*
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between
* two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see
* How DataSync Handles Metadata
* and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by
* administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured
* object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB
* location. For information about choosing a user that ensures sufficient permissions to files, folders, and
* metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by
* the user that was provided for accessing the destination location. DACLs and SACLs are set based on the
* destination server’s configuration.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #securityDescriptorCopyFlags} will return {@link SmbSecurityDescriptorCopyFlags#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #securityDescriptorCopyFlagsAsString}.
*
*
* @return A value that determines which components of the SMB security descriptor are copied from source to
* destination objects.
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or
* between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles
* metadata, see How
* DataSync Handles Metadata and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are
* used by administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a
* secured object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access
* your SMB location. For information about choosing a user that ensures sufficient permissions to files,
* folders, and metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are
* owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based
* on the destination server’s configuration.
* @see SmbSecurityDescriptorCopyFlags
*/
public final SmbSecurityDescriptorCopyFlags securityDescriptorCopyFlags() {
return SmbSecurityDescriptorCopyFlags.fromValue(securityDescriptorCopyFlags);
}
/**
*
* A value that determines which components of the SMB security descriptor are copied from source to destination
* objects.
*
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between
* two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see
* How DataSync Handles Metadata
* and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by
* administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured
* object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB
* location. For information about choosing a user that ensures sufficient permissions to files, folders, and
* metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by
* the user that was provided for accessing the destination location. DACLs and SACLs are set based on the
* destination server’s configuration.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #securityDescriptorCopyFlags} will return {@link SmbSecurityDescriptorCopyFlags#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #securityDescriptorCopyFlagsAsString}.
*
*
* @return A value that determines which components of the SMB security descriptor are copied from source to
* destination objects.
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or
* between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles
* metadata, see How
* DataSync Handles Metadata and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are
* used by administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a
* secured object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access
* your SMB location. For information about choosing a user that ensures sufficient permissions to files,
* folders, and metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are
* owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based
* on the destination server’s configuration.
* @see SmbSecurityDescriptorCopyFlags
*/
public final String securityDescriptorCopyFlagsAsString() {
return securityDescriptorCopyFlags;
}
/**
*
* Specifies whether object tags are maintained when transferring between object storage systems. If you want your
* DataSync task to ignore object tags, specify the NONE
value.
*
*
* Default Value: PRESERVE
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #objectTags} will
* return {@link ObjectTags#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #objectTagsAsString}.
*
*
* @return Specifies whether object tags are maintained when transferring between object storage systems. If you
* want your DataSync task to ignore object tags, specify the NONE
value.
*
* Default Value: PRESERVE
* @see ObjectTags
*/
public final ObjectTags objectTags() {
return ObjectTags.fromValue(objectTags);
}
/**
*
* Specifies whether object tags are maintained when transferring between object storage systems. If you want your
* DataSync task to ignore object tags, specify the NONE
value.
*
*
* Default Value: PRESERVE
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #objectTags} will
* return {@link ObjectTags#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #objectTagsAsString}.
*
*
* @return Specifies whether object tags are maintained when transferring between object storage systems. If you
* want your DataSync task to ignore object tags, specify the NONE
value.
*
* Default Value: PRESERVE
* @see ObjectTags
*/
public final String objectTagsAsString() {
return objectTags;
}
@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(verifyModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(overwriteModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(atimeAsString());
hashCode = 31 * hashCode + Objects.hashCode(mtimeAsString());
hashCode = 31 * hashCode + Objects.hashCode(uidAsString());
hashCode = 31 * hashCode + Objects.hashCode(gidAsString());
hashCode = 31 * hashCode + Objects.hashCode(preserveDeletedFilesAsString());
hashCode = 31 * hashCode + Objects.hashCode(preserveDevicesAsString());
hashCode = 31 * hashCode + Objects.hashCode(posixPermissionsAsString());
hashCode = 31 * hashCode + Objects.hashCode(bytesPerSecond());
hashCode = 31 * hashCode + Objects.hashCode(taskQueueingAsString());
hashCode = 31 * hashCode + Objects.hashCode(logLevelAsString());
hashCode = 31 * hashCode + Objects.hashCode(transferModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(securityDescriptorCopyFlagsAsString());
hashCode = 31 * hashCode + Objects.hashCode(objectTagsAsString());
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 Options)) {
return false;
}
Options other = (Options) obj;
return Objects.equals(verifyModeAsString(), other.verifyModeAsString())
&& Objects.equals(overwriteModeAsString(), other.overwriteModeAsString())
&& Objects.equals(atimeAsString(), other.atimeAsString())
&& Objects.equals(mtimeAsString(), other.mtimeAsString()) && Objects.equals(uidAsString(), other.uidAsString())
&& Objects.equals(gidAsString(), other.gidAsString())
&& Objects.equals(preserveDeletedFilesAsString(), other.preserveDeletedFilesAsString())
&& Objects.equals(preserveDevicesAsString(), other.preserveDevicesAsString())
&& Objects.equals(posixPermissionsAsString(), other.posixPermissionsAsString())
&& Objects.equals(bytesPerSecond(), other.bytesPerSecond())
&& Objects.equals(taskQueueingAsString(), other.taskQueueingAsString())
&& Objects.equals(logLevelAsString(), other.logLevelAsString())
&& Objects.equals(transferModeAsString(), other.transferModeAsString())
&& Objects.equals(securityDescriptorCopyFlagsAsString(), other.securityDescriptorCopyFlagsAsString())
&& Objects.equals(objectTagsAsString(), other.objectTagsAsString());
}
/**
* 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("Options").add("VerifyMode", verifyModeAsString()).add("OverwriteMode", overwriteModeAsString())
.add("Atime", atimeAsString()).add("Mtime", mtimeAsString()).add("Uid", uidAsString()).add("Gid", gidAsString())
.add("PreserveDeletedFiles", preserveDeletedFilesAsString()).add("PreserveDevices", preserveDevicesAsString())
.add("PosixPermissions", posixPermissionsAsString()).add("BytesPerSecond", bytesPerSecond())
.add("TaskQueueing", taskQueueingAsString()).add("LogLevel", logLevelAsString())
.add("TransferMode", transferModeAsString())
.add("SecurityDescriptorCopyFlags", securityDescriptorCopyFlagsAsString())
.add("ObjectTags", objectTagsAsString()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "VerifyMode":
return Optional.ofNullable(clazz.cast(verifyModeAsString()));
case "OverwriteMode":
return Optional.ofNullable(clazz.cast(overwriteModeAsString()));
case "Atime":
return Optional.ofNullable(clazz.cast(atimeAsString()));
case "Mtime":
return Optional.ofNullable(clazz.cast(mtimeAsString()));
case "Uid":
return Optional.ofNullable(clazz.cast(uidAsString()));
case "Gid":
return Optional.ofNullable(clazz.cast(gidAsString()));
case "PreserveDeletedFiles":
return Optional.ofNullable(clazz.cast(preserveDeletedFilesAsString()));
case "PreserveDevices":
return Optional.ofNullable(clazz.cast(preserveDevicesAsString()));
case "PosixPermissions":
return Optional.ofNullable(clazz.cast(posixPermissionsAsString()));
case "BytesPerSecond":
return Optional.ofNullable(clazz.cast(bytesPerSecond()));
case "TaskQueueing":
return Optional.ofNullable(clazz.cast(taskQueueingAsString()));
case "LogLevel":
return Optional.ofNullable(clazz.cast(logLevelAsString()));
case "TransferMode":
return Optional.ofNullable(clazz.cast(transferModeAsString()));
case "SecurityDescriptorCopyFlags":
return Optional.ofNullable(clazz.cast(securityDescriptorCopyFlagsAsString()));
case "ObjectTags":
return Optional.ofNullable(clazz.cast(objectTagsAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were
* transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the
* transfer to verify that source and destination are fully synchronized. This option isn't supported
* when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data
* transmissions are integrity-checked with checksum verification during the transfer.
* @see VerifyMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see VerifyMode
*/
Builder verifyMode(String verifyMode);
/**
*
* A value that determines whether a data integrity verification should be performed at the end of a task
* execution after all data and metadata have been transferred. For more information, see Configure task settings.
*
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the
* transfer to verify that source and destination are fully synchronized. This option isn't supported when
* transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data transmissions
* are integrity-checked with checksum verification during the transfer.
*
*
* @param verifyMode
* A value that determines whether a data integrity verification should be performed at the end of a task
* execution after all data and metadata have been transferred. For more information, see Configure task
* settings.
*
* Default value: POINT_IN_TIME_CONSISTENT
*
*
* ONLY_FILES_TRANSFERRED
(recommended): Perform verification only on files that were
* transferred.
*
*
* POINT_IN_TIME_CONSISTENT
: Scan the entire source and entire destination at the end of the
* transfer to verify that source and destination are fully synchronized. This option isn't supported
* when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
*
*
* NONE
: No additional verification is done at the end of the transfer, but all data
* transmissions are integrity-checked with checksum verification during the transfer.
* @see VerifyMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see VerifyMode
*/
Builder verifyMode(VerifyMode verifyMode);
/**
*
* A value that determines whether files at the destination should be overwritten or preserved when copying
* files. If set to NEVER
a destination file will not be replaced by a source file, even if the
* destination file differs from the source file. If you modify files in the destination and you sync the files,
* you can use this value to protect against overwriting those changes.
*
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information,
* see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
*
* @param overwriteMode
* A value that determines whether files at the destination should be overwritten or preserved when
* copying files. If set to NEVER
a destination file will not be replaced by a source file,
* even if the destination file differs from the source file. If you modify files in the destination and
* you sync the files, you can use this value to protect against overwriting those changes.
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed
* information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
* @see OverwriteMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see OverwriteMode
*/
Builder overwriteMode(String overwriteMode);
/**
*
* A value that determines whether files at the destination should be overwritten or preserved when copying
* files. If set to NEVER
a destination file will not be replaced by a source file, even if the
* destination file differs from the source file. If you modify files in the destination and you sync the files,
* you can use this value to protect against overwriting those changes.
*
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information,
* see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
*
* @param overwriteMode
* A value that determines whether files at the destination should be overwritten or preserved when
* copying files. If set to NEVER
a destination file will not be replaced by a source file,
* even if the destination file differs from the source file. If you modify files in the destination and
* you sync the files, you can use this value to protect against overwriting those changes.
*
* Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed
* information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
* @see OverwriteMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see OverwriteMode
*/
Builder overwriteMode(OverwriteMode overwriteMode);
/**
*
* A file metadata value that shows the last time a file was accessed (that is, when the file was read or
* written to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the
* original Atime
attribute on all source files (that is, the version before the
* PREPARING
phase). However, Atime
's behavior is not fully standard across platforms,
* so DataSync can only do this on a best-effort basis.
*
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to
* PRESERVE
.
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
*
*
* @param atime
* A file metadata value that shows the last time a file was accessed (that is, when the file was read or
* written to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve
* the original Atime
attribute on all source files (that is, the version before the
* PREPARING
phase). However, Atime
's behavior is not fully standard across
* platforms, so DataSync can only do this on a best-effort basis.
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to
* PRESERVE
.
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
* @see Atime
* @return Returns a reference to this object so that method calls can be chained together.
* @see Atime
*/
Builder atime(String atime);
/**
*
* A file metadata value that shows the last time a file was accessed (that is, when the file was read or
* written to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the
* original Atime
attribute on all source files (that is, the version before the
* PREPARING
phase). However, Atime
's behavior is not fully standard across platforms,
* so DataSync can only do this on a best-effort basis.
*
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to
* PRESERVE
.
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
*
*
* @param atime
* A file metadata value that shows the last time a file was accessed (that is, when the file was read or
* written to). If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve
* the original Atime
attribute on all source files (that is, the version before the
* PREPARING
phase). However, Atime
's behavior is not fully standard across
* platforms, so DataSync can only do this on a best-effort basis.
*
* Default value: BEST_EFFORT
*
*
* BEST_EFFORT
: Attempt to preserve the per-file Atime
value (recommended).
*
*
* NONE
: Ignore Atime
.
*
*
*
* If Atime
is set to BEST_EFFORT
, Mtime
must be set to
* PRESERVE
.
*
*
* If Atime
is set to NONE
, Mtime
must also be NONE
.
*
* @see Atime
* @return Returns a reference to this object so that method calls can be chained together.
* @see Atime
*/
Builder atime(Atime atime);
/**
*
* A value that indicates the last time that a file was modified (that is, a file was written to) before the
* PREPARING
phase. This option is required for cases when you need to run the same task more than
* one time.
*
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to
* BEST_EFFORT
.
*
*
* If Mtime
is set to NONE
, Atime
must also be set to NONE
.
*
*
*
* @param mtime
* A value that indicates the last time that a file was modified (that is, a file was written to) before
* the PREPARING
phase. This option is required for cases when you need to run the same task
* more than one time.
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to
* BEST_EFFORT
.
*
*
* If Mtime
is set to NONE
, Atime
must also be set to
* NONE
.
*
* @see Mtime
* @return Returns a reference to this object so that method calls can be chained together.
* @see Mtime
*/
Builder mtime(String mtime);
/**
*
* A value that indicates the last time that a file was modified (that is, a file was written to) before the
* PREPARING
phase. This option is required for cases when you need to run the same task more than
* one time.
*
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to
* BEST_EFFORT
.
*
*
* If Mtime
is set to NONE
, Atime
must also be set to NONE
.
*
*
*
* @param mtime
* A value that indicates the last time that a file was modified (that is, a file was written to) before
* the PREPARING
phase. This option is required for cases when you need to run the same task
* more than one time.
*
* Default Value: PRESERVE
*
*
* PRESERVE
: Preserve original Mtime
(recommended)
*
*
* NONE
: Ignore Mtime
.
*
*
*
* If Mtime
is set to PRESERVE
, Atime
must be set to
* BEST_EFFORT
.
*
*
* If Mtime
is set to NONE
, Atime
must also be set to
* NONE
.
*
* @see Mtime
* @return Returns a reference to this object so that method calls can be chained together.
* @see Mtime
*/
Builder mtime(Mtime mtime);
/**
*
* The POSIX user ID (UID) of the file's owner.
*
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* @param uid
* The POSIX user ID (UID) of the file's owner.
*
* For more information, see Metadata copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Uid
* @return Returns a reference to this object so that method calls can be chained together.
* @see Uid
*/
Builder uid(String uid);
/**
*
* The POSIX user ID (UID) of the file's owner.
*
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* @param uid
* The POSIX user ID (UID) of the file's owner.
*
* For more information, see Metadata copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Uid
* @return Returns a reference to this object so that method calls can be chained together.
* @see Uid
*/
Builder uid(Uid uid);
/**
*
* The POSIX group ID (GID) of the file's owners.
*
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* @param gid
* The POSIX group ID (GID) of the file's owners.
*
* For more information, see Metadata copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Gid
* @return Returns a reference to this object so that method calls can be chained together.
* @see Gid
*/
Builder gid(String gid);
/**
*
* The POSIX group ID (GID) of the file's owners.
*
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
*
*
* @param gid
* The POSIX group ID (GID) of the file's owners.
*
* For more information, see Metadata copied by DataSync.
*
*
* Default value: INT_VALUE
. This preserves the integer value of the ID.
*
*
* INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
*
*
* NONE
: Ignore UID and GID.
* @see Gid
* @return Returns a reference to this object so that method calls can be chained together.
* @see Gid
*/
Builder gid(Gid gid);
/**
*
* A value that specifies whether files in the destination that don't exist in the source file system should be
* preserved. This option can affect your storage cost. If your task deletes objects, you might incur minimum
* storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
*
*
* @param preserveDeletedFiles
* A value that specifies whether files in the destination that don't exist in the source file system
* should be preserved. This option can affect your storage cost. If your task deletes objects, you might
* incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
* @see PreserveDeletedFiles
* @return Returns a reference to this object so that method calls can be chained together.
* @see PreserveDeletedFiles
*/
Builder preserveDeletedFiles(String preserveDeletedFiles);
/**
*
* A value that specifies whether files in the destination that don't exist in the source file system should be
* preserved. This option can affect your storage cost. If your task deletes objects, you might incur minimum
* storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
*
*
* @param preserveDeletedFiles
* A value that specifies whether files in the destination that don't exist in the source file system
* should be preserved. This option can affect your storage cost. If your task deletes objects, you might
* incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User
* Guide.
*
* Default value: PRESERVE
*
*
* PRESERVE
: Ignore such destination files (recommended).
*
*
* REMOVE
: Delete destination files that aren’t present in the source.
* @see PreserveDeletedFiles
* @return Returns a reference to this object so that method calls can be chained together.
* @see PreserveDeletedFiles
*/
Builder preserveDeletedFiles(PreserveDeletedFiles preserveDeletedFiles);
/**
*
* A value that determines whether DataSync should preserve the metadata of block and character devices in the
* source file system, and re-create the files with that device name and metadata on the destination. DataSync
* does not copy the contents of such devices, only the name and metadata.
*
*
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an
* end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently supported
* for Amazon EFS.
*
*
* @param preserveDevices
* A value that determines whether DataSync should preserve the metadata of block and character devices
* in the source file system, and re-create the files with that device name and metadata on the
* destination. DataSync does not copy the contents of such devices, only the name and metadata.
*
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return
* an end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently
* supported for Amazon EFS.
* @see PreserveDevices
* @return Returns a reference to this object so that method calls can be chained together.
* @see PreserveDevices
*/
Builder preserveDevices(String preserveDevices);
/**
*
* A value that determines whether DataSync should preserve the metadata of block and character devices in the
* source file system, and re-create the files with that device name and metadata on the destination. DataSync
* does not copy the contents of such devices, only the name and metadata.
*
*
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an
* end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently supported
* for Amazon EFS.
*
*
* @param preserveDevices
* A value that determines whether DataSync should preserve the metadata of block and character devices
* in the source file system, and re-create the files with that device name and metadata on the
* destination. DataSync does not copy the contents of such devices, only the name and metadata.
*
*
* DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return
* an end-of-file (EOF) marker.
*
*
*
* Default value: NONE
*
*
* NONE
: Ignore special devices (recommended).
*
*
* PRESERVE
: Preserve character and block device metadata. This option isn't currently
* supported for Amazon EFS.
* @see PreserveDevices
* @return Returns a reference to this object so that method calls can be chained together.
* @see PreserveDevices
*/
Builder preserveDevices(PreserveDevices preserveDevices);
/**
*
* A value that determines which users or groups can access a file for a specific purpose such as reading,
* writing, or execution of the file.
*
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
*
*
* @param posixPermissions
* A value that determines which users or groups can access a file for a specific purpose such as
* reading, writing, or execution of the file.
*
* For more information, see Metadata copied by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
* @see PosixPermissions
* @return Returns a reference to this object so that method calls can be chained together.
* @see PosixPermissions
*/
Builder posixPermissions(String posixPermissions);
/**
*
* A value that determines which users or groups can access a file for a specific purpose such as reading,
* writing, or execution of the file.
*
*
* For more information, see Metadata
* copied by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
*
*
* @param posixPermissions
* A value that determines which users or groups can access a file for a specific purpose such as
* reading, writing, or execution of the file.
*
* For more information, see Metadata copied by DataSync.
*
*
* Default value: PRESERVE
*
*
* PRESERVE
: Preserve POSIX-style permissions (recommended).
*
*
* NONE
: Ignore permissions.
*
*
*
* DataSync can preserve extant permissions of a source location.
*
* @see PosixPermissions
* @return Returns a reference to this object so that method calls can be chained together.
* @see PosixPermissions
*/
Builder posixPermissions(PosixPermissions posixPermissions);
/**
*
* A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1
* MB, set this value to 1048576
(=1024*1024
).
*
*
* @param bytesPerSecond
* A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum
* of 1 MB, set this value to 1048576
(=1024*1024
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder bytesPerSecond(Long bytesPerSecond);
/**
*
* A value that determines whether tasks should be queued before executing the tasks. If set to
* ENABLED
, the tasks will be queued. The default is ENABLED
.
*
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more
* information, see Queueing task
* executions.
*
*
* @param taskQueueing
* A value that determines whether tasks should be queued before executing the tasks. If set to
* ENABLED
, the tasks will be queued. The default is ENABLED
.
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more
* information, see Queueing task executions.
* @see TaskQueueing
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskQueueing
*/
Builder taskQueueing(String taskQueueing);
/**
*
* A value that determines whether tasks should be queued before executing the tasks. If set to
* ENABLED
, the tasks will be queued. The default is ENABLED
.
*
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more
* information, see Queueing task
* executions.
*
*
* @param taskQueueing
* A value that determines whether tasks should be queued before executing the tasks. If set to
* ENABLED
, the tasks will be queued. The default is ENABLED
.
*
* If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more
* information, see Queueing task executions.
* @see TaskQueueing
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskQueueing
*/
Builder taskQueueing(TaskQueueing taskQueueing);
/**
*
* A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log
* group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
publishes
* logs on errors for individual files transferred, and TRANSFER
publishes logs for every file or
* object that is transferred and integrity checked.
*
*
* @param logLevel
* A value that determines the type of logs that DataSync publishes to a log stream in the Amazon
* CloudWatch log group that you provide. For more information about providing a log group for DataSync,
* see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
* publishes logs on errors for individual files transferred, and TRANSFER
publishes logs
* for every file or object that is transferred and integrity checked.
* @see LogLevel
* @return Returns a reference to this object so that method calls can be chained together.
* @see LogLevel
*/
Builder logLevel(String logLevel);
/**
*
* A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log
* group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
publishes
* logs on errors for individual files transferred, and TRANSFER
publishes logs for every file or
* object that is transferred and integrity checked.
*
*
* @param logLevel
* A value that determines the type of logs that DataSync publishes to a log stream in the Amazon
* CloudWatch log group that you provide. For more information about providing a log group for DataSync,
* see CloudWatchLogGroupArn. If set to OFF
, no logs are published. BASIC
* publishes logs on errors for individual files transferred, and TRANSFER
publishes logs
* for every file or object that is transferred and integrity checked.
* @see LogLevel
* @return Returns a reference to this object so that method calls can be chained together.
* @see LogLevel
*/
Builder logLevel(LogLevel logLevel);
/**
*
* A value that determines whether DataSync transfers only the data and metadata that differ between the source
* and the destination location, or whether DataSync transfers all the content from the source, without
* comparing to the destination location.
*
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the source
* location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to
* existing content on the destination.
*
*
* @param transferMode
* A value that determines whether DataSync transfers only the data and metadata that differ between the
* source and the destination location, or whether DataSync transfers all the content from the source,
* without comparing to the destination location.
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the
* source location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to
* existing content on the destination.
* @see TransferMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see TransferMode
*/
Builder transferMode(String transferMode);
/**
*
* A value that determines whether DataSync transfers only the data and metadata that differ between the source
* and the destination location, or whether DataSync transfers all the content from the source, without
* comparing to the destination location.
*
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the source
* location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to
* existing content on the destination.
*
*
* @param transferMode
* A value that determines whether DataSync transfers only the data and metadata that differ between the
* source and the destination location, or whether DataSync transfers all the content from the source,
* without comparing to the destination location.
*
* CHANGED
: DataSync copies only data or metadata that is new or different content from the
* source location to the destination location.
*
*
* ALL
: DataSync copies all source location content to the destination, without comparing to
* existing content on the destination.
* @see TransferMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see TransferMode
*/
Builder transferMode(TransferMode transferMode);
/**
*
* A value that determines which components of the SMB security descriptor are copied from source to destination
* objects.
*
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or
* between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles
* metadata, see How DataSync
* Handles Metadata and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are
* used by administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a
* secured object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your
* SMB location. For information about choosing a user that ensures sufficient permissions to files, folders,
* and metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are owned
* by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the
* destination server’s configuration.
*
*
* @param securityDescriptorCopyFlags
* A value that determines which components of the SMB security descriptor are copied from source to
* destination objects.
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or
* between two Amazon FSx for Windows File Server locations. For more information about how DataSync
* handles metadata, see How DataSync Handles
* Metadata and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which
* are used by administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a
* secured object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to
* access your SMB location. For information about choosing a user that ensures sufficient permissions to
* files, folders, and metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are
* owned by the user that was provided for accessing the destination location. DACLs and SACLs are set
* based on the destination server’s configuration.
* @see SmbSecurityDescriptorCopyFlags
* @return Returns a reference to this object so that method calls can be chained together.
* @see SmbSecurityDescriptorCopyFlags
*/
Builder securityDescriptorCopyFlags(String securityDescriptorCopyFlags);
/**
*
* A value that determines which components of the SMB security descriptor are copied from source to destination
* objects.
*
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or
* between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles
* metadata, see How DataSync
* Handles Metadata and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are
* used by administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a
* secured object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your
* SMB location. For information about choosing a user that ensures sufficient permissions to files, folders,
* and metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are owned
* by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the
* destination server’s configuration.
*
*
* @param securityDescriptorCopyFlags
* A value that determines which components of the SMB security descriptor are copied from source to
* destination objects.
*
* This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or
* between two Amazon FSx for Windows File Server locations. For more information about how DataSync
* handles metadata, see How DataSync Handles
* Metadata and Special Files.
*
*
* Default value: OWNER_DACL
*
*
* OWNER_DACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
*
*
* When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which
* are used by administrators to log attempts to access a secured object.
*
*
* OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
*
*
* -
*
* Object owner.
*
*
* -
*
* NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
*
*
* -
*
* NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a
* secured object.
*
*
*
*
* Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to
* access your SMB location. For information about choosing a user that ensures sufficient permissions to
* files, folders, and metadata, see user.
*
*
* NONE
: None of the SMB security descriptor components are copied. Destination objects are
* owned by the user that was provided for accessing the destination location. DACLs and SACLs are set
* based on the destination server’s configuration.
* @see SmbSecurityDescriptorCopyFlags
* @return Returns a reference to this object so that method calls can be chained together.
* @see SmbSecurityDescriptorCopyFlags
*/
Builder securityDescriptorCopyFlags(SmbSecurityDescriptorCopyFlags securityDescriptorCopyFlags);
/**
*
* Specifies whether object tags are maintained when transferring between object storage systems. If you want
* your DataSync task to ignore object tags, specify the NONE
value.
*
*
* Default Value: PRESERVE
*
*
* @param objectTags
* Specifies whether object tags are maintained when transferring between object storage systems. If you
* want your DataSync task to ignore object tags, specify the NONE
value.
*
* Default Value: PRESERVE
* @see ObjectTags
* @return Returns a reference to this object so that method calls can be chained together.
* @see ObjectTags
*/
Builder objectTags(String objectTags);
/**
*
* Specifies whether object tags are maintained when transferring between object storage systems. If you want
* your DataSync task to ignore object tags, specify the NONE
value.
*
*
* Default Value: PRESERVE
*
*
* @param objectTags
* Specifies whether object tags are maintained when transferring between object storage systems. If you
* want your DataSync task to ignore object tags, specify the NONE
value.
*
* Default Value: PRESERVE
* @see ObjectTags
* @return Returns a reference to this object so that method calls can be chained together.
* @see ObjectTags
*/
Builder objectTags(ObjectTags objectTags);
}
static final class BuilderImpl implements Builder {
private String verifyMode;
private String overwriteMode;
private String atime;
private String mtime;
private String uid;
private String gid;
private String preserveDeletedFiles;
private String preserveDevices;
private String posixPermissions;
private Long bytesPerSecond;
private String taskQueueing;
private String logLevel;
private String transferMode;
private String securityDescriptorCopyFlags;
private String objectTags;
private BuilderImpl() {
}
private BuilderImpl(Options model) {
verifyMode(model.verifyMode);
overwriteMode(model.overwriteMode);
atime(model.atime);
mtime(model.mtime);
uid(model.uid);
gid(model.gid);
preserveDeletedFiles(model.preserveDeletedFiles);
preserveDevices(model.preserveDevices);
posixPermissions(model.posixPermissions);
bytesPerSecond(model.bytesPerSecond);
taskQueueing(model.taskQueueing);
logLevel(model.logLevel);
transferMode(model.transferMode);
securityDescriptorCopyFlags(model.securityDescriptorCopyFlags);
objectTags(model.objectTags);
}
public final String getVerifyMode() {
return verifyMode;
}
public final void setVerifyMode(String verifyMode) {
this.verifyMode = verifyMode;
}
@Override
public final Builder verifyMode(String verifyMode) {
this.verifyMode = verifyMode;
return this;
}
@Override
public final Builder verifyMode(VerifyMode verifyMode) {
this.verifyMode(verifyMode == null ? null : verifyMode.toString());
return this;
}
public final String getOverwriteMode() {
return overwriteMode;
}
public final void setOverwriteMode(String overwriteMode) {
this.overwriteMode = overwriteMode;
}
@Override
public final Builder overwriteMode(String overwriteMode) {
this.overwriteMode = overwriteMode;
return this;
}
@Override
public final Builder overwriteMode(OverwriteMode overwriteMode) {
this.overwriteMode(overwriteMode == null ? null : overwriteMode.toString());
return this;
}
public final String getAtime() {
return atime;
}
public final void setAtime(String atime) {
this.atime = atime;
}
@Override
public final Builder atime(String atime) {
this.atime = atime;
return this;
}
@Override
public final Builder atime(Atime atime) {
this.atime(atime == null ? null : atime.toString());
return this;
}
public final String getMtime() {
return mtime;
}
public final void setMtime(String mtime) {
this.mtime = mtime;
}
@Override
public final Builder mtime(String mtime) {
this.mtime = mtime;
return this;
}
@Override
public final Builder mtime(Mtime mtime) {
this.mtime(mtime == null ? null : mtime.toString());
return this;
}
public final String getUid() {
return uid;
}
public final void setUid(String uid) {
this.uid = uid;
}
@Override
public final Builder uid(String uid) {
this.uid = uid;
return this;
}
@Override
public final Builder uid(Uid uid) {
this.uid(uid == null ? null : uid.toString());
return this;
}
public final String getGid() {
return gid;
}
public final void setGid(String gid) {
this.gid = gid;
}
@Override
public final Builder gid(String gid) {
this.gid = gid;
return this;
}
@Override
public final Builder gid(Gid gid) {
this.gid(gid == null ? null : gid.toString());
return this;
}
public final String getPreserveDeletedFiles() {
return preserveDeletedFiles;
}
public final void setPreserveDeletedFiles(String preserveDeletedFiles) {
this.preserveDeletedFiles = preserveDeletedFiles;
}
@Override
public final Builder preserveDeletedFiles(String preserveDeletedFiles) {
this.preserveDeletedFiles = preserveDeletedFiles;
return this;
}
@Override
public final Builder preserveDeletedFiles(PreserveDeletedFiles preserveDeletedFiles) {
this.preserveDeletedFiles(preserveDeletedFiles == null ? null : preserveDeletedFiles.toString());
return this;
}
public final String getPreserveDevices() {
return preserveDevices;
}
public final void setPreserveDevices(String preserveDevices) {
this.preserveDevices = preserveDevices;
}
@Override
public final Builder preserveDevices(String preserveDevices) {
this.preserveDevices = preserveDevices;
return this;
}
@Override
public final Builder preserveDevices(PreserveDevices preserveDevices) {
this.preserveDevices(preserveDevices == null ? null : preserveDevices.toString());
return this;
}
public final String getPosixPermissions() {
return posixPermissions;
}
public final void setPosixPermissions(String posixPermissions) {
this.posixPermissions = posixPermissions;
}
@Override
public final Builder posixPermissions(String posixPermissions) {
this.posixPermissions = posixPermissions;
return this;
}
@Override
public final Builder posixPermissions(PosixPermissions posixPermissions) {
this.posixPermissions(posixPermissions == null ? null : posixPermissions.toString());
return this;
}
public final Long getBytesPerSecond() {
return bytesPerSecond;
}
public final void setBytesPerSecond(Long bytesPerSecond) {
this.bytesPerSecond = bytesPerSecond;
}
@Override
public final Builder bytesPerSecond(Long bytesPerSecond) {
this.bytesPerSecond = bytesPerSecond;
return this;
}
public final String getTaskQueueing() {
return taskQueueing;
}
public final void setTaskQueueing(String taskQueueing) {
this.taskQueueing = taskQueueing;
}
@Override
public final Builder taskQueueing(String taskQueueing) {
this.taskQueueing = taskQueueing;
return this;
}
@Override
public final Builder taskQueueing(TaskQueueing taskQueueing) {
this.taskQueueing(taskQueueing == null ? null : taskQueueing.toString());
return this;
}
public final String getLogLevel() {
return logLevel;
}
public final void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
@Override
public final Builder logLevel(String logLevel) {
this.logLevel = logLevel;
return this;
}
@Override
public final Builder logLevel(LogLevel logLevel) {
this.logLevel(logLevel == null ? null : logLevel.toString());
return this;
}
public final String getTransferMode() {
return transferMode;
}
public final void setTransferMode(String transferMode) {
this.transferMode = transferMode;
}
@Override
public final Builder transferMode(String transferMode) {
this.transferMode = transferMode;
return this;
}
@Override
public final Builder transferMode(TransferMode transferMode) {
this.transferMode(transferMode == null ? null : transferMode.toString());
return this;
}
public final String getSecurityDescriptorCopyFlags() {
return securityDescriptorCopyFlags;
}
public final void setSecurityDescriptorCopyFlags(String securityDescriptorCopyFlags) {
this.securityDescriptorCopyFlags = securityDescriptorCopyFlags;
}
@Override
public final Builder securityDescriptorCopyFlags(String securityDescriptorCopyFlags) {
this.securityDescriptorCopyFlags = securityDescriptorCopyFlags;
return this;
}
@Override
public final Builder securityDescriptorCopyFlags(SmbSecurityDescriptorCopyFlags securityDescriptorCopyFlags) {
this.securityDescriptorCopyFlags(securityDescriptorCopyFlags == null ? null : securityDescriptorCopyFlags.toString());
return this;
}
public final String getObjectTags() {
return objectTags;
}
public final void setObjectTags(String objectTags) {
this.objectTags = objectTags;
}
@Override
public final Builder objectTags(String objectTags) {
this.objectTags = objectTags;
return this;
}
@Override
public final Builder objectTags(ObjectTags objectTags) {
this.objectTags(objectTags == null ? null : objectTags.toString());
return this;
}
@Override
public Options build() {
return new Options(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}