{-# 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.Create
(
MattersCreateResource
, mattersCreate
, MattersCreate
, mXgafv
, mUploadProtocol
, mAccessToken
, mUploadType
, mPayload
, mCallback
) where
import Network.Google.Prelude
import Network.Google.Vault.Types
type MattersCreateResource =
"v1" :>
"matters" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Matter :> Post '[JSON] Matter
data MattersCreate = MattersCreate'
{ _mXgafv :: !(Maybe Xgafv)
, _mUploadProtocol :: !(Maybe Text)
, _mAccessToken :: !(Maybe Text)
, _mUploadType :: !(Maybe Text)
, _mPayload :: !Matter
, _mCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mattersCreate
:: Matter
-> MattersCreate
mattersCreate pMPayload_ =
MattersCreate'
{ _mXgafv = Nothing
, _mUploadProtocol = Nothing
, _mAccessToken = Nothing
, _mUploadType = Nothing
, _mPayload = pMPayload_
, _mCallback = Nothing
}
mXgafv :: Lens' MattersCreate (Maybe Xgafv)
mXgafv = lens _mXgafv (\ s a -> s{_mXgafv = a})
mUploadProtocol :: Lens' MattersCreate (Maybe Text)
mUploadProtocol
= lens _mUploadProtocol
(\ s a -> s{_mUploadProtocol = a})
mAccessToken :: Lens' MattersCreate (Maybe Text)
mAccessToken
= lens _mAccessToken (\ s a -> s{_mAccessToken = a})
mUploadType :: Lens' MattersCreate (Maybe Text)
mUploadType
= lens _mUploadType (\ s a -> s{_mUploadType = a})
mPayload :: Lens' MattersCreate Matter
mPayload = lens _mPayload (\ s a -> s{_mPayload = a})
mCallback :: Lens' MattersCreate (Maybe Text)
mCallback
= lens _mCallback (\ s a -> s{_mCallback = a})
instance GoogleRequest MattersCreate where
type Rs MattersCreate = Matter
type Scopes MattersCreate =
'["https://www.googleapis.com/auth/ediscovery"]
requestClient MattersCreate'{..}
= go _mXgafv _mUploadProtocol _mAccessToken
_mUploadType
_mCallback
(Just AltJSON)
_mPayload
vaultService
where go
= buildClient (Proxy :: Proxy MattersCreateResource)
mempty