{-# 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.Subnetworks.SetPrivateIPGoogleAccess
(
SubnetworksSetPrivateIPGoogleAccessResource
, subnetworksSetPrivateIPGoogleAccess
, SubnetworksSetPrivateIPGoogleAccess
, sspigaRequestId
, sspigaProject
, sspigaPayload
, sspigaSubnetwork
, sspigaRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SubnetworksSetPrivateIPGoogleAccessResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"subnetworks" :>
Capture "subnetwork" Text :>
"setPrivateIpGoogleAccess" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
SubnetworksSetPrivateIPGoogleAccessRequest
:> Post '[JSON] Operation
data SubnetworksSetPrivateIPGoogleAccess = SubnetworksSetPrivateIPGoogleAccess'
{ _sspigaRequestId :: !(Maybe Text)
, _sspigaProject :: !Text
, _sspigaPayload :: !SubnetworksSetPrivateIPGoogleAccessRequest
, _sspigaSubnetwork :: !Text
, _sspigaRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subnetworksSetPrivateIPGoogleAccess
:: Text
-> SubnetworksSetPrivateIPGoogleAccessRequest
-> Text
-> Text
-> SubnetworksSetPrivateIPGoogleAccess
subnetworksSetPrivateIPGoogleAccess pSspigaProject_ pSspigaPayload_ pSspigaSubnetwork_ pSspigaRegion_ =
SubnetworksSetPrivateIPGoogleAccess'
{ _sspigaRequestId = Nothing
, _sspigaProject = pSspigaProject_
, _sspigaPayload = pSspigaPayload_
, _sspigaSubnetwork = pSspigaSubnetwork_
, _sspigaRegion = pSspigaRegion_
}
sspigaRequestId :: Lens' SubnetworksSetPrivateIPGoogleAccess (Maybe Text)
sspigaRequestId
= lens _sspigaRequestId
(\ s a -> s{_sspigaRequestId = a})
sspigaProject :: Lens' SubnetworksSetPrivateIPGoogleAccess Text
sspigaProject
= lens _sspigaProject
(\ s a -> s{_sspigaProject = a})
sspigaPayload :: Lens' SubnetworksSetPrivateIPGoogleAccess SubnetworksSetPrivateIPGoogleAccessRequest
sspigaPayload
= lens _sspigaPayload
(\ s a -> s{_sspigaPayload = a})
sspigaSubnetwork :: Lens' SubnetworksSetPrivateIPGoogleAccess Text
sspigaSubnetwork
= lens _sspigaSubnetwork
(\ s a -> s{_sspigaSubnetwork = a})
sspigaRegion :: Lens' SubnetworksSetPrivateIPGoogleAccess Text
sspigaRegion
= lens _sspigaRegion (\ s a -> s{_sspigaRegion = a})
instance GoogleRequest
SubnetworksSetPrivateIPGoogleAccess where
type Rs SubnetworksSetPrivateIPGoogleAccess =
Operation
type Scopes SubnetworksSetPrivateIPGoogleAccess =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient
SubnetworksSetPrivateIPGoogleAccess'{..}
= go _sspigaProject _sspigaRegion _sspigaSubnetwork
_sspigaRequestId
(Just AltJSON)
_sspigaPayload
computeService
where go
= buildClient
(Proxy ::
Proxy SubnetworksSetPrivateIPGoogleAccessResource)
mempty