{-# 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.TargetPools.AddInstance
(
TargetPoolsAddInstanceResource
, targetPoolsAddInstance
, TargetPoolsAddInstance
, tpaiRequestId
, tpaiProject
, tpaiTargetPool
, tpaiPayload
, tpaiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetPoolsAddInstanceResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"targetPools" :>
Capture "targetPool" Text :>
"addInstance" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetPoolsAddInstanceRequest :>
Post '[JSON] Operation
data TargetPoolsAddInstance = TargetPoolsAddInstance'
{ _tpaiRequestId :: !(Maybe Text)
, _tpaiProject :: !Text
, _tpaiTargetPool :: !Text
, _tpaiPayload :: !TargetPoolsAddInstanceRequest
, _tpaiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetPoolsAddInstance
:: Text
-> Text
-> TargetPoolsAddInstanceRequest
-> Text
-> TargetPoolsAddInstance
targetPoolsAddInstance pTpaiProject_ pTpaiTargetPool_ pTpaiPayload_ pTpaiRegion_ =
TargetPoolsAddInstance'
{ _tpaiRequestId = Nothing
, _tpaiProject = pTpaiProject_
, _tpaiTargetPool = pTpaiTargetPool_
, _tpaiPayload = pTpaiPayload_
, _tpaiRegion = pTpaiRegion_
}
tpaiRequestId :: Lens' TargetPoolsAddInstance (Maybe Text)
tpaiRequestId
= lens _tpaiRequestId
(\ s a -> s{_tpaiRequestId = a})
tpaiProject :: Lens' TargetPoolsAddInstance Text
tpaiProject
= lens _tpaiProject (\ s a -> s{_tpaiProject = a})
tpaiTargetPool :: Lens' TargetPoolsAddInstance Text
tpaiTargetPool
= lens _tpaiTargetPool
(\ s a -> s{_tpaiTargetPool = a})
tpaiPayload :: Lens' TargetPoolsAddInstance TargetPoolsAddInstanceRequest
tpaiPayload
= lens _tpaiPayload (\ s a -> s{_tpaiPayload = a})
tpaiRegion :: Lens' TargetPoolsAddInstance Text
tpaiRegion
= lens _tpaiRegion (\ s a -> s{_tpaiRegion = a})
instance GoogleRequest TargetPoolsAddInstance where
type Rs TargetPoolsAddInstance = Operation
type Scopes TargetPoolsAddInstance =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetPoolsAddInstance'{..}
= go _tpaiProject _tpaiRegion _tpaiTargetPool
_tpaiRequestId
(Just AltJSON)
_tpaiPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetPoolsAddInstanceResource)
mempty