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
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]
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]
A displayable name for users, groups or domains. Corresponds to the JSON property `displayName` @return [String]
The domain to which this permission refers. Corresponds to the JSON property `domain` @return [String]
The email address of the user or group to which this permission refers. Corresponds to the JSON property `emailAddress` @return [String]
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]
This is always drive#permission. Corresponds to the JSON property `kind` @return [String]
A link to the user's profile photo, if available. Corresponds to the JSON property `photoLink` @return [String]
The role granted by this permission. Valid values are:
-
owner
-
writer
-
commenter
-
reader
Corresponds to the JSON property `role` @return [String]
The type of the grantee. Valid values are:
-
user
-
group
-
domain
-
anyone
Corresponds to the JSON property `type` @return [String]
Public Class Methods
# File generated/google/apis/drive_v3/classes.rb, line 1201 def initialize(**args) update!(**args) end
Public Instance Methods
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