Class: Google::Apis::DriveV3::DownloadRestriction

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

Overview

A restriction for copy and download of the file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DownloadRestriction

Returns a new instance of DownloadRestriction.



1227
1228
1229
# File 'lib/google/apis/drive_v3/classes.rb', line 1227

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

Instance Attribute Details

#restricted_for_readersBoolean Also known as: restricted_for_readers?

Whether download and copy is restricted for readers. Corresponds to the JSON property restrictedForReaders

Returns:

  • (Boolean)


1217
1218
1219
# File 'lib/google/apis/drive_v3/classes.rb', line 1217

def restricted_for_readers
  @restricted_for_readers
end

#restricted_for_writersBoolean Also known as: restricted_for_writers?

Whether download and copy is restricted for writers. If true, download is also restricted for readers. Corresponds to the JSON property restrictedForWriters

Returns:

  • (Boolean)


1224
1225
1226
# File 'lib/google/apis/drive_v3/classes.rb', line 1224

def restricted_for_writers
  @restricted_for_writers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1232
1233
1234
1235
# File 'lib/google/apis/drive_v3/classes.rb', line 1232

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