{-# 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.Create
(
ProjectsLocationsClustersCreateResource
, projectsLocationsClustersCreate
, ProjectsLocationsClustersCreate
, plccParent
, plccXgafv
, plccUploadProtocol
, plccAccessToken
, plccUploadType
, plccPayload
, plccCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsLocationsClustersCreateResource =
"v1" :>
Capture "parent" Text :>
"clusters" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateClusterRequest :>
Post '[JSON] Operation
data ProjectsLocationsClustersCreate = ProjectsLocationsClustersCreate'
{ _plccParent :: !Text
, _plccXgafv :: !(Maybe Xgafv)
, _plccUploadProtocol :: !(Maybe Text)
, _plccAccessToken :: !(Maybe Text)
, _plccUploadType :: !(Maybe Text)
, _plccPayload :: !CreateClusterRequest
, _plccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsClustersCreate
:: Text
-> CreateClusterRequest
-> ProjectsLocationsClustersCreate
projectsLocationsClustersCreate pPlccParent_ pPlccPayload_ =
ProjectsLocationsClustersCreate'
{ _plccParent = pPlccParent_
, _plccXgafv = Nothing
, _plccUploadProtocol = Nothing
, _plccAccessToken = Nothing
, _plccUploadType = Nothing
, _plccPayload = pPlccPayload_
, _plccCallback = Nothing
}
plccParent :: Lens' ProjectsLocationsClustersCreate Text
plccParent
= lens _plccParent (\ s a -> s{_plccParent = a})
plccXgafv :: Lens' ProjectsLocationsClustersCreate (Maybe Xgafv)
plccXgafv
= lens _plccXgafv (\ s a -> s{_plccXgafv = a})
plccUploadProtocol :: Lens' ProjectsLocationsClustersCreate (Maybe Text)
plccUploadProtocol
= lens _plccUploadProtocol
(\ s a -> s{_plccUploadProtocol = a})
plccAccessToken :: Lens' ProjectsLocationsClustersCreate (Maybe Text)
plccAccessToken
= lens _plccAccessToken
(\ s a -> s{_plccAccessToken = a})
plccUploadType :: Lens' ProjectsLocationsClustersCreate (Maybe Text)
plccUploadType
= lens _plccUploadType
(\ s a -> s{_plccUploadType = a})
plccPayload :: Lens' ProjectsLocationsClustersCreate CreateClusterRequest
plccPayload
= lens _plccPayload (\ s a -> s{_plccPayload = a})
plccCallback :: Lens' ProjectsLocationsClustersCreate (Maybe Text)
plccCallback
= lens _plccCallback (\ s a -> s{_plccCallback = a})
instance GoogleRequest
ProjectsLocationsClustersCreate where
type Rs ProjectsLocationsClustersCreate = Operation
type Scopes ProjectsLocationsClustersCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsClustersCreate'{..}
= go _plccParent _plccXgafv _plccUploadProtocol
_plccAccessToken
_plccUploadType
_plccCallback
(Just AltJSON)
_plccPayload
containerService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsClustersCreateResource)
mempty