{-# 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.Projects.Get
(
ProjectsGetResource
, projectsGet
, ProjectsGet
, proProFileId
, proId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ProjectsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"projects" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Project
data ProjectsGet = ProjectsGet'
{ _proProFileId :: !(Textual Int64)
, _proId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGet
:: Int64
-> Int64
-> ProjectsGet
projectsGet pProProFileId_ pProId_ =
ProjectsGet'
{ _proProFileId = _Coerce # pProProFileId_
, _proId = _Coerce # pProId_
}
proProFileId :: Lens' ProjectsGet Int64
proProFileId
= lens _proProFileId (\ s a -> s{_proProFileId = a})
. _Coerce
proId :: Lens' ProjectsGet Int64
proId
= lens _proId (\ s a -> s{_proId = a}) . _Coerce
instance GoogleRequest ProjectsGet where
type Rs ProjectsGet = Project
type Scopes ProjectsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient ProjectsGet'{..}
= go _proProFileId _proId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy ProjectsGetResource)
mempty