{-# 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.BigtableAdmin.Projects.Instances.Clusters.Create
(
ProjectsInstancesClustersCreateResource
, projectsInstancesClustersCreate
, ProjectsInstancesClustersCreate
, piccParent
, piccXgafv
, piccUploadProtocol
, piccAccessToken
, piccUploadType
, piccPayload
, piccClusterId
, piccCallback
) where
import Network.Google.BigtableAdmin.Types
import Network.Google.Prelude
type ProjectsInstancesClustersCreateResource =
"v2" :>
Capture "parent" Text :>
"clusters" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "clusterId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Cluster :> Post '[JSON] Operation
data ProjectsInstancesClustersCreate = ProjectsInstancesClustersCreate'
{ _piccParent :: !Text
, _piccXgafv :: !(Maybe Xgafv)
, _piccUploadProtocol :: !(Maybe Text)
, _piccAccessToken :: !(Maybe Text)
, _piccUploadType :: !(Maybe Text)
, _piccPayload :: !Cluster
, _piccClusterId :: !(Maybe Text)
, _piccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesClustersCreate
:: Text
-> Cluster
-> ProjectsInstancesClustersCreate
projectsInstancesClustersCreate pPiccParent_ pPiccPayload_ =
ProjectsInstancesClustersCreate'
{ _piccParent = pPiccParent_
, _piccXgafv = Nothing
, _piccUploadProtocol = Nothing
, _piccAccessToken = Nothing
, _piccUploadType = Nothing
, _piccPayload = pPiccPayload_
, _piccClusterId = Nothing
, _piccCallback = Nothing
}
piccParent :: Lens' ProjectsInstancesClustersCreate Text
piccParent
= lens _piccParent (\ s a -> s{_piccParent = a})
piccXgafv :: Lens' ProjectsInstancesClustersCreate (Maybe Xgafv)
piccXgafv
= lens _piccXgafv (\ s a -> s{_piccXgafv = a})
piccUploadProtocol :: Lens' ProjectsInstancesClustersCreate (Maybe Text)
piccUploadProtocol
= lens _piccUploadProtocol
(\ s a -> s{_piccUploadProtocol = a})
piccAccessToken :: Lens' ProjectsInstancesClustersCreate (Maybe Text)
piccAccessToken
= lens _piccAccessToken
(\ s a -> s{_piccAccessToken = a})
piccUploadType :: Lens' ProjectsInstancesClustersCreate (Maybe Text)
piccUploadType
= lens _piccUploadType
(\ s a -> s{_piccUploadType = a})
piccPayload :: Lens' ProjectsInstancesClustersCreate Cluster
piccPayload
= lens _piccPayload (\ s a -> s{_piccPayload = a})
piccClusterId :: Lens' ProjectsInstancesClustersCreate (Maybe Text)
piccClusterId
= lens _piccClusterId
(\ s a -> s{_piccClusterId = a})
piccCallback :: Lens' ProjectsInstancesClustersCreate (Maybe Text)
piccCallback
= lens _piccCallback (\ s a -> s{_piccCallback = a})
instance GoogleRequest
ProjectsInstancesClustersCreate where
type Rs ProjectsInstancesClustersCreate = Operation
type Scopes ProjectsInstancesClustersCreate =
'["https://www.googleapis.com/auth/bigtable.admin",
"https://www.googleapis.com/auth/bigtable.admin.cluster",
"https://www.googleapis.com/auth/bigtable.admin.instance",
"https://www.googleapis.com/auth/cloud-bigtable.admin",
"https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsInstancesClustersCreate'{..}
= go _piccParent _piccXgafv _piccUploadProtocol
_piccAccessToken
_piccUploadType
_piccClusterId
_piccCallback
(Just AltJSON)
_piccPayload
bigtableAdminService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesClustersCreateResource)
mempty