class Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition

The condition(s) under which the action will be taken.

Attributes

age[RW]

Age of an object (in days). This condition is satisfied when an object reaches the specified age. Corresponds to the JSON property `age` @return [Fixnum]

created_before[RW]

A date in RFC 3339 format with only the date part (for instance, “2013-01-15”). This condition is satisfied when an object is created before midnight of the specified date in UTC. Corresponds to the JSON property `createdBefore` @return [Date]

is_live[RW]

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. Corresponds to the JSON property `isLive` @return [Boolean]

is_live?[RW]

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. Corresponds to the JSON property `isLive` @return [Boolean]

num_newer_versions[RW]

Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. Corresponds to the JSON property `numNewerVersions` @return [Fixnum]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/storage_v1/classes.rb, line 294
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/storage_v1/classes.rb, line 299
def update!(**args)
  @age = args[:age] if args.key?(:age)
  @created_before = args[:created_before] if args.key?(:created_before)
  @is_live = args[:is_live] if args.key?(:is_live)
  @num_newer_versions = args[:num_newer_versions] if args.key?(:num_newer_versions)
end