Class: Google::Apis::DriveV3::Drive::Restrictions

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 set of restrictions that apply to this shared drive or items inside this shared drive. Note that restrictions can't be set when creating a shared drive. To add a restriction, first create a shared drive and then use drives.update to add restrictions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Restrictions

Returns a new instance of Restrictions.



1433
1434
1435
# File 'lib/google/apis/drive_v3/classes.rb', line 1433

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

Instance Attribute Details

#admin_managed_restrictionsBoolean Also known as: admin_managed_restrictions?

Whether administrative privileges on this shared drive are required to modify restrictions. Corresponds to the JSON property adminManagedRestrictions

Returns:

  • (Boolean)


1394
1395
1396
# File 'lib/google/apis/drive_v3/classes.rb', line 1394

def admin_managed_restrictions
  @admin_managed_restrictions
end

#copy_requires_writer_permissionBoolean Also known as: copy_requires_writer_permission?

Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive. Corresponds to the JSON property copyRequiresWriterPermission

Returns:

  • (Boolean)


1403
1404
1405
# File 'lib/google/apis/drive_v3/classes.rb', line 1403

def copy_requires_writer_permission
  @copy_requires_writer_permission
end

#domain_users_onlyBoolean Also known as: domain_users_only?

Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. This restriction may be overridden by other sharing policies controlled outside of this shared drive. Corresponds to the JSON property domainUsersOnly

Returns:

  • (Boolean)


1412
1413
1414
# File 'lib/google/apis/drive_v3/classes.rb', line 1412

def domain_users_only
  @domain_users_only
end

#download_restrictionGoogle::Apis::DriveV3::DownloadRestriction

A restriction for copy and download of the file. Corresponds to the JSON property downloadRestriction



1418
1419
1420
# File 'lib/google/apis/drive_v3/classes.rb', line 1418

def download_restriction
  @download_restriction
end

#drive_members_onlyBoolean Also known as: drive_members_only?

Whether access to items inside this shared drive is restricted to its members. Corresponds to the JSON property driveMembersOnly

Returns:

  • (Boolean)


1423
1424
1425
# File 'lib/google/apis/drive_v3/classes.rb', line 1423

def drive_members_only
  @drive_members_only
end

#sharing_folders_requires_organizer_permissionBoolean Also known as: sharing_folders_requires_organizer_permission?

If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders. Corresponds to the JSON property sharingFoldersRequiresOrganizerPermission

Returns:

  • (Boolean)


1430
1431
1432
# File 'lib/google/apis/drive_v3/classes.rb', line 1430

def sharing_folders_requires_organizer_permission
  @sharing_folders_requires_organizer_permission
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1438
1439
1440
1441
1442
1443
1444
1445
# File 'lib/google/apis/drive_v3/classes.rb', line 1438

def update!(**args)
  @admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
  @copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
  @domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
  @download_restriction = args[:download_restriction] if args.key?(:download_restriction)
  @drive_members_only = args[:drive_members_only] if args.key?(:drive_members_only)
  @sharing_folders_requires_organizer_permission = args[:sharing_folders_requires_organizer_permission] if args.key?(:sharing_folders_requires_organizer_permission)
end