Interface ObjectLockRule.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>,SdkBuilder<ObjectLockRule.Builder,ObjectLockRule>,SdkPojo
- Enclosing class:
- ObjectLockRule
@Mutable @NotThreadSafe public static interface ObjectLockRule.Builder extends SdkPojo, CopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ObjectLockRule.BuilderdefaultRetention(Consumer<DefaultRetention.Builder> defaultRetention)The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.ObjectLockRule.BuilderdefaultRetention(DefaultRetention defaultRetention)The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
defaultRetention
ObjectLockRule.Builder defaultRetention(DefaultRetention defaultRetention)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either
DaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.- Parameters:
defaultRetention- The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
defaultRetention
default ObjectLockRule.Builder defaultRetention(Consumer<DefaultRetention.Builder> defaultRetention)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either
This is a convenience method that creates an instance of theDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.DefaultRetention.Builderavoiding the need to create one manually viaDefaultRetention.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todefaultRetention(DefaultRetention).- Parameters:
defaultRetention- a consumer that will call methods onDefaultRetention.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
defaultRetention(DefaultRetention)
-
-