{-# 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.Keys.List
(
ProjectsServiceAccountsKeysListResource
, projectsServiceAccountsKeysList
, ProjectsServiceAccountsKeysList
, psaklKeyTypes
, psaklXgafv
, psaklUploadProtocol
, psaklAccessToken
, psaklUploadType
, psaklName
, psaklCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsKeysListResource =
"v1" :>
Capture "name" Text :>
"keys" :>
QueryParams "keyTypes" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListServiceAccountKeysResponse
data ProjectsServiceAccountsKeysList = ProjectsServiceAccountsKeysList'
{ _psaklKeyTypes :: !(Maybe [Text])
, _psaklXgafv :: !(Maybe Xgafv)
, _psaklUploadProtocol :: !(Maybe Text)
, _psaklAccessToken :: !(Maybe Text)
, _psaklUploadType :: !(Maybe Text)
, _psaklName :: !Text
, _psaklCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsKeysList
:: Text
-> ProjectsServiceAccountsKeysList
projectsServiceAccountsKeysList pPsaklName_ =
ProjectsServiceAccountsKeysList'
{ _psaklKeyTypes = Nothing
, _psaklXgafv = Nothing
, _psaklUploadProtocol = Nothing
, _psaklAccessToken = Nothing
, _psaklUploadType = Nothing
, _psaklName = pPsaklName_
, _psaklCallback = Nothing
}
psaklKeyTypes :: Lens' ProjectsServiceAccountsKeysList [Text]
psaklKeyTypes
= lens _psaklKeyTypes
(\ s a -> s{_psaklKeyTypes = a})
. _Default
. _Coerce
psaklXgafv :: Lens' ProjectsServiceAccountsKeysList (Maybe Xgafv)
psaklXgafv
= lens _psaklXgafv (\ s a -> s{_psaklXgafv = a})
psaklUploadProtocol :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
psaklUploadProtocol
= lens _psaklUploadProtocol
(\ s a -> s{_psaklUploadProtocol = a})
psaklAccessToken :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
psaklAccessToken
= lens _psaklAccessToken
(\ s a -> s{_psaklAccessToken = a})
psaklUploadType :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
psaklUploadType
= lens _psaklUploadType
(\ s a -> s{_psaklUploadType = a})
psaklName :: Lens' ProjectsServiceAccountsKeysList Text
psaklName
= lens _psaklName (\ s a -> s{_psaklName = a})
psaklCallback :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
psaklCallback
= lens _psaklCallback
(\ s a -> s{_psaklCallback = a})
instance GoogleRequest
ProjectsServiceAccountsKeysList where
type Rs ProjectsServiceAccountsKeysList =
ListServiceAccountKeysResponse
type Scopes ProjectsServiceAccountsKeysList =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsServiceAccountsKeysList'{..}
= go _psaklName (_psaklKeyTypes ^. _Default)
_psaklXgafv
_psaklUploadProtocol
_psaklAccessToken
_psaklUploadType
_psaklCallback
(Just AltJSON)
iAMService
where go
= buildClient
(Proxy ::
Proxy ProjectsServiceAccountsKeysListResource)
mempty