{-# 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.Update
(
BillingAccountsSinksUpdateResource
, billingAccountsSinksUpdate
, BillingAccountsSinksUpdate
, basuXgafv
, basuUniqueWriterIdentity
, basuUploadProtocol
, basuUpdateMask
, basuAccessToken
, basuUploadType
, basuPayload
, basuSinkName
, basuCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type BillingAccountsSinksUpdateResource =
"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 BillingAccountsSinksUpdate = BillingAccountsSinksUpdate'
{ _basuXgafv :: !(Maybe Xgafv)
, _basuUniqueWriterIdentity :: !(Maybe Bool)
, _basuUploadProtocol :: !(Maybe Text)
, _basuUpdateMask :: !(Maybe GFieldMask)
, _basuAccessToken :: !(Maybe Text)
, _basuUploadType :: !(Maybe Text)
, _basuPayload :: !LogSink
, _basuSinkName :: !Text
, _basuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsSinksUpdate
:: LogSink
-> Text
-> BillingAccountsSinksUpdate
billingAccountsSinksUpdate pBasuPayload_ pBasuSinkName_ =
BillingAccountsSinksUpdate'
{ _basuXgafv = Nothing
, _basuUniqueWriterIdentity = Nothing
, _basuUploadProtocol = Nothing
, _basuUpdateMask = Nothing
, _basuAccessToken = Nothing
, _basuUploadType = Nothing
, _basuPayload = pBasuPayload_
, _basuSinkName = pBasuSinkName_
, _basuCallback = Nothing
}
basuXgafv :: Lens' BillingAccountsSinksUpdate (Maybe Xgafv)
basuXgafv
= lens _basuXgafv (\ s a -> s{_basuXgafv = a})
basuUniqueWriterIdentity :: Lens' BillingAccountsSinksUpdate (Maybe Bool)
basuUniqueWriterIdentity
= lens _basuUniqueWriterIdentity
(\ s a -> s{_basuUniqueWriterIdentity = a})
basuUploadProtocol :: Lens' BillingAccountsSinksUpdate (Maybe Text)
basuUploadProtocol
= lens _basuUploadProtocol
(\ s a -> s{_basuUploadProtocol = a})
basuUpdateMask :: Lens' BillingAccountsSinksUpdate (Maybe GFieldMask)
basuUpdateMask
= lens _basuUpdateMask
(\ s a -> s{_basuUpdateMask = a})
basuAccessToken :: Lens' BillingAccountsSinksUpdate (Maybe Text)
basuAccessToken
= lens _basuAccessToken
(\ s a -> s{_basuAccessToken = a})
basuUploadType :: Lens' BillingAccountsSinksUpdate (Maybe Text)
basuUploadType
= lens _basuUploadType
(\ s a -> s{_basuUploadType = a})
basuPayload :: Lens' BillingAccountsSinksUpdate LogSink
basuPayload
= lens _basuPayload (\ s a -> s{_basuPayload = a})
basuSinkName :: Lens' BillingAccountsSinksUpdate Text
basuSinkName
= lens _basuSinkName (\ s a -> s{_basuSinkName = a})
basuCallback :: Lens' BillingAccountsSinksUpdate (Maybe Text)
basuCallback
= lens _basuCallback (\ s a -> s{_basuCallback = a})
instance GoogleRequest BillingAccountsSinksUpdate
where
type Rs BillingAccountsSinksUpdate = LogSink
type Scopes BillingAccountsSinksUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient BillingAccountsSinksUpdate'{..}
= go _basuSinkName _basuXgafv
_basuUniqueWriterIdentity
_basuUploadProtocol
_basuUpdateMask
_basuAccessToken
_basuUploadType
_basuCallback
(Just AltJSON)
_basuPayload
loggingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsSinksUpdateResource)
mempty