class Google::Apis::DriveV3::Permission

A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.

Attributes

allow_file_discovery[RW]

Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. Corresponds to the JSON property `allowFileDiscovery` @return [Boolean]

allow_file_discovery?[RW]

Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. Corresponds to the JSON property `allowFileDiscovery` @return [Boolean]

display_name[RW]

A displayable name for users, groups or domains. Corresponds to the JSON property `displayName` @return [String]

domain[RW]

The domain to which this permission refers. Corresponds to the JSON property `domain` @return [String]

email_address[RW]

The email address of the user or group to which this permission refers. Corresponds to the JSON property `emailAddress` @return [String]

id[RW]

The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. Corresponds to the JSON property `id` @return [String]

kind[RW]

This is always drive#permission. Corresponds to the JSON property `kind` @return [String]

role[RW]

The role granted by this permission. Valid values are:

  • owner

  • writer

  • commenter

  • reader

Corresponds to the JSON property `role` @return [String]

type[RW]

The type of the grantee. Valid values are:

  • user

  • group

  • domain

  • anyone

Corresponds to the JSON property `type` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/drive_v3/classes.rb, line 1201
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/drive_v3/classes.rb, line 1206
def update!(**args)
  @allow_file_discovery = args[:allow_file_discovery] if args.key?(:allow_file_discovery)
  @display_name = args[:display_name] if args.key?(:display_name)
  @domain = args[:domain] if args.key?(:domain)
  @email_address = args[:email_address] if args.key?(:email_address)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @photo_link = args[:photo_link] if args.key?(:photo_link)
  @role = args[:role] if args.key?(:role)
  @type = args[:type] if args.key?(:type)
end