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.



1329
1330
1331
# File 'lib/google/apis/drive_v3/classes.rb', line 1329

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)


1319
1320
1321
# File 'lib/google/apis/drive_v3/classes.rb', line 1319

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)


1326
1327
1328
# File 'lib/google/apis/drive_v3/classes.rb', line 1326

def restricted_for_writers
  @restricted_for_writers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1334
1335
1336
1337
# File 'lib/google/apis/drive_v3/classes.rb', line 1334

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