{-# 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.Create
(
ProjectsInstancesCreateResource
, projectsInstancesCreate
, ProjectsInstancesCreate
, picParent
, picXgafv
, picUploadProtocol
, picAccessToken
, picUploadType
, picPayload
, picCallback
) where
import Network.Google.BigtableAdmin.Types
import Network.Google.Prelude
type ProjectsInstancesCreateResource =
"v2" :>
Capture "parent" Text :>
"instances" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateInstanceRequest :>
Post '[JSON] Operation
data ProjectsInstancesCreate = ProjectsInstancesCreate'
{ _picParent :: !Text
, _picXgafv :: !(Maybe Xgafv)
, _picUploadProtocol :: !(Maybe Text)
, _picAccessToken :: !(Maybe Text)
, _picUploadType :: !(Maybe Text)
, _picPayload :: !CreateInstanceRequest
, _picCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesCreate
:: Text
-> CreateInstanceRequest
-> ProjectsInstancesCreate
projectsInstancesCreate pPicParent_ pPicPayload_ =
ProjectsInstancesCreate'
{ _picParent = pPicParent_
, _picXgafv = Nothing
, _picUploadProtocol = Nothing
, _picAccessToken = Nothing
, _picUploadType = Nothing
, _picPayload = pPicPayload_
, _picCallback = Nothing
}
picParent :: Lens' ProjectsInstancesCreate Text
picParent
= lens _picParent (\ s a -> s{_picParent = a})
picXgafv :: Lens' ProjectsInstancesCreate (Maybe Xgafv)
picXgafv = lens _picXgafv (\ s a -> s{_picXgafv = a})
picUploadProtocol :: Lens' ProjectsInstancesCreate (Maybe Text)
picUploadProtocol
= lens _picUploadProtocol
(\ s a -> s{_picUploadProtocol = a})
picAccessToken :: Lens' ProjectsInstancesCreate (Maybe Text)
picAccessToken
= lens _picAccessToken
(\ s a -> s{_picAccessToken = a})
picUploadType :: Lens' ProjectsInstancesCreate (Maybe Text)
picUploadType
= lens _picUploadType
(\ s a -> s{_picUploadType = a})
picPayload :: Lens' ProjectsInstancesCreate CreateInstanceRequest
picPayload
= lens _picPayload (\ s a -> s{_picPayload = a})
picCallback :: Lens' ProjectsInstancesCreate (Maybe Text)
picCallback
= lens _picCallback (\ s a -> s{_picCallback = a})
instance GoogleRequest ProjectsInstancesCreate where
type Rs ProjectsInstancesCreate = Operation
type Scopes ProjectsInstancesCreate =
'["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 ProjectsInstancesCreate'{..}
= go _picParent _picXgafv _picUploadProtocol
_picAccessToken
_picUploadType
_picCallback
(Just AltJSON)
_picPayload
bigtableAdminService
where go
= buildClient
(Proxy :: Proxy ProjectsInstancesCreateResource)
mempty