/* * Copyright 2018-2023 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 com.amazonaws.services.fsx.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Sets the autocommit period of files in an FSx for ONTAP SnapLock volume, which determines how long the files must * remain unmodified before they're automatically transitioned to the write once, read many (WORM) state. *
** For more information, see Autocommit. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AutocommitPeriod implements Serializable, Cloneable, StructuredPojo { /** *
* Defines the type of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. Setting this
* value to NONE
disables autocommit. The default value is NONE
.
*
* Defines the amount of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. The following * ranges are valid: *
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*
* Defines the type of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. Setting this
* value to NONE
disables autocommit. The default value is NONE
.
*
NONE
disables autocommit. The default value is NONE
.
* @see AutocommitPeriodType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* Defines the type of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. Setting this
* value to NONE
disables autocommit. The default value is NONE
.
*
NONE
disables autocommit. The default value is NONE
.
* @see AutocommitPeriodType
*/
public String getType() {
return this.type;
}
/**
*
* Defines the type of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. Setting this
* value to NONE
disables autocommit. The default value is NONE
.
*
NONE
disables autocommit. The default value is NONE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AutocommitPeriodType
*/
public AutocommitPeriod withType(String type) {
setType(type);
return this;
}
/**
*
* Defines the type of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. Setting this
* value to NONE
disables autocommit. The default value is NONE
.
*
NONE
disables autocommit. The default value is NONE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AutocommitPeriodType
*/
public AutocommitPeriod withType(AutocommitPeriodType type) {
this.type = type.toString();
return this;
}
/**
* * Defines the amount of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. The following * ranges are valid: *
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*
* Defines the amount of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. The following * ranges are valid: *
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*
* Defines the amount of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. The following * ranges are valid: *
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*
* Minutes
: 5 - 65,535
*
* Hours
: 1 - 65,535
*
* Days
: 1 - 3,650
*
* Months
: 1 - 120
*
* Years
: 1 - 10
*