{-# 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.TPU.Projects.Locations.Nodes.Stop
(
ProjectsLocationsNodesStopResource
, projectsLocationsNodesStop
, ProjectsLocationsNodesStop
, pXgafv
, pUploadProtocol
, pAccessToken
, pUploadType
, pPayload
, pName
, pCallback
) where
import Network.Google.Prelude
import Network.Google.TPU.Types
type ProjectsLocationsNodesStopResource =
"v1" :>
CaptureMode "name" "stop" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StopNodeRequest :>
Post '[JSON] Operation
data ProjectsLocationsNodesStop = ProjectsLocationsNodesStop'
{ _pXgafv :: !(Maybe Xgafv)
, _pUploadProtocol :: !(Maybe Text)
, _pAccessToken :: !(Maybe Text)
, _pUploadType :: !(Maybe Text)
, _pPayload :: !StopNodeRequest
, _pName :: !Text
, _pCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsNodesStop
:: StopNodeRequest
-> Text
-> ProjectsLocationsNodesStop
projectsLocationsNodesStop pPPayload_ pPName_ =
ProjectsLocationsNodesStop'
{ _pXgafv = Nothing
, _pUploadProtocol = Nothing
, _pAccessToken = Nothing
, _pUploadType = Nothing
, _pPayload = pPPayload_
, _pName = pPName_
, _pCallback = Nothing
}
pXgafv :: Lens' ProjectsLocationsNodesStop (Maybe Xgafv)
pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})
pUploadProtocol :: Lens' ProjectsLocationsNodesStop (Maybe Text)
pUploadProtocol
= lens _pUploadProtocol
(\ s a -> s{_pUploadProtocol = a})
pAccessToken :: Lens' ProjectsLocationsNodesStop (Maybe Text)
pAccessToken
= lens _pAccessToken (\ s a -> s{_pAccessToken = a})
pUploadType :: Lens' ProjectsLocationsNodesStop (Maybe Text)
pUploadType
= lens _pUploadType (\ s a -> s{_pUploadType = a})
pPayload :: Lens' ProjectsLocationsNodesStop StopNodeRequest
pPayload = lens _pPayload (\ s a -> s{_pPayload = a})
pName :: Lens' ProjectsLocationsNodesStop Text
pName = lens _pName (\ s a -> s{_pName = a})
pCallback :: Lens' ProjectsLocationsNodesStop (Maybe Text)
pCallback
= lens _pCallback (\ s a -> s{_pCallback = a})
instance GoogleRequest ProjectsLocationsNodesStop
where
type Rs ProjectsLocationsNodesStop = Operation
type Scopes ProjectsLocationsNodesStop =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsNodesStop'{..}
= go _pName _pXgafv _pUploadProtocol _pAccessToken
_pUploadType
_pCallback
(Just AltJSON)
_pPayload
tPUService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsNodesStopResource)
mempty