Class LockDurationDetails
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.filestorage.model.LockDurationDetails
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20171215") public final class LockDurationDetails extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelDetails for setting a retention date or legal hold.
Note: Objects should always be created or deserialized using theLockDurationDetails.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 theLockDurationDetails.Builder, which maintain a set of all explicitly set fields calledLockDurationDetails.Builder.__explicitlySet__. ThehashCode()andequals(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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLockDurationDetails.Builderstatic classLockDurationDetails.LockModeCan be GOVERNANCE or COMPLIANCE.
-
Constructor Summary
Constructors Constructor Description LockDurationDetails(Integer coolOffDuration, Integer lockDuration, LockDurationDetails.LockMode lockMode)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LockDurationDetails.Builderbuilder()Create a new builder.booleanequals(Object o)IntegergetCoolOffDuration()For snapshots in compliance mode, a cooling-off period (measured in days) begins.IntegergetLockDuration()The retention period (measured in days) defines how long a snapshot remains locked, preventing user modifications or deletions.LockDurationDetails.LockModegetLockMode()Can be GOVERNANCE or COMPLIANCE.inthashCode()LockDurationDetails.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
-
-
-
Constructor Detail
-
LockDurationDetails
@Deprecated @ConstructorProperties({"coolOffDuration","lockDuration","lockMode"}) public LockDurationDetails(Integer coolOffDuration, Integer lockDuration, LockDurationDetails.LockMode lockMode)
Deprecated.
-
-
Method Detail
-
builder
public static LockDurationDetails.Builder builder()
Create a new builder.
-
toBuilder
public LockDurationDetails.Builder toBuilder()
-
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:
toStringin classcom.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:
equalsin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-