{-# 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.IAM.Projects.ServiceAccounts.Get
(
ProjectsServiceAccountsGetResource
, projectsServiceAccountsGet
, ProjectsServiceAccountsGet
, psagXgafv
, psagUploadProtocol
, psagAccessToken
, psagUploadType
, psagName
, psagCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ServiceAccount
data ProjectsServiceAccountsGet = ProjectsServiceAccountsGet'
{ _psagXgafv :: !(Maybe Xgafv)
, _psagUploadProtocol :: !(Maybe Text)
, _psagAccessToken :: !(Maybe Text)
, _psagUploadType :: !(Maybe Text)
, _psagName :: !Text
, _psagCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsGet
:: Text
-> ProjectsServiceAccountsGet
projectsServiceAccountsGet pPsagName_ =
ProjectsServiceAccountsGet'
{ _psagXgafv = Nothing
, _psagUploadProtocol = Nothing
, _psagAccessToken = Nothing
, _psagUploadType = Nothing
, _psagName = pPsagName_
, _psagCallback = Nothing
}
psagXgafv :: Lens' ProjectsServiceAccountsGet (Maybe Xgafv)
psagXgafv
= lens _psagXgafv (\ s a -> s{_psagXgafv = a})
psagUploadProtocol :: Lens' ProjectsServiceAccountsGet (Maybe Text)
psagUploadProtocol
= lens _psagUploadProtocol
(\ s a -> s{_psagUploadProtocol = a})
psagAccessToken :: Lens' ProjectsServiceAccountsGet (Maybe Text)
psagAccessToken
= lens _psagAccessToken
(\ s a -> s{_psagAccessToken = a})
psagUploadType :: Lens' ProjectsServiceAccountsGet (Maybe Text)
psagUploadType
= lens _psagUploadType
(\ s a -> s{_psagUploadType = a})
psagName :: Lens' ProjectsServiceAccountsGet Text
psagName = lens _psagName (\ s a -> s{_psagName = a})
psagCallback :: Lens' ProjectsServiceAccountsGet (Maybe Text)
psagCallback
= lens _psagCallback (\ s a -> s{_psagCallback = a})
instance GoogleRequest ProjectsServiceAccountsGet
where
type Rs ProjectsServiceAccountsGet = ServiceAccount
type Scopes ProjectsServiceAccountsGet =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsServiceAccountsGet'{..}
= go _psagName _psagXgafv _psagUploadProtocol
_psagAccessToken
_psagUploadType
_psagCallback
(Just AltJSON)
iAMService
where go
= buildClient
(Proxy :: Proxy ProjectsServiceAccountsGetResource)
mempty