{-# 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.CreativeFields.Get
(
CreativeFieldsGetResource
, creativeFieldsGet
, CreativeFieldsGet
, cfgProFileId
, cfgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] CreativeField
data CreativeFieldsGet = CreativeFieldsGet'
{ _cfgProFileId :: !(Textual Int64)
, _cfgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldsGet
:: Int64
-> Int64
-> CreativeFieldsGet
creativeFieldsGet pCfgProFileId_ pCfgId_ =
CreativeFieldsGet'
{ _cfgProFileId = _Coerce # pCfgProFileId_
, _cfgId = _Coerce # pCfgId_
}
cfgProFileId :: Lens' CreativeFieldsGet Int64
cfgProFileId
= lens _cfgProFileId (\ s a -> s{_cfgProFileId = a})
. _Coerce
cfgId :: Lens' CreativeFieldsGet Int64
cfgId
= lens _cfgId (\ s a -> s{_cfgId = a}) . _Coerce
instance GoogleRequest CreativeFieldsGet where
type Rs CreativeFieldsGet = CreativeField
type Scopes CreativeFieldsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldsGet'{..}
= go _cfgProFileId _cfgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldsGetResource)
mempty