{-# 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.Networks.SwitchToCustomMode
(
NetworksSwitchToCustomModeResource
, networksSwitchToCustomMode
, NetworksSwitchToCustomMode
, nstcmRequestId
, nstcmProject
, nstcmNetwork
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NetworksSwitchToCustomModeResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"networks" :>
Capture "network" Text :>
"switchToCustomMode" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data NetworksSwitchToCustomMode = NetworksSwitchToCustomMode'
{ _nstcmRequestId :: !(Maybe Text)
, _nstcmProject :: !Text
, _nstcmNetwork :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
networksSwitchToCustomMode
:: Text
-> Text
-> NetworksSwitchToCustomMode
networksSwitchToCustomMode pNstcmProject_ pNstcmNetwork_ =
NetworksSwitchToCustomMode'
{ _nstcmRequestId = Nothing
, _nstcmProject = pNstcmProject_
, _nstcmNetwork = pNstcmNetwork_
}
nstcmRequestId :: Lens' NetworksSwitchToCustomMode (Maybe Text)
nstcmRequestId
= lens _nstcmRequestId
(\ s a -> s{_nstcmRequestId = a})
nstcmProject :: Lens' NetworksSwitchToCustomMode Text
nstcmProject
= lens _nstcmProject (\ s a -> s{_nstcmProject = a})
nstcmNetwork :: Lens' NetworksSwitchToCustomMode Text
nstcmNetwork
= lens _nstcmNetwork (\ s a -> s{_nstcmNetwork = a})
instance GoogleRequest NetworksSwitchToCustomMode
where
type Rs NetworksSwitchToCustomMode = Operation
type Scopes NetworksSwitchToCustomMode =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NetworksSwitchToCustomMode'{..}
= go _nstcmProject _nstcmNetwork _nstcmRequestId
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy NetworksSwitchToCustomModeResource)
mempty