{-# 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.ConnectionTypes.Get
(
ConnectionTypesGetResource
, connectionTypesGet
, ConnectionTypesGet
, ctgProFileId
, ctgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ConnectionTypesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"connectionTypes" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ConnectionType
data ConnectionTypesGet = ConnectionTypesGet'
{ _ctgProFileId :: !(Textual Int64)
, _ctgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
connectionTypesGet
:: Int64
-> Int64
-> ConnectionTypesGet
connectionTypesGet pCtgProFileId_ pCtgId_ =
ConnectionTypesGet'
{ _ctgProFileId = _Coerce # pCtgProFileId_
, _ctgId = _Coerce # pCtgId_
}
ctgProFileId :: Lens' ConnectionTypesGet Int64
ctgProFileId
= lens _ctgProFileId (\ s a -> s{_ctgProFileId = a})
. _Coerce
ctgId :: Lens' ConnectionTypesGet Int64
ctgId
= lens _ctgId (\ s a -> s{_ctgId = a}) . _Coerce
instance GoogleRequest ConnectionTypesGet where
type Rs ConnectionTypesGet = ConnectionType
type Scopes ConnectionTypesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient ConnectionTypesGet'{..}
= go _ctgProFileId _ctgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ConnectionTypesGetResource)
mempty