{-# 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.Campaigns.Get
(
CampaignsGetResource
, campaignsGet
, CampaignsGet
, cggProFileId
, cggId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CampaignsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"campaigns" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Campaign
data CampaignsGet = CampaignsGet'
{ _cggProFileId :: !(Textual Int64)
, _cggId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
campaignsGet
:: Int64
-> Int64
-> CampaignsGet
campaignsGet pCggProFileId_ pCggId_ =
CampaignsGet'
{ _cggProFileId = _Coerce # pCggProFileId_
, _cggId = _Coerce # pCggId_
}
cggProFileId :: Lens' CampaignsGet Int64
cggProFileId
= lens _cggProFileId (\ s a -> s{_cggProFileId = a})
. _Coerce
cggId :: Lens' CampaignsGet Int64
cggId
= lens _cggId (\ s a -> s{_cggId = a}) . _Coerce
instance GoogleRequest CampaignsGet where
type Rs CampaignsGet = Campaign
type Scopes CampaignsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CampaignsGet'{..}
= go _cggProFileId _cggId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy CampaignsGetResource)
mempty