{-# 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.PlatformTypes.Get
(
PlatformTypesGetResource
, platformTypesGet
, PlatformTypesGet
, ptgProFileId
, ptgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlatformTypesGetResource =
"dfareporting" :>
"v3.3" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"platformTypes" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] PlatformType
data PlatformTypesGet =
PlatformTypesGet'
{ _ptgProFileId :: !(Textual Int64)
, _ptgId :: !(Textual Int64)
}
deriving (Eq, Show, Data, Typeable, Generic)
platformTypesGet
:: Int64
-> Int64
-> PlatformTypesGet
platformTypesGet pPtgProFileId_ pPtgId_ =
PlatformTypesGet'
{_ptgProFileId = _Coerce # pPtgProFileId_, _ptgId = _Coerce # pPtgId_}
ptgProFileId :: Lens' PlatformTypesGet Int64
ptgProFileId
= lens _ptgProFileId (\ s a -> s{_ptgProFileId = a})
. _Coerce
ptgId :: Lens' PlatformTypesGet Int64
ptgId
= lens _ptgId (\ s a -> s{_ptgId = a}) . _Coerce
instance GoogleRequest PlatformTypesGet where
type Rs PlatformTypesGet = PlatformType
type Scopes PlatformTypesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlatformTypesGet'{..}
= go _ptgProFileId _ptgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlatformTypesGetResource)
mempty