software.amazon.awssdk.services.fsx.model.CreateSnaplockConfiguration Maven / Gradle / Ivy
Show all versions of fsx Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.fsx.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Defines the SnapLock configuration when creating an FSx for ONTAP SnapLock volume.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateSnaplockConfiguration implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField AUDIT_LOG_VOLUME_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("AuditLogVolume").getter(getter(CreateSnaplockConfiguration::auditLogVolume))
.setter(setter(Builder::auditLogVolume))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AuditLogVolume").build()).build();
private static final SdkField AUTOCOMMIT_PERIOD_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AutocommitPeriod")
.getter(getter(CreateSnaplockConfiguration::autocommitPeriod)).setter(setter(Builder::autocommitPeriod))
.constructor(AutocommitPeriod::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutocommitPeriod").build()).build();
private static final SdkField PRIVILEGED_DELETE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PrivilegedDelete").getter(getter(CreateSnaplockConfiguration::privilegedDeleteAsString))
.setter(setter(Builder::privilegedDelete))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PrivilegedDelete").build()).build();
private static final SdkField RETENTION_PERIOD_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RetentionPeriod")
.getter(getter(CreateSnaplockConfiguration::retentionPeriod)).setter(setter(Builder::retentionPeriod))
.constructor(SnaplockRetentionPeriod::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RetentionPeriod").build()).build();
private static final SdkField SNAPLOCK_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SnaplockType").getter(getter(CreateSnaplockConfiguration::snaplockTypeAsString))
.setter(setter(Builder::snaplockType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnaplockType").build()).build();
private static final SdkField VOLUME_APPEND_MODE_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("VolumeAppendModeEnabled").getter(getter(CreateSnaplockConfiguration::volumeAppendModeEnabled))
.setter(setter(Builder::volumeAppendModeEnabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VolumeAppendModeEnabled").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AUDIT_LOG_VOLUME_FIELD,
AUTOCOMMIT_PERIOD_FIELD, PRIVILEGED_DELETE_FIELD, RETENTION_PERIOD_FIELD, SNAPLOCK_TYPE_FIELD,
VOLUME_APPEND_MODE_ENABLED_FIELD));
private static final long serialVersionUID = 1L;
private final Boolean auditLogVolume;
private final AutocommitPeriod autocommitPeriod;
private final String privilegedDelete;
private final SnaplockRetentionPeriod retentionPeriod;
private final String snaplockType;
private final Boolean volumeAppendModeEnabled;
private CreateSnaplockConfiguration(BuilderImpl builder) {
this.auditLogVolume = builder.auditLogVolume;
this.autocommitPeriod = builder.autocommitPeriod;
this.privilegedDelete = builder.privilegedDelete;
this.retentionPeriod = builder.retentionPeriod;
this.snaplockType = builder.snaplockType;
this.volumeAppendModeEnabled = builder.volumeAppendModeEnabled;
}
/**
*
* Enables or disables the audit log volume for an FSx for ONTAP SnapLock volume. The default value is
* false
. If you set AuditLogVolume
to true
, the SnapLock volume is created
* as an audit log volume. The minimum retention period for an audit log volume is six months.
*
*
* For more information, see
* SnapLock audit log volumes.
*
*
* @return Enables or disables the audit log volume for an FSx for ONTAP SnapLock volume. The default value is
* false
. If you set AuditLogVolume
to true
, the SnapLock volume is
* created as an audit log volume. The minimum retention period for an audit log volume is six months.
*
* For more information, see
* SnapLock audit log volumes.
*/
public final Boolean auditLogVolume() {
return auditLogVolume;
}
/**
*
* The configuration object for setting the autocommit period of files in an FSx for ONTAP SnapLock volume.
*
*
* @return The configuration object for setting the autocommit period of files in an FSx for ONTAP SnapLock volume.
*/
public final AutocommitPeriod autocommitPeriod() {
return autocommitPeriod;
}
/**
*
* Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise volume.
* Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have active retention
* periods. PERMANENTLY_DISABLED
is a terminal state. If privileged delete is permanently disabled on a
* SnapLock volume, you can't re-enable it. The default value is DISABLED
.
*
*
* For more information, see Privileged
* delete.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #privilegedDelete}
* will return {@link PrivilegedDelete#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #privilegedDeleteAsString}.
*
*
* @return Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise
* volume. Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have
* active retention periods. PERMANENTLY_DISABLED
is a terminal state. If privileged delete is
* permanently disabled on a SnapLock volume, you can't re-enable it. The default value is
* DISABLED
.
*
* For more information, see Privileged delete.
* @see PrivilegedDelete
*/
public final PrivilegedDelete privilegedDelete() {
return PrivilegedDelete.fromValue(privilegedDelete);
}
/**
*
* Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise volume.
* Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have active retention
* periods. PERMANENTLY_DISABLED
is a terminal state. If privileged delete is permanently disabled on a
* SnapLock volume, you can't re-enable it. The default value is DISABLED
.
*
*
* For more information, see Privileged
* delete.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #privilegedDelete}
* will return {@link PrivilegedDelete#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #privilegedDeleteAsString}.
*
*
* @return Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise
* volume. Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have
* active retention periods. PERMANENTLY_DISABLED
is a terminal state. If privileged delete is
* permanently disabled on a SnapLock volume, you can't re-enable it. The default value is
* DISABLED
.
*
* For more information, see Privileged delete.
* @see PrivilegedDelete
*/
public final String privilegedDeleteAsString() {
return privilegedDelete;
}
/**
*
* Specifies the retention period of an FSx for ONTAP SnapLock volume.
*
*
* @return Specifies the retention period of an FSx for ONTAP SnapLock volume.
*/
public final SnaplockRetentionPeriod retentionPeriod() {
return retentionPeriod;
}
/**
*
* Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed. You can
* choose one of the following retention modes:
*
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume can't be
* deleted until their retention periods expire. This retention mode is used to address government or
* industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by authorized users
* before their retention periods expire using privileged delete. This retention mode is used to advance an
* organization's data integrity and internal compliance or to test retention settings before using SnapLock
* Compliance. For more information, see SnapLock Enterprise.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #snaplockType} will
* return {@link SnaplockType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #snaplockTypeAsString}.
*
*
* @return Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed.
* You can choose one of the following retention modes:
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume can't
* be deleted until their retention periods expire. This retention mode is used to address government or
* industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock
* Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by authorized
* users before their retention periods expire using privileged delete. This retention mode is used to
* advance an organization's data integrity and internal compliance or to test retention settings before
* using SnapLock Compliance. For more information, see SnapLock
* Enterprise.
*
*
* @see SnaplockType
*/
public final SnaplockType snaplockType() {
return SnaplockType.fromValue(snaplockType);
}
/**
*
* Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed. You can
* choose one of the following retention modes:
*
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume can't be
* deleted until their retention periods expire. This retention mode is used to address government or
* industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by authorized users
* before their retention periods expire using privileged delete. This retention mode is used to advance an
* organization's data integrity and internal compliance or to test retention settings before using SnapLock
* Compliance. For more information, see SnapLock Enterprise.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #snaplockType} will
* return {@link SnaplockType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #snaplockTypeAsString}.
*
*
* @return Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed.
* You can choose one of the following retention modes:
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume can't
* be deleted until their retention periods expire. This retention mode is used to address government or
* industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock
* Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by authorized
* users before their retention periods expire using privileged delete. This retention mode is used to
* advance an organization's data integrity and internal compliance or to test retention settings before
* using SnapLock Compliance. For more information, see SnapLock
* Enterprise.
*
*
* @see SnaplockType
*/
public final String snaplockTypeAsString() {
return snaplockType;
}
/**
*
* Enables or disables volume-append mode on an FSx for ONTAP SnapLock volume. Volume-append mode allows you to
* create WORM-appendable files and write data to them incrementally. The default value is false
.
*
*
* For more information, see Volume-append
* mode.
*
*
* @return Enables or disables volume-append mode on an FSx for ONTAP SnapLock volume. Volume-append mode allows you
* to create WORM-appendable files and write data to them incrementally. The default value is
* false
.
*
* For more information, see Volume-append
* mode.
*/
public final Boolean volumeAppendModeEnabled() {
return volumeAppendModeEnabled;
}
@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(auditLogVolume());
hashCode = 31 * hashCode + Objects.hashCode(autocommitPeriod());
hashCode = 31 * hashCode + Objects.hashCode(privilegedDeleteAsString());
hashCode = 31 * hashCode + Objects.hashCode(retentionPeriod());
hashCode = 31 * hashCode + Objects.hashCode(snaplockTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(volumeAppendModeEnabled());
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 CreateSnaplockConfiguration)) {
return false;
}
CreateSnaplockConfiguration other = (CreateSnaplockConfiguration) obj;
return Objects.equals(auditLogVolume(), other.auditLogVolume())
&& Objects.equals(autocommitPeriod(), other.autocommitPeriod())
&& Objects.equals(privilegedDeleteAsString(), other.privilegedDeleteAsString())
&& Objects.equals(retentionPeriod(), other.retentionPeriod())
&& Objects.equals(snaplockTypeAsString(), other.snaplockTypeAsString())
&& Objects.equals(volumeAppendModeEnabled(), other.volumeAppendModeEnabled());
}
/**
* 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("CreateSnaplockConfiguration").add("AuditLogVolume", auditLogVolume())
.add("AutocommitPeriod", autocommitPeriod()).add("PrivilegedDelete", privilegedDeleteAsString())
.add("RetentionPeriod", retentionPeriod()).add("SnaplockType", snaplockTypeAsString())
.add("VolumeAppendModeEnabled", volumeAppendModeEnabled()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AuditLogVolume":
return Optional.ofNullable(clazz.cast(auditLogVolume()));
case "AutocommitPeriod":
return Optional.ofNullable(clazz.cast(autocommitPeriod()));
case "PrivilegedDelete":
return Optional.ofNullable(clazz.cast(privilegedDeleteAsString()));
case "RetentionPeriod":
return Optional.ofNullable(clazz.cast(retentionPeriod()));
case "SnaplockType":
return Optional.ofNullable(clazz.cast(snaplockTypeAsString()));
case "VolumeAppendModeEnabled":
return Optional.ofNullable(clazz.cast(volumeAppendModeEnabled()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
*
* For more information, see
* SnapLock audit log volumes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder auditLogVolume(Boolean auditLogVolume);
/**
*
* The configuration object for setting the autocommit period of files in an FSx for ONTAP SnapLock volume.
*
*
* @param autocommitPeriod
* The configuration object for setting the autocommit period of files in an FSx for ONTAP SnapLock
* volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder autocommitPeriod(AutocommitPeriod autocommitPeriod);
/**
*
* The configuration object for setting the autocommit period of files in an FSx for ONTAP SnapLock volume.
*
* This is a convenience method that creates an instance of the {@link AutocommitPeriod.Builder} avoiding the
* need to create one manually via {@link AutocommitPeriod#builder()}.
*
*
* When the {@link Consumer} completes, {@link AutocommitPeriod.Builder#build()} is called immediately and its
* result is passed to {@link #autocommitPeriod(AutocommitPeriod)}.
*
* @param autocommitPeriod
* a consumer that will call methods on {@link AutocommitPeriod.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #autocommitPeriod(AutocommitPeriod)
*/
default Builder autocommitPeriod(Consumer autocommitPeriod) {
return autocommitPeriod(AutocommitPeriod.builder().applyMutation(autocommitPeriod).build());
}
/**
*
* Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise volume.
* Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have active
* retention periods. PERMANENTLY_DISABLED
is a terminal state. If privileged delete is permanently
* disabled on a SnapLock volume, you can't re-enable it. The default value is DISABLED
.
*
*
* For more information, see Privileged delete.
*
*
* @param privilegedDelete
* Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise
* volume. Enabling privileged delete allows SnapLock administrators to delete WORM files even if they
* have active retention periods. PERMANENTLY_DISABLED
is a terminal state. If privileged
* delete is permanently disabled on a SnapLock volume, you can't re-enable it. The default value is
* DISABLED
.
*
* For more information, see Privileged delete.
* @see PrivilegedDelete
* @return Returns a reference to this object so that method calls can be chained together.
* @see PrivilegedDelete
*/
Builder privilegedDelete(String privilegedDelete);
/**
*
* Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise volume.
* Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have active
* retention periods. PERMANENTLY_DISABLED
is a terminal state. If privileged delete is permanently
* disabled on a SnapLock volume, you can't re-enable it. The default value is DISABLED
.
*
*
* For more information, see Privileged delete.
*
*
* @param privilegedDelete
* Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise
* volume. Enabling privileged delete allows SnapLock administrators to delete WORM files even if they
* have active retention periods. PERMANENTLY_DISABLED
is a terminal state. If privileged
* delete is permanently disabled on a SnapLock volume, you can't re-enable it. The default value is
* DISABLED
.
*
* For more information, see Privileged delete.
* @see PrivilegedDelete
* @return Returns a reference to this object so that method calls can be chained together.
* @see PrivilegedDelete
*/
Builder privilegedDelete(PrivilegedDelete privilegedDelete);
/**
*
* Specifies the retention period of an FSx for ONTAP SnapLock volume.
*
*
* @param retentionPeriod
* Specifies the retention period of an FSx for ONTAP SnapLock volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder retentionPeriod(SnaplockRetentionPeriod retentionPeriod);
/**
*
* Specifies the retention period of an FSx for ONTAP SnapLock volume.
*
* This is a convenience method that creates an instance of the {@link SnaplockRetentionPeriod.Builder} avoiding
* the need to create one manually via {@link SnaplockRetentionPeriod#builder()}.
*
*
* When the {@link Consumer} completes, {@link SnaplockRetentionPeriod.Builder#build()} is called immediately
* and its result is passed to {@link #retentionPeriod(SnaplockRetentionPeriod)}.
*
* @param retentionPeriod
* a consumer that will call methods on {@link SnaplockRetentionPeriod.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #retentionPeriod(SnaplockRetentionPeriod)
*/
default Builder retentionPeriod(Consumer retentionPeriod) {
return retentionPeriod(SnaplockRetentionPeriod.builder().applyMutation(retentionPeriod).build());
}
/**
*
* Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed. You
* can choose one of the following retention modes:
*
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume can't be
* deleted until their retention periods expire. This retention mode is used to address government or
* industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by authorized
* users before their retention periods expire using privileged delete. This retention mode is used to advance
* an organization's data integrity and internal compliance or to test retention settings before using SnapLock
* Compliance. For more information, see SnapLock Enterprise.
*
*
*
*
* @param snaplockType
* Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be
* changed. You can choose one of the following retention modes:
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume
* can't be deleted until their retention periods expire. This retention mode is used to address
* government or industry-specific mandates or to protect against ransomware attacks. For more
* information, see SnapLock
* Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by
* authorized users before their retention periods expire using privileged delete. This retention mode is
* used to advance an organization's data integrity and internal compliance or to test retention settings
* before using SnapLock Compliance. For more information, see SnapLock
* Enterprise.
*
*
* @see SnaplockType
* @return Returns a reference to this object so that method calls can be chained together.
* @see SnaplockType
*/
Builder snaplockType(String snaplockType);
/**
*
* Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed. You
* can choose one of the following retention modes:
*
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume can't be
* deleted until their retention periods expire. This retention mode is used to address government or
* industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by authorized
* users before their retention periods expire using privileged delete. This retention mode is used to advance
* an organization's data integrity and internal compliance or to test retention settings before using SnapLock
* Compliance. For more information, see SnapLock Enterprise.
*
*
*
*
* @param snaplockType
* Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be
* changed. You can choose one of the following retention modes:
*
* -
*
* COMPLIANCE
: Files transitioned to write once, read many (WORM) on a Compliance volume
* can't be deleted until their retention periods expire. This retention mode is used to address
* government or industry-specific mandates or to protect against ransomware attacks. For more
* information, see SnapLock
* Compliance.
*
*
* -
*
* ENTERPRISE
: Files transitioned to WORM on an Enterprise volume can be deleted by
* authorized users before their retention periods expire using privileged delete. This retention mode is
* used to advance an organization's data integrity and internal compliance or to test retention settings
* before using SnapLock Compliance. For more information, see SnapLock
* Enterprise.
*
*
* @see SnaplockType
* @return Returns a reference to this object so that method calls can be chained together.
* @see SnaplockType
*/
Builder snaplockType(SnaplockType snaplockType);
/**
*
* Enables or disables volume-append mode on an FSx for ONTAP SnapLock volume. Volume-append mode allows you to
* create WORM-appendable files and write data to them incrementally. The default value is false
.
*
*
* For more information, see Volume-append
* mode.
*
*
* @param volumeAppendModeEnabled
* Enables or disables volume-append mode on an FSx for ONTAP SnapLock volume. Volume-append mode allows
* you to create WORM-appendable files and write data to them incrementally. The default value is
* false
.
*
* For more information, see Volume-append mode.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder volumeAppendModeEnabled(Boolean volumeAppendModeEnabled);
}
static final class BuilderImpl implements Builder {
private Boolean auditLogVolume;
private AutocommitPeriod autocommitPeriod;
private String privilegedDelete;
private SnaplockRetentionPeriod retentionPeriod;
private String snaplockType;
private Boolean volumeAppendModeEnabled;
private BuilderImpl() {
}
private BuilderImpl(CreateSnaplockConfiguration model) {
auditLogVolume(model.auditLogVolume);
autocommitPeriod(model.autocommitPeriod);
privilegedDelete(model.privilegedDelete);
retentionPeriod(model.retentionPeriod);
snaplockType(model.snaplockType);
volumeAppendModeEnabled(model.volumeAppendModeEnabled);
}
public final Boolean getAuditLogVolume() {
return auditLogVolume;
}
public final void setAuditLogVolume(Boolean auditLogVolume) {
this.auditLogVolume = auditLogVolume;
}
@Override
public final Builder auditLogVolume(Boolean auditLogVolume) {
this.auditLogVolume = auditLogVolume;
return this;
}
public final AutocommitPeriod.Builder getAutocommitPeriod() {
return autocommitPeriod != null ? autocommitPeriod.toBuilder() : null;
}
public final void setAutocommitPeriod(AutocommitPeriod.BuilderImpl autocommitPeriod) {
this.autocommitPeriod = autocommitPeriod != null ? autocommitPeriod.build() : null;
}
@Override
public final Builder autocommitPeriod(AutocommitPeriod autocommitPeriod) {
this.autocommitPeriod = autocommitPeriod;
return this;
}
public final String getPrivilegedDelete() {
return privilegedDelete;
}
public final void setPrivilegedDelete(String privilegedDelete) {
this.privilegedDelete = privilegedDelete;
}
@Override
public final Builder privilegedDelete(String privilegedDelete) {
this.privilegedDelete = privilegedDelete;
return this;
}
@Override
public final Builder privilegedDelete(PrivilegedDelete privilegedDelete) {
this.privilegedDelete(privilegedDelete == null ? null : privilegedDelete.toString());
return this;
}
public final SnaplockRetentionPeriod.Builder getRetentionPeriod() {
return retentionPeriod != null ? retentionPeriod.toBuilder() : null;
}
public final void setRetentionPeriod(SnaplockRetentionPeriod.BuilderImpl retentionPeriod) {
this.retentionPeriod = retentionPeriod != null ? retentionPeriod.build() : null;
}
@Override
public final Builder retentionPeriod(SnaplockRetentionPeriod retentionPeriod) {
this.retentionPeriod = retentionPeriod;
return this;
}
public final String getSnaplockType() {
return snaplockType;
}
public final void setSnaplockType(String snaplockType) {
this.snaplockType = snaplockType;
}
@Override
public final Builder snaplockType(String snaplockType) {
this.snaplockType = snaplockType;
return this;
}
@Override
public final Builder snaplockType(SnaplockType snaplockType) {
this.snaplockType(snaplockType == null ? null : snaplockType.toString());
return this;
}
public final Boolean getVolumeAppendModeEnabled() {
return volumeAppendModeEnabled;
}
public final void setVolumeAppendModeEnabled(Boolean volumeAppendModeEnabled) {
this.volumeAppendModeEnabled = volumeAppendModeEnabled;
}
@Override
public final Builder volumeAppendModeEnabled(Boolean volumeAppendModeEnabled) {
this.volumeAppendModeEnabled = volumeAppendModeEnabled;
return this;
}
@Override
public CreateSnaplockConfiguration build() {
return new CreateSnaplockConfiguration(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}