{-# 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.AddAccessConfig
(
InstancesAddAccessConfigResource
, instancesAddAccessConfig
, InstancesAddAccessConfig
, iaacRequestId
, iaacProject
, iaacNetworkInterface
, iaacZone
, iaacPayload
, iaacInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesAddAccessConfigResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"addAccessConfig" :>
QueryParam "networkInterface" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccessConfig :>
Post '[JSON] Operation
data InstancesAddAccessConfig = InstancesAddAccessConfig'
{ _iaacRequestId :: !(Maybe Text)
, _iaacProject :: !Text
, _iaacNetworkInterface :: !Text
, _iaacZone :: !Text
, _iaacPayload :: !AccessConfig
, _iaacInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesAddAccessConfig
:: Text
-> Text
-> Text
-> AccessConfig
-> Text
-> InstancesAddAccessConfig
instancesAddAccessConfig pIaacProject_ pIaacNetworkInterface_ pIaacZone_ pIaacPayload_ pIaacInstance_ =
InstancesAddAccessConfig'
{ _iaacRequestId = Nothing
, _iaacProject = pIaacProject_
, _iaacNetworkInterface = pIaacNetworkInterface_
, _iaacZone = pIaacZone_
, _iaacPayload = pIaacPayload_
, _iaacInstance = pIaacInstance_
}
iaacRequestId :: Lens' InstancesAddAccessConfig (Maybe Text)
iaacRequestId
= lens _iaacRequestId
(\ s a -> s{_iaacRequestId = a})
iaacProject :: Lens' InstancesAddAccessConfig Text
iaacProject
= lens _iaacProject (\ s a -> s{_iaacProject = a})
iaacNetworkInterface :: Lens' InstancesAddAccessConfig Text
iaacNetworkInterface
= lens _iaacNetworkInterface
(\ s a -> s{_iaacNetworkInterface = a})
iaacZone :: Lens' InstancesAddAccessConfig Text
iaacZone = lens _iaacZone (\ s a -> s{_iaacZone = a})
iaacPayload :: Lens' InstancesAddAccessConfig AccessConfig
iaacPayload
= lens _iaacPayload (\ s a -> s{_iaacPayload = a})
iaacInstance :: Lens' InstancesAddAccessConfig Text
iaacInstance
= lens _iaacInstance (\ s a -> s{_iaacInstance = a})
instance GoogleRequest InstancesAddAccessConfig where
type Rs InstancesAddAccessConfig = Operation
type Scopes InstancesAddAccessConfig =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesAddAccessConfig'{..}
= go _iaacProject _iaacZone _iaacInstance
(Just _iaacNetworkInterface)
_iaacRequestId
(Just AltJSON)
_iaacPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesAddAccessConfigResource)
mempty