module Network.Google.Resource.DFAReporting.AccountUserProFiles.Insert
(
AccountUserProFilesInsertResource
, accountUserProFilesInsert
, AccountUserProFilesInsert
, aupfiProFileId
, aupfiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountUserProFilesInsertResource =
"dfareporting" :>
"v2.5" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accountUserProfiles" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountUserProFile :>
Post '[JSON] AccountUserProFile
data AccountUserProFilesInsert = AccountUserProFilesInsert'
{ _aupfiProFileId :: !(Textual Int64)
, _aupfiPayload :: !AccountUserProFile
} deriving (Eq,Show,Data,Typeable,Generic)
accountUserProFilesInsert
:: Int64
-> AccountUserProFile
-> AccountUserProFilesInsert
accountUserProFilesInsert pAupfiProFileId_ pAupfiPayload_ =
AccountUserProFilesInsert'
{ _aupfiProFileId = _Coerce # pAupfiProFileId_
, _aupfiPayload = pAupfiPayload_
}
aupfiProFileId :: Lens' AccountUserProFilesInsert Int64
aupfiProFileId
= lens _aupfiProFileId
(\ s a -> s{_aupfiProFileId = a})
. _Coerce
aupfiPayload :: Lens' AccountUserProFilesInsert AccountUserProFile
aupfiPayload
= lens _aupfiPayload (\ s a -> s{_aupfiPayload = a})
instance GoogleRequest AccountUserProFilesInsert
where
type Rs AccountUserProFilesInsert =
AccountUserProFile
type Scopes AccountUserProFilesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountUserProFilesInsert'{..}
= go _aupfiProFileId (Just AltJSON) _aupfiPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AccountUserProFilesInsertResource)
mempty