Interface ObjectLockRule.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<ObjectLockRule.Builder,,ObjectLockRule> SdkBuilder<ObjectLockRule.Builder,,ObjectLockRule> SdkPojo
- Enclosing class:
ObjectLockRule
public static interface ObjectLockRule.Builder
extends SdkPojo, CopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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.defaultRetention(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
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
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:
-