Class LifecycleRuleFilter
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<LifecycleRuleFilter.Builder,LifecycleRuleFilter>
The Filter is used to identify objects that a Lifecycle Rule applies to. A Filter can have
exactly one of Prefix, Tag, ObjectSizeGreaterThan,
ObjectSizeLessThan, or And specified. If the Filter element is left empty, the
Lifecycle Rule applies to all objects in the bucket.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enum -
Method Summary
Modifier and TypeMethodDescriptionfinal LifecycleRuleAndOperatorand()Returns the value of the And property for this object.static LifecycleRuleFilter.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) static LifecycleRuleFilterCreate an instance of this class withand()initialized to the given value.static LifecycleRuleFilterCreate an instance of this class withand()initialized to the given value.static LifecycleRuleFilterfromObjectSizeGreaterThan(Long objectSizeGreaterThan) Create an instance of this class withobjectSizeGreaterThan()initialized to the given value.static LifecycleRuleFilterfromObjectSizeLessThan(Long objectSizeLessThan) Create an instance of this class withobjectSizeLessThan()initialized to the given value.static LifecycleRuleFilterfromPrefix(String prefix) Create an instance of this class withprefix()initialized to the given value.static LifecycleRuleFilterfromTag(Consumer<Tag.Builder> tag) Create an instance of this class withtag()initialized to the given value.static LifecycleRuleFilterCreate an instance of this class withtag()initialized to the given value.final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()final LongMinimum object size to which the rule applies.final LongMaximum object size to which the rule applies.final Stringprefix()Prefix identifying one or more objects to which the rule applies.static Class<? extends LifecycleRuleFilter.Builder>final Tagtag()This tag must exist in the object's tag set in order for the rule to apply.final StringtoString()Returns a string representation of this object.type()Retrieve an enum value representing which member of this object is populated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
prefix
Prefix identifying one or more 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:
- Prefix identifying one or more 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
This tag must exist in the object's tag set in order for the rule to apply.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Returns:
- This tag must exist in the object's tag set in order for the rule to apply.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
-
objectSizeGreaterThan
Minimum object size to which the rule applies.
- Returns:
- Minimum object size to which the rule applies.
-
objectSizeLessThan
Maximum object size to which the rule applies.
- Returns:
- Maximum object size to which the rule applies.
-
and
Returns the value of the And property for this object.- Returns:
- The value of the And property for this object.
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<LifecycleRuleFilter.Builder,LifecycleRuleFilter>
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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. -
getValueForField
-
fromPrefix
Create an instance of this class withprefix()initialized to the given value.Prefix identifying one or more 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- Prefix identifying one or more 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
Create an instance of this class withtag()initialized to the given value.This tag must exist in the object's tag set in order for the rule to apply.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Parameters:
tag- This tag must exist in the object's tag set in order for the rule to apply.This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
-
fromTag
Create an instance of this class withtag()initialized to the given value.This tag must exist in the object's tag set in order for the rule to apply.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Parameters:
tag- This tag must exist in the object's tag set in order for the rule to apply.This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
-
fromObjectSizeGreaterThan
Create an instance of this class withobjectSizeGreaterThan()initialized to the given value.Minimum object size to which the rule applies.
- Parameters:
objectSizeGreaterThan- Minimum object size to which the rule applies.
-
fromObjectSizeLessThan
Create an instance of this class withobjectSizeLessThan()initialized to the given value.Maximum object size to which the rule applies.
- Parameters:
objectSizeLessThan- Maximum object size to which the rule applies.
-
fromAnd
Create an instance of this class withand()initialized to the given value. Sets the value of the And property for this object.- Parameters:
and- The new value for the And property for this object.
-
fromAnd
Create an instance of this class withand()initialized to the given value. Sets the value of the And property for this object.- Parameters:
and- The new value for the And property for this object.
-
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beLifecycleRuleFilter.Type.UNKNOWN_TO_SDK_VERSIONif 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 beLifecycleRuleFilter.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set. -
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-