Class: Google::Apis::StorageV1beta2::Bucket::Lifecycle::Rule::Condition
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::StorageV1beta2::Bucket::Lifecycle::Rule::Condition
 
 
- Includes:
 - Core::Hashable, Core::JsonObjectSupport
 
- Defined in:
 - generated/google/apis/storage_v1beta2/classes.rb,
generated/google/apis/storage_v1beta2/representations.rb,
generated/google/apis/storage_v1beta2/representations.rb 
Overview
The condition(s) under which the action will be taken.
Instance Attribute Summary collapse
- 
  
    
      #age  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Age of an object (in days).
 - 
  
    
      #created_before  ⇒ Date 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
A date in RFC 3339 format with only the date part, e.g.
 - 
  
    
      #is_live  ⇒ Boolean 
    
    
      (also: #is_live?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Relevant only for versioned objects.
 - 
  
    
      #num_newer_versions  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Relevant only for versioned objects.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ Condition 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Condition.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Condition
Returns a new instance of Condition
      282 283 284  | 
    
      # File 'generated/google/apis/storage_v1beta2/classes.rb', line 282 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#age ⇒ Fixnum
Age of an object (in days). This condition is satisfied when an object reaches
the specified age.
Corresponds to the JSON property age
      259 260 261  | 
    
      # File 'generated/google/apis/storage_v1beta2/classes.rb', line 259 def age @age end  | 
  
#created_before ⇒ Date
A date in RFC 3339 format with only the date part, e.g. "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
      266 267 268  | 
    
      # File 'generated/google/apis/storage_v1beta2/classes.rb', line 266 def created_before @created_before end  | 
  
#is_live ⇒ Boolean Also known as: is_live?
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
      272 273 274  | 
    
      # File 'generated/google/apis/storage_v1beta2/classes.rb', line 272 def is_live @is_live end  | 
  
#num_newer_versions ⇒ Fixnum
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
      280 281 282  | 
    
      # File 'generated/google/apis/storage_v1beta2/classes.rb', line 280 def num_newer_versions @num_newer_versions end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      287 288 289 290 291 292  | 
    
      # File 'generated/google/apis/storage_v1beta2/classes.rb', line 287 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  |