{-# 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.Ads.Patch
(
AdsPatchResource
, adsPatch
, AdsPatch
, adsdProFileId
, adsdPayload
, adsdId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"ads" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Ad :> Patch '[JSON] Ad
data AdsPatch = AdsPatch'
{ _adsdProFileId :: !(Textual Int64)
, _adsdPayload :: !Ad
, _adsdId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
adsPatch
:: Int64
-> Ad
-> Int64
-> AdsPatch
adsPatch pAdsdProFileId_ pAdsdPayload_ pAdsdId_ =
AdsPatch'
{ _adsdProFileId = _Coerce # pAdsdProFileId_
, _adsdPayload = pAdsdPayload_
, _adsdId = _Coerce # pAdsdId_
}
adsdProFileId :: Lens' AdsPatch Int64
adsdProFileId
= lens _adsdProFileId
(\ s a -> s{_adsdProFileId = a})
. _Coerce
adsdPayload :: Lens' AdsPatch Ad
adsdPayload
= lens _adsdPayload (\ s a -> s{_adsdPayload = a})
adsdId :: Lens' AdsPatch Int64
adsdId
= lens _adsdId (\ s a -> s{_adsdId = a}) . _Coerce
instance GoogleRequest AdsPatch where
type Rs AdsPatch = Ad
type Scopes AdsPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdsPatch'{..}
= go _adsdProFileId (Just _adsdId) (Just AltJSON)
_adsdPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy AdsPatchResource)
mempty