{-# 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.Create
(
ProjectsLocationsNodesCreateResource
, projectsLocationsNodesCreate
, ProjectsLocationsNodesCreate
, plncParent
, plncXgafv
, plncUploadProtocol
, plncAccessToken
, plncUploadType
, plncPayload
, plncNodeId
, plncCallback
) where
import Network.Google.Prelude
import Network.Google.TPU.Types
type ProjectsLocationsNodesCreateResource =
"v1" :>
Capture "parent" Text :>
"nodes" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "nodeId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Node :> Post '[JSON] Operation
data ProjectsLocationsNodesCreate = ProjectsLocationsNodesCreate'
{ _plncParent :: !Text
, _plncXgafv :: !(Maybe Xgafv)
, _plncUploadProtocol :: !(Maybe Text)
, _plncAccessToken :: !(Maybe Text)
, _plncUploadType :: !(Maybe Text)
, _plncPayload :: !Node
, _plncNodeId :: !(Maybe Text)
, _plncCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsNodesCreate
:: Text
-> Node
-> ProjectsLocationsNodesCreate
projectsLocationsNodesCreate pPlncParent_ pPlncPayload_ =
ProjectsLocationsNodesCreate'
{ _plncParent = pPlncParent_
, _plncXgafv = Nothing
, _plncUploadProtocol = Nothing
, _plncAccessToken = Nothing
, _plncUploadType = Nothing
, _plncPayload = pPlncPayload_
, _plncNodeId = Nothing
, _plncCallback = Nothing
}
plncParent :: Lens' ProjectsLocationsNodesCreate Text
plncParent
= lens _plncParent (\ s a -> s{_plncParent = a})
plncXgafv :: Lens' ProjectsLocationsNodesCreate (Maybe Xgafv)
plncXgafv
= lens _plncXgafv (\ s a -> s{_plncXgafv = a})
plncUploadProtocol :: Lens' ProjectsLocationsNodesCreate (Maybe Text)
plncUploadProtocol
= lens _plncUploadProtocol
(\ s a -> s{_plncUploadProtocol = a})
plncAccessToken :: Lens' ProjectsLocationsNodesCreate (Maybe Text)
plncAccessToken
= lens _plncAccessToken
(\ s a -> s{_plncAccessToken = a})
plncUploadType :: Lens' ProjectsLocationsNodesCreate (Maybe Text)
plncUploadType
= lens _plncUploadType
(\ s a -> s{_plncUploadType = a})
plncPayload :: Lens' ProjectsLocationsNodesCreate Node
plncPayload
= lens _plncPayload (\ s a -> s{_plncPayload = a})
plncNodeId :: Lens' ProjectsLocationsNodesCreate (Maybe Text)
plncNodeId
= lens _plncNodeId (\ s a -> s{_plncNodeId = a})
plncCallback :: Lens' ProjectsLocationsNodesCreate (Maybe Text)
plncCallback
= lens _plncCallback (\ s a -> s{_plncCallback = a})
instance GoogleRequest ProjectsLocationsNodesCreate
where
type Rs ProjectsLocationsNodesCreate = Operation
type Scopes ProjectsLocationsNodesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsNodesCreate'{..}
= go _plncParent _plncXgafv _plncUploadProtocol
_plncAccessToken
_plncUploadType
_plncNodeId
_plncCallback
(Just AltJSON)
_plncPayload
tPUService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsNodesCreateResource)
mempty