{-# 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.ReplicaPool.Pools.Insert
(
PoolsInsertResource
, poolsInsert
, PoolsInsert
, piZone
, piPayload
, piProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type PoolsInsertResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Pool :> Post '[JSON] Pool
data PoolsInsert = PoolsInsert'
{ _piZone :: !Text
, _piPayload :: !Pool
, _piProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
poolsInsert
:: Text
-> Pool
-> Text
-> PoolsInsert
poolsInsert pPiZone_ pPiPayload_ pPiProjectName_ =
PoolsInsert'
{ _piZone = pPiZone_
, _piPayload = pPiPayload_
, _piProjectName = pPiProjectName_
}
piZone :: Lens' PoolsInsert Text
piZone = lens _piZone (\ s a -> s{_piZone = a})
piPayload :: Lens' PoolsInsert Pool
piPayload
= lens _piPayload (\ s a -> s{_piPayload = a})
piProjectName :: Lens' PoolsInsert Text
piProjectName
= lens _piProjectName
(\ s a -> s{_piProjectName = a})
instance GoogleRequest PoolsInsert where
type Rs PoolsInsert = Pool
type Scopes PoolsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/replicapool"]
requestClient PoolsInsert'{..}
= go _piProjectName _piZone (Just AltJSON) _piPayload
replicaPoolService
where go
= buildClient (Proxy :: Proxy PoolsInsertResource)
mempty