{-# 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.Subnetworks.Get
(
SubnetworksGetResource
, subnetworksGet
, SubnetworksGet
, sgProject
, sgSubnetwork
, sgRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SubnetworksGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"subnetworks" :>
Capture "subnetwork" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Subnetwork
data SubnetworksGet = SubnetworksGet'
{ _sgProject :: !Text
, _sgSubnetwork :: !Text
, _sgRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subnetworksGet
:: Text
-> Text
-> Text
-> SubnetworksGet
subnetworksGet pSgProject_ pSgSubnetwork_ pSgRegion_ =
SubnetworksGet'
{ _sgProject = pSgProject_
, _sgSubnetwork = pSgSubnetwork_
, _sgRegion = pSgRegion_
}
sgProject :: Lens' SubnetworksGet Text
sgProject
= lens _sgProject (\ s a -> s{_sgProject = a})
sgSubnetwork :: Lens' SubnetworksGet Text
sgSubnetwork
= lens _sgSubnetwork (\ s a -> s{_sgSubnetwork = a})
sgRegion :: Lens' SubnetworksGet Text
sgRegion = lens _sgRegion (\ s a -> s{_sgRegion = a})
instance GoogleRequest SubnetworksGet where
type Rs SubnetworksGet = Subnetwork
type Scopes SubnetworksGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient SubnetworksGet'{..}
= go _sgProject _sgRegion _sgSubnetwork
(Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy SubnetworksGetResource)
mempty