Class DefaultRetention
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<DefaultRetention.Builder,DefaultRetention>
The container element for optionally specifying the default Object Lock retention settings for new objects placed in the specified bucket.
-
The
DefaultRetentionsettings require both a mode and a period. -
The
DefaultRetentionperiod can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultRetention.Builderbuilder()final Integerdays()The number of days that you want to specify for the default retention period.final booleanfinal booleanequalsBySdkFields(Object obj) final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()final ObjectLockRetentionModemode()The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.final StringThe default Object Lock retention mode you want to apply to new objects placed in the specified bucket.static Class<? extends DefaultRetention.Builder>final StringtoString()Returns a string representation of this object.final Integeryears()The number of years that you want to specify for the default retention period.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
-
mode
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either
DaysorYears.If the service returns an enum value that is not available in the current SDK version,
modewill returnObjectLockRetentionMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommodeAsString().- Returns:
- The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
Must be used with either
DaysorYears. - See Also:
-
modeAsString
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either
DaysorYears.If the service returns an enum value that is not available in the current SDK version,
modewill returnObjectLockRetentionMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommodeAsString().- Returns:
- The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
Must be used with either
DaysorYears. - See Also:
-
days
The number of days that you want to specify for the default retention period. Must be used with
Mode.- Returns:
- The number of days that you want to specify for the default retention period. Must be used with
Mode.
-
years
The number of years that you want to specify for the default retention period. Must be used with
Mode.- Returns:
- The number of years that you want to specify for the default retention period. Must be used with
Mode.
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<DefaultRetention.Builder,DefaultRetention>
-
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
-