{-# 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.Folders.Exclusions.Create
(
FoldersExclusionsCreateResource
, foldersExclusionsCreate
, FoldersExclusionsCreate
, fecParent
, fecXgafv
, fecUploadProtocol
, fecAccessToken
, fecUploadType
, fecPayload
, fecCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type FoldersExclusionsCreateResource =
"v2" :>
Capture "parent" Text :>
"exclusions" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LogExclusion :>
Post '[JSON] LogExclusion
data FoldersExclusionsCreate = FoldersExclusionsCreate'
{ _fecParent :: !Text
, _fecXgafv :: !(Maybe Xgafv)
, _fecUploadProtocol :: !(Maybe Text)
, _fecAccessToken :: !(Maybe Text)
, _fecUploadType :: !(Maybe Text)
, _fecPayload :: !LogExclusion
, _fecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersExclusionsCreate
:: Text
-> LogExclusion
-> FoldersExclusionsCreate
foldersExclusionsCreate pFecParent_ pFecPayload_ =
FoldersExclusionsCreate'
{ _fecParent = pFecParent_
, _fecXgafv = Nothing
, _fecUploadProtocol = Nothing
, _fecAccessToken = Nothing
, _fecUploadType = Nothing
, _fecPayload = pFecPayload_
, _fecCallback = Nothing
}
fecParent :: Lens' FoldersExclusionsCreate Text
fecParent
= lens _fecParent (\ s a -> s{_fecParent = a})
fecXgafv :: Lens' FoldersExclusionsCreate (Maybe Xgafv)
fecXgafv = lens _fecXgafv (\ s a -> s{_fecXgafv = a})
fecUploadProtocol :: Lens' FoldersExclusionsCreate (Maybe Text)
fecUploadProtocol
= lens _fecUploadProtocol
(\ s a -> s{_fecUploadProtocol = a})
fecAccessToken :: Lens' FoldersExclusionsCreate (Maybe Text)
fecAccessToken
= lens _fecAccessToken
(\ s a -> s{_fecAccessToken = a})
fecUploadType :: Lens' FoldersExclusionsCreate (Maybe Text)
fecUploadType
= lens _fecUploadType
(\ s a -> s{_fecUploadType = a})
fecPayload :: Lens' FoldersExclusionsCreate LogExclusion
fecPayload
= lens _fecPayload (\ s a -> s{_fecPayload = a})
fecCallback :: Lens' FoldersExclusionsCreate (Maybe Text)
fecCallback
= lens _fecCallback (\ s a -> s{_fecCallback = a})
instance GoogleRequest FoldersExclusionsCreate where
type Rs FoldersExclusionsCreate = LogExclusion
type Scopes FoldersExclusionsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient FoldersExclusionsCreate'{..}
= go _fecParent _fecXgafv _fecUploadProtocol
_fecAccessToken
_fecUploadType
_fecCallback
(Just AltJSON)
_fecPayload
loggingService
where go
= buildClient
(Proxy :: Proxy FoldersExclusionsCreateResource)
mempty