{-# 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.TargetTCPProxies.Insert
(
TargetTCPProxiesInsertResource
, targetTCPProxiesInsert
, TargetTCPProxiesInsert
, ttpiRequestId
, ttpiProject
, ttpiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetTCPProxiesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"targetTcpProxies" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetTCPProxy :>
Post '[JSON] Operation
data TargetTCPProxiesInsert = TargetTCPProxiesInsert'
{ _ttpiRequestId :: !(Maybe Text)
, _ttpiProject :: !Text
, _ttpiPayload :: !TargetTCPProxy
} deriving (Eq,Show,Data,Typeable,Generic)
targetTCPProxiesInsert
:: Text
-> TargetTCPProxy
-> TargetTCPProxiesInsert
targetTCPProxiesInsert pTtpiProject_ pTtpiPayload_ =
TargetTCPProxiesInsert'
{ _ttpiRequestId = Nothing
, _ttpiProject = pTtpiProject_
, _ttpiPayload = pTtpiPayload_
}
ttpiRequestId :: Lens' TargetTCPProxiesInsert (Maybe Text)
ttpiRequestId
= lens _ttpiRequestId
(\ s a -> s{_ttpiRequestId = a})
ttpiProject :: Lens' TargetTCPProxiesInsert Text
ttpiProject
= lens _ttpiProject (\ s a -> s{_ttpiProject = a})
ttpiPayload :: Lens' TargetTCPProxiesInsert TargetTCPProxy
ttpiPayload
= lens _ttpiPayload (\ s a -> s{_ttpiPayload = a})
instance GoogleRequest TargetTCPProxiesInsert where
type Rs TargetTCPProxiesInsert = Operation
type Scopes TargetTCPProxiesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetTCPProxiesInsert'{..}
= go _ttpiProject _ttpiRequestId (Just AltJSON)
_ttpiPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetTCPProxiesInsertResource)
mempty