{-# 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.Get
(
NodeTemplatesGetResource
, nodeTemplatesGet
, NodeTemplatesGet
, nodProject
, nodNodeTemplate
, nodRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeTemplatesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"nodeTemplates" :>
Capture "nodeTemplate" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] NodeTemplate
data NodeTemplatesGet = NodeTemplatesGet'
{ _nodProject :: !Text
, _nodNodeTemplate :: !Text
, _nodRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeTemplatesGet
:: Text
-> Text
-> Text
-> NodeTemplatesGet
nodeTemplatesGet pNodProject_ pNodNodeTemplate_ pNodRegion_ =
NodeTemplatesGet'
{ _nodProject = pNodProject_
, _nodNodeTemplate = pNodNodeTemplate_
, _nodRegion = pNodRegion_
}
nodProject :: Lens' NodeTemplatesGet Text
nodProject
= lens _nodProject (\ s a -> s{_nodProject = a})
nodNodeTemplate :: Lens' NodeTemplatesGet Text
nodNodeTemplate
= lens _nodNodeTemplate
(\ s a -> s{_nodNodeTemplate = a})
nodRegion :: Lens' NodeTemplatesGet Text
nodRegion
= lens _nodRegion (\ s a -> s{_nodRegion = a})
instance GoogleRequest NodeTemplatesGet where
type Rs NodeTemplatesGet = NodeTemplate
type Scopes NodeTemplatesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient NodeTemplatesGet'{..}
= go _nodProject _nodRegion _nodNodeTemplate
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy NodeTemplatesGetResource)
mempty