Class LifecycleRuleFilter
- java.lang.Object
-
- software.amazon.awssdk.services.s3.model.LifecycleRuleFilter
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<LifecycleRuleFilter.Builder,LifecycleRuleFilter>
@Generated("software.amazon.awssdk:codegen") public final class LifecycleRuleFilter extends Object implements SdkPojo, Serializable, ToCopyableBuilder<LifecycleRuleFilter.Builder,LifecycleRuleFilter>
The
Filteris used to identify objects that a Lifecycle Rule applies to. AFiltercan have exactly one ofPrefix,Tag,ObjectSizeGreaterThan,ObjectSizeLessThan, orAndspecified. If theFilterelement is left empty, the Lifecycle Rule applies to all objects in the bucket.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLifecycleRuleFilter.Builderstatic classLifecycleRuleFilter.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LifecycleRuleAndOperatorand()Returns the value of the And property for this object.static LifecycleRuleFilter.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static LifecycleRuleFilterfromAnd(Consumer<LifecycleRuleAndOperator.Builder> and)Create an instance of this class withand()initialized to the given value.static LifecycleRuleFilterfromAnd(LifecycleRuleAndOperator and)Create 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 LifecycleRuleFilterfromTag(Tag tag)Create an instance of this class withtag()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()LongobjectSizeGreaterThan()Minimum object size to which the rule applies.LongobjectSizeLessThan()Maximum object size to which the rule applies.Stringprefix()Prefix identifying one or more objects to which the rule applies.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends LifecycleRuleFilter.Builder>serializableBuilderClass()Tagtag()This tag must exist in the object's tag set in order for the rule to apply.LifecycleRuleFilter.BuildertoBuilder()StringtoString()Returns a string representation of this object.LifecycleRuleFilter.Typetype()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, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
prefix
public final String 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
public final Tag 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
public final Long objectSizeGreaterThan()
Minimum object size to which the rule applies.
- Returns:
- Minimum object size to which the rule applies.
-
objectSizeLessThan
public final Long objectSizeLessThan()
Maximum object size to which the rule applies.
- Returns:
- Maximum object size to which the rule applies.
-
and
public final LifecycleRuleAndOperator and()
Returns the value of the And property for this object.- Returns:
- The value of the And property for this object.
-
toBuilder
public LifecycleRuleFilter.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<LifecycleRuleFilter.Builder,LifecycleRuleFilter>
-
builder
public static LifecycleRuleFilter.Builder builder()
-
serializableBuilderClass
public static Class<? extends LifecycleRuleFilter.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
fromPrefix
public static LifecycleRuleFilter fromPrefix(String prefix)
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
public static LifecycleRuleFilter fromTag(Tag tag)
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
public static LifecycleRuleFilter fromTag(Consumer<Tag.Builder> tag)
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
public static LifecycleRuleFilter fromObjectSizeGreaterThan(Long objectSizeGreaterThan)
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
public static LifecycleRuleFilter fromObjectSizeLessThan(Long objectSizeLessThan)
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
public static LifecycleRuleFilter fromAnd(LifecycleRuleAndOperator and)
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
public static LifecycleRuleFilter fromAnd(Consumer<LifecycleRuleAndOperator.Builder> and)
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
public LifecycleRuleFilter.Type 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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-