Class LockDurationDetails


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20171215")
    public final class LockDurationDetails
    extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
    Details for setting a retention date or legal hold.
    Note: Objects should always be created or deserialized using the LockDurationDetails.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the LockDurationDetails.Builder, which maintain a set of all explicitly set fields called LockDurationDetails.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
    • Method Detail

      • getCoolOffDuration

        public Integer getCoolOffDuration()
        For snapshots in compliance mode, a cooling-off period (measured in days) begins.

        During this time, you can still edit or remove the lock. Once this period ends, the snapshot becomes immutable until the specified retention date expires, permanently preventing any deletion or modification. The cool off duration can be set for a minimum of 0 days and a maximum of 365. It defaults to 14 days if not set.

        Returns:
        the value
      • getLockDuration

        public Integer getLockDuration()
        The retention period (measured in days) defines how long a snapshot remains locked, preventing user modifications or deletions.

        In governance mode this period can be adjusted, but in compliance mode it becomes permanent after a cool-off period. Snapshots can be locked for a minimum of 0 days and a maximum of 36,500 days. A value of 0 days stands for an indefinite retention period and it is used for a legal hold.

        Returns:
        the value
      • getLockMode

        public LockDurationDetails.LockMode getLockMode()
        Can be GOVERNANCE or COMPLIANCE.

        GOVERNANCE MODE: locks snapshots based on either a retention period or a legal hold. COMPLIANCE MODE: the customer can only remove the snapshot during its cooling-off period. Once that time ends, the snapshot becomes immutable; customers cannot delete or modify it until its set retention date passes. After the snapshot is locked, customers can only increase its retention period.

        Returns:
        the value
      • toString

        public String toString()
        Overrides:
        toString in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel