{-# 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.AppProFiles.Create
(
ProjectsInstancesAppProFilesCreateResource
, projectsInstancesAppProFilesCreate
, ProjectsInstancesAppProFilesCreate
, piapfcParent
, piapfcXgafv
, piapfcAppProFileId
, piapfcUploadProtocol
, piapfcAccessToken
, piapfcUploadType
, piapfcPayload
, piapfcIgnoreWarnings
, piapfcCallback
) where
import Network.Google.BigtableAdmin.Types
import Network.Google.Prelude
type ProjectsInstancesAppProFilesCreateResource =
"v2" :>
Capture "parent" Text :>
"appProfiles" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "appProfileId" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "ignoreWarnings" Bool :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AppProFile :> Post '[JSON] AppProFile
data ProjectsInstancesAppProFilesCreate = ProjectsInstancesAppProFilesCreate'
{ _piapfcParent :: !Text
, _piapfcXgafv :: !(Maybe Xgafv)
, _piapfcAppProFileId :: !(Maybe Text)
, _piapfcUploadProtocol :: !(Maybe Text)
, _piapfcAccessToken :: !(Maybe Text)
, _piapfcUploadType :: !(Maybe Text)
, _piapfcPayload :: !AppProFile
, _piapfcIgnoreWarnings :: !(Maybe Bool)
, _piapfcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesAppProFilesCreate
:: Text
-> AppProFile
-> ProjectsInstancesAppProFilesCreate
projectsInstancesAppProFilesCreate pPiapfcParent_ pPiapfcPayload_ =
ProjectsInstancesAppProFilesCreate'
{ _piapfcParent = pPiapfcParent_
, _piapfcXgafv = Nothing
, _piapfcAppProFileId = Nothing
, _piapfcUploadProtocol = Nothing
, _piapfcAccessToken = Nothing
, _piapfcUploadType = Nothing
, _piapfcPayload = pPiapfcPayload_
, _piapfcIgnoreWarnings = Nothing
, _piapfcCallback = Nothing
}
piapfcParent :: Lens' ProjectsInstancesAppProFilesCreate Text
piapfcParent
= lens _piapfcParent (\ s a -> s{_piapfcParent = a})
piapfcXgafv :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Xgafv)
piapfcXgafv
= lens _piapfcXgafv (\ s a -> s{_piapfcXgafv = a})
piapfcAppProFileId :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Text)
piapfcAppProFileId
= lens _piapfcAppProFileId
(\ s a -> s{_piapfcAppProFileId = a})
piapfcUploadProtocol :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Text)
piapfcUploadProtocol
= lens _piapfcUploadProtocol
(\ s a -> s{_piapfcUploadProtocol = a})
piapfcAccessToken :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Text)
piapfcAccessToken
= lens _piapfcAccessToken
(\ s a -> s{_piapfcAccessToken = a})
piapfcUploadType :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Text)
piapfcUploadType
= lens _piapfcUploadType
(\ s a -> s{_piapfcUploadType = a})
piapfcPayload :: Lens' ProjectsInstancesAppProFilesCreate AppProFile
piapfcPayload
= lens _piapfcPayload
(\ s a -> s{_piapfcPayload = a})
piapfcIgnoreWarnings :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Bool)
piapfcIgnoreWarnings
= lens _piapfcIgnoreWarnings
(\ s a -> s{_piapfcIgnoreWarnings = a})
piapfcCallback :: Lens' ProjectsInstancesAppProFilesCreate (Maybe Text)
piapfcCallback
= lens _piapfcCallback
(\ s a -> s{_piapfcCallback = a})
instance GoogleRequest
ProjectsInstancesAppProFilesCreate where
type Rs ProjectsInstancesAppProFilesCreate =
AppProFile
type Scopes ProjectsInstancesAppProFilesCreate =
'["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 ProjectsInstancesAppProFilesCreate'{..}
= go _piapfcParent _piapfcXgafv _piapfcAppProFileId
_piapfcUploadProtocol
_piapfcAccessToken
_piapfcUploadType
_piapfcIgnoreWarnings
_piapfcCallback
(Just AltJSON)
_piapfcPayload
bigtableAdminService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesAppProFilesCreateResource)
mempty