{-# 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.Compute.Instances.SetServiceAccount
(
InstancesSetServiceAccountResource
, instancesSetServiceAccount
, InstancesSetServiceAccount
, issaRequestId
, issaProject
, issaZone
, issaPayload
, issaInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetServiceAccountResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setServiceAccount" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesSetServiceAccountRequest :>
Post '[JSON] Operation
data InstancesSetServiceAccount = InstancesSetServiceAccount'
{ _issaRequestId :: !(Maybe Text)
, _issaProject :: !Text
, _issaZone :: !Text
, _issaPayload :: !InstancesSetServiceAccountRequest
, _issaInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetServiceAccount
:: Text
-> Text
-> InstancesSetServiceAccountRequest
-> Text
-> InstancesSetServiceAccount
instancesSetServiceAccount pIssaProject_ pIssaZone_ pIssaPayload_ pIssaInstance_ =
InstancesSetServiceAccount'
{ _issaRequestId = Nothing
, _issaProject = pIssaProject_
, _issaZone = pIssaZone_
, _issaPayload = pIssaPayload_
, _issaInstance = pIssaInstance_
}
issaRequestId :: Lens' InstancesSetServiceAccount (Maybe Text)
issaRequestId
= lens _issaRequestId
(\ s a -> s{_issaRequestId = a})
issaProject :: Lens' InstancesSetServiceAccount Text
issaProject
= lens _issaProject (\ s a -> s{_issaProject = a})
issaZone :: Lens' InstancesSetServiceAccount Text
issaZone = lens _issaZone (\ s a -> s{_issaZone = a})
issaPayload :: Lens' InstancesSetServiceAccount InstancesSetServiceAccountRequest
issaPayload
= lens _issaPayload (\ s a -> s{_issaPayload = a})
issaInstance :: Lens' InstancesSetServiceAccount Text
issaInstance
= lens _issaInstance (\ s a -> s{_issaInstance = a})
instance GoogleRequest InstancesSetServiceAccount
where
type Rs InstancesSetServiceAccount = Operation
type Scopes InstancesSetServiceAccount =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetServiceAccount'{..}
= go _issaProject _issaZone _issaInstance
_issaRequestId
(Just AltJSON)
_issaPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetServiceAccountResource)
mempty