{-# 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.Exclusions.Create
(
BillingAccountsExclusionsCreateResource
, billingAccountsExclusionsCreate
, BillingAccountsExclusionsCreate
, baecParent
, baecXgafv
, baecUploadProtocol
, baecAccessToken
, baecUploadType
, baecPayload
, baecCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type BillingAccountsExclusionsCreateResource =
"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 BillingAccountsExclusionsCreate = BillingAccountsExclusionsCreate'
{ _baecParent :: !Text
, _baecXgafv :: !(Maybe Xgafv)
, _baecUploadProtocol :: !(Maybe Text)
, _baecAccessToken :: !(Maybe Text)
, _baecUploadType :: !(Maybe Text)
, _baecPayload :: !LogExclusion
, _baecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsExclusionsCreate
:: Text
-> LogExclusion
-> BillingAccountsExclusionsCreate
billingAccountsExclusionsCreate pBaecParent_ pBaecPayload_ =
BillingAccountsExclusionsCreate'
{ _baecParent = pBaecParent_
, _baecXgafv = Nothing
, _baecUploadProtocol = Nothing
, _baecAccessToken = Nothing
, _baecUploadType = Nothing
, _baecPayload = pBaecPayload_
, _baecCallback = Nothing
}
baecParent :: Lens' BillingAccountsExclusionsCreate Text
baecParent
= lens _baecParent (\ s a -> s{_baecParent = a})
baecXgafv :: Lens' BillingAccountsExclusionsCreate (Maybe Xgafv)
baecXgafv
= lens _baecXgafv (\ s a -> s{_baecXgafv = a})
baecUploadProtocol :: Lens' BillingAccountsExclusionsCreate (Maybe Text)
baecUploadProtocol
= lens _baecUploadProtocol
(\ s a -> s{_baecUploadProtocol = a})
baecAccessToken :: Lens' BillingAccountsExclusionsCreate (Maybe Text)
baecAccessToken
= lens _baecAccessToken
(\ s a -> s{_baecAccessToken = a})
baecUploadType :: Lens' BillingAccountsExclusionsCreate (Maybe Text)
baecUploadType
= lens _baecUploadType
(\ s a -> s{_baecUploadType = a})
baecPayload :: Lens' BillingAccountsExclusionsCreate LogExclusion
baecPayload
= lens _baecPayload (\ s a -> s{_baecPayload = a})
baecCallback :: Lens' BillingAccountsExclusionsCreate (Maybe Text)
baecCallback
= lens _baecCallback (\ s a -> s{_baecCallback = a})
instance GoogleRequest
BillingAccountsExclusionsCreate where
type Rs BillingAccountsExclusionsCreate =
LogExclusion
type Scopes BillingAccountsExclusionsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient BillingAccountsExclusionsCreate'{..}
= go _baecParent _baecXgafv _baecUploadProtocol
_baecAccessToken
_baecUploadType
_baecCallback
(Just AltJSON)
_baecPayload
loggingService
where go
= buildClient
(Proxy ::
Proxy BillingAccountsExclusionsCreateResource)
mempty