{-# 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.Logging.Folders.Sinks.Update
(
FoldersSinksUpdateResource
, foldersSinksUpdate
, FoldersSinksUpdate
, fsuXgafv
, fsuUniqueWriterIdentity
, fsuUploadProtocol
, fsuUpdateMask
, fsuAccessToken
, fsuUploadType
, fsuPayload
, fsuSinkName
, fsuCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type FoldersSinksUpdateResource =
"v2" :>
Capture "sinkName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "uniqueWriterIdentity" Bool :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
data FoldersSinksUpdate = FoldersSinksUpdate'
{ _fsuXgafv :: !(Maybe Xgafv)
, _fsuUniqueWriterIdentity :: !(Maybe Bool)
, _fsuUploadProtocol :: !(Maybe Text)
, _fsuUpdateMask :: !(Maybe GFieldMask)
, _fsuAccessToken :: !(Maybe Text)
, _fsuUploadType :: !(Maybe Text)
, _fsuPayload :: !LogSink
, _fsuSinkName :: !Text
, _fsuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersSinksUpdate
:: LogSink
-> Text
-> FoldersSinksUpdate
foldersSinksUpdate pFsuPayload_ pFsuSinkName_ =
FoldersSinksUpdate'
{ _fsuXgafv = Nothing
, _fsuUniqueWriterIdentity = Nothing
, _fsuUploadProtocol = Nothing
, _fsuUpdateMask = Nothing
, _fsuAccessToken = Nothing
, _fsuUploadType = Nothing
, _fsuPayload = pFsuPayload_
, _fsuSinkName = pFsuSinkName_
, _fsuCallback = Nothing
}
fsuXgafv :: Lens' FoldersSinksUpdate (Maybe Xgafv)
fsuXgafv = lens _fsuXgafv (\ s a -> s{_fsuXgafv = a})
fsuUniqueWriterIdentity :: Lens' FoldersSinksUpdate (Maybe Bool)
fsuUniqueWriterIdentity
= lens _fsuUniqueWriterIdentity
(\ s a -> s{_fsuUniqueWriterIdentity = a})
fsuUploadProtocol :: Lens' FoldersSinksUpdate (Maybe Text)
fsuUploadProtocol
= lens _fsuUploadProtocol
(\ s a -> s{_fsuUploadProtocol = a})
fsuUpdateMask :: Lens' FoldersSinksUpdate (Maybe GFieldMask)
fsuUpdateMask
= lens _fsuUpdateMask
(\ s a -> s{_fsuUpdateMask = a})
fsuAccessToken :: Lens' FoldersSinksUpdate (Maybe Text)
fsuAccessToken
= lens _fsuAccessToken
(\ s a -> s{_fsuAccessToken = a})
fsuUploadType :: Lens' FoldersSinksUpdate (Maybe Text)
fsuUploadType
= lens _fsuUploadType
(\ s a -> s{_fsuUploadType = a})
fsuPayload :: Lens' FoldersSinksUpdate LogSink
fsuPayload
= lens _fsuPayload (\ s a -> s{_fsuPayload = a})
fsuSinkName :: Lens' FoldersSinksUpdate Text
fsuSinkName
= lens _fsuSinkName (\ s a -> s{_fsuSinkName = a})
fsuCallback :: Lens' FoldersSinksUpdate (Maybe Text)
fsuCallback
= lens _fsuCallback (\ s a -> s{_fsuCallback = a})
instance GoogleRequest FoldersSinksUpdate where
type Rs FoldersSinksUpdate = LogSink
type Scopes FoldersSinksUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient FoldersSinksUpdate'{..}
= go _fsuSinkName _fsuXgafv _fsuUniqueWriterIdentity
_fsuUploadProtocol
_fsuUpdateMask
_fsuAccessToken
_fsuUploadType
_fsuCallback
(Just AltJSON)
_fsuPayload
loggingService
where go
= buildClient
(Proxy :: Proxy FoldersSinksUpdateResource)
mempty