{-# 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.DlpJobs.Create
(
ProjectsDlpJobsCreateResource
, projectsDlpJobsCreate
, ProjectsDlpJobsCreate
, pParent
, pXgafv
, pUploadProtocol
, pAccessToken
, pUploadType
, pPayload
, pCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsDlpJobsCreateResource =
"v2" :>
Capture "parent" Text :>
"dlpJobs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GooglePrivacyDlpV2CreateDlpJobRequest
:> Post '[JSON] GooglePrivacyDlpV2DlpJob
data ProjectsDlpJobsCreate = ProjectsDlpJobsCreate'
{ _pParent :: !Text
, _pXgafv :: !(Maybe Xgafv)
, _pUploadProtocol :: !(Maybe Text)
, _pAccessToken :: !(Maybe Text)
, _pUploadType :: !(Maybe Text)
, _pPayload :: !GooglePrivacyDlpV2CreateDlpJobRequest
, _pCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDlpJobsCreate
:: Text
-> GooglePrivacyDlpV2CreateDlpJobRequest
-> ProjectsDlpJobsCreate
projectsDlpJobsCreate pPParent_ pPPayload_ =
ProjectsDlpJobsCreate'
{ _pParent = pPParent_
, _pXgafv = Nothing
, _pUploadProtocol = Nothing
, _pAccessToken = Nothing
, _pUploadType = Nothing
, _pPayload = pPPayload_
, _pCallback = Nothing
}
pParent :: Lens' ProjectsDlpJobsCreate Text
pParent = lens _pParent (\ s a -> s{_pParent = a})
pXgafv :: Lens' ProjectsDlpJobsCreate (Maybe Xgafv)
pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})
pUploadProtocol :: Lens' ProjectsDlpJobsCreate (Maybe Text)
pUploadProtocol
= lens _pUploadProtocol
(\ s a -> s{_pUploadProtocol = a})
pAccessToken :: Lens' ProjectsDlpJobsCreate (Maybe Text)
pAccessToken
= lens _pAccessToken (\ s a -> s{_pAccessToken = a})
pUploadType :: Lens' ProjectsDlpJobsCreate (Maybe Text)
pUploadType
= lens _pUploadType (\ s a -> s{_pUploadType = a})
pPayload :: Lens' ProjectsDlpJobsCreate GooglePrivacyDlpV2CreateDlpJobRequest
pPayload = lens _pPayload (\ s a -> s{_pPayload = a})
pCallback :: Lens' ProjectsDlpJobsCreate (Maybe Text)
pCallback
= lens _pCallback (\ s a -> s{_pCallback = a})
instance GoogleRequest ProjectsDlpJobsCreate where
type Rs ProjectsDlpJobsCreate =
GooglePrivacyDlpV2DlpJob
type Scopes ProjectsDlpJobsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsDlpJobsCreate'{..}
= go _pParent _pXgafv _pUploadProtocol _pAccessToken
_pUploadType
_pCallback
(Just AltJSON)
_pPayload
dLPService
where go
= buildClient
(Proxy :: Proxy ProjectsDlpJobsCreateResource)
mempty