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 Details

    • 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 Days or Years but you must select one. You cannot specify Days and Years at 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 either Days or Years but you must select one. You cannot specify Days and Years at 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 Days or Years but you must select one. You cannot specify Days and Years at the same time.

      This is a convenience method that creates an instance of the DefaultRetention.Builder avoiding the need to create one manually via DefaultRetention.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to defaultRetention(DefaultRetention).

      Parameters:
      defaultRetention - a consumer that will call methods on DefaultRetention.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: