{-# 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.Routes.Insert
(
RoutesInsertResource
, routesInsert
, RoutesInsert
, rouRequestId
, rouProject
, rouPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RoutesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"routes" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Route :> Post '[JSON] Operation
data RoutesInsert = RoutesInsert'
{ _rouRequestId :: !(Maybe Text)
, _rouProject :: !Text
, _rouPayload :: !Route
} deriving (Eq,Show,Data,Typeable,Generic)
routesInsert
:: Text
-> Route
-> RoutesInsert
routesInsert pRouProject_ pRouPayload_ =
RoutesInsert'
{ _rouRequestId = Nothing
, _rouProject = pRouProject_
, _rouPayload = pRouPayload_
}
rouRequestId :: Lens' RoutesInsert (Maybe Text)
rouRequestId
= lens _rouRequestId (\ s a -> s{_rouRequestId = a})
rouProject :: Lens' RoutesInsert Text
rouProject
= lens _rouProject (\ s a -> s{_rouProject = a})
rouPayload :: Lens' RoutesInsert Route
rouPayload
= lens _rouPayload (\ s a -> s{_rouPayload = a})
instance GoogleRequest RoutesInsert where
type Rs RoutesInsert = Operation
type Scopes RoutesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RoutesInsert'{..}
= go _rouProject _rouRequestId (Just AltJSON)
_rouPayload
computeService
where go
= buildClient (Proxy :: Proxy RoutesInsertResource)
mempty