@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class ObjectLifecycleRule extends Object
To 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 the ObjectLifecycleRule.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 the ObjectLifecycleRule.Builder
, which maintain a set of all explicitly set fields called __explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take __explicitlySet__
into account. The constructor, on the other hand, does not set __explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
ObjectLifecycleRule.Builder |
static class |
ObjectLifecycleRule.TimeUnit
The unit that should be used to interpret timeAmount.
|
Constructor and Description |
---|
ObjectLifecycleRule(String name,
String action,
Long timeAmount,
ObjectLifecycleRule.TimeUnit timeUnit,
Boolean isEnabled,
ObjectNameFilter objectNameFilter)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static ObjectLifecycleRule.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Set<String> |
get__explicitlySet__() |
String |
getAction()
The action of the object lifecycle policy rule.
|
Boolean |
getIsEnabled()
A boolean that determines whether this rule is currently enabled.
|
String |
getName()
The name of the lifecycle rule to be applied.
|
ObjectNameFilter |
getObjectNameFilter()
A filter limiting object names that the rule will apply to.
|
Long |
getTimeAmount()
Specifies the age of objects to apply the rule to.
|
ObjectLifecycleRule.TimeUnit |
getTimeUnit()
The unit that should be used to interpret timeAmount.
|
int |
hashCode() |
String |
toString() |
@ConstructorProperties(value={"name","action","timeAmount","timeUnit","isEnabled","objectNameFilter"}) @Deprecated public ObjectLifecycleRule(String name, String action, Long timeAmount, ObjectLifecycleRule.TimeUnit timeUnit, Boolean isEnabled, ObjectNameFilter objectNameFilter)
public static ObjectLifecycleRule.Builder builder()
Create a new builder.
public String getName()
The name of the lifecycle rule to be applied.
public String getAction()
The action of the object lifecycle policy rule. Rules using the action ‘ARCHIVE’ move objects into the Archive Storage tier. Rules using the action ‘DELETE’ permanently delete objects from buckets. ‘ARCHIVE’ and ‘DELETE’ are the only two supported actions at this time.
public 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.
public 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.
public Boolean getIsEnabled()
A boolean that determines whether this rule is currently enabled.
public ObjectNameFilter getObjectNameFilter()
A filter limiting object names that the rule will apply to.
Copyright © 2016–2019. All rights reserved.