{-# 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.Storage.Projects.ServiceAccount.Get
(
ProjectsServiceAccountGetResource
, projectsServiceAccountGet
, ProjectsServiceAccountGet
, psagUserProject
, psagProjectId
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ProjectsServiceAccountGetResource =
"storage" :>
"v1" :>
"projects" :>
Capture "projectId" Text :>
"serviceAccount" :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ServiceAccount
data ProjectsServiceAccountGet = ProjectsServiceAccountGet'
{ _psagUserProject :: !(Maybe Text)
, _psagProjectId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountGet
:: Text
-> ProjectsServiceAccountGet
projectsServiceAccountGet pPsagProjectId_ =
ProjectsServiceAccountGet'
{ _psagUserProject = Nothing
, _psagProjectId = pPsagProjectId_
}
psagUserProject :: Lens' ProjectsServiceAccountGet (Maybe Text)
psagUserProject
= lens _psagUserProject
(\ s a -> s{_psagUserProject = a})
psagProjectId :: Lens' ProjectsServiceAccountGet Text
psagProjectId
= lens _psagProjectId
(\ s a -> s{_psagProjectId = a})
instance GoogleRequest ProjectsServiceAccountGet
where
type Rs ProjectsServiceAccountGet = ServiceAccount
type Scopes ProjectsServiceAccountGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient ProjectsServiceAccountGet'{..}
= go _psagProjectId _psagUserProject (Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy ProjectsServiceAccountGetResource)
mempty