{-# 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.Interconnects.Get
(
InterconnectsGetResource
, interconnectsGet
, InterconnectsGet
, iProject
, iInterconnect
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InterconnectsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"interconnects" :>
Capture "interconnect" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Interconnect
data InterconnectsGet = InterconnectsGet'
{ _iProject :: !Text
, _iInterconnect :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
interconnectsGet
:: Text
-> Text
-> InterconnectsGet
interconnectsGet pIProject_ pIInterconnect_ =
InterconnectsGet'
{ _iProject = pIProject_
, _iInterconnect = pIInterconnect_
}
iProject :: Lens' InterconnectsGet Text
iProject = lens _iProject (\ s a -> s{_iProject = a})
iInterconnect :: Lens' InterconnectsGet Text
iInterconnect
= lens _iInterconnect
(\ s a -> s{_iInterconnect = a})
instance GoogleRequest InterconnectsGet where
type Rs InterconnectsGet = Interconnect
type Scopes InterconnectsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InterconnectsGet'{..}
= go _iProject _iInterconnect (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InterconnectsGetResource)
mempty