{-# 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.DLP.Projects.JobTriggers.Create
(
ProjectsJobTriggersCreateResource
, projectsJobTriggersCreate
, ProjectsJobTriggersCreate
, pjtcParent
, pjtcXgafv
, pjtcUploadProtocol
, pjtcAccessToken
, pjtcUploadType
, pjtcPayload
, pjtcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsJobTriggersCreateResource =
"v2" :>
Capture "parent" Text :>
"jobTriggers" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GooglePrivacyDlpV2CreateJobTriggerRequest
:> Post '[JSON] GooglePrivacyDlpV2JobTrigger
data ProjectsJobTriggersCreate = ProjectsJobTriggersCreate'
{ _pjtcParent :: !Text
, _pjtcXgafv :: !(Maybe Xgafv)
, _pjtcUploadProtocol :: !(Maybe Text)
, _pjtcAccessToken :: !(Maybe Text)
, _pjtcUploadType :: !(Maybe Text)
, _pjtcPayload :: !GooglePrivacyDlpV2CreateJobTriggerRequest
, _pjtcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobTriggersCreate
:: Text
-> GooglePrivacyDlpV2CreateJobTriggerRequest
-> ProjectsJobTriggersCreate
projectsJobTriggersCreate pPjtcParent_ pPjtcPayload_ =
ProjectsJobTriggersCreate'
{ _pjtcParent = pPjtcParent_
, _pjtcXgafv = Nothing
, _pjtcUploadProtocol = Nothing
, _pjtcAccessToken = Nothing
, _pjtcUploadType = Nothing
, _pjtcPayload = pPjtcPayload_
, _pjtcCallback = Nothing
}
pjtcParent :: Lens' ProjectsJobTriggersCreate Text
pjtcParent
= lens _pjtcParent (\ s a -> s{_pjtcParent = a})
pjtcXgafv :: Lens' ProjectsJobTriggersCreate (Maybe Xgafv)
pjtcXgafv
= lens _pjtcXgafv (\ s a -> s{_pjtcXgafv = a})
pjtcUploadProtocol :: Lens' ProjectsJobTriggersCreate (Maybe Text)
pjtcUploadProtocol
= lens _pjtcUploadProtocol
(\ s a -> s{_pjtcUploadProtocol = a})
pjtcAccessToken :: Lens' ProjectsJobTriggersCreate (Maybe Text)
pjtcAccessToken
= lens _pjtcAccessToken
(\ s a -> s{_pjtcAccessToken = a})
pjtcUploadType :: Lens' ProjectsJobTriggersCreate (Maybe Text)
pjtcUploadType
= lens _pjtcUploadType
(\ s a -> s{_pjtcUploadType = a})
pjtcPayload :: Lens' ProjectsJobTriggersCreate GooglePrivacyDlpV2CreateJobTriggerRequest
pjtcPayload
= lens _pjtcPayload (\ s a -> s{_pjtcPayload = a})
pjtcCallback :: Lens' ProjectsJobTriggersCreate (Maybe Text)
pjtcCallback
= lens _pjtcCallback (\ s a -> s{_pjtcCallback = a})
instance GoogleRequest ProjectsJobTriggersCreate
where
type Rs ProjectsJobTriggersCreate =
GooglePrivacyDlpV2JobTrigger
type Scopes ProjectsJobTriggersCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsJobTriggersCreate'{..}
= go _pjtcParent _pjtcXgafv _pjtcUploadProtocol
_pjtcAccessToken
_pjtcUploadType
_pjtcCallback
(Just AltJSON)
_pjtcPayload
dLPService
where go
= buildClient
(Proxy :: Proxy ProjectsJobTriggersCreateResource)
mempty