{-# 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.TargetVPNGateways.Insert
(
TargetVPNGatewaysInsertResource
, targetVPNGatewaysInsert
, TargetVPNGatewaysInsert
, tvgiRequestId
, tvgiProject
, tvgiPayload
, tvgiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetVPNGatewaysInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"targetVpnGateways" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetVPNGateway :>
Post '[JSON] Operation
data TargetVPNGatewaysInsert = TargetVPNGatewaysInsert'
{ _tvgiRequestId :: !(Maybe Text)
, _tvgiProject :: !Text
, _tvgiPayload :: !TargetVPNGateway
, _tvgiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetVPNGatewaysInsert
:: Text
-> TargetVPNGateway
-> Text
-> TargetVPNGatewaysInsert
targetVPNGatewaysInsert pTvgiProject_ pTvgiPayload_ pTvgiRegion_ =
TargetVPNGatewaysInsert'
{ _tvgiRequestId = Nothing
, _tvgiProject = pTvgiProject_
, _tvgiPayload = pTvgiPayload_
, _tvgiRegion = pTvgiRegion_
}
tvgiRequestId :: Lens' TargetVPNGatewaysInsert (Maybe Text)
tvgiRequestId
= lens _tvgiRequestId
(\ s a -> s{_tvgiRequestId = a})
tvgiProject :: Lens' TargetVPNGatewaysInsert Text
tvgiProject
= lens _tvgiProject (\ s a -> s{_tvgiProject = a})
tvgiPayload :: Lens' TargetVPNGatewaysInsert TargetVPNGateway
tvgiPayload
= lens _tvgiPayload (\ s a -> s{_tvgiPayload = a})
tvgiRegion :: Lens' TargetVPNGatewaysInsert Text
tvgiRegion
= lens _tvgiRegion (\ s a -> s{_tvgiRegion = a})
instance GoogleRequest TargetVPNGatewaysInsert where
type Rs TargetVPNGatewaysInsert = Operation
type Scopes TargetVPNGatewaysInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetVPNGatewaysInsert'{..}
= go _tvgiProject _tvgiRegion _tvgiRequestId
(Just AltJSON)
_tvgiPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetVPNGatewaysInsertResource)
mempty