Class: Google::Apis::StorageV1::Bucket::SoftDeletePolicy

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

The bucket's soft delete policy, which defines the period of time that soft- deleted objects will be retained, and cannot be permanently deleted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SoftDeletePolicy

Returns a new instance of SoftDeletePolicy.



1080
1081
1082
# File 'lib/google/apis/storage_v1/classes.rb', line 1080

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

Instance Attribute Details

#effective_timeDateTime

Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format. Corresponds to the JSON property effectiveTime

Returns:

  • (DateTime)


1072
1073
1074
# File 'lib/google/apis/storage_v1/classes.rb', line 1072

def effective_time
  @effective_time
end

#retention_duration_secondsFixnum

The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Corresponds to the JSON property retentionDurationSeconds

Returns:

  • (Fixnum)


1078
1079
1080
# File 'lib/google/apis/storage_v1/classes.rb', line 1078

def retention_duration_seconds
  @retention_duration_seconds
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1085
1086
1087
1088
# File 'lib/google/apis/storage_v1/classes.rb', line 1085

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