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

target.apidocs.com.google.api.services.drive.Drive.Permissions.Create.html Maven / Gradle / Ivy

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






Drive.Permissions.Create (Google Drive API v3-rev20241027-2.0.0)












com.google.api.services.drive

Class Drive.Permissions.Create

    • Constructor Detail

      • Create

        protected Create(String fileId,
                         Permission content)
        Creates a permission for a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied. Create a request for the method "permissions.create". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        Drive.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest) must be called to initialize this instance immediately after invoking the constructor.

        Parameters:
        fileId - The ID of the file or shared drive.
        content - the Permission
        Since:
        1.13
    • Method Detail

      • getFileId

        public String getFileId()
        The ID of the file or shared drive.
      • getEmailMessage

        public String getEmailMessage()
        A plain text custom message to include in the notification email.
      • setEmailMessage

        public Drive.Permissions.Create setEmailMessage(String emailMessage)
        A plain text custom message to include in the notification email.
      • getEnforceSingleParent

        public Boolean getEnforceSingleParent()
        Deprecated: See `moveToNewOwnersRoot` for details. [default: false]
      • setEnforceSingleParent

        public Drive.Permissions.Create setEnforceSingleParent(Boolean enforceSingleParent)
        Deprecated: See `moveToNewOwnersRoot` for details.
      • isEnforceSingleParent

        public boolean isEnforceSingleParent()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Deprecated: See `moveToNewOwnersRoot` for details.

      • getMoveToNewOwnersRoot

        public Boolean getMoveToNewOwnersRoot()
        This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed. [default: false]
      • setMoveToNewOwnersRoot

        public Drive.Permissions.Create setMoveToNewOwnersRoot(Boolean moveToNewOwnersRoot)
        This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed.
      • isMoveToNewOwnersRoot

        public boolean isMoveToNewOwnersRoot()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed.

      • getSendNotificationEmail

        public Boolean getSendNotificationEmail()
        Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
      • setSendNotificationEmail

        public Drive.Permissions.Create setSendNotificationEmail(Boolean sendNotificationEmail)
        Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
      • getSupportsAllDrives

        public Boolean getSupportsAllDrives()
        Whether the requesting application supports both My Drives and shared drives. [default: false]
      • setSupportsAllDrives

        public Drive.Permissions.Create setSupportsAllDrives(Boolean supportsAllDrives)
        Whether the requesting application supports both My Drives and shared drives.
      • isSupportsAllDrives

        public boolean isSupportsAllDrives()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Whether the requesting application supports both My Drives and shared drives.

      • getSupportsTeamDrives

        public Boolean getSupportsTeamDrives()
        Deprecated: Use `supportsAllDrives` instead. [default: false]
      • isSupportsTeamDrives

        public boolean isSupportsTeamDrives()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Deprecated: Use `supportsAllDrives` instead.

      • getTransferOwnership

        public Boolean getTransferOwnership()
        Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. [default: false]
      • setTransferOwnership

        public Drive.Permissions.Create setTransferOwnership(Boolean transferOwnership)
        Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
      • isTransferOwnership

        public boolean isTransferOwnership()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.

      • getUseDomainAdminAccess

        public Boolean getUseDomainAdminAccess()
        Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false]
      • setUseDomainAdminAccess

        public Drive.Permissions.Create setUseDomainAdminAccess(Boolean useDomainAdminAccess)
        Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
      • isUseDomainAdminAccess

        public boolean isUseDomainAdminAccess()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy