{-# 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.InstanceTemplates.Get
(
InstanceTemplatesGetResource
, instanceTemplatesGet
, InstanceTemplatesGet
, itgProject
, itgInstanceTemplate
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstanceTemplatesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"instanceTemplates" :>
Capture "instanceTemplate" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] InstanceTemplate
data InstanceTemplatesGet = InstanceTemplatesGet'
{ _itgProject :: !Text
, _itgInstanceTemplate :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instanceTemplatesGet
:: Text
-> Text
-> InstanceTemplatesGet
instanceTemplatesGet pItgProject_ pItgInstanceTemplate_ =
InstanceTemplatesGet'
{ _itgProject = pItgProject_
, _itgInstanceTemplate = pItgInstanceTemplate_
}
itgProject :: Lens' InstanceTemplatesGet Text
itgProject
= lens _itgProject (\ s a -> s{_itgProject = a})
itgInstanceTemplate :: Lens' InstanceTemplatesGet Text
itgInstanceTemplate
= lens _itgInstanceTemplate
(\ s a -> s{_itgInstanceTemplate = a})
instance GoogleRequest InstanceTemplatesGet where
type Rs InstanceTemplatesGet = InstanceTemplate
type Scopes InstanceTemplatesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InstanceTemplatesGet'{..}
= go _itgProject _itgInstanceTemplate (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InstanceTemplatesGetResource)
mempty