{-# 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.Update
(
OrganizationsSinksUpdateResource
, organizationsSinksUpdate
, OrganizationsSinksUpdate
, osuXgafv
, osuUniqueWriterIdentity
, osuUploadProtocol
, osuUpdateMask
, osuAccessToken
, osuUploadType
, osuPayload
, osuSinkName
, osuCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type OrganizationsSinksUpdateResource =
"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 OrganizationsSinksUpdate = OrganizationsSinksUpdate'
{ _osuXgafv :: !(Maybe Xgafv)
, _osuUniqueWriterIdentity :: !(Maybe Bool)
, _osuUploadProtocol :: !(Maybe Text)
, _osuUpdateMask :: !(Maybe GFieldMask)
, _osuAccessToken :: !(Maybe Text)
, _osuUploadType :: !(Maybe Text)
, _osuPayload :: !LogSink
, _osuSinkName :: !Text
, _osuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsSinksUpdate
:: LogSink
-> Text
-> OrganizationsSinksUpdate
organizationsSinksUpdate pOsuPayload_ pOsuSinkName_ =
OrganizationsSinksUpdate'
{ _osuXgafv = Nothing
, _osuUniqueWriterIdentity = Nothing
, _osuUploadProtocol = Nothing
, _osuUpdateMask = Nothing
, _osuAccessToken = Nothing
, _osuUploadType = Nothing
, _osuPayload = pOsuPayload_
, _osuSinkName = pOsuSinkName_
, _osuCallback = Nothing
}
osuXgafv :: Lens' OrganizationsSinksUpdate (Maybe Xgafv)
osuXgafv = lens _osuXgafv (\ s a -> s{_osuXgafv = a})
osuUniqueWriterIdentity :: Lens' OrganizationsSinksUpdate (Maybe Bool)
osuUniqueWriterIdentity
= lens _osuUniqueWriterIdentity
(\ s a -> s{_osuUniqueWriterIdentity = a})
osuUploadProtocol :: Lens' OrganizationsSinksUpdate (Maybe Text)
osuUploadProtocol
= lens _osuUploadProtocol
(\ s a -> s{_osuUploadProtocol = a})
osuUpdateMask :: Lens' OrganizationsSinksUpdate (Maybe GFieldMask)
osuUpdateMask
= lens _osuUpdateMask
(\ s a -> s{_osuUpdateMask = a})
osuAccessToken :: Lens' OrganizationsSinksUpdate (Maybe Text)
osuAccessToken
= lens _osuAccessToken
(\ s a -> s{_osuAccessToken = a})
osuUploadType :: Lens' OrganizationsSinksUpdate (Maybe Text)
osuUploadType
= lens _osuUploadType
(\ s a -> s{_osuUploadType = a})
osuPayload :: Lens' OrganizationsSinksUpdate LogSink
osuPayload
= lens _osuPayload (\ s a -> s{_osuPayload = a})
osuSinkName :: Lens' OrganizationsSinksUpdate Text
osuSinkName
= lens _osuSinkName (\ s a -> s{_osuSinkName = a})
osuCallback :: Lens' OrganizationsSinksUpdate (Maybe Text)
osuCallback
= lens _osuCallback (\ s a -> s{_osuCallback = a})
instance GoogleRequest OrganizationsSinksUpdate where
type Rs OrganizationsSinksUpdate = LogSink
type Scopes OrganizationsSinksUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient OrganizationsSinksUpdate'{..}
= go _osuSinkName _osuXgafv _osuUniqueWriterIdentity
_osuUploadProtocol
_osuUpdateMask
_osuAccessToken
_osuUploadType
_osuCallback
(Just AltJSON)
_osuPayload
loggingService
where go
= buildClient
(Proxy :: Proxy OrganizationsSinksUpdateResource)
mempty