{-# 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.PlacementGroups.Get
(
PlacementGroupsGetResource
, placementGroupsGet
, PlacementGroupsGet
, pggProFileId
, pggId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementGroupsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementGroups" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PlacementGroup
data PlacementGroupsGet = PlacementGroupsGet'
{ _pggProFileId :: !(Textual Int64)
, _pggId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
placementGroupsGet
:: Int64
-> Int64
-> PlacementGroupsGet
placementGroupsGet pPggProFileId_ pPggId_ =
PlacementGroupsGet'
{ _pggProFileId = _Coerce # pPggProFileId_
, _pggId = _Coerce # pPggId_
}
pggProFileId :: Lens' PlacementGroupsGet Int64
pggProFileId
= lens _pggProFileId (\ s a -> s{_pggProFileId = a})
. _Coerce
pggId :: Lens' PlacementGroupsGet Int64
pggId
= lens _pggId (\ s a -> s{_pggId = a}) . _Coerce
instance GoogleRequest PlacementGroupsGet where
type Rs PlacementGroupsGet = PlacementGroup
type Scopes PlacementGroupsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementGroupsGet'{..}
= go _pggProFileId _pggId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementGroupsGetResource)
mempty