{-# 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.Tables.Create
(
ProjectsInstancesTablesCreateResource
, projectsInstancesTablesCreate
, ProjectsInstancesTablesCreate
, pitcParent
, pitcXgafv
, pitcUploadProtocol
, pitcAccessToken
, pitcUploadType
, pitcPayload
, pitcCallback
) where
import Network.Google.BigtableAdmin.Types
import Network.Google.Prelude
type ProjectsInstancesTablesCreateResource =
"v2" :>
Capture "parent" Text :>
"tables" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateTableRequest :>
Post '[JSON] Table
data ProjectsInstancesTablesCreate = ProjectsInstancesTablesCreate'
{ _pitcParent :: !Text
, _pitcXgafv :: !(Maybe Xgafv)
, _pitcUploadProtocol :: !(Maybe Text)
, _pitcAccessToken :: !(Maybe Text)
, _pitcUploadType :: !(Maybe Text)
, _pitcPayload :: !CreateTableRequest
, _pitcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesTablesCreate
:: Text
-> CreateTableRequest
-> ProjectsInstancesTablesCreate
projectsInstancesTablesCreate pPitcParent_ pPitcPayload_ =
ProjectsInstancesTablesCreate'
{ _pitcParent = pPitcParent_
, _pitcXgafv = Nothing
, _pitcUploadProtocol = Nothing
, _pitcAccessToken = Nothing
, _pitcUploadType = Nothing
, _pitcPayload = pPitcPayload_
, _pitcCallback = Nothing
}
pitcParent :: Lens' ProjectsInstancesTablesCreate Text
pitcParent
= lens _pitcParent (\ s a -> s{_pitcParent = a})
pitcXgafv :: Lens' ProjectsInstancesTablesCreate (Maybe Xgafv)
pitcXgafv
= lens _pitcXgafv (\ s a -> s{_pitcXgafv = a})
pitcUploadProtocol :: Lens' ProjectsInstancesTablesCreate (Maybe Text)
pitcUploadProtocol
= lens _pitcUploadProtocol
(\ s a -> s{_pitcUploadProtocol = a})
pitcAccessToken :: Lens' ProjectsInstancesTablesCreate (Maybe Text)
pitcAccessToken
= lens _pitcAccessToken
(\ s a -> s{_pitcAccessToken = a})
pitcUploadType :: Lens' ProjectsInstancesTablesCreate (Maybe Text)
pitcUploadType
= lens _pitcUploadType
(\ s a -> s{_pitcUploadType = a})
pitcPayload :: Lens' ProjectsInstancesTablesCreate CreateTableRequest
pitcPayload
= lens _pitcPayload (\ s a -> s{_pitcPayload = a})
pitcCallback :: Lens' ProjectsInstancesTablesCreate (Maybe Text)
pitcCallback
= lens _pitcCallback (\ s a -> s{_pitcCallback = a})
instance GoogleRequest ProjectsInstancesTablesCreate
where
type Rs ProjectsInstancesTablesCreate = Table
type Scopes ProjectsInstancesTablesCreate =
'["https://www.googleapis.com/auth/bigtable.admin",
"https://www.googleapis.com/auth/bigtable.admin.table",
"https://www.googleapis.com/auth/cloud-bigtable.admin",
"https://www.googleapis.com/auth/cloud-bigtable.admin.table",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsInstancesTablesCreate'{..}
= go _pitcParent _pitcXgafv _pitcUploadProtocol
_pitcAccessToken
_pitcUploadType
_pitcCallback
(Just AltJSON)
_pitcPayload
bigtableAdminService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesTablesCreateResource)
mempty