{-# 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.GetDiagnostics
(
InterconnectsGetDiagnosticsResource
, interconnectsGetDiagnostics
, InterconnectsGetDiagnostics
, igdsProject
, igdsInterconnect
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InterconnectsGetDiagnosticsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"interconnects" :>
Capture "interconnect" Text :>
"getDiagnostics" :>
QueryParam "alt" AltJSON :>
Get '[JSON] InterconnectsGetDiagnosticsResponse
data InterconnectsGetDiagnostics = InterconnectsGetDiagnostics'
{ _igdsProject :: !Text
, _igdsInterconnect :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
interconnectsGetDiagnostics
:: Text
-> Text
-> InterconnectsGetDiagnostics
interconnectsGetDiagnostics pIgdsProject_ pIgdsInterconnect_ =
InterconnectsGetDiagnostics'
{ _igdsProject = pIgdsProject_
, _igdsInterconnect = pIgdsInterconnect_
}
igdsProject :: Lens' InterconnectsGetDiagnostics Text
igdsProject
= lens _igdsProject (\ s a -> s{_igdsProject = a})
igdsInterconnect :: Lens' InterconnectsGetDiagnostics Text
igdsInterconnect
= lens _igdsInterconnect
(\ s a -> s{_igdsInterconnect = a})
instance GoogleRequest InterconnectsGetDiagnostics
where
type Rs InterconnectsGetDiagnostics =
InterconnectsGetDiagnosticsResponse
type Scopes InterconnectsGetDiagnostics =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InterconnectsGetDiagnostics'{..}
= go _igdsProject _igdsInterconnect (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InterconnectsGetDiagnosticsResource)
mempty