{-# 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.BillingAccounts.Sinks.Patch
(
BillingAccountsSinksPatchResource
, billingAccountsSinksPatch
, BillingAccountsSinksPatch
, baspXgafv
, baspUniqueWriterIdentity
, baspUploadProtocol
, baspUpdateMask
, baspAccessToken
, baspUploadType
, baspPayload
, baspSinkName
, baspCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type BillingAccountsSinksPatchResource =
"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 BillingAccountsSinksPatch = BillingAccountsSinksPatch'
{ _baspXgafv :: !(Maybe Xgafv)
, _baspUniqueWriterIdentity :: !(Maybe Bool)
, _baspUploadProtocol :: !(Maybe Text)
, _baspUpdateMask :: !(Maybe GFieldMask)
, _baspAccessToken :: !(Maybe Text)
, _baspUploadType :: !(Maybe Text)
, _baspPayload :: !LogSink
, _baspSinkName :: !Text
, _baspCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsSinksPatch
:: LogSink
-> Text
-> BillingAccountsSinksPatch
billingAccountsSinksPatch pBaspPayload_ pBaspSinkName_ =
BillingAccountsSinksPatch'
{ _baspXgafv = Nothing
, _baspUniqueWriterIdentity = Nothing
, _baspUploadProtocol = Nothing
, _baspUpdateMask = Nothing
, _baspAccessToken = Nothing
, _baspUploadType = Nothing
, _baspPayload = pBaspPayload_
, _baspSinkName = pBaspSinkName_
, _baspCallback = Nothing
}
baspXgafv :: Lens' BillingAccountsSinksPatch (Maybe Xgafv)
baspXgafv
= lens _baspXgafv (\ s a -> s{_baspXgafv = a})
baspUniqueWriterIdentity :: Lens' BillingAccountsSinksPatch (Maybe Bool)
baspUniqueWriterIdentity
= lens _baspUniqueWriterIdentity
(\ s a -> s{_baspUniqueWriterIdentity = a})
baspUploadProtocol :: Lens' BillingAccountsSinksPatch (Maybe Text)
baspUploadProtocol
= lens _baspUploadProtocol
(\ s a -> s{_baspUploadProtocol = a})
baspUpdateMask :: Lens' BillingAccountsSinksPatch (Maybe GFieldMask)
baspUpdateMask
= lens _baspUpdateMask
(\ s a -> s{_baspUpdateMask = a})
baspAccessToken :: Lens' BillingAccountsSinksPatch (Maybe Text)
baspAccessToken
= lens _baspAccessToken
(\ s a -> s{_baspAccessToken = a})
baspUploadType :: Lens' BillingAccountsSinksPatch (Maybe Text)
baspUploadType
= lens _baspUploadType
(\ s a -> s{_baspUploadType = a})
baspPayload :: Lens' BillingAccountsSinksPatch LogSink
baspPayload
= lens _baspPayload (\ s a -> s{_baspPayload = a})
baspSinkName :: Lens' BillingAccountsSinksPatch Text
baspSinkName
= lens _baspSinkName (\ s a -> s{_baspSinkName = a})
baspCallback :: Lens' BillingAccountsSinksPatch (Maybe Text)
baspCallback
= lens _baspCallback (\ s a -> s{_baspCallback = a})
instance GoogleRequest BillingAccountsSinksPatch
where
type Rs BillingAccountsSinksPatch = LogSink
type Scopes BillingAccountsSinksPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient BillingAccountsSinksPatch'{..}
= go _baspSinkName _baspXgafv
_baspUniqueWriterIdentity
_baspUploadProtocol
_baspUpdateMask
_baspAccessToken
_baspUploadType
_baspCallback
(Just AltJSON)
_baspPayload
loggingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsSinksPatchResource)
mempty