{-# 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.SignJwt
(
ProjectsServiceAccountsSignJwtResource
, projectsServiceAccountsSignJwt
, ProjectsServiceAccountsSignJwt
, psasjXgafv
, psasjUploadProtocol
, psasjAccessToken
, psasjUploadType
, psasjPayload
, psasjName
, psasjCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsSignJwtResource =
"v1" :>
CaptureMode "name" "signJwt" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SignJwtRequest :>
Post '[JSON] SignJwtResponse
data ProjectsServiceAccountsSignJwt = ProjectsServiceAccountsSignJwt'
{ _psasjXgafv :: !(Maybe Xgafv)
, _psasjUploadProtocol :: !(Maybe Text)
, _psasjAccessToken :: !(Maybe Text)
, _psasjUploadType :: !(Maybe Text)
, _psasjPayload :: !SignJwtRequest
, _psasjName :: !Text
, _psasjCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsSignJwt
:: SignJwtRequest
-> Text
-> ProjectsServiceAccountsSignJwt
projectsServiceAccountsSignJwt pPsasjPayload_ pPsasjName_ =
ProjectsServiceAccountsSignJwt'
{ _psasjXgafv = Nothing
, _psasjUploadProtocol = Nothing
, _psasjAccessToken = Nothing
, _psasjUploadType = Nothing
, _psasjPayload = pPsasjPayload_
, _psasjName = pPsasjName_
, _psasjCallback = Nothing
}
psasjXgafv :: Lens' ProjectsServiceAccountsSignJwt (Maybe Xgafv)
psasjXgafv
= lens _psasjXgafv (\ s a -> s{_psasjXgafv = a})
psasjUploadProtocol :: Lens' ProjectsServiceAccountsSignJwt (Maybe Text)
psasjUploadProtocol
= lens _psasjUploadProtocol
(\ s a -> s{_psasjUploadProtocol = a})
psasjAccessToken :: Lens' ProjectsServiceAccountsSignJwt (Maybe Text)
psasjAccessToken
= lens _psasjAccessToken
(\ s a -> s{_psasjAccessToken = a})
psasjUploadType :: Lens' ProjectsServiceAccountsSignJwt (Maybe Text)
psasjUploadType
= lens _psasjUploadType
(\ s a -> s{_psasjUploadType = a})
psasjPayload :: Lens' ProjectsServiceAccountsSignJwt SignJwtRequest
psasjPayload
= lens _psasjPayload (\ s a -> s{_psasjPayload = a})
psasjName :: Lens' ProjectsServiceAccountsSignJwt Text
psasjName
= lens _psasjName (\ s a -> s{_psasjName = a})
psasjCallback :: Lens' ProjectsServiceAccountsSignJwt (Maybe Text)
psasjCallback
= lens _psasjCallback
(\ s a -> s{_psasjCallback = a})
instance GoogleRequest ProjectsServiceAccountsSignJwt
where
type Rs ProjectsServiceAccountsSignJwt =
SignJwtResponse
type Scopes ProjectsServiceAccountsSignJwt =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsServiceAccountsSignJwt'{..}
= go _psasjName _psasjXgafv _psasjUploadProtocol
_psasjAccessToken
_psasjUploadType
_psasjCallback
(Just AltJSON)
_psasjPayload
iAMService
where go
= buildClient
(Proxy ::
Proxy ProjectsServiceAccountsSignJwtResource)
mempty