{-# 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.Container.Projects.Locations.Clusters.NodePools.Create
(
ProjectsLocationsClustersNodePoolsCreateResource
, projectsLocationsClustersNodePoolsCreate
, ProjectsLocationsClustersNodePoolsCreate
, plcnpcParent
, plcnpcXgafv
, plcnpcUploadProtocol
, plcnpcAccessToken
, plcnpcUploadType
, plcnpcPayload
, plcnpcCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsLocationsClustersNodePoolsCreateResource
=
"v1" :>
Capture "parent" Text :>
"nodePools" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateNodePoolRequest :>
Post '[JSON] Operation
data ProjectsLocationsClustersNodePoolsCreate = ProjectsLocationsClustersNodePoolsCreate'
{ _plcnpcParent :: !Text
, _plcnpcXgafv :: !(Maybe Xgafv)
, _plcnpcUploadProtocol :: !(Maybe Text)
, _plcnpcAccessToken :: !(Maybe Text)
, _plcnpcUploadType :: !(Maybe Text)
, _plcnpcPayload :: !CreateNodePoolRequest
, _plcnpcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsClustersNodePoolsCreate
:: Text
-> CreateNodePoolRequest
-> ProjectsLocationsClustersNodePoolsCreate
projectsLocationsClustersNodePoolsCreate pPlcnpcParent_ pPlcnpcPayload_ =
ProjectsLocationsClustersNodePoolsCreate'
{ _plcnpcParent = pPlcnpcParent_
, _plcnpcXgafv = Nothing
, _plcnpcUploadProtocol = Nothing
, _plcnpcAccessToken = Nothing
, _plcnpcUploadType = Nothing
, _plcnpcPayload = pPlcnpcPayload_
, _plcnpcCallback = Nothing
}
plcnpcParent :: Lens' ProjectsLocationsClustersNodePoolsCreate Text
plcnpcParent
= lens _plcnpcParent (\ s a -> s{_plcnpcParent = a})
plcnpcXgafv :: Lens' ProjectsLocationsClustersNodePoolsCreate (Maybe Xgafv)
plcnpcXgafv
= lens _plcnpcXgafv (\ s a -> s{_plcnpcXgafv = a})
plcnpcUploadProtocol :: Lens' ProjectsLocationsClustersNodePoolsCreate (Maybe Text)
plcnpcUploadProtocol
= lens _plcnpcUploadProtocol
(\ s a -> s{_plcnpcUploadProtocol = a})
plcnpcAccessToken :: Lens' ProjectsLocationsClustersNodePoolsCreate (Maybe Text)
plcnpcAccessToken
= lens _plcnpcAccessToken
(\ s a -> s{_plcnpcAccessToken = a})
plcnpcUploadType :: Lens' ProjectsLocationsClustersNodePoolsCreate (Maybe Text)
plcnpcUploadType
= lens _plcnpcUploadType
(\ s a -> s{_plcnpcUploadType = a})
plcnpcPayload :: Lens' ProjectsLocationsClustersNodePoolsCreate CreateNodePoolRequest
plcnpcPayload
= lens _plcnpcPayload
(\ s a -> s{_plcnpcPayload = a})
plcnpcCallback :: Lens' ProjectsLocationsClustersNodePoolsCreate (Maybe Text)
plcnpcCallback
= lens _plcnpcCallback
(\ s a -> s{_plcnpcCallback = a})
instance GoogleRequest
ProjectsLocationsClustersNodePoolsCreate where
type Rs ProjectsLocationsClustersNodePoolsCreate =
Operation
type Scopes ProjectsLocationsClustersNodePoolsCreate
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsClustersNodePoolsCreate'{..}
= go _plcnpcParent _plcnpcXgafv _plcnpcUploadProtocol
_plcnpcAccessToken
_plcnpcUploadType
_plcnpcCallback
(Just AltJSON)
_plcnpcPayload
containerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsClustersNodePoolsCreateResource)
mempty