Class: Google::Apis::StoragebatchoperationsV1::PutObjectHold

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

Overview

Describes options to update object hold.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PutObjectHold

Returns a new instance of PutObjectHold.



1300
1301
1302
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1300

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

Instance Attribute Details

#event_based_holdString

Required. Updates object event based holds state. When object event based hold is set, object can't be deleted or replaced. Resets object's time in the bucket for the purposes of the retention period. Corresponds to the JSON property eventBasedHold

Returns:

  • (String)


1292
1293
1294
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1292

def event_based_hold
  @event_based_hold
end

#temporary_holdString

Required. Updates object temporary holds state. When object temporary hold is set, object can't be deleted or replaced. Corresponds to the JSON property temporaryHold

Returns:

  • (String)


1298
1299
1300
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1298

def temporary_hold
  @temporary_hold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1305
1306
1307
1308
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1305

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