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

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

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






Drive.Permissions.Insert (Google Drive API v2-rev20240809-2.0.0)












com.google.api.services.drive

Class Drive.Permissions.Insert

    • Constructor Detail

      • Insert

        protected Insert(String fileId,
                         Permission content)
        Inserts 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.insert". 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 for the file or shared drive.
        content - the Permission
        Since:
        1.13
    • Method Detail

      • getFileId

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

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

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

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

        public Drive.Permissions.Insert 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.Insert 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.

      • getSendNotificationEmails

        public Boolean getSendNotificationEmails()
        Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the `role` is `owner`. [default: true]
      • setSendNotificationEmails

        public Drive.Permissions.Insert setSendNotificationEmails(Boolean sendNotificationEmails)
        Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the `role` is `owner`.
      • isSendNotificationEmails

        public boolean isSendNotificationEmails()
        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 send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the `role` is `owner`.

      • getSupportsAllDrives

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

        public Drive.Permissions.Insert 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.

      • 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.Insert 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 - 2025 Weber Informatics LLC | Privacy Policy