{-# 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.NodeTemplates.Insert
(
NodeTemplatesInsertResource
, nodeTemplatesInsert
, NodeTemplatesInsert
, ntiRequestId
, ntiProject
, ntiPayload
, ntiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeTemplatesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"nodeTemplates" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] NodeTemplate :>
Post '[JSON] Operation
data NodeTemplatesInsert = NodeTemplatesInsert'
{ _ntiRequestId :: !(Maybe Text)
, _ntiProject :: !Text
, _ntiPayload :: !NodeTemplate
, _ntiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeTemplatesInsert
:: Text
-> NodeTemplate
-> Text
-> NodeTemplatesInsert
nodeTemplatesInsert pNtiProject_ pNtiPayload_ pNtiRegion_ =
NodeTemplatesInsert'
{ _ntiRequestId = Nothing
, _ntiProject = pNtiProject_
, _ntiPayload = pNtiPayload_
, _ntiRegion = pNtiRegion_
}
ntiRequestId :: Lens' NodeTemplatesInsert (Maybe Text)
ntiRequestId
= lens _ntiRequestId (\ s a -> s{_ntiRequestId = a})
ntiProject :: Lens' NodeTemplatesInsert Text
ntiProject
= lens _ntiProject (\ s a -> s{_ntiProject = a})
ntiPayload :: Lens' NodeTemplatesInsert NodeTemplate
ntiPayload
= lens _ntiPayload (\ s a -> s{_ntiPayload = a})
ntiRegion :: Lens' NodeTemplatesInsert Text
ntiRegion
= lens _ntiRegion (\ s a -> s{_ntiRegion = a})
instance GoogleRequest NodeTemplatesInsert where
type Rs NodeTemplatesInsert = Operation
type Scopes NodeTemplatesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NodeTemplatesInsert'{..}
= go _ntiProject _ntiRegion _ntiRequestId
(Just AltJSON)
_ntiPayload
computeService
where go
= buildClient
(Proxy :: Proxy NodeTemplatesInsertResource)
mempty