{-# 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.Exclusions.Patch
(
ExclusionsPatchResource
, exclusionsPatch
, ExclusionsPatch
, epXgafv
, epUploadProtocol
, epUpdateMask
, epAccessToken
, epUploadType
, epPayload
, epName
, epCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ExclusionsPatchResource =
"v2" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LogExclusion :>
Patch '[JSON] LogExclusion
data ExclusionsPatch = ExclusionsPatch'
{ _epXgafv :: !(Maybe Xgafv)
, _epUploadProtocol :: !(Maybe Text)
, _epUpdateMask :: !(Maybe GFieldMask)
, _epAccessToken :: !(Maybe Text)
, _epUploadType :: !(Maybe Text)
, _epPayload :: !LogExclusion
, _epName :: !Text
, _epCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
exclusionsPatch
:: LogExclusion
-> Text
-> ExclusionsPatch
exclusionsPatch pEpPayload_ pEpName_ =
ExclusionsPatch'
{ _epXgafv = Nothing
, _epUploadProtocol = Nothing
, _epUpdateMask = Nothing
, _epAccessToken = Nothing
, _epUploadType = Nothing
, _epPayload = pEpPayload_
, _epName = pEpName_
, _epCallback = Nothing
}
epXgafv :: Lens' ExclusionsPatch (Maybe Xgafv)
epXgafv = lens _epXgafv (\ s a -> s{_epXgafv = a})
epUploadProtocol :: Lens' ExclusionsPatch (Maybe Text)
epUploadProtocol
= lens _epUploadProtocol
(\ s a -> s{_epUploadProtocol = a})
epUpdateMask :: Lens' ExclusionsPatch (Maybe GFieldMask)
epUpdateMask
= lens _epUpdateMask (\ s a -> s{_epUpdateMask = a})
epAccessToken :: Lens' ExclusionsPatch (Maybe Text)
epAccessToken
= lens _epAccessToken
(\ s a -> s{_epAccessToken = a})
epUploadType :: Lens' ExclusionsPatch (Maybe Text)
epUploadType
= lens _epUploadType (\ s a -> s{_epUploadType = a})
epPayload :: Lens' ExclusionsPatch LogExclusion
epPayload
= lens _epPayload (\ s a -> s{_epPayload = a})
epName :: Lens' ExclusionsPatch Text
epName = lens _epName (\ s a -> s{_epName = a})
epCallback :: Lens' ExclusionsPatch (Maybe Text)
epCallback
= lens _epCallback (\ s a -> s{_epCallback = a})
instance GoogleRequest ExclusionsPatch where
type Rs ExclusionsPatch = LogExclusion
type Scopes ExclusionsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient ExclusionsPatch'{..}
= go _epName _epXgafv _epUploadProtocol _epUpdateMask
_epAccessToken
_epUploadType
_epCallback
(Just AltJSON)
_epPayload
loggingService
where go
= buildClient
(Proxy :: Proxy ExclusionsPatchResource)
mempty