{-# 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.Update
(
ProjectsServiceAccountsUpdateResource
, projectsServiceAccountsUpdate
, ProjectsServiceAccountsUpdate
, psauXgafv
, psauUploadProtocol
, psauAccessToken
, psauUploadType
, psauPayload
, psauName
, psauCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsUpdateResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ServiceAccount :>
Put '[JSON] ServiceAccount
data ProjectsServiceAccountsUpdate = ProjectsServiceAccountsUpdate'
{ _psauXgafv :: !(Maybe Xgafv)
, _psauUploadProtocol :: !(Maybe Text)
, _psauAccessToken :: !(Maybe Text)
, _psauUploadType :: !(Maybe Text)
, _psauPayload :: !ServiceAccount
, _psauName :: !Text
, _psauCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsUpdate
:: ServiceAccount
-> Text
-> ProjectsServiceAccountsUpdate
projectsServiceAccountsUpdate pPsauPayload_ pPsauName_ =
ProjectsServiceAccountsUpdate'
{ _psauXgafv = Nothing
, _psauUploadProtocol = Nothing
, _psauAccessToken = Nothing
, _psauUploadType = Nothing
, _psauPayload = pPsauPayload_
, _psauName = pPsauName_
, _psauCallback = Nothing
}
psauXgafv :: Lens' ProjectsServiceAccountsUpdate (Maybe Xgafv)
psauXgafv
= lens _psauXgafv (\ s a -> s{_psauXgafv = a})
psauUploadProtocol :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
psauUploadProtocol
= lens _psauUploadProtocol
(\ s a -> s{_psauUploadProtocol = a})
psauAccessToken :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
psauAccessToken
= lens _psauAccessToken
(\ s a -> s{_psauAccessToken = a})
psauUploadType :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
psauUploadType
= lens _psauUploadType
(\ s a -> s{_psauUploadType = a})
psauPayload :: Lens' ProjectsServiceAccountsUpdate ServiceAccount
psauPayload
= lens _psauPayload (\ s a -> s{_psauPayload = a})
psauName :: Lens' ProjectsServiceAccountsUpdate Text
psauName = lens _psauName (\ s a -> s{_psauName = a})
psauCallback :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
psauCallback
= lens _psauCallback (\ s a -> s{_psauCallback = a})
instance GoogleRequest ProjectsServiceAccountsUpdate
where
type Rs ProjectsServiceAccountsUpdate =
ServiceAccount
type Scopes ProjectsServiceAccountsUpdate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsServiceAccountsUpdate'{..}
= go _psauName _psauXgafv _psauUploadProtocol
_psauAccessToken
_psauUploadType
_psauCallback
(Just AltJSON)
_psauPayload
iAMService
where go
= buildClient
(Proxy ::
Proxy ProjectsServiceAccountsUpdateResource)
mempty