{-# 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.UpdateAccessConfig
(
InstancesUpdateAccessConfigResource
, instancesUpdateAccessConfig
, InstancesUpdateAccessConfig
, iuacRequestId
, iuacProject
, iuacNetworkInterface
, iuacZone
, iuacPayload
, iuacInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesUpdateAccessConfigResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"updateAccessConfig" :>
QueryParam "networkInterface" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccessConfig :>
Post '[JSON] Operation
data InstancesUpdateAccessConfig = InstancesUpdateAccessConfig'
{ _iuacRequestId :: !(Maybe Text)
, _iuacProject :: !Text
, _iuacNetworkInterface :: !Text
, _iuacZone :: !Text
, _iuacPayload :: !AccessConfig
, _iuacInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesUpdateAccessConfig
:: Text
-> Text
-> Text
-> AccessConfig
-> Text
-> InstancesUpdateAccessConfig
instancesUpdateAccessConfig pIuacProject_ pIuacNetworkInterface_ pIuacZone_ pIuacPayload_ pIuacInstance_ =
InstancesUpdateAccessConfig'
{ _iuacRequestId = Nothing
, _iuacProject = pIuacProject_
, _iuacNetworkInterface = pIuacNetworkInterface_
, _iuacZone = pIuacZone_
, _iuacPayload = pIuacPayload_
, _iuacInstance = pIuacInstance_
}
iuacRequestId :: Lens' InstancesUpdateAccessConfig (Maybe Text)
iuacRequestId
= lens _iuacRequestId
(\ s a -> s{_iuacRequestId = a})
iuacProject :: Lens' InstancesUpdateAccessConfig Text
iuacProject
= lens _iuacProject (\ s a -> s{_iuacProject = a})
iuacNetworkInterface :: Lens' InstancesUpdateAccessConfig Text
iuacNetworkInterface
= lens _iuacNetworkInterface
(\ s a -> s{_iuacNetworkInterface = a})
iuacZone :: Lens' InstancesUpdateAccessConfig Text
iuacZone = lens _iuacZone (\ s a -> s{_iuacZone = a})
iuacPayload :: Lens' InstancesUpdateAccessConfig AccessConfig
iuacPayload
= lens _iuacPayload (\ s a -> s{_iuacPayload = a})
iuacInstance :: Lens' InstancesUpdateAccessConfig Text
iuacInstance
= lens _iuacInstance (\ s a -> s{_iuacInstance = a})
instance GoogleRequest InstancesUpdateAccessConfig
where
type Rs InstancesUpdateAccessConfig = Operation
type Scopes InstancesUpdateAccessConfig =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesUpdateAccessConfig'{..}
= go _iuacProject _iuacZone _iuacInstance
(Just _iuacNetworkInterface)
_iuacRequestId
(Just AltJSON)
_iuacPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesUpdateAccessConfigResource)
mempty