{-# 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.CreativeGroups.Get
(
CreativeGroupsGetResource
, creativeGroupsGet
, CreativeGroupsGet
, cgggProFileId
, cgggId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeGroupsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeGroups" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] CreativeGroup
data CreativeGroupsGet = CreativeGroupsGet'
{ _cgggProFileId :: !(Textual Int64)
, _cgggId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeGroupsGet
:: Int64
-> Int64
-> CreativeGroupsGet
creativeGroupsGet pCgggProFileId_ pCgggId_ =
CreativeGroupsGet'
{ _cgggProFileId = _Coerce # pCgggProFileId_
, _cgggId = _Coerce # pCgggId_
}
cgggProFileId :: Lens' CreativeGroupsGet Int64
cgggProFileId
= lens _cgggProFileId
(\ s a -> s{_cgggProFileId = a})
. _Coerce
cgggId :: Lens' CreativeGroupsGet Int64
cgggId
= lens _cgggId (\ s a -> s{_cgggId = a}) . _Coerce
instance GoogleRequest CreativeGroupsGet where
type Rs CreativeGroupsGet = CreativeGroup
type Scopes CreativeGroupsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeGroupsGet'{..}
= go _cgggProFileId _cgggId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeGroupsGetResource)
mempty