Class BucketInfo.LifecycleRule.LifecycleAction (2.44.1)

public static class BucketInfo.LifecycleRule.LifecycleAction implements Serializable

Base class for the Action to take when a Lifecycle Condition is met. Supported Actions are expressed as subclasses of this class, accessed by static factory methods.

Inheritance

Object > BucketInfo.LifecycleRule.LifecycleAction

Implements

Serializable

Static Methods

newAbortIncompleteMPUploadAction()

public static BucketInfo.LifecycleRule.LifecycleAction newAbortIncompleteMPUploadAction()

Create a new AbortIncompleteMPUAction. An incomplete multipart upload will be aborted when the multipart upload meets the specified condition. Age is the only condition supported for this action. See: https://cloud.google.com/storage/docs/lifecycle##abort-mpu

Returns
Type Description
BucketInfo.LifecycleRule.LifecycleAction

newDeleteAction()

public static BucketInfo.LifecycleRule.DeleteLifecycleAction newDeleteAction()

Creates a new DeleteLifecycleAction. Blobs that meet the Condition associated with this action will be deleted.

Returns
Type Description
BucketInfo.LifecycleRule.DeleteLifecycleAction

newLifecycleAction(@NonNull String actionType)

public static BucketInfo.LifecycleRule.LifecycleAction newLifecycleAction(@NonNull String actionType)

Creates a new LifecycleAction, with no specific supported action associated with it. This is only intended as a "backup" for when the library doesn't recognize the type, and should generally not be used, instead use the supported actions, and upgrade the library if necessary to get new supported actions.

Parameter
Name Description
actionType @org.checkerframework.checker.nullness.qual.NonNull java.lang.String
Returns
Type Description
BucketInfo.LifecycleRule.LifecycleAction

newSetStorageClassAction(@NonNull StorageClass storageClass)

public static BucketInfo.LifecycleRule.SetStorageClassLifecycleAction newSetStorageClassAction(@NonNull StorageClass storageClass)

Creates a new SetStorageClassLifecycleAction. A Blob's storage class that meets the action's conditions will be changed to the specified storage class.

Parameter
Name Description
storageClass @org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.StorageClass

The new storage class to use when conditions are met for this action.

Returns
Type Description
BucketInfo.LifecycleRule.SetStorageClassLifecycleAction

Constructors

LifecycleAction(String actionType)

public LifecycleAction(String actionType)
Parameter
Name Description
actionType String

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
Name Description
o Object
Returns
Type Description
boolean
Overrides

getActionType()

public String getActionType()
Returns
Type Description
String

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides