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.



1049
1050
1051
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1049

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 cannot 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)


1041
1042
1043
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1041

def event_based_hold
  @event_based_hold
end

#temporary_holdString

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

Returns:

  • (String)


1047
1048
1049
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1047

def temporary_hold
  @temporary_hold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1054
1055
1056
1057
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1054

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