All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.drive.model.Permission.html Maven / Gradle / Ivy

There is a newer version: v3-rev20241027-2.0.0
Show newest version






Permission (Google Drive API v3-rev20240809-2.0.0)












com.google.api.services.drive.model

Class Permission

  • All Implemented Interfaces:
    Cloneable, Map<String,Object>


    public final class Permission
    extends com.google.api.client.json.GenericJson
    A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Google Drive API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Constructor Detail

      • Permission

        public Permission()
    • Method Detail

      • getAllowFileDiscovery

        public Boolean getAllowFileDiscovery()
        Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type `domain` or `anyone`.
        Returns:
        value or null for none
      • setAllowFileDiscovery

        public Permission setAllowFileDiscovery(Boolean allowFileDiscovery)
        Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type `domain` or `anyone`.
        Parameters:
        allowFileDiscovery - allowFileDiscovery or null for none
      • getDeleted

        public Boolean getDeleted()
        Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
        Returns:
        value or null for none
      • setDeleted

        public Permission setDeleted(Boolean deleted)
        Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
        Parameters:
        deleted - deleted or null for none
      • getDisplayName

        public String getDisplayName()
        Output only. The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: * `user` - User's full name, as defined for their Google account, such as "Joe Smith." * `group` - Name of the Google Group, such as "The Company Administrators." * `domain` - String domain name, such as "thecompany.com." * `anyone` - No `displayName` is present.
        Returns:
        value or null for none
      • setDisplayName

        public Permission setDisplayName(String displayName)
        Output only. The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: * `user` - User's full name, as defined for their Google account, such as "Joe Smith." * `group` - Name of the Google Group, such as "The Company Administrators." * `domain` - String domain name, such as "thecompany.com." * `anyone` - No `displayName` is present.
        Parameters:
        displayName - displayName or null for none
      • getDomain

        public String getDomain()
        The domain to which this permission refers.
        Returns:
        value or null for none
      • setDomain

        public Permission setDomain(String domain)
        The domain to which this permission refers.
        Parameters:
        domain - domain or null for none
      • getEmailAddress

        public String getEmailAddress()
        The email address of the user or group to which this permission refers.
        Returns:
        value or null for none
      • setEmailAddress

        public Permission setEmailAddress(String emailAddress)
        The email address of the user or group to which this permission refers.
        Parameters:
        emailAddress - emailAddress or null for none
      • getExpirationTime

        public com.google.api.client.util.DateTime getExpirationTime()
        The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They can only be set on user and group permissions - The time must be in the future - The time cannot be more than a year in the future
        Returns:
        value or null for none
      • setExpirationTime

        public Permission setExpirationTime(com.google.api.client.util.DateTime expirationTime)
        The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They can only be set on user and group permissions - The time must be in the future - The time cannot be more than a year in the future
        Parameters:
        expirationTime - expirationTime or null for none
      • getId

        public String getId()
        Output only. The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as `permissionId`. IDs should be treated as opaque values.
        Returns:
        value or null for none
      • setId

        public Permission setId(String id)
        Output only. The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as `permissionId`. IDs should be treated as opaque values.
        Parameters:
        id - id or null for none
      • getKind

        public String getKind()
        Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#permission"`.
        Returns:
        value or null for none
      • setKind

        public Permission setKind(String kind)
        Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#permission"`.
        Parameters:
        kind - kind or null for none
      • getPendingOwner

        public Boolean getPendingOwner()
        Whether the account associated with this permission is a pending owner. Only populated for `user` type permissions for files that are not in a shared drive.
        Returns:
        value or null for none
      • setPendingOwner

        public Permission setPendingOwner(Boolean pendingOwner)
        Whether the account associated with this permission is a pending owner. Only populated for `user` type permissions for files that are not in a shared drive.
        Parameters:
        pendingOwner - pendingOwner or null for none
      • getPermissionDetails

        public List<Permission.PermissionDetails> getPermissionDetails()
        Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
        Returns:
        value or null for none
      • setPermissionDetails

        public Permission setPermissionDetails(List<Permission.PermissionDetails> permissionDetails)
        Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
        Parameters:
        permissionDetails - permissionDetails or null for none
      • getPhotoLink

        public String getPhotoLink()
        Output only. A link to the user's profile photo, if available.
        Returns:
        value or null for none
      • setPhotoLink

        public Permission setPhotoLink(String photoLink)
        Output only. A link to the user's profile photo, if available.
        Parameters:
        photoLink - photoLink or null for none
      • getRole

        public String getRole()
        The role granted by this permission. While new values may be supported in the future, the following are currently allowed: * `owner` * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader`
        Returns:
        value or null for none
      • setRole

        public Permission setRole(String role)
        The role granted by this permission. While new values may be supported in the future, the following are currently allowed: * `owner` * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader`
        Parameters:
        role - role or null for none
      • getTeamDrivePermissionDetails

        public List<Permission.TeamDrivePermissionDetails> getTeamDrivePermissionDetails()
        Output only. Deprecated: Output only. Use `permissionDetails` instead.
        Returns:
        value or null for none
      • setTeamDrivePermissionDetails

        public Permission setTeamDrivePermissionDetails(List<Permission.TeamDrivePermissionDetails> teamDrivePermissionDetails)
        Output only. Deprecated: Output only. Use `permissionDetails` instead.
        Parameters:
        teamDrivePermissionDetails - teamDrivePermissionDetails or null for none
      • getType

        public String getType()
        The type of the grantee. Valid values are: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. When `type` is `domain`, you must provide a `domain`. There isn't extra information required for an `anyone` type.
        Returns:
        value or null for none
      • setType

        public Permission setType(String type)
        The type of the grantee. Valid values are: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. When `type` is `domain`, you must provide a `domain`. There isn't extra information required for an `anyone` type.
        Parameters:
        type - type or null for none
      • getView

        public String getView()
        Indicates the view for this permission. Only populated for permissions that belong to a view. 'published' is the only supported value.
        Returns:
        value or null for none
      • setView

        public Permission setView(String view)
        Indicates the view for this permission. Only populated for permissions that belong to a view. 'published' is the only supported value.
        Parameters:
        view - view or null for none
      • set

        public Permission set(String fieldName,
                              Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public Permission clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy