Class ObjectLockRule
java.lang.Object
software.amazon.awssdk.services.s3.model.ObjectLockRule
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
@Generated("software.amazon.awssdk:codegen")
public final class ObjectLockRule
extends Object
implements SdkPojo, Serializable, ToCopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
The container element for an Object Lock rule.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectLockRule.Builderbuilder()final DefaultRetentionThe default Object Lock retention settings for new objects in this bucket.final booleanfinal booleanequalsBySdkFields(Object obj) final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()static Class<? extends ObjectLockRule.Builder>final StringtoString()Returns a string representation of this object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
defaultRetention
The default Object Lock retention settings for new objects in this bucket. You can specify:
-
A default retention period, by using
DaysorYears. -
A default event hold duration, by using
DefaultEventHold. This setting also uses days or years.
You can set one or both. You cannot use days and years in the same setting.
- Returns:
- The default Object Lock retention settings for new objects in this bucket. You can specify:
-
A default retention period, by using
DaysorYears. -
A default event hold duration, by using
DefaultEventHold. This setting also uses days or years.
You can set one or both. You cannot use days and years in the same setting.
-
-
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-