class Google::Apis::DriveV2::Permission

A permission for a file.

Attributes

additional_roles[RW]

Additional roles for this user. Only commenter is currently allowed. Corresponds to the JSON property `additionalRoles` @return [Array<String>]

auth_key[RW]

The authkey parameter required for this permission. Corresponds to the JSON property `authKey` @return [String]

domain[RW]

The domain name of the entity this permission refers to. This is an output- only field which is present when the permission type is user, group or domain. Corresponds to the JSON property `domain` @return [String]

email_address[RW]

The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. Corresponds to the JSON property `emailAddress` @return [String]

etag[RW]

The ETag of the permission. Corresponds to the JSON property `etag` @return [String]

id[RW]

The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions. insert request, exactly one of the id or value fields must be specified. Corresponds to the JSON property `id` @return [String]

kind[RW]

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

name[RW]

The name for this permission. Corresponds to the JSON property `name` @return [String]

role[RW]

The primary role for this user. Allowed values are:

  • owner

  • reader

  • writer

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

type[RW]

The account type. Allowed values are:

  • user

  • group

  • domain

  • anyone

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

value[RW]

The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified. Corresponds to the JSON property `value` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/drive_v2/classes.rb, line 2153
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_v2/classes.rb, line 2158
def update!(**args)
  @additional_roles = args[:additional_roles] if args.key?(:additional_roles)
  @auth_key = args[:auth_key] if args.key?(:auth_key)
  @domain = args[:domain] if args.key?(:domain)
  @email_address = args[:email_address] if args.key?(:email_address)
  @etag = args[:etag] if args.key?(:etag)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @photo_link = args[:photo_link] if args.key?(:photo_link)
  @role = args[:role] if args.key?(:role)
  @self_link = args[:self_link] if args.key?(:self_link)
  @type = args[:type] if args.key?(:type)
  @value = args[:value] if args.key?(:value)
  @with_link = args[:with_link] if args.key?(:with_link)
end