{-# 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.Dataproc.Projects.Regions.Clusters.Create
(
ProjectsRegionsClustersCreateResource
, projectsRegionsClustersCreate
, ProjectsRegionsClustersCreate
, prccXgafv
, prccRequestId
, prccUploadProtocol
, prccAccessToken
, prccUploadType
, prccPayload
, prccRegion
, prccProjectId
, prccCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsClustersCreateResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"regions" :>
Capture "region" Text :>
"clusters" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "requestId" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Cluster :> Post '[JSON] Operation
data ProjectsRegionsClustersCreate = ProjectsRegionsClustersCreate'
{ _prccXgafv :: !(Maybe Xgafv)
, _prccRequestId :: !(Maybe Text)
, _prccUploadProtocol :: !(Maybe Text)
, _prccAccessToken :: !(Maybe Text)
, _prccUploadType :: !(Maybe Text)
, _prccPayload :: !Cluster
, _prccRegion :: !Text
, _prccProjectId :: !Text
, _prccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsClustersCreate
:: Cluster
-> Text
-> Text
-> ProjectsRegionsClustersCreate
projectsRegionsClustersCreate pPrccPayload_ pPrccRegion_ pPrccProjectId_ =
ProjectsRegionsClustersCreate'
{ _prccXgafv = Nothing
, _prccRequestId = Nothing
, _prccUploadProtocol = Nothing
, _prccAccessToken = Nothing
, _prccUploadType = Nothing
, _prccPayload = pPrccPayload_
, _prccRegion = pPrccRegion_
, _prccProjectId = pPrccProjectId_
, _prccCallback = Nothing
}
prccXgafv :: Lens' ProjectsRegionsClustersCreate (Maybe Xgafv)
prccXgafv
= lens _prccXgafv (\ s a -> s{_prccXgafv = a})
prccRequestId :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
prccRequestId
= lens _prccRequestId
(\ s a -> s{_prccRequestId = a})
prccUploadProtocol :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
prccUploadProtocol
= lens _prccUploadProtocol
(\ s a -> s{_prccUploadProtocol = a})
prccAccessToken :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
prccAccessToken
= lens _prccAccessToken
(\ s a -> s{_prccAccessToken = a})
prccUploadType :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
prccUploadType
= lens _prccUploadType
(\ s a -> s{_prccUploadType = a})
prccPayload :: Lens' ProjectsRegionsClustersCreate Cluster
prccPayload
= lens _prccPayload (\ s a -> s{_prccPayload = a})
prccRegion :: Lens' ProjectsRegionsClustersCreate Text
prccRegion
= lens _prccRegion (\ s a -> s{_prccRegion = a})
prccProjectId :: Lens' ProjectsRegionsClustersCreate Text
prccProjectId
= lens _prccProjectId
(\ s a -> s{_prccProjectId = a})
prccCallback :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
prccCallback
= lens _prccCallback (\ s a -> s{_prccCallback = a})
instance GoogleRequest ProjectsRegionsClustersCreate
where
type Rs ProjectsRegionsClustersCreate = Operation
type Scopes ProjectsRegionsClustersCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsRegionsClustersCreate'{..}
= go _prccProjectId _prccRegion _prccXgafv
_prccRequestId
_prccUploadProtocol
_prccAccessToken
_prccUploadType
_prccCallback
(Just AltJSON)
_prccPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy ProjectsRegionsClustersCreateResource)
mempty