{-# 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.Projects.Exclusions.Create
(
ProjectsExclusionsCreateResource
, projectsExclusionsCreate
, ProjectsExclusionsCreate
, pecParent
, pecXgafv
, pecUploadProtocol
, pecAccessToken
, pecUploadType
, pecPayload
, pecCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ProjectsExclusionsCreateResource =
"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 ProjectsExclusionsCreate = ProjectsExclusionsCreate'
{ _pecParent :: !Text
, _pecXgafv :: !(Maybe Xgafv)
, _pecUploadProtocol :: !(Maybe Text)
, _pecAccessToken :: !(Maybe Text)
, _pecUploadType :: !(Maybe Text)
, _pecPayload :: !LogExclusion
, _pecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsExclusionsCreate
:: Text
-> LogExclusion
-> ProjectsExclusionsCreate
projectsExclusionsCreate pPecParent_ pPecPayload_ =
ProjectsExclusionsCreate'
{ _pecParent = pPecParent_
, _pecXgafv = Nothing
, _pecUploadProtocol = Nothing
, _pecAccessToken = Nothing
, _pecUploadType = Nothing
, _pecPayload = pPecPayload_
, _pecCallback = Nothing
}
pecParent :: Lens' ProjectsExclusionsCreate Text
pecParent
= lens _pecParent (\ s a -> s{_pecParent = a})
pecXgafv :: Lens' ProjectsExclusionsCreate (Maybe Xgafv)
pecXgafv = lens _pecXgafv (\ s a -> s{_pecXgafv = a})
pecUploadProtocol :: Lens' ProjectsExclusionsCreate (Maybe Text)
pecUploadProtocol
= lens _pecUploadProtocol
(\ s a -> s{_pecUploadProtocol = a})
pecAccessToken :: Lens' ProjectsExclusionsCreate (Maybe Text)
pecAccessToken
= lens _pecAccessToken
(\ s a -> s{_pecAccessToken = a})
pecUploadType :: Lens' ProjectsExclusionsCreate (Maybe Text)
pecUploadType
= lens _pecUploadType
(\ s a -> s{_pecUploadType = a})
pecPayload :: Lens' ProjectsExclusionsCreate LogExclusion
pecPayload
= lens _pecPayload (\ s a -> s{_pecPayload = a})
pecCallback :: Lens' ProjectsExclusionsCreate (Maybe Text)
pecCallback
= lens _pecCallback (\ s a -> s{_pecCallback = a})
instance GoogleRequest ProjectsExclusionsCreate where
type Rs ProjectsExclusionsCreate = LogExclusion
type Scopes ProjectsExclusionsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"]
requestClient ProjectsExclusionsCreate'{..}
= go _pecParent _pecXgafv _pecUploadProtocol
_pecAccessToken
_pecUploadType
_pecCallback
(Just AltJSON)
_pecPayload
loggingService
where go
= buildClient
(Proxy :: Proxy ProjectsExclusionsCreateResource)
mempty