Class ObjectLifecycleRule
- java.lang.Object
- 
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
- 
- com.oracle.bmc.objectstorage.model.ObjectLifecycleRule
 
 
- 
 @Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class ObjectLifecycleRule extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelTo use any of the API operations, you must be authorized in an IAM policy.If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see Getting Started with Policies. 
 Note: Objects should always be created or deserialized using theObjectLifecycleRule.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theObjectLifecycleRule.Builder, which maintain a set of all explicitly set fields calledObjectLifecycleRule.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classObjectLifecycleRule.Builderstatic classObjectLifecycleRule.TimeUnitThe unit that should be used to interpret timeAmount.
 - 
Constructor SummaryConstructors Constructor Description ObjectLifecycleRule(String name, String target, String action, Long timeAmount, ObjectLifecycleRule.TimeUnit timeUnit, Boolean isEnabled, ObjectNameFilter objectNameFilter)Deprecated.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ObjectLifecycleRule.Builderbuilder()Create a new builder.booleanequals(Object o)StringgetAction()The action of the object lifecycle policy rule.BooleangetIsEnabled()A Boolean that determines whether this rule is currently enabled.StringgetName()The name of the lifecycle rule to be applied.ObjectNameFiltergetObjectNameFilter()StringgetTarget()The target of the object lifecycle policy rule.LonggetTimeAmount()Specifies the age of objects to apply the rule to.ObjectLifecycleRule.TimeUnitgetTimeUnit()The unit that should be used to interpret timeAmount.inthashCode()ObjectLifecycleRule.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
 
- 
- 
- 
Constructor Detail- 
ObjectLifecycleRule@Deprecated @ConstructorProperties({"name","target","action","timeAmount","timeUnit","isEnabled","objectNameFilter"}) public ObjectLifecycleRule(String name, String target, String action, Long timeAmount, ObjectLifecycleRule.TimeUnit timeUnit, Boolean isEnabled, ObjectNameFilter objectNameFilter) Deprecated.
 
- 
 - 
Method Detail- 
builderpublic static ObjectLifecycleRule.Builder builder() Create a new builder.
 - 
toBuilderpublic ObjectLifecycleRule.Builder toBuilder() 
 - 
getNamepublic String getName() The name of the lifecycle rule to be applied.- Returns:
- the value
 
 - 
getTargetpublic String getTarget() The target of the object lifecycle policy rule.The values of target can be either “objects”, “multipart-uploads” or “previous-object-versions”. This field when declared as “objects” is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as “previous-object-versions” is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as “multipart-uploads” is used to specify the ABORT (only) rule for uncommitted multipart-uploads. - Returns:
- the value
 
 - 
getActionpublic String getAction() The action of the object lifecycle policy rule.Rules using the action ‘ARCHIVE’ move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action ‘INFREQUENT_ACCESS’ move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action ‘DELETE’ permanently delete objects from buckets. Rules using ‘ABORT’ abort the uncommitted multipart-uploads and permanently delete their parts from buckets. - Returns:
- the value
 
 - 
getTimeAmountpublic Long getTimeAmount() Specifies the age of objects to apply the rule to.The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object’s Last-Modified time. - Returns:
- the value
 
 - 
getTimeUnitpublic ObjectLifecycleRule.TimeUnit getTimeUnit() The unit that should be used to interpret timeAmount.Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC. - Returns:
- the value
 
 - 
getIsEnabledpublic Boolean getIsEnabled() A Boolean that determines whether this rule is currently enabled.- Returns:
- the value
 
 - 
getObjectNameFilterpublic ObjectNameFilter getObjectNameFilter() 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
toStringpublic String toString(boolean includeByteArrayContents) Return a string representation of the object.- Parameters:
- includeByteArrayContents- true to include the full contents of byte arrays
- Returns:
- string representation
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 
- 
 
-