{-# 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.Projects.Sinks.Update
(
ProjectsSinksUpdateResource
, projectsSinksUpdate
, ProjectsSinksUpdate
, psuXgafv
, psuUniqueWriterIdentity
, psuUploadProtocol
, psuUpdateMask
, psuAccessToken
, psuUploadType
, psuPayload
, psuSinkName
, psuCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ProjectsSinksUpdateResource =
"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 ProjectsSinksUpdate = ProjectsSinksUpdate'
{ _psuXgafv :: !(Maybe Xgafv)
, _psuUniqueWriterIdentity :: !(Maybe Bool)
, _psuUploadProtocol :: !(Maybe Text)
, _psuUpdateMask :: !(Maybe GFieldMask)
, _psuAccessToken :: !(Maybe Text)
, _psuUploadType :: !(Maybe Text)
, _psuPayload :: !LogSink
, _psuSinkName :: !Text
, _psuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSinksUpdate
:: LogSink
-> Text
-> ProjectsSinksUpdate
projectsSinksUpdate pPsuPayload_ pPsuSinkName_ =
ProjectsSinksUpdate'
{ _psuXgafv = Nothing
, _psuUniqueWriterIdentity = Nothing
, _psuUploadProtocol = Nothing
, _psuUpdateMask = Nothing
, _psuAccessToken = Nothing
, _psuUploadType = Nothing
, _psuPayload = pPsuPayload_
, _psuSinkName = pPsuSinkName_
, _psuCallback = Nothing
}
psuXgafv :: Lens' ProjectsSinksUpdate (Maybe Xgafv)
psuXgafv = lens _psuXgafv (\ s a -> s{_psuXgafv = a})
psuUniqueWriterIdentity :: Lens' ProjectsSinksUpdate (Maybe Bool)
psuUniqueWriterIdentity
= lens _psuUniqueWriterIdentity
(\ s a -> s{_psuUniqueWriterIdentity = a})
psuUploadProtocol :: Lens' ProjectsSinksUpdate (Maybe Text)
psuUploadProtocol
= lens _psuUploadProtocol
(\ s a -> s{_psuUploadProtocol = a})
psuUpdateMask :: Lens' ProjectsSinksUpdate (Maybe GFieldMask)
psuUpdateMask
= lens _psuUpdateMask
(\ s a -> s{_psuUpdateMask = a})
psuAccessToken :: Lens' ProjectsSinksUpdate (Maybe Text)
psuAccessToken
= lens _psuAccessToken
(\ s a -> s{_psuAccessToken = a})
psuUploadType :: Lens' ProjectsSinksUpdate (Maybe Text)
psuUploadType
= lens _psuUploadType
(\ s a -> s{_psuUploadType = a})
psuPayload :: Lens' ProjectsSinksUpdate LogSink
psuPayload
= lens _psuPayload (\ s a -> s{_psuPayload = a})
psuSinkName :: Lens' ProjectsSinksUpdate Text
psuSinkName
= lens _psuSinkName (\ s a -> s{_psuSinkName = a})
psuCallback :: Lens' ProjectsSinksUpdate (Maybe Text)
psuCallback
= lens _psuCallback (\ s a -> s{_psuCallback = a})
instance GoogleRequest ProjectsSinksUpdate where
type Rs ProjectsSinksUpdate = LogSink
type Scopes ProjectsSinksUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient ProjectsSinksUpdate'{..}
= go _psuSinkName _psuXgafv _psuUniqueWriterIdentity
_psuUploadProtocol
_psuUpdateMask
_psuAccessToken
_psuUploadType
_psuCallback
(Just AltJSON)
_psuPayload
loggingService
where go
= buildClient
(Proxy :: Proxy ProjectsSinksUpdateResource)
mempty