{-# 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.Zones.Clusters.Create
(
ProjectsZonesClustersCreateResource
, projectsZonesClustersCreate
, ProjectsZonesClustersCreate
, pzccXgafv
, pzccUploadProtocol
, pzccAccessToken
, pzccUploadType
, pzccZone
, pzccPayload
, pzccProjectId
, pzccCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsZonesClustersCreateResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"zones" :>
Capture "zone" 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 ProjectsZonesClustersCreate = ProjectsZonesClustersCreate'
{ _pzccXgafv :: !(Maybe Xgafv)
, _pzccUploadProtocol :: !(Maybe Text)
, _pzccAccessToken :: !(Maybe Text)
, _pzccUploadType :: !(Maybe Text)
, _pzccZone :: !Text
, _pzccPayload :: !CreateClusterRequest
, _pzccProjectId :: !Text
, _pzccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsZonesClustersCreate
:: Text
-> CreateClusterRequest
-> Text
-> ProjectsZonesClustersCreate
projectsZonesClustersCreate pPzccZone_ pPzccPayload_ pPzccProjectId_ =
ProjectsZonesClustersCreate'
{ _pzccXgafv = Nothing
, _pzccUploadProtocol = Nothing
, _pzccAccessToken = Nothing
, _pzccUploadType = Nothing
, _pzccZone = pPzccZone_
, _pzccPayload = pPzccPayload_
, _pzccProjectId = pPzccProjectId_
, _pzccCallback = Nothing
}
pzccXgafv :: Lens' ProjectsZonesClustersCreate (Maybe Xgafv)
pzccXgafv
= lens _pzccXgafv (\ s a -> s{_pzccXgafv = a})
pzccUploadProtocol :: Lens' ProjectsZonesClustersCreate (Maybe Text)
pzccUploadProtocol
= lens _pzccUploadProtocol
(\ s a -> s{_pzccUploadProtocol = a})
pzccAccessToken :: Lens' ProjectsZonesClustersCreate (Maybe Text)
pzccAccessToken
= lens _pzccAccessToken
(\ s a -> s{_pzccAccessToken = a})
pzccUploadType :: Lens' ProjectsZonesClustersCreate (Maybe Text)
pzccUploadType
= lens _pzccUploadType
(\ s a -> s{_pzccUploadType = a})
pzccZone :: Lens' ProjectsZonesClustersCreate Text
pzccZone = lens _pzccZone (\ s a -> s{_pzccZone = a})
pzccPayload :: Lens' ProjectsZonesClustersCreate CreateClusterRequest
pzccPayload
= lens _pzccPayload (\ s a -> s{_pzccPayload = a})
pzccProjectId :: Lens' ProjectsZonesClustersCreate Text
pzccProjectId
= lens _pzccProjectId
(\ s a -> s{_pzccProjectId = a})
pzccCallback :: Lens' ProjectsZonesClustersCreate (Maybe Text)
pzccCallback
= lens _pzccCallback (\ s a -> s{_pzccCallback = a})
instance GoogleRequest ProjectsZonesClustersCreate
where
type Rs ProjectsZonesClustersCreate = Operation
type Scopes ProjectsZonesClustersCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsZonesClustersCreate'{..}
= go _pzccProjectId _pzccZone _pzccXgafv
_pzccUploadProtocol
_pzccAccessToken
_pzccUploadType
_pzccCallback
(Just AltJSON)
_pzccPayload
containerService
where go
= buildClient
(Proxy :: Proxy ProjectsZonesClustersCreateResource)
mempty