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
Filter
is used to identify objects that a Lifecycle Rule applies to. AFilter
must have exactly one ofPrefix
,Tag
, orAnd
specified.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LifecycleRuleFilter.Builder
static class
LifecycleRuleFilter.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LifecycleRuleAndOperator
and()
Returns the value of the And property for this object.static LifecycleRuleFilter.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
static LifecycleRuleFilter
fromAnd(Consumer<LifecycleRuleAndOperator.Builder> and)
Create an instance of this class withand()
initialized to the given value.static LifecycleRuleFilter
fromAnd(LifecycleRuleAndOperator and)
Create an instance of this class withand()
initialized to the given value.static LifecycleRuleFilter
fromObjectSizeGreaterThan(Long objectSizeGreaterThan)
Create an instance of this class withobjectSizeGreaterThan()
initialized to the given value.static LifecycleRuleFilter
fromObjectSizeLessThan(Long objectSizeLessThan)
Create an instance of this class withobjectSizeLessThan()
initialized to the given value.static LifecycleRuleFilter
fromPrefix(String prefix)
Create an instance of this class withprefix()
initialized to the given value.static LifecycleRuleFilter
fromTag(Consumer<Tag.Builder> tag)
Create an instance of this class withtag()
initialized to the given value.static LifecycleRuleFilter
fromTag(Tag tag)
Create an instance of this class withtag()
initialized to the given value.<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
Long
objectSizeGreaterThan()
Minimum object size to which the rule applies.Long
objectSizeLessThan()
Maximum object size to which the rule applies.String
prefix()
Prefix identifying one or more objects to which the rule applies.List<SdkField<?>>
sdkFields()
static Class<? extends LifecycleRuleFilter.Builder>
serializableBuilderClass()
Tag
tag()
This tag must exist in the object's tag set in order for the rule to apply.LifecycleRuleFilter.Builder
toBuilder()
String
toString()
Returns a string representation of this object.LifecycleRuleFilter.Type
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, 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.
- Returns:
- This tag must exist in the object's tag set in order for the rule to apply.
-
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:
toBuilder
in 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:
equalsBySdkFields
in 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.
- Parameters:
tag
- This tag must exist in the object's tag set in order for the rule to apply.
-
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.
- Parameters:
tag
- This tag must exist in the object's tag set in order for the rule to apply.
-
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_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 beLifecycleRuleFilter.Type.UNKNOWN_TO_SDK_VERSION
if zero members are set, andnull
if more than one member is set.
-
-