{-# 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.Update
(
SettingsSearchApplicationsUpdateResource
, settingsSearchApplicationsUpdate
, SettingsSearchApplicationsUpdate
, ssauXgafv
, ssauUploadProtocol
, ssauAccessToken
, ssauUploadType
, ssauPayload
, ssauName
, ssauCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type SettingsSearchApplicationsUpdateResource =
"v1" :>
"settings" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SearchApplication :>
Put '[JSON] Operation
data SettingsSearchApplicationsUpdate = SettingsSearchApplicationsUpdate'
{ _ssauXgafv :: !(Maybe Xgafv)
, _ssauUploadProtocol :: !(Maybe Text)
, _ssauAccessToken :: !(Maybe Text)
, _ssauUploadType :: !(Maybe Text)
, _ssauPayload :: !SearchApplication
, _ssauName :: !Text
, _ssauCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
settingsSearchApplicationsUpdate
:: SearchApplication
-> Text
-> SettingsSearchApplicationsUpdate
settingsSearchApplicationsUpdate pSsauPayload_ pSsauName_ =
SettingsSearchApplicationsUpdate'
{ _ssauXgafv = Nothing
, _ssauUploadProtocol = Nothing
, _ssauAccessToken = Nothing
, _ssauUploadType = Nothing
, _ssauPayload = pSsauPayload_
, _ssauName = pSsauName_
, _ssauCallback = Nothing
}
ssauXgafv :: Lens' SettingsSearchApplicationsUpdate (Maybe Xgafv)
ssauXgafv
= lens _ssauXgafv (\ s a -> s{_ssauXgafv = a})
ssauUploadProtocol :: Lens' SettingsSearchApplicationsUpdate (Maybe Text)
ssauUploadProtocol
= lens _ssauUploadProtocol
(\ s a -> s{_ssauUploadProtocol = a})
ssauAccessToken :: Lens' SettingsSearchApplicationsUpdate (Maybe Text)
ssauAccessToken
= lens _ssauAccessToken
(\ s a -> s{_ssauAccessToken = a})
ssauUploadType :: Lens' SettingsSearchApplicationsUpdate (Maybe Text)
ssauUploadType
= lens _ssauUploadType
(\ s a -> s{_ssauUploadType = a})
ssauPayload :: Lens' SettingsSearchApplicationsUpdate SearchApplication
ssauPayload
= lens _ssauPayload (\ s a -> s{_ssauPayload = a})
ssauName :: Lens' SettingsSearchApplicationsUpdate Text
ssauName = lens _ssauName (\ s a -> s{_ssauName = a})
ssauCallback :: Lens' SettingsSearchApplicationsUpdate (Maybe Text)
ssauCallback
= lens _ssauCallback (\ s a -> s{_ssauCallback = a})
instance GoogleRequest
SettingsSearchApplicationsUpdate where
type Rs SettingsSearchApplicationsUpdate = Operation
type Scopes SettingsSearchApplicationsUpdate =
'["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 SettingsSearchApplicationsUpdate'{..}
= go _ssauName _ssauXgafv _ssauUploadProtocol
_ssauAccessToken
_ssauUploadType
_ssauCallback
(Just AltJSON)
_ssauPayload
cloudSearchService
where go
= buildClient
(Proxy ::
Proxy SettingsSearchApplicationsUpdateResource)
mempty