{-# 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.Exclusions.Create
(
OrganizationsExclusionsCreateResource
, organizationsExclusionsCreate
, OrganizationsExclusionsCreate
, oecParent
, oecXgafv
, oecUploadProtocol
, oecAccessToken
, oecUploadType
, oecPayload
, oecCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type OrganizationsExclusionsCreateResource =
"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 OrganizationsExclusionsCreate = OrganizationsExclusionsCreate'
{ _oecParent :: !Text
, _oecXgafv :: !(Maybe Xgafv)
, _oecUploadProtocol :: !(Maybe Text)
, _oecAccessToken :: !(Maybe Text)
, _oecUploadType :: !(Maybe Text)
, _oecPayload :: !LogExclusion
, _oecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsExclusionsCreate
:: Text
-> LogExclusion
-> OrganizationsExclusionsCreate
organizationsExclusionsCreate pOecParent_ pOecPayload_ =
OrganizationsExclusionsCreate'
{ _oecParent = pOecParent_
, _oecXgafv = Nothing
, _oecUploadProtocol = Nothing
, _oecAccessToken = Nothing
, _oecUploadType = Nothing
, _oecPayload = pOecPayload_
, _oecCallback = Nothing
}
oecParent :: Lens' OrganizationsExclusionsCreate Text
oecParent
= lens _oecParent (\ s a -> s{_oecParent = a})
oecXgafv :: Lens' OrganizationsExclusionsCreate (Maybe Xgafv)
oecXgafv = lens _oecXgafv (\ s a -> s{_oecXgafv = a})
oecUploadProtocol :: Lens' OrganizationsExclusionsCreate (Maybe Text)
oecUploadProtocol
= lens _oecUploadProtocol
(\ s a -> s{_oecUploadProtocol = a})
oecAccessToken :: Lens' OrganizationsExclusionsCreate (Maybe Text)
oecAccessToken
= lens _oecAccessToken
(\ s a -> s{_oecAccessToken = a})
oecUploadType :: Lens' OrganizationsExclusionsCreate (Maybe Text)
oecUploadType
= lens _oecUploadType
(\ s a -> s{_oecUploadType = a})
oecPayload :: Lens' OrganizationsExclusionsCreate LogExclusion
oecPayload
= lens _oecPayload (\ s a -> s{_oecPayload = a})
oecCallback :: Lens' OrganizationsExclusionsCreate (Maybe Text)
oecCallback
= lens _oecCallback (\ s a -> s{_oecCallback = a})
instance GoogleRequest OrganizationsExclusionsCreate
where
type Rs OrganizationsExclusionsCreate = LogExclusion
type Scopes OrganizationsExclusionsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient OrganizationsExclusionsCreate'{..}
= go _oecParent _oecXgafv _oecUploadProtocol
_oecAccessToken
_oecUploadType
_oecCallback
(Just AltJSON)
_oecPayload
loggingService
where go
= buildClient
(Proxy ::
Proxy OrganizationsExclusionsCreateResource)
mempty