{-# 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.DFAReporting.CreativeFieldValues.Insert
(
CreativeFieldValuesInsertResource
, creativeFieldValuesInsert
, CreativeFieldValuesInsert
, cfviCreativeFieldId
, cfviProFileId
, cfviPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldValuesInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
Capture "creativeFieldId" (Textual Int64) :>
"creativeFieldValues" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreativeFieldValue :>
Post '[JSON] CreativeFieldValue
data CreativeFieldValuesInsert = CreativeFieldValuesInsert'
{ _cfviCreativeFieldId :: !(Textual Int64)
, _cfviProFileId :: !(Textual Int64)
, _cfviPayload :: !CreativeFieldValue
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldValuesInsert
:: Int64
-> Int64
-> CreativeFieldValue
-> CreativeFieldValuesInsert
creativeFieldValuesInsert pCfviCreativeFieldId_ pCfviProFileId_ pCfviPayload_ =
CreativeFieldValuesInsert'
{ _cfviCreativeFieldId = _Coerce # pCfviCreativeFieldId_
, _cfviProFileId = _Coerce # pCfviProFileId_
, _cfviPayload = pCfviPayload_
}
cfviCreativeFieldId :: Lens' CreativeFieldValuesInsert Int64
cfviCreativeFieldId
= lens _cfviCreativeFieldId
(\ s a -> s{_cfviCreativeFieldId = a})
. _Coerce
cfviProFileId :: Lens' CreativeFieldValuesInsert Int64
cfviProFileId
= lens _cfviProFileId
(\ s a -> s{_cfviProFileId = a})
. _Coerce
cfviPayload :: Lens' CreativeFieldValuesInsert CreativeFieldValue
cfviPayload
= lens _cfviPayload (\ s a -> s{_cfviPayload = a})
instance GoogleRequest CreativeFieldValuesInsert
where
type Rs CreativeFieldValuesInsert =
CreativeFieldValue
type Scopes CreativeFieldValuesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldValuesInsert'{..}
= go _cfviProFileId _cfviCreativeFieldId
(Just AltJSON)
_cfviPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldValuesInsertResource)
mempty