{-# 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.Routers.Preview
(
RoutersPreviewResource
, routersPreview
, RoutersPreview
, rppProject
, rppRouter
, rppPayload
, rppRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RoutersPreviewResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"routers" :>
Capture "router" Text :>
"preview" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Router :>
Post '[JSON] RoutersPreviewResponse
data RoutersPreview = RoutersPreview'
{ _rppProject :: !Text
, _rppRouter :: !Text
, _rppPayload :: !Router
, _rppRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
routersPreview
:: Text
-> Text
-> Router
-> Text
-> RoutersPreview
routersPreview pRppProject_ pRppRouter_ pRppPayload_ pRppRegion_ =
RoutersPreview'
{ _rppProject = pRppProject_
, _rppRouter = pRppRouter_
, _rppPayload = pRppPayload_
, _rppRegion = pRppRegion_
}
rppProject :: Lens' RoutersPreview Text
rppProject
= lens _rppProject (\ s a -> s{_rppProject = a})
rppRouter :: Lens' RoutersPreview Text
rppRouter
= lens _rppRouter (\ s a -> s{_rppRouter = a})
rppPayload :: Lens' RoutersPreview Router
rppPayload
= lens _rppPayload (\ s a -> s{_rppPayload = a})
rppRegion :: Lens' RoutersPreview Text
rppRegion
= lens _rppRegion (\ s a -> s{_rppRegion = a})
instance GoogleRequest RoutersPreview where
type Rs RoutersPreview = RoutersPreviewResponse
type Scopes RoutersPreview =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RoutersPreview'{..}
= go _rppProject _rppRegion _rppRouter (Just AltJSON)
_rppPayload
computeService
where go
= buildClient (Proxy :: Proxy RoutersPreviewResource)
mempty