public RetentionPeriod withType(RetentionPeriodType type) {
        this.type = type.toString();
        return this;
    }
<p>
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 <code>INFINITE</code>, the files are retained forever. If you set it to
<code>UNSPECIFIED</code>, the files are retained until you set an explicit retention period.
</p>

@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 <code>INFINITE</code>, the files are retained forever. If you set it to
       <code>UNSPECIFIED</code>, 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
aws-java-sdk-fsx/src/main/java/com/amazonaws/services/fsx/model/RetentionPeriod.java