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.
See: Drive API Reference for drive.permissions.create
.
- type PermissionsCreateResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("permissions" :> (QueryParam "sendNotificationEmail" Bool :> (QueryParam "emailMessage" Text :> (QueryParam "transferOwnership" 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)
- pcTransferOwnership :: Lens' PermissionsCreate Bool
- pcFileId :: Lens' PermissionsCreate Text
REST Resource
type PermissionsCreateResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("permissions" :> (QueryParam "sendNotificationEmail" Bool :> (QueryParam "emailMessage" Text :> (QueryParam "transferOwnership" 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.
See: permissionsCreate
smart constructor.
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 custom message to include in the notification email.
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.