{-# 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.NodeGroups.Insert
(
NodeGroupsInsertResource
, nodeGroupsInsert
, NodeGroupsInsert
, ngiRequestId
, ngiProject
, ngiInitialNodeCount
, ngiZone
, ngiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeGroupsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"nodeGroups" :>
QueryParam "initialNodeCount" (Textual Int32) :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] NodeGroup :> Post '[JSON] Operation
data NodeGroupsInsert = NodeGroupsInsert'
{ _ngiRequestId :: !(Maybe Text)
, _ngiProject :: !Text
, _ngiInitialNodeCount :: !(Textual Int32)
, _ngiZone :: !Text
, _ngiPayload :: !NodeGroup
} deriving (Eq,Show,Data,Typeable,Generic)
nodeGroupsInsert
:: Text
-> Int32
-> Text
-> NodeGroup
-> NodeGroupsInsert
nodeGroupsInsert pNgiProject_ pNgiInitialNodeCount_ pNgiZone_ pNgiPayload_ =
NodeGroupsInsert'
{ _ngiRequestId = Nothing
, _ngiProject = pNgiProject_
, _ngiInitialNodeCount = _Coerce # pNgiInitialNodeCount_
, _ngiZone = pNgiZone_
, _ngiPayload = pNgiPayload_
}
ngiRequestId :: Lens' NodeGroupsInsert (Maybe Text)
ngiRequestId
= lens _ngiRequestId (\ s a -> s{_ngiRequestId = a})
ngiProject :: Lens' NodeGroupsInsert Text
ngiProject
= lens _ngiProject (\ s a -> s{_ngiProject = a})
ngiInitialNodeCount :: Lens' NodeGroupsInsert Int32
ngiInitialNodeCount
= lens _ngiInitialNodeCount
(\ s a -> s{_ngiInitialNodeCount = a})
. _Coerce
ngiZone :: Lens' NodeGroupsInsert Text
ngiZone = lens _ngiZone (\ s a -> s{_ngiZone = a})
ngiPayload :: Lens' NodeGroupsInsert NodeGroup
ngiPayload
= lens _ngiPayload (\ s a -> s{_ngiPayload = a})
instance GoogleRequest NodeGroupsInsert where
type Rs NodeGroupsInsert = Operation
type Scopes NodeGroupsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NodeGroupsInsert'{..}
= go _ngiProject _ngiZone (Just _ngiInitialNodeCount)
_ngiRequestId
(Just AltJSON)
_ngiPayload
computeService
where go
= buildClient
(Proxy :: Proxy NodeGroupsInsertResource)
mempty