{-# 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.SavedQueries.Create
(
MattersSavedQueriesCreateResource
, mattersSavedQueriesCreate
, MattersSavedQueriesCreate
, msqcXgafv
, msqcUploadProtocol
, msqcAccessToken
, msqcUploadType
, msqcPayload
, msqcMatterId
, msqcCallback
) where
import Network.Google.Prelude
import Network.Google.Vault.Types
type MattersSavedQueriesCreateResource =
"v1" :>
"matters" :>
Capture "matterId" Text :>
"savedQueries" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SavedQuery :> Post '[JSON] SavedQuery
data MattersSavedQueriesCreate = MattersSavedQueriesCreate'
{ _msqcXgafv :: !(Maybe Xgafv)
, _msqcUploadProtocol :: !(Maybe Text)
, _msqcAccessToken :: !(Maybe Text)
, _msqcUploadType :: !(Maybe Text)
, _msqcPayload :: !SavedQuery
, _msqcMatterId :: !Text
, _msqcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mattersSavedQueriesCreate
:: SavedQuery
-> Text
-> MattersSavedQueriesCreate
mattersSavedQueriesCreate pMsqcPayload_ pMsqcMatterId_ =
MattersSavedQueriesCreate'
{ _msqcXgafv = Nothing
, _msqcUploadProtocol = Nothing
, _msqcAccessToken = Nothing
, _msqcUploadType = Nothing
, _msqcPayload = pMsqcPayload_
, _msqcMatterId = pMsqcMatterId_
, _msqcCallback = Nothing
}
msqcXgafv :: Lens' MattersSavedQueriesCreate (Maybe Xgafv)
msqcXgafv
= lens _msqcXgafv (\ s a -> s{_msqcXgafv = a})
msqcUploadProtocol :: Lens' MattersSavedQueriesCreate (Maybe Text)
msqcUploadProtocol
= lens _msqcUploadProtocol
(\ s a -> s{_msqcUploadProtocol = a})
msqcAccessToken :: Lens' MattersSavedQueriesCreate (Maybe Text)
msqcAccessToken
= lens _msqcAccessToken
(\ s a -> s{_msqcAccessToken = a})
msqcUploadType :: Lens' MattersSavedQueriesCreate (Maybe Text)
msqcUploadType
= lens _msqcUploadType
(\ s a -> s{_msqcUploadType = a})
msqcPayload :: Lens' MattersSavedQueriesCreate SavedQuery
msqcPayload
= lens _msqcPayload (\ s a -> s{_msqcPayload = a})
msqcMatterId :: Lens' MattersSavedQueriesCreate Text
msqcMatterId
= lens _msqcMatterId (\ s a -> s{_msqcMatterId = a})
msqcCallback :: Lens' MattersSavedQueriesCreate (Maybe Text)
msqcCallback
= lens _msqcCallback (\ s a -> s{_msqcCallback = a})
instance GoogleRequest MattersSavedQueriesCreate
where
type Rs MattersSavedQueriesCreate = SavedQuery
type Scopes MattersSavedQueriesCreate =
'["https://www.googleapis.com/auth/ediscovery"]
requestClient MattersSavedQueriesCreate'{..}
= go _msqcMatterId _msqcXgafv _msqcUploadProtocol
_msqcAccessToken
_msqcUploadType
_msqcCallback
(Just AltJSON)
_msqcPayload
vaultService
where go
= buildClient
(Proxy :: Proxy MattersSavedQueriesCreateResource)
mempty