{-# 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.Addresses.Get
(
AddressesGetResource
, addressesGet
, AddressesGet
, addProject
, addAddress
, addRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type AddressesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"addresses" :>
Capture "address" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Address
data AddressesGet = AddressesGet'
{ _addProject :: !Text
, _addAddress :: !Text
, _addRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
addressesGet
:: Text
-> Text
-> Text
-> AddressesGet
addressesGet pAddProject_ pAddAddress_ pAddRegion_ =
AddressesGet'
{ _addProject = pAddProject_
, _addAddress = pAddAddress_
, _addRegion = pAddRegion_
}
addProject :: Lens' AddressesGet Text
addProject
= lens _addProject (\ s a -> s{_addProject = a})
addAddress :: Lens' AddressesGet Text
addAddress
= lens _addAddress (\ s a -> s{_addAddress = a})
addRegion :: Lens' AddressesGet Text
addRegion
= lens _addRegion (\ s a -> s{_addRegion = a})
instance GoogleRequest AddressesGet where
type Rs AddressesGet = Address
type Scopes AddressesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient AddressesGet'{..}
= go _addProject _addRegion _addAddress
(Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy AddressesGetResource)
mempty