{-# 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.GetFromFamily
(
ImagesGetFromFamilyResource
, imagesGetFromFamily
, ImagesGetFromFamily
, igffProject
, igffFamily
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ImagesGetFromFamilyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"images" :>
"family" :>
Capture "family" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Image
data ImagesGetFromFamily = ImagesGetFromFamily'
{ _igffProject :: !Text
, _igffFamily :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
imagesGetFromFamily
:: Text
-> Text
-> ImagesGetFromFamily
imagesGetFromFamily pIgffProject_ pIgffFamily_ =
ImagesGetFromFamily'
{ _igffProject = pIgffProject_
, _igffFamily = pIgffFamily_
}
igffProject :: Lens' ImagesGetFromFamily Text
igffProject
= lens _igffProject (\ s a -> s{_igffProject = a})
igffFamily :: Lens' ImagesGetFromFamily Text
igffFamily
= lens _igffFamily (\ s a -> s{_igffFamily = a})
instance GoogleRequest ImagesGetFromFamily where
type Rs ImagesGetFromFamily = Image
type Scopes ImagesGetFromFamily =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ImagesGetFromFamily'{..}
= go _igffProject _igffFamily (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy ImagesGetFromFamilyResource)
mempty