{-# 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.UpdateNetworkInterface
(
InstancesUpdateNetworkInterfaceResource
, instancesUpdateNetworkInterface
, InstancesUpdateNetworkInterface
, iuniRequestId
, iuniProject
, iuniNetworkInterface
, iuniZone
, iuniPayload
, iuniInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesUpdateNetworkInterfaceResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"updateNetworkInterface" :>
QueryParam "networkInterface" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] NetworkInterface :>
Patch '[JSON] Operation
data InstancesUpdateNetworkInterface = InstancesUpdateNetworkInterface'
{ _iuniRequestId :: !(Maybe Text)
, _iuniProject :: !Text
, _iuniNetworkInterface :: !Text
, _iuniZone :: !Text
, _iuniPayload :: !NetworkInterface
, _iuniInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesUpdateNetworkInterface
:: Text
-> Text
-> Text
-> NetworkInterface
-> Text
-> InstancesUpdateNetworkInterface
instancesUpdateNetworkInterface pIuniProject_ pIuniNetworkInterface_ pIuniZone_ pIuniPayload_ pIuniInstance_ =
InstancesUpdateNetworkInterface'
{ _iuniRequestId = Nothing
, _iuniProject = pIuniProject_
, _iuniNetworkInterface = pIuniNetworkInterface_
, _iuniZone = pIuniZone_
, _iuniPayload = pIuniPayload_
, _iuniInstance = pIuniInstance_
}
iuniRequestId :: Lens' InstancesUpdateNetworkInterface (Maybe Text)
iuniRequestId
= lens _iuniRequestId
(\ s a -> s{_iuniRequestId = a})
iuniProject :: Lens' InstancesUpdateNetworkInterface Text
iuniProject
= lens _iuniProject (\ s a -> s{_iuniProject = a})
iuniNetworkInterface :: Lens' InstancesUpdateNetworkInterface Text
iuniNetworkInterface
= lens _iuniNetworkInterface
(\ s a -> s{_iuniNetworkInterface = a})
iuniZone :: Lens' InstancesUpdateNetworkInterface Text
iuniZone = lens _iuniZone (\ s a -> s{_iuniZone = a})
iuniPayload :: Lens' InstancesUpdateNetworkInterface NetworkInterface
iuniPayload
= lens _iuniPayload (\ s a -> s{_iuniPayload = a})
iuniInstance :: Lens' InstancesUpdateNetworkInterface Text
iuniInstance
= lens _iuniInstance (\ s a -> s{_iuniInstance = a})
instance GoogleRequest
InstancesUpdateNetworkInterface where
type Rs InstancesUpdateNetworkInterface = Operation
type Scopes InstancesUpdateNetworkInterface =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesUpdateNetworkInterface'{..}
= go _iuniProject _iuniZone _iuniInstance
(Just _iuniNetworkInterface)
_iuniRequestId
(Just AltJSON)
_iuniPayload
computeService
where go
= buildClient
(Proxy ::
Proxy InstancesUpdateNetworkInterfaceResource)
mempty