{-# 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.Networks.Get
(
NetworksGetResource
, networksGet
, NetworksGet
, ngProject
, ngNetwork
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NetworksGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"networks" :>
Capture "network" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Network
data NetworksGet = NetworksGet'
{ _ngProject :: !Text
, _ngNetwork :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
networksGet
:: Text
-> Text
-> NetworksGet
networksGet pNgProject_ pNgNetwork_ =
NetworksGet'
{ _ngProject = pNgProject_
, _ngNetwork = pNgNetwork_
}
ngProject :: Lens' NetworksGet Text
ngProject
= lens _ngProject (\ s a -> s{_ngProject = a})
ngNetwork :: Lens' NetworksGet Text
ngNetwork
= lens _ngNetwork (\ s a -> s{_ngNetwork = a})
instance GoogleRequest NetworksGet where
type Rs NetworksGet = Network
type Scopes NetworksGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient NetworksGet'{..}
= go _ngProject _ngNetwork (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy NetworksGetResource)
mempty