{-# 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.TargetSSLProxies.Insert
(
TargetSSLProxiesInsertResource
, targetSSLProxiesInsert
, TargetSSLProxiesInsert
, tspiRequestId
, tspiProject
, tspiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetSSLProxiesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"targetSslProxies" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetSSLProxy :>
Post '[JSON] Operation
data TargetSSLProxiesInsert = TargetSSLProxiesInsert'
{ _tspiRequestId :: !(Maybe Text)
, _tspiProject :: !Text
, _tspiPayload :: !TargetSSLProxy
} deriving (Eq,Show,Data,Typeable,Generic)
targetSSLProxiesInsert
:: Text
-> TargetSSLProxy
-> TargetSSLProxiesInsert
targetSSLProxiesInsert pTspiProject_ pTspiPayload_ =
TargetSSLProxiesInsert'
{ _tspiRequestId = Nothing
, _tspiProject = pTspiProject_
, _tspiPayload = pTspiPayload_
}
tspiRequestId :: Lens' TargetSSLProxiesInsert (Maybe Text)
tspiRequestId
= lens _tspiRequestId
(\ s a -> s{_tspiRequestId = a})
tspiProject :: Lens' TargetSSLProxiesInsert Text
tspiProject
= lens _tspiProject (\ s a -> s{_tspiProject = a})
tspiPayload :: Lens' TargetSSLProxiesInsert TargetSSLProxy
tspiPayload
= lens _tspiPayload (\ s a -> s{_tspiPayload = a})
instance GoogleRequest TargetSSLProxiesInsert where
type Rs TargetSSLProxiesInsert = Operation
type Scopes TargetSSLProxiesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetSSLProxiesInsert'{..}
= go _tspiProject _tspiRequestId (Just AltJSON)
_tspiPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetSSLProxiesInsertResource)
mempty