{-# 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.GlobalAddresses.Get
(
GlobalAddressesGetResource
, globalAddressesGet
, GlobalAddressesGet
, gagProject
, gagAddress
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type GlobalAddressesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"addresses" :>
Capture "address" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Address
data GlobalAddressesGet = GlobalAddressesGet'
{ _gagProject :: !Text
, _gagAddress :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
globalAddressesGet
:: Text
-> Text
-> GlobalAddressesGet
globalAddressesGet pGagProject_ pGagAddress_ =
GlobalAddressesGet'
{ _gagProject = pGagProject_
, _gagAddress = pGagAddress_
}
gagProject :: Lens' GlobalAddressesGet Text
gagProject
= lens _gagProject (\ s a -> s{_gagProject = a})
gagAddress :: Lens' GlobalAddressesGet Text
gagAddress
= lens _gagAddress (\ s a -> s{_gagAddress = a})
instance GoogleRequest GlobalAddressesGet where
type Rs GlobalAddressesGet = Address
type Scopes GlobalAddressesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient GlobalAddressesGet'{..}
= go _gagProject _gagAddress (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy GlobalAddressesGetResource)
mempty