{-# 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.Create
(
ExclusionsCreateResource
, exclusionsCreate
, ExclusionsCreate
, ecParent
, ecXgafv
, ecUploadProtocol
, ecAccessToken
, ecUploadType
, ecPayload
, ecCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ExclusionsCreateResource =
"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 ExclusionsCreate = ExclusionsCreate'
{ _ecParent :: !Text
, _ecXgafv :: !(Maybe Xgafv)
, _ecUploadProtocol :: !(Maybe Text)
, _ecAccessToken :: !(Maybe Text)
, _ecUploadType :: !(Maybe Text)
, _ecPayload :: !LogExclusion
, _ecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
exclusionsCreate
:: Text
-> LogExclusion
-> ExclusionsCreate
exclusionsCreate pEcParent_ pEcPayload_ =
ExclusionsCreate'
{ _ecParent = pEcParent_
, _ecXgafv = Nothing
, _ecUploadProtocol = Nothing
, _ecAccessToken = Nothing
, _ecUploadType = Nothing
, _ecPayload = pEcPayload_
, _ecCallback = Nothing
}
ecParent :: Lens' ExclusionsCreate Text
ecParent = lens _ecParent (\ s a -> s{_ecParent = a})
ecXgafv :: Lens' ExclusionsCreate (Maybe Xgafv)
ecXgafv = lens _ecXgafv (\ s a -> s{_ecXgafv = a})
ecUploadProtocol :: Lens' ExclusionsCreate (Maybe Text)
ecUploadProtocol
= lens _ecUploadProtocol
(\ s a -> s{_ecUploadProtocol = a})
ecAccessToken :: Lens' ExclusionsCreate (Maybe Text)
ecAccessToken
= lens _ecAccessToken
(\ s a -> s{_ecAccessToken = a})
ecUploadType :: Lens' ExclusionsCreate (Maybe Text)
ecUploadType
= lens _ecUploadType (\ s a -> s{_ecUploadType = a})
ecPayload :: Lens' ExclusionsCreate LogExclusion
ecPayload
= lens _ecPayload (\ s a -> s{_ecPayload = a})
ecCallback :: Lens' ExclusionsCreate (Maybe Text)
ecCallback
= lens _ecCallback (\ s a -> s{_ecCallback = a})
instance GoogleRequest ExclusionsCreate where
type Rs ExclusionsCreate = LogExclusion
type Scopes ExclusionsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient ExclusionsCreate'{..}
= go _ecParent _ecXgafv _ecUploadProtocol
_ecAccessToken
_ecUploadType
_ecCallback
(Just AltJSON)
_ecPayload
loggingService
where go
= buildClient
(Proxy :: Proxy ExclusionsCreateResource)
mempty