{-# 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.Compute.Projects.Get
(
ProjectsGetResource
, projectsGet
, ProjectsGet
, pgProject
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Project
newtype ProjectsGet = ProjectsGet'
{ _pgProject :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGet
:: Text
-> ProjectsGet
projectsGet pPgProject_ =
ProjectsGet'
{ _pgProject = pPgProject_
}
pgProject :: Lens' ProjectsGet Text
pgProject
= lens _pgProject (\ s a -> s{_pgProject = a})
instance GoogleRequest ProjectsGet where
type Rs ProjectsGet = Project
type Scopes ProjectsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ProjectsGet'{..}
= go _pgProject (Just AltJSON) computeService
where go
= buildClient (Proxy :: Proxy ProjectsGetResource)
mempty