{-# 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.Organizations.Sinks.Patch
(
OrganizationsSinksPatchResource
, organizationsSinksPatch
, OrganizationsSinksPatch
, ospXgafv
, ospUniqueWriterIdentity
, ospUploadProtocol
, ospUpdateMask
, ospAccessToken
, ospUploadType
, ospPayload
, ospSinkName
, ospCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type OrganizationsSinksPatchResource =
"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 OrganizationsSinksPatch = OrganizationsSinksPatch'
{ _ospXgafv :: !(Maybe Xgafv)
, _ospUniqueWriterIdentity :: !(Maybe Bool)
, _ospUploadProtocol :: !(Maybe Text)
, _ospUpdateMask :: !(Maybe GFieldMask)
, _ospAccessToken :: !(Maybe Text)
, _ospUploadType :: !(Maybe Text)
, _ospPayload :: !LogSink
, _ospSinkName :: !Text
, _ospCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsSinksPatch
:: LogSink
-> Text
-> OrganizationsSinksPatch
organizationsSinksPatch pOspPayload_ pOspSinkName_ =
OrganizationsSinksPatch'
{ _ospXgafv = Nothing
, _ospUniqueWriterIdentity = Nothing
, _ospUploadProtocol = Nothing
, _ospUpdateMask = Nothing
, _ospAccessToken = Nothing
, _ospUploadType = Nothing
, _ospPayload = pOspPayload_
, _ospSinkName = pOspSinkName_
, _ospCallback = Nothing
}
ospXgafv :: Lens' OrganizationsSinksPatch (Maybe Xgafv)
ospXgafv = lens _ospXgafv (\ s a -> s{_ospXgafv = a})
ospUniqueWriterIdentity :: Lens' OrganizationsSinksPatch (Maybe Bool)
ospUniqueWriterIdentity
= lens _ospUniqueWriterIdentity
(\ s a -> s{_ospUniqueWriterIdentity = a})
ospUploadProtocol :: Lens' OrganizationsSinksPatch (Maybe Text)
ospUploadProtocol
= lens _ospUploadProtocol
(\ s a -> s{_ospUploadProtocol = a})
ospUpdateMask :: Lens' OrganizationsSinksPatch (Maybe GFieldMask)
ospUpdateMask
= lens _ospUpdateMask
(\ s a -> s{_ospUpdateMask = a})
ospAccessToken :: Lens' OrganizationsSinksPatch (Maybe Text)
ospAccessToken
= lens _ospAccessToken
(\ s a -> s{_ospAccessToken = a})
ospUploadType :: Lens' OrganizationsSinksPatch (Maybe Text)
ospUploadType
= lens _ospUploadType
(\ s a -> s{_ospUploadType = a})
ospPayload :: Lens' OrganizationsSinksPatch LogSink
ospPayload
= lens _ospPayload (\ s a -> s{_ospPayload = a})
ospSinkName :: Lens' OrganizationsSinksPatch Text
ospSinkName
= lens _ospSinkName (\ s a -> s{_ospSinkName = a})
ospCallback :: Lens' OrganizationsSinksPatch (Maybe Text)
ospCallback
= lens _ospCallback (\ s a -> s{_ospCallback = a})
instance GoogleRequest OrganizationsSinksPatch where
type Rs OrganizationsSinksPatch = LogSink
type Scopes OrganizationsSinksPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient OrganizationsSinksPatch'{..}
= go _ospSinkName _ospXgafv _ospUniqueWriterIdentity
_ospUploadProtocol
_ospUpdateMask
_ospAccessToken
_ospUploadType
_ospCallback
(Just AltJSON)
_ospPayload
loggingService
where go
= buildClient
(Proxy :: Proxy OrganizationsSinksPatchResource)
mempty