{-# 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.Settings.SearchApplications.Create
(
SettingsSearchApplicationsCreateResource
, settingsSearchApplicationsCreate
, SettingsSearchApplicationsCreate
, ssacXgafv
, ssacUploadProtocol
, ssacAccessToken
, ssacUploadType
, ssacPayload
, ssacCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type SettingsSearchApplicationsCreateResource =
"v1" :>
"settings" :>
"searchapplications" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SearchApplication :>
Post '[JSON] Operation
data SettingsSearchApplicationsCreate = SettingsSearchApplicationsCreate'
{ _ssacXgafv :: !(Maybe Xgafv)
, _ssacUploadProtocol :: !(Maybe Text)
, _ssacAccessToken :: !(Maybe Text)
, _ssacUploadType :: !(Maybe Text)
, _ssacPayload :: !SearchApplication
, _ssacCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
settingsSearchApplicationsCreate
:: SearchApplication
-> SettingsSearchApplicationsCreate
settingsSearchApplicationsCreate pSsacPayload_ =
SettingsSearchApplicationsCreate'
{ _ssacXgafv = Nothing
, _ssacUploadProtocol = Nothing
, _ssacAccessToken = Nothing
, _ssacUploadType = Nothing
, _ssacPayload = pSsacPayload_
, _ssacCallback = Nothing
}
ssacXgafv :: Lens' SettingsSearchApplicationsCreate (Maybe Xgafv)
ssacXgafv
= lens _ssacXgafv (\ s a -> s{_ssacXgafv = a})
ssacUploadProtocol :: Lens' SettingsSearchApplicationsCreate (Maybe Text)
ssacUploadProtocol
= lens _ssacUploadProtocol
(\ s a -> s{_ssacUploadProtocol = a})
ssacAccessToken :: Lens' SettingsSearchApplicationsCreate (Maybe Text)
ssacAccessToken
= lens _ssacAccessToken
(\ s a -> s{_ssacAccessToken = a})
ssacUploadType :: Lens' SettingsSearchApplicationsCreate (Maybe Text)
ssacUploadType
= lens _ssacUploadType
(\ s a -> s{_ssacUploadType = a})
ssacPayload :: Lens' SettingsSearchApplicationsCreate SearchApplication
ssacPayload
= lens _ssacPayload (\ s a -> s{_ssacPayload = a})
ssacCallback :: Lens' SettingsSearchApplicationsCreate (Maybe Text)
ssacCallback
= lens _ssacCallback (\ s a -> s{_ssacCallback = a})
instance GoogleRequest
SettingsSearchApplicationsCreate where
type Rs SettingsSearchApplicationsCreate = Operation
type Scopes SettingsSearchApplicationsCreate =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.settings",
"https://www.googleapis.com/auth/cloud_search.settings.query"]
requestClient SettingsSearchApplicationsCreate'{..}
= go _ssacXgafv _ssacUploadProtocol _ssacAccessToken
_ssacUploadType
_ssacCallback
(Just AltJSON)
_ssacPayload
cloudSearchService
where go
= buildClient
(Proxy ::
Proxy SettingsSearchApplicationsCreateResource)
mempty