/* * 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; /** *

* Specifies the retention period of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed. Files can't * be deleted or modified during the retention period. *

*

* For more information, see Working * with the retention period in SnapLock. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RetentionPeriod implements Serializable, Cloneable, StructuredPojo { /** *

* Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of the valid * types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. *

*/ private String type; /** *

* Defines the amount of time for the retention period of an FSx for ONTAP SnapLock volume. You can't set a value * for INFINITE or UNSPECIFIED. For all other options, the following ranges are valid: *

* */ private Integer value; /** *

* Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of the valid * types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. *

* * @param type * Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of * the valid types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. * @see RetentionPeriodType */ public void setType(String type) { this.type = type; } /** *

* Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of the valid * types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. *

* * @return Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of * the valid types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. * @see RetentionPeriodType */ public String getType() { return this.type; } /** *

* Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of the valid * types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. *

* * @param type * Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of * the valid types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. * @return Returns a reference to this object so that method calls can be chained together. * @see RetentionPeriodType */ public RetentionPeriod withType(String type) { setType(type); return this; } /** *

* Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of the valid * types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. *

* * @param type * Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of * the valid types. If you set it to INFINITE, the files are retained forever. If you set it to * UNSPECIFIED, the files are retained until you set an explicit retention period. * @return Returns a reference to this object so that method calls can be chained together. * @see RetentionPeriodType */ public RetentionPeriod withType(RetentionPeriodType type) { this.type = type.toString(); return this; } /** *

* Defines the amount of time for the retention period of an FSx for ONTAP SnapLock volume. You can't set a value * for INFINITE or UNSPECIFIED. For all other options, the following ranges are valid: *

* * * @param value * Defines the amount of time for the retention period of an FSx for ONTAP SnapLock volume. You can't set a * value for INFINITE or UNSPECIFIED. For all other options, the following ranges * are valid:

*