{-# 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.AdExchangeBuyer.Creatives.Get
(
CreativesGetResource
, creativesGet
, CreativesGet
, cgBuyerCreativeId
, cgAccountId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type CreativesGetResource =
"adexchangebuyer" :>
"v1.4" :>
"creatives" :>
Capture "accountId" (Textual Int32) :>
Capture "buyerCreativeId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Creative
data CreativesGet = CreativesGet'
{ _cgBuyerCreativeId :: !Text
, _cgAccountId :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativesGet
:: Text
-> Int32
-> CreativesGet
creativesGet pCgBuyerCreativeId_ pCgAccountId_ =
CreativesGet'
{ _cgBuyerCreativeId = pCgBuyerCreativeId_
, _cgAccountId = _Coerce # pCgAccountId_
}
cgBuyerCreativeId :: Lens' CreativesGet Text
cgBuyerCreativeId
= lens _cgBuyerCreativeId
(\ s a -> s{_cgBuyerCreativeId = a})
cgAccountId :: Lens' CreativesGet Int32
cgAccountId
= lens _cgAccountId (\ s a -> s{_cgAccountId = a}) .
_Coerce
instance GoogleRequest CreativesGet where
type Rs CreativesGet = Creative
type Scopes CreativesGet =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient CreativesGet'{..}
= go _cgAccountId _cgBuyerCreativeId (Just AltJSON)
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy CreativesGetResource)
mempty