{-# 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.CampaignCreativeAssociations.Insert
(
CampaignCreativeAssociationsInsertResource
, campaignCreativeAssociationsInsert
, CampaignCreativeAssociationsInsert
, ccaiCampaignId
, ccaiProFileId
, ccaiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CampaignCreativeAssociationsInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"campaigns" :>
Capture "campaignId" (Textual Int64) :>
"campaignCreativeAssociations" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CampaignCreativeAssociation :>
Post '[JSON] CampaignCreativeAssociation
data CampaignCreativeAssociationsInsert = CampaignCreativeAssociationsInsert'
{ _ccaiCampaignId :: !(Textual Int64)
, _ccaiProFileId :: !(Textual Int64)
, _ccaiPayload :: !CampaignCreativeAssociation
} deriving (Eq,Show,Data,Typeable,Generic)
campaignCreativeAssociationsInsert
:: Int64
-> Int64
-> CampaignCreativeAssociation
-> CampaignCreativeAssociationsInsert
campaignCreativeAssociationsInsert pCcaiCampaignId_ pCcaiProFileId_ pCcaiPayload_ =
CampaignCreativeAssociationsInsert'
{ _ccaiCampaignId = _Coerce # pCcaiCampaignId_
, _ccaiProFileId = _Coerce # pCcaiProFileId_
, _ccaiPayload = pCcaiPayload_
}
ccaiCampaignId :: Lens' CampaignCreativeAssociationsInsert Int64
ccaiCampaignId
= lens _ccaiCampaignId
(\ s a -> s{_ccaiCampaignId = a})
. _Coerce
ccaiProFileId :: Lens' CampaignCreativeAssociationsInsert Int64
ccaiProFileId
= lens _ccaiProFileId
(\ s a -> s{_ccaiProFileId = a})
. _Coerce
ccaiPayload :: Lens' CampaignCreativeAssociationsInsert CampaignCreativeAssociation
ccaiPayload
= lens _ccaiPayload (\ s a -> s{_ccaiPayload = a})
instance GoogleRequest
CampaignCreativeAssociationsInsert where
type Rs CampaignCreativeAssociationsInsert =
CampaignCreativeAssociation
type Scopes CampaignCreativeAssociationsInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CampaignCreativeAssociationsInsert'{..}
= go _ccaiProFileId _ccaiCampaignId (Just AltJSON)
_ccaiPayload
dFAReportingService
where go
= buildClient
(Proxy ::
Proxy CampaignCreativeAssociationsInsertResource)
mempty