Class ReplicationRuleFilter

java.lang.Object
software.amazon.awssdk.services.s3.model.ReplicationRuleFilter
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ReplicationRuleFilter.Builder,ReplicationRuleFilter>

@Generated("software.amazon.awssdk:codegen") public final class ReplicationRuleFilter extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ReplicationRuleFilter.Builder,ReplicationRuleFilter>

A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix, Tag, or an And child element.

See Also:
  • Method Details

    • prefix

      public final String prefix()

      An object key name prefix that identifies the subset of objects to which the rule applies.

      Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

      Returns:
      An object key name prefix that identifies the subset of objects to which the rule applies.

      Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

    • tag

      public final Tag tag()

      A container for specifying a tag key and value.

      The rule applies only to objects that have the tag in their tag set.

      Returns:
      A container for specifying a tag key and value.

      The rule applies only to objects that have the tag in their tag set.

    • and

      public final ReplicationRuleAndOperator and()

      A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

      • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

      • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

      Returns:
      A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

      • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

      • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

    • toBuilder

      public ReplicationRuleFilter.Builder toBuilder()
      Specified by:
      toBuilder in interface ToCopyableBuilder<ReplicationRuleFilter.Builder,ReplicationRuleFilter>
    • builder

      public static ReplicationRuleFilter.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ReplicationRuleFilter.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Specified by:
      equalsBySdkFields in interface SdkPojo
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • fromPrefix

      public static ReplicationRuleFilter fromPrefix(String prefix)
      Create an instance of this class with prefix() initialized to the given value.

      An object key name prefix that identifies the subset of objects to which the rule applies.

      Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

      Parameters:
      prefix - An object key name prefix that identifies the subset of objects to which the rule applies.

      Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

    • fromTag

      public static ReplicationRuleFilter fromTag(Tag tag)
      Create an instance of this class with tag() initialized to the given value.

      A container for specifying a tag key and value.

      The rule applies only to objects that have the tag in their tag set.

      Parameters:
      tag - A container for specifying a tag key and value.

      The rule applies only to objects that have the tag in their tag set.

    • fromTag

      public static ReplicationRuleFilter fromTag(Consumer<Tag.Builder> tag)
      Create an instance of this class with tag() initialized to the given value.

      A container for specifying a tag key and value.

      The rule applies only to objects that have the tag in their tag set.

      Parameters:
      tag - A container for specifying a tag key and value.

      The rule applies only to objects that have the tag in their tag set.

    • fromAnd

      Create an instance of this class with and() initialized to the given value.

      A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

      • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

      • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

      Parameters:
      and - A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

      • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

      • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

    • fromAnd

      Create an instance of this class with and() initialized to the given value.

      A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

      • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

      • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

      Parameters:
      and - A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

      • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

      • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

    • type

      Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will be ReplicationRuleFilter.Type.UNKNOWN_TO_SDK_VERSION if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will be ReplicationRuleFilter.Type.UNKNOWN_TO_SDK_VERSION if zero members are set, and null if more than one member is set.
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo