{-# 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.Exports.Create
(
MattersExportsCreateResource
, mattersExportsCreate
, MattersExportsCreate
, mecXgafv
, mecUploadProtocol
, mecAccessToken
, mecUploadType
, mecPayload
, mecMatterId
, mecCallback
) where
import Network.Google.Prelude
import Network.Google.Vault.Types
type MattersExportsCreateResource =
"v1" :>
"matters" :>
Capture "matterId" Text :>
"exports" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Export :> Post '[JSON] Export
data MattersExportsCreate = MattersExportsCreate'
{ _mecXgafv :: !(Maybe Xgafv)
, _mecUploadProtocol :: !(Maybe Text)
, _mecAccessToken :: !(Maybe Text)
, _mecUploadType :: !(Maybe Text)
, _mecPayload :: !Export
, _mecMatterId :: !Text
, _mecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mattersExportsCreate
:: Export
-> Text
-> MattersExportsCreate
mattersExportsCreate pMecPayload_ pMecMatterId_ =
MattersExportsCreate'
{ _mecXgafv = Nothing
, _mecUploadProtocol = Nothing
, _mecAccessToken = Nothing
, _mecUploadType = Nothing
, _mecPayload = pMecPayload_
, _mecMatterId = pMecMatterId_
, _mecCallback = Nothing
}
mecXgafv :: Lens' MattersExportsCreate (Maybe Xgafv)
mecXgafv = lens _mecXgafv (\ s a -> s{_mecXgafv = a})
mecUploadProtocol :: Lens' MattersExportsCreate (Maybe Text)
mecUploadProtocol
= lens _mecUploadProtocol
(\ s a -> s{_mecUploadProtocol = a})
mecAccessToken :: Lens' MattersExportsCreate (Maybe Text)
mecAccessToken
= lens _mecAccessToken
(\ s a -> s{_mecAccessToken = a})
mecUploadType :: Lens' MattersExportsCreate (Maybe Text)
mecUploadType
= lens _mecUploadType
(\ s a -> s{_mecUploadType = a})
mecPayload :: Lens' MattersExportsCreate Export
mecPayload
= lens _mecPayload (\ s a -> s{_mecPayload = a})
mecMatterId :: Lens' MattersExportsCreate Text
mecMatterId
= lens _mecMatterId (\ s a -> s{_mecMatterId = a})
mecCallback :: Lens' MattersExportsCreate (Maybe Text)
mecCallback
= lens _mecCallback (\ s a -> s{_mecCallback = a})
instance GoogleRequest MattersExportsCreate where
type Rs MattersExportsCreate = Export
type Scopes MattersExportsCreate =
'["https://www.googleapis.com/auth/ediscovery"]
requestClient MattersExportsCreate'{..}
= go _mecMatterId _mecXgafv _mecUploadProtocol
_mecAccessToken
_mecUploadType
_mecCallback
(Just AltJSON)
_mecPayload
vaultService
where go
= buildClient
(Proxy :: Proxy MattersExportsCreateResource)
mempty