{-# 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.Holds.Create
(
MattersHoldsCreateResource
, mattersHoldsCreate
, MattersHoldsCreate
, mhcXgafv
, mhcUploadProtocol
, mhcAccessToken
, mhcUploadType
, mhcPayload
, mhcMatterId
, mhcCallback
) where
import Network.Google.Prelude
import Network.Google.Vault.Types
type MattersHoldsCreateResource =
"v1" :>
"matters" :>
Capture "matterId" Text :>
"holds" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Hold :> Post '[JSON] Hold
data MattersHoldsCreate = MattersHoldsCreate'
{ _mhcXgafv :: !(Maybe Xgafv)
, _mhcUploadProtocol :: !(Maybe Text)
, _mhcAccessToken :: !(Maybe Text)
, _mhcUploadType :: !(Maybe Text)
, _mhcPayload :: !Hold
, _mhcMatterId :: !Text
, _mhcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mattersHoldsCreate
:: Hold
-> Text
-> MattersHoldsCreate
mattersHoldsCreate pMhcPayload_ pMhcMatterId_ =
MattersHoldsCreate'
{ _mhcXgafv = Nothing
, _mhcUploadProtocol = Nothing
, _mhcAccessToken = Nothing
, _mhcUploadType = Nothing
, _mhcPayload = pMhcPayload_
, _mhcMatterId = pMhcMatterId_
, _mhcCallback = Nothing
}
mhcXgafv :: Lens' MattersHoldsCreate (Maybe Xgafv)
mhcXgafv = lens _mhcXgafv (\ s a -> s{_mhcXgafv = a})
mhcUploadProtocol :: Lens' MattersHoldsCreate (Maybe Text)
mhcUploadProtocol
= lens _mhcUploadProtocol
(\ s a -> s{_mhcUploadProtocol = a})
mhcAccessToken :: Lens' MattersHoldsCreate (Maybe Text)
mhcAccessToken
= lens _mhcAccessToken
(\ s a -> s{_mhcAccessToken = a})
mhcUploadType :: Lens' MattersHoldsCreate (Maybe Text)
mhcUploadType
= lens _mhcUploadType
(\ s a -> s{_mhcUploadType = a})
mhcPayload :: Lens' MattersHoldsCreate Hold
mhcPayload
= lens _mhcPayload (\ s a -> s{_mhcPayload = a})
mhcMatterId :: Lens' MattersHoldsCreate Text
mhcMatterId
= lens _mhcMatterId (\ s a -> s{_mhcMatterId = a})
mhcCallback :: Lens' MattersHoldsCreate (Maybe Text)
mhcCallback
= lens _mhcCallback (\ s a -> s{_mhcCallback = a})
instance GoogleRequest MattersHoldsCreate where
type Rs MattersHoldsCreate = Hold
type Scopes MattersHoldsCreate =
'["https://www.googleapis.com/auth/ediscovery"]
requestClient MattersHoldsCreate'{..}
= go _mhcMatterId _mhcXgafv _mhcUploadProtocol
_mhcAccessToken
_mhcUploadType
_mhcCallback
(Just AltJSON)
_mhcPayload
vaultService
where go
= buildClient
(Proxy :: Proxy MattersHoldsCreateResource)
mempty