{-# 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.CloudSearch.Debug.Datasources.Items.CheckAccess
(
DebugDatasourcesItemsCheckAccessResource
, debugDatasourcesItemsCheckAccess
, DebugDatasourcesItemsCheckAccess
, ddicaXgafv
, ddicaUploadProtocol
, ddicaAccessToken
, ddicaUploadType
, ddicaPayload
, ddicaName
, ddicaDebugOptionsEnableDebugging
, ddicaCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type DebugDatasourcesItemsCheckAccessResource =
"v1" :>
"debug" :>
CaptureMode "name" "checkAccess" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "debugOptions.enableDebugging" Bool :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Principal :>
Post '[JSON] CheckAccessResponse
data DebugDatasourcesItemsCheckAccess = DebugDatasourcesItemsCheckAccess'
{ _ddicaXgafv :: !(Maybe Xgafv)
, _ddicaUploadProtocol :: !(Maybe Text)
, _ddicaAccessToken :: !(Maybe Text)
, _ddicaUploadType :: !(Maybe Text)
, _ddicaPayload :: !Principal
, _ddicaName :: !Text
, _ddicaDebugOptionsEnableDebugging :: !(Maybe Bool)
, _ddicaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
debugDatasourcesItemsCheckAccess
:: Principal
-> Text
-> DebugDatasourcesItemsCheckAccess
debugDatasourcesItemsCheckAccess pDdicaPayload_ pDdicaName_ =
DebugDatasourcesItemsCheckAccess'
{ _ddicaXgafv = Nothing
, _ddicaUploadProtocol = Nothing
, _ddicaAccessToken = Nothing
, _ddicaUploadType = Nothing
, _ddicaPayload = pDdicaPayload_
, _ddicaName = pDdicaName_
, _ddicaDebugOptionsEnableDebugging = Nothing
, _ddicaCallback = Nothing
}
ddicaXgafv :: Lens' DebugDatasourcesItemsCheckAccess (Maybe Xgafv)
ddicaXgafv
= lens _ddicaXgafv (\ s a -> s{_ddicaXgafv = a})
ddicaUploadProtocol :: Lens' DebugDatasourcesItemsCheckAccess (Maybe Text)
ddicaUploadProtocol
= lens _ddicaUploadProtocol
(\ s a -> s{_ddicaUploadProtocol = a})
ddicaAccessToken :: Lens' DebugDatasourcesItemsCheckAccess (Maybe Text)
ddicaAccessToken
= lens _ddicaAccessToken
(\ s a -> s{_ddicaAccessToken = a})
ddicaUploadType :: Lens' DebugDatasourcesItemsCheckAccess (Maybe Text)
ddicaUploadType
= lens _ddicaUploadType
(\ s a -> s{_ddicaUploadType = a})
ddicaPayload :: Lens' DebugDatasourcesItemsCheckAccess Principal
ddicaPayload
= lens _ddicaPayload (\ s a -> s{_ddicaPayload = a})
ddicaName :: Lens' DebugDatasourcesItemsCheckAccess Text
ddicaName
= lens _ddicaName (\ s a -> s{_ddicaName = a})
ddicaDebugOptionsEnableDebugging :: Lens' DebugDatasourcesItemsCheckAccess (Maybe Bool)
ddicaDebugOptionsEnableDebugging
= lens _ddicaDebugOptionsEnableDebugging
(\ s a -> s{_ddicaDebugOptionsEnableDebugging = a})
ddicaCallback :: Lens' DebugDatasourcesItemsCheckAccess (Maybe Text)
ddicaCallback
= lens _ddicaCallback
(\ s a -> s{_ddicaCallback = a})
instance GoogleRequest
DebugDatasourcesItemsCheckAccess where
type Rs DebugDatasourcesItemsCheckAccess =
CheckAccessResponse
type Scopes DebugDatasourcesItemsCheckAccess =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.debug"]
requestClient DebugDatasourcesItemsCheckAccess'{..}
= go _ddicaName _ddicaXgafv _ddicaUploadProtocol
_ddicaAccessToken
_ddicaUploadType
_ddicaDebugOptionsEnableDebugging
_ddicaCallback
(Just AltJSON)
_ddicaPayload
cloudSearchService
where go
= buildClient
(Proxy ::
Proxy DebugDatasourcesItemsCheckAccessResource)
mempty