{-# 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.SignBlob
(
ProjectsServiceAccountsSignBlobResource
, projectsServiceAccountsSignBlob
, ProjectsServiceAccountsSignBlob
, psasbXgafv
, psasbUploadProtocol
, psasbAccessToken
, psasbUploadType
, psasbPayload
, psasbName
, psasbCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsSignBlobResource =
"v1" :>
CaptureMode "name" "signBlob" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SignBlobRequest :>
Post '[JSON] SignBlobResponse
data ProjectsServiceAccountsSignBlob = ProjectsServiceAccountsSignBlob'
{ _psasbXgafv :: !(Maybe Xgafv)
, _psasbUploadProtocol :: !(Maybe Text)
, _psasbAccessToken :: !(Maybe Text)
, _psasbUploadType :: !(Maybe Text)
, _psasbPayload :: !SignBlobRequest
, _psasbName :: !Text
, _psasbCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsSignBlob
:: SignBlobRequest
-> Text
-> ProjectsServiceAccountsSignBlob
projectsServiceAccountsSignBlob pPsasbPayload_ pPsasbName_ =
ProjectsServiceAccountsSignBlob'
{ _psasbXgafv = Nothing
, _psasbUploadProtocol = Nothing
, _psasbAccessToken = Nothing
, _psasbUploadType = Nothing
, _psasbPayload = pPsasbPayload_
, _psasbName = pPsasbName_
, _psasbCallback = Nothing
}
psasbXgafv :: Lens' ProjectsServiceAccountsSignBlob (Maybe Xgafv)
psasbXgafv
= lens _psasbXgafv (\ s a -> s{_psasbXgafv = a})
psasbUploadProtocol :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
psasbUploadProtocol
= lens _psasbUploadProtocol
(\ s a -> s{_psasbUploadProtocol = a})
psasbAccessToken :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
psasbAccessToken
= lens _psasbAccessToken
(\ s a -> s{_psasbAccessToken = a})
psasbUploadType :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
psasbUploadType
= lens _psasbUploadType
(\ s a -> s{_psasbUploadType = a})
psasbPayload :: Lens' ProjectsServiceAccountsSignBlob SignBlobRequest
psasbPayload
= lens _psasbPayload (\ s a -> s{_psasbPayload = a})
psasbName :: Lens' ProjectsServiceAccountsSignBlob Text
psasbName
= lens _psasbName (\ s a -> s{_psasbName = a})
psasbCallback :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
psasbCallback
= lens _psasbCallback
(\ s a -> s{_psasbCallback = a})
instance GoogleRequest
ProjectsServiceAccountsSignBlob where
type Rs ProjectsServiceAccountsSignBlob =
SignBlobResponse
type Scopes ProjectsServiceAccountsSignBlob =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsServiceAccountsSignBlob'{..}
= go _psasbName _psasbXgafv _psasbUploadProtocol
_psasbAccessToken
_psasbUploadType
_psasbCallback
(Just AltJSON)
_psasbPayload
iAMService
where go
= buildClient
(Proxy ::
Proxy ProjectsServiceAccountsSignBlobResource)
mempty