{-# 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.Zones.Get
(
ZonesGetResource
, zonesGet
, ZonesGet
, zgProject
, zgZone
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ZonesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Zone
data ZonesGet = ZonesGet'
{ _zgProject :: !Text
, _zgZone :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
zonesGet
:: Text
-> Text
-> ZonesGet
zonesGet pZgProject_ pZgZone_ =
ZonesGet'
{ _zgProject = pZgProject_
, _zgZone = pZgZone_
}
zgProject :: Lens' ZonesGet Text
zgProject
= lens _zgProject (\ s a -> s{_zgProject = a})
zgZone :: Lens' ZonesGet Text
zgZone = lens _zgZone (\ s a -> s{_zgZone = a})
instance GoogleRequest ZonesGet where
type Rs ZonesGet = Zone
type Scopes ZonesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ZonesGet'{..}
= go _zgProject _zgZone (Just AltJSON) computeService
where go
= buildClient (Proxy :: Proxy ZonesGetResource)
mempty