Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a permission for a file or Team Drive.
See: Drive API Reference for drive.permissions.create
.
Synopsis
- type PermissionsCreateResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("permissions" :> (QueryParam "sendNotificationEmail" Bool :> (QueryParam "emailMessage" Text :> (QueryParam "useDomainAdminAccess" Bool :> (QueryParam "transferOwnership" Bool :> (QueryParam "supportsTeamDrives" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Permission :> Post '[JSON] Permission)))))))))))
- permissionsCreate :: Permission -> Text -> PermissionsCreate
- data PermissionsCreate
- pcSendNotificationEmail :: Lens' PermissionsCreate (Maybe Bool)
- pcPayload :: Lens' PermissionsCreate Permission
- pcEmailMessage :: Lens' PermissionsCreate (Maybe Text)
- pcUseDomainAdminAccess :: Lens' PermissionsCreate Bool
- pcTransferOwnership :: Lens' PermissionsCreate Bool
- pcFileId :: Lens' PermissionsCreate Text
- pcSupportsTeamDrives :: Lens' PermissionsCreate Bool
REST Resource
type PermissionsCreateResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("permissions" :> (QueryParam "sendNotificationEmail" Bool :> (QueryParam "emailMessage" Text :> (QueryParam "useDomainAdminAccess" Bool :> (QueryParam "transferOwnership" Bool :> (QueryParam "supportsTeamDrives" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Permission :> Post '[JSON] Permission))))))))))) Source #
A resource alias for drive.permissions.create
method which the
PermissionsCreate
request conforms to.
Creating a Request
Creates a value of PermissionsCreate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data PermissionsCreate Source #
Creates a permission for a file or Team Drive.
See: permissionsCreate
smart constructor.
Instances
Request Lenses
pcSendNotificationEmail :: Lens' PermissionsCreate (Maybe Bool) Source #
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.
pcPayload :: Lens' PermissionsCreate Permission Source #
Multipart request metadata.
pcEmailMessage :: Lens' PermissionsCreate (Maybe Text) Source #
A plain text custom message to include in the notification email.
pcUseDomainAdminAccess :: Lens' PermissionsCreate Bool Source #
Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs.
pcTransferOwnership :: Lens' PermissionsCreate Bool Source #
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.
pcSupportsTeamDrives :: Lens' PermissionsCreate Bool Source #
Whether the requesting application supports Team Drives.