{-# 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.PlacementStrategies.Get
(
PlacementStrategiesGetResource
, placementStrategiesGet
, PlacementStrategiesGet
, psgProFileId
, psgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementStrategiesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementStrategies" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PlacementStrategy
data PlacementStrategiesGet = PlacementStrategiesGet'
{ _psgProFileId :: !(Textual Int64)
, _psgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
placementStrategiesGet
:: Int64
-> Int64
-> PlacementStrategiesGet
placementStrategiesGet pPsgProFileId_ pPsgId_ =
PlacementStrategiesGet'
{ _psgProFileId = _Coerce # pPsgProFileId_
, _psgId = _Coerce # pPsgId_
}
psgProFileId :: Lens' PlacementStrategiesGet Int64
psgProFileId
= lens _psgProFileId (\ s a -> s{_psgProFileId = a})
. _Coerce
psgId :: Lens' PlacementStrategiesGet Int64
psgId
= lens _psgId (\ s a -> s{_psgId = a}) . _Coerce
instance GoogleRequest PlacementStrategiesGet where
type Rs PlacementStrategiesGet = PlacementStrategy
type Scopes PlacementStrategiesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementStrategiesGet'{..}
= go _psgProFileId _psgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementStrategiesGetResource)
mempty