class Google::Apis::DriveV2::Permission
A permission for a file.
Attributes
Additional roles for this user. Only commenter is currently allowed. Corresponds to the JSON property `additionalRoles` @return [Array<String>]
The authkey parameter required for this permission. Corresponds to the JSON property `authKey` @return [String]
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]
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]
The ETag of the permission. Corresponds to the JSON property `etag` @return [String]
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]
This is always drive#permission. Corresponds to the JSON property `kind` @return [String]
The name for this permission. Corresponds to the JSON property `name` @return [String]
A link to the profile photo, if available. Corresponds to the JSON property `photoLink` @return [String]
The primary role for this user. Allowed values are:
-
owner
-
reader
-
writer
Corresponds to the JSON property `role` @return [String]
A link back to this permission. Corresponds to the JSON property `selfLink` @return [String]
The account type. Allowed values are:
-
user
-
group
-
domain
-
anyone
Corresponds to the JSON property `type` @return [String]
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]
Whether the link is required for this permission. Corresponds to the JSON property `withLink` @return [Boolean]
Whether the link is required for this permission. Corresponds to the JSON property `withLink` @return [Boolean]
Public Class Methods
# File generated/google/apis/drive_v2/classes.rb, line 2153 def initialize(**args) update!(**args) end
Public Instance Methods
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