{-# 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.Patch
(
ProjectsSinksPatchResource
, projectsSinksPatch
, ProjectsSinksPatch
, pspXgafv
, pspUniqueWriterIdentity
, pspUploadProtocol
, pspUpdateMask
, pspAccessToken
, pspUploadType
, pspPayload
, pspSinkName
, pspCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ProjectsSinksPatchResource =
"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 :> Patch '[JSON] LogSink
data ProjectsSinksPatch = ProjectsSinksPatch'
{ _pspXgafv :: !(Maybe Xgafv)
, _pspUniqueWriterIdentity :: !(Maybe Bool)
, _pspUploadProtocol :: !(Maybe Text)
, _pspUpdateMask :: !(Maybe GFieldMask)
, _pspAccessToken :: !(Maybe Text)
, _pspUploadType :: !(Maybe Text)
, _pspPayload :: !LogSink
, _pspSinkName :: !Text
, _pspCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSinksPatch
:: LogSink
-> Text
-> ProjectsSinksPatch
projectsSinksPatch pPspPayload_ pPspSinkName_ =
ProjectsSinksPatch'
{ _pspXgafv = Nothing
, _pspUniqueWriterIdentity = Nothing
, _pspUploadProtocol = Nothing
, _pspUpdateMask = Nothing
, _pspAccessToken = Nothing
, _pspUploadType = Nothing
, _pspPayload = pPspPayload_
, _pspSinkName = pPspSinkName_
, _pspCallback = Nothing
}
pspXgafv :: Lens' ProjectsSinksPatch (Maybe Xgafv)
pspXgafv = lens _pspXgafv (\ s a -> s{_pspXgafv = a})
pspUniqueWriterIdentity :: Lens' ProjectsSinksPatch (Maybe Bool)
pspUniqueWriterIdentity
= lens _pspUniqueWriterIdentity
(\ s a -> s{_pspUniqueWriterIdentity = a})
pspUploadProtocol :: Lens' ProjectsSinksPatch (Maybe Text)
pspUploadProtocol
= lens _pspUploadProtocol
(\ s a -> s{_pspUploadProtocol = a})
pspUpdateMask :: Lens' ProjectsSinksPatch (Maybe GFieldMask)
pspUpdateMask
= lens _pspUpdateMask
(\ s a -> s{_pspUpdateMask = a})
pspAccessToken :: Lens' ProjectsSinksPatch (Maybe Text)
pspAccessToken
= lens _pspAccessToken
(\ s a -> s{_pspAccessToken = a})
pspUploadType :: Lens' ProjectsSinksPatch (Maybe Text)
pspUploadType
= lens _pspUploadType
(\ s a -> s{_pspUploadType = a})
pspPayload :: Lens' ProjectsSinksPatch LogSink
pspPayload
= lens _pspPayload (\ s a -> s{_pspPayload = a})
pspSinkName :: Lens' ProjectsSinksPatch Text
pspSinkName
= lens _pspSinkName (\ s a -> s{_pspSinkName = a})
pspCallback :: Lens' ProjectsSinksPatch (Maybe Text)
pspCallback
= lens _pspCallback (\ s a -> s{_pspCallback = a})
instance GoogleRequest ProjectsSinksPatch where
type Rs ProjectsSinksPatch = LogSink
type Scopes ProjectsSinksPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient ProjectsSinksPatch'{..}
= go _pspSinkName _pspXgafv _pspUniqueWriterIdentity
_pspUploadProtocol
_pspUpdateMask
_pspAccessToken
_pspUploadType
_pspCallback
(Just AltJSON)
_pspPayload
loggingService
where go
= buildClient
(Proxy :: Proxy ProjectsSinksPatchResource)
mempty