Class: Google::Apis::StorageV1::Object::Retention

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/storage_v1/classes.rb,
lib/google/apis/storage_v1/representations.rb,
lib/google/apis/storage_v1/representations.rb

Overview

A collection of object level retention parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Retention

Returns a new instance of Retention.



2004
2005
2006
# File 'lib/google/apis/storage_v1/classes.rb', line 2004

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#modeString

The bucket's object retention mode, can only be Unlocked or Locked. Corresponds to the JSON property mode

Returns:

  • (String)


1997
1998
1999
# File 'lib/google/apis/storage_v1/classes.rb', line 1997

def mode
  @mode
end

#retain_until_timeDateTime

A time in RFC 3339 format until which object retention protects this object. Corresponds to the JSON property retainUntilTime

Returns:

  • (DateTime)


2002
2003
2004
# File 'lib/google/apis/storage_v1/classes.rb', line 2002

def retain_until_time
  @retain_until_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2009
2010
2011
2012
# File 'lib/google/apis/storage_v1/classes.rb', line 2009

def update!(**args)
  @mode = args[:mode] if args.key?(:mode)
  @retain_until_time = args[:retain_until_time] if args.key?(:retain_until_time)
end