{-# 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.Start
(
ProjectsLocationsNodesStartResource
, projectsLocationsNodesStart
, ProjectsLocationsNodesStart
, plnsXgafv
, plnsUploadProtocol
, plnsAccessToken
, plnsUploadType
, plnsPayload
, plnsName
, plnsCallback
) where
import Network.Google.Prelude
import Network.Google.TPU.Types
type ProjectsLocationsNodesStartResource =
"v1" :>
CaptureMode "name" "start" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StartNodeRequest :>
Post '[JSON] Operation
data ProjectsLocationsNodesStart = ProjectsLocationsNodesStart'
{ _plnsXgafv :: !(Maybe Xgafv)
, _plnsUploadProtocol :: !(Maybe Text)
, _plnsAccessToken :: !(Maybe Text)
, _plnsUploadType :: !(Maybe Text)
, _plnsPayload :: !StartNodeRequest
, _plnsName :: !Text
, _plnsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsNodesStart
:: StartNodeRequest
-> Text
-> ProjectsLocationsNodesStart
projectsLocationsNodesStart pPlnsPayload_ pPlnsName_ =
ProjectsLocationsNodesStart'
{ _plnsXgafv = Nothing
, _plnsUploadProtocol = Nothing
, _plnsAccessToken = Nothing
, _plnsUploadType = Nothing
, _plnsPayload = pPlnsPayload_
, _plnsName = pPlnsName_
, _plnsCallback = Nothing
}
plnsXgafv :: Lens' ProjectsLocationsNodesStart (Maybe Xgafv)
plnsXgafv
= lens _plnsXgafv (\ s a -> s{_plnsXgafv = a})
plnsUploadProtocol :: Lens' ProjectsLocationsNodesStart (Maybe Text)
plnsUploadProtocol
= lens _plnsUploadProtocol
(\ s a -> s{_plnsUploadProtocol = a})
plnsAccessToken :: Lens' ProjectsLocationsNodesStart (Maybe Text)
plnsAccessToken
= lens _plnsAccessToken
(\ s a -> s{_plnsAccessToken = a})
plnsUploadType :: Lens' ProjectsLocationsNodesStart (Maybe Text)
plnsUploadType
= lens _plnsUploadType
(\ s a -> s{_plnsUploadType = a})
plnsPayload :: Lens' ProjectsLocationsNodesStart StartNodeRequest
plnsPayload
= lens _plnsPayload (\ s a -> s{_plnsPayload = a})
plnsName :: Lens' ProjectsLocationsNodesStart Text
plnsName = lens _plnsName (\ s a -> s{_plnsName = a})
plnsCallback :: Lens' ProjectsLocationsNodesStart (Maybe Text)
plnsCallback
= lens _plnsCallback (\ s a -> s{_plnsCallback = a})
instance GoogleRequest ProjectsLocationsNodesStart
where
type Rs ProjectsLocationsNodesStart = Operation
type Scopes ProjectsLocationsNodesStart =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsNodesStart'{..}
= go _plnsName _plnsXgafv _plnsUploadProtocol
_plnsAccessToken
_plnsUploadType
_plnsCallback
(Just AltJSON)
_plnsPayload
tPUService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsNodesStartResource)
mempty