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.



1016
1017
1018
# File 'lib/google/apis/drive_v3/classes.rb', line 1016

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)


1006
1007
1008
# File 'lib/google/apis/drive_v3/classes.rb', line 1006

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)


1013
1014
1015
# File 'lib/google/apis/drive_v3/classes.rb', line 1013

def restricted_for_writers
  @restricted_for_writers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1021
1022
1023
1024
# File 'lib/google/apis/drive_v3/classes.rb', line 1021

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