{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Vault.Matters.AddPermissions
(
MattersAddPermissionsResource
, mattersAddPermissions
, MattersAddPermissions
, mapXgafv
, mapUploadProtocol
, mapAccessToken
, mapUploadType
, mapPayload
, mapMatterId
, mapCallback
) where
import Network.Google.Prelude
import Network.Google.Vault.Types
type MattersAddPermissionsResource =
"v1" :>
"matters" :>
CaptureMode "matterId" "addPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AddMatterPermissionsRequest :>
Post '[JSON] MatterPermission
data MattersAddPermissions = MattersAddPermissions'
{ _mapXgafv :: !(Maybe Xgafv)
, _mapUploadProtocol :: !(Maybe Text)
, _mapAccessToken :: !(Maybe Text)
, _mapUploadType :: !(Maybe Text)
, _mapPayload :: !AddMatterPermissionsRequest
, _mapMatterId :: !Text
, _mapCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mattersAddPermissions
:: AddMatterPermissionsRequest
-> Text
-> MattersAddPermissions
mattersAddPermissions pMapPayload_ pMapMatterId_ =
MattersAddPermissions'
{ _mapXgafv = Nothing
, _mapUploadProtocol = Nothing
, _mapAccessToken = Nothing
, _mapUploadType = Nothing
, _mapPayload = pMapPayload_
, _mapMatterId = pMapMatterId_
, _mapCallback = Nothing
}
mapXgafv :: Lens' MattersAddPermissions (Maybe Xgafv)
mapXgafv = lens _mapXgafv (\ s a -> s{_mapXgafv = a})
mapUploadProtocol :: Lens' MattersAddPermissions (Maybe Text)
mapUploadProtocol
= lens _mapUploadProtocol
(\ s a -> s{_mapUploadProtocol = a})
mapAccessToken :: Lens' MattersAddPermissions (Maybe Text)
mapAccessToken
= lens _mapAccessToken
(\ s a -> s{_mapAccessToken = a})
mapUploadType :: Lens' MattersAddPermissions (Maybe Text)
mapUploadType
= lens _mapUploadType
(\ s a -> s{_mapUploadType = a})
mapPayload :: Lens' MattersAddPermissions AddMatterPermissionsRequest
mapPayload
= lens _mapPayload (\ s a -> s{_mapPayload = a})
mapMatterId :: Lens' MattersAddPermissions Text
mapMatterId
= lens _mapMatterId (\ s a -> s{_mapMatterId = a})
mapCallback :: Lens' MattersAddPermissions (Maybe Text)
mapCallback
= lens _mapCallback (\ s a -> s{_mapCallback = a})
instance GoogleRequest MattersAddPermissions where
type Rs MattersAddPermissions = MatterPermission
type Scopes MattersAddPermissions =
'["https://www.googleapis.com/auth/ediscovery"]
requestClient MattersAddPermissions'{..}
= go _mapMatterId _mapXgafv _mapUploadProtocol
_mapAccessToken
_mapUploadType
_mapCallback
(Just AltJSON)
_mapPayload
vaultService
where go
= buildClient
(Proxy :: Proxy MattersAddPermissionsResource)
mempty