Interface ObjectLockConfiguration.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ObjectLockConfiguration.Builder,ObjectLockConfiguration>,SdkBuilder<ObjectLockConfiguration.Builder,ObjectLockConfiguration>,SdkPojo
- Enclosing class:
- ObjectLockConfiguration
@Mutable @NotThreadSafe public static interface ObjectLockConfiguration.Builder extends SdkPojo, CopyableBuilder<ObjectLockConfiguration.Builder,ObjectLockConfiguration>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ObjectLockConfiguration.BuilderobjectLockEnabled(String objectLockEnabled)Indicates whether this bucket has an Object Lock configuration enabled.ObjectLockConfiguration.BuilderobjectLockEnabled(ObjectLockEnabled objectLockEnabled)Indicates whether this bucket has an Object Lock configuration enabled.default ObjectLockConfiguration.Builderrule(Consumer<ObjectLockRule.Builder> rule)Specifies the Object Lock rule for the specified object.ObjectLockConfiguration.Builderrule(ObjectLockRule rule)Specifies the Object Lock rule for the specified object.-
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
-
objectLockEnabled
ObjectLockConfiguration.Builder objectLockEnabled(String objectLockEnabled)
Indicates whether this bucket has an Object Lock configuration enabled. Enable
ObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Parameters:
objectLockEnabled- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ObjectLockEnabled,ObjectLockEnabled
-
objectLockEnabled
ObjectLockConfiguration.Builder objectLockEnabled(ObjectLockEnabled objectLockEnabled)
Indicates whether this bucket has an Object Lock configuration enabled. Enable
ObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Parameters:
objectLockEnabled- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ObjectLockEnabled,ObjectLockEnabled
-
rule
ObjectLockConfiguration.Builder rule(ObjectLockRule rule)
Specifies the Object Lock rule for the specified object. Enable the this rule when you apply
ObjectLockConfigurationto a 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.- Parameters:
rule- Specifies the Object Lock rule for the specified object. Enable the this rule when you applyObjectLockConfigurationto a 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.
-
rule
default ObjectLockConfiguration.Builder rule(Consumer<ObjectLockRule.Builder> rule)
Specifies the Object Lock rule for the specified object. Enable the this rule when you apply
This is a convenience method that creates an instance of theObjectLockConfigurationto a 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.ObjectLockRule.Builderavoiding the need to create one manually viaObjectLockRule.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed torule(ObjectLockRule).- Parameters:
rule- a consumer that will call methods onObjectLockRule.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
rule(ObjectLockRule)
-
-