{-# 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.RemarketingLists.Insert
(
RemarketingListsInsertResource
, remarketingListsInsert
, RemarketingListsInsert
, rliProFileId
, rliPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type RemarketingListsInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"remarketingLists" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RemarketingList :>
Post '[JSON] RemarketingList
data RemarketingListsInsert = RemarketingListsInsert'
{ _rliProFileId :: !(Textual Int64)
, _rliPayload :: !RemarketingList
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingListsInsert
:: Int64
-> RemarketingList
-> RemarketingListsInsert
remarketingListsInsert pRliProFileId_ pRliPayload_ =
RemarketingListsInsert'
{ _rliProFileId = _Coerce # pRliProFileId_
, _rliPayload = pRliPayload_
}
rliProFileId :: Lens' RemarketingListsInsert Int64
rliProFileId
= lens _rliProFileId (\ s a -> s{_rliProFileId = a})
. _Coerce
rliPayload :: Lens' RemarketingListsInsert RemarketingList
rliPayload
= lens _rliPayload (\ s a -> s{_rliPayload = a})
instance GoogleRequest RemarketingListsInsert where
type Rs RemarketingListsInsert = RemarketingList
type Scopes RemarketingListsInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient RemarketingListsInsert'{..}
= go _rliProFileId (Just AltJSON) _rliPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy RemarketingListsInsertResource)
mempty