Interface ObjectLockConfiguration.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<ObjectLockConfiguration.Builder,ObjectLockConfiguration>
,SdkBuilder<ObjectLockConfiguration.Builder,ObjectLockConfiguration>
,SdkPojo
- Enclosing class:
- ObjectLockConfiguration
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.Builder
objectLockEnabled(String objectLockEnabled)
Indicates whether this bucket has an Object Lock configuration enabled.ObjectLockConfiguration.Builder
objectLockEnabled(ObjectLockEnabled objectLockEnabled)
Indicates whether this bucket has an Object Lock configuration enabled.default ObjectLockConfiguration.Builder
rule(Consumer<ObjectLockRule.Builder> rule)
Specifies the Object Lock rule for the specified object.ObjectLockConfiguration.Builder
rule(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
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Parameters:
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabled
when you applyObjectLockConfiguration
to 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
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Parameters:
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabled
when you applyObjectLockConfiguration
to 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
ObjectLockConfiguration
to a bucket. Bucket settings require both a mode and a period. The period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time.- Parameters:
rule
- Specifies the Object Lock rule for the specified object. Enable the this rule when you applyObjectLockConfiguration
to a bucket. Bucket settings require both a mode and a period. The period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at 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 theObjectLockConfiguration
to a bucket. Bucket settings require both a mode and a period. The period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time.ObjectLockRule.Builder
avoiding the need to create one manually viaObjectLockRule.builder()
.When the
Consumer
completes,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)
-
-