{-# 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.UserProFiles.Get
(
UserProFilesGetResource
, userProFilesGet
, UserProFilesGet
, upfgProFileId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserProFilesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] UserProFile
newtype UserProFilesGet = UserProFilesGet'
{ _upfgProFileId :: Textual Int64
} deriving (Eq,Show,Data,Typeable,Generic)
userProFilesGet
:: Int64
-> UserProFilesGet
userProFilesGet pUpfgProFileId_ =
UserProFilesGet'
{ _upfgProFileId = _Coerce # pUpfgProFileId_
}
upfgProFileId :: Lens' UserProFilesGet Int64
upfgProFileId
= lens _upfgProFileId
(\ s a -> s{_upfgProFileId = a})
. _Coerce
instance GoogleRequest UserProFilesGet where
type Rs UserProFilesGet = UserProFile
type Scopes UserProFilesGet =
'["https://www.googleapis.com/auth/dfareporting",
"https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserProFilesGet'{..}
= go _upfgProFileId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy UserProFilesGetResource)
mempty