{-# 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.Images.Get
(
ImagesGetResource
, imagesGet
, ImagesGet
, imaImage
, imaProject
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ImagesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"images" :>
Capture "image" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Image
data ImagesGet = ImagesGet'
{ _imaImage :: !Text
, _imaProject :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
imagesGet
:: Text
-> Text
-> ImagesGet
imagesGet pImaImage_ pImaProject_ =
ImagesGet'
{ _imaImage = pImaImage_
, _imaProject = pImaProject_
}
imaImage :: Lens' ImagesGet Text
imaImage = lens _imaImage (\ s a -> s{_imaImage = a})
imaProject :: Lens' ImagesGet Text
imaProject
= lens _imaProject (\ s a -> s{_imaProject = a})
instance GoogleRequest ImagesGet where
type Rs ImagesGet = Image
type Scopes ImagesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ImagesGet'{..}
= go _imaProject _imaImage (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy ImagesGetResource)
mempty