{-# 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.DeidentifyTemplates.Create
(
ProjectsDeidentifyTemplatesCreateResource
, projectsDeidentifyTemplatesCreate
, ProjectsDeidentifyTemplatesCreate
, pdtcParent
, pdtcXgafv
, pdtcUploadProtocol
, pdtcAccessToken
, pdtcUploadType
, pdtcPayload
, pdtcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsDeidentifyTemplatesCreateResource =
"v2" :>
Capture "parent" Text :>
"deidentifyTemplates" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
:> Post '[JSON] GooglePrivacyDlpV2DeidentifyTemplate
data ProjectsDeidentifyTemplatesCreate = ProjectsDeidentifyTemplatesCreate'
{ _pdtcParent :: !Text
, _pdtcXgafv :: !(Maybe Xgafv)
, _pdtcUploadProtocol :: !(Maybe Text)
, _pdtcAccessToken :: !(Maybe Text)
, _pdtcUploadType :: !(Maybe Text)
, _pdtcPayload :: !GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
, _pdtcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDeidentifyTemplatesCreate
:: Text
-> GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
-> ProjectsDeidentifyTemplatesCreate
projectsDeidentifyTemplatesCreate pPdtcParent_ pPdtcPayload_ =
ProjectsDeidentifyTemplatesCreate'
{ _pdtcParent = pPdtcParent_
, _pdtcXgafv = Nothing
, _pdtcUploadProtocol = Nothing
, _pdtcAccessToken = Nothing
, _pdtcUploadType = Nothing
, _pdtcPayload = pPdtcPayload_
, _pdtcCallback = Nothing
}
pdtcParent :: Lens' ProjectsDeidentifyTemplatesCreate Text
pdtcParent
= lens _pdtcParent (\ s a -> s{_pdtcParent = a})
pdtcXgafv :: Lens' ProjectsDeidentifyTemplatesCreate (Maybe Xgafv)
pdtcXgafv
= lens _pdtcXgafv (\ s a -> s{_pdtcXgafv = a})
pdtcUploadProtocol :: Lens' ProjectsDeidentifyTemplatesCreate (Maybe Text)
pdtcUploadProtocol
= lens _pdtcUploadProtocol
(\ s a -> s{_pdtcUploadProtocol = a})
pdtcAccessToken :: Lens' ProjectsDeidentifyTemplatesCreate (Maybe Text)
pdtcAccessToken
= lens _pdtcAccessToken
(\ s a -> s{_pdtcAccessToken = a})
pdtcUploadType :: Lens' ProjectsDeidentifyTemplatesCreate (Maybe Text)
pdtcUploadType
= lens _pdtcUploadType
(\ s a -> s{_pdtcUploadType = a})
pdtcPayload :: Lens' ProjectsDeidentifyTemplatesCreate GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
pdtcPayload
= lens _pdtcPayload (\ s a -> s{_pdtcPayload = a})
pdtcCallback :: Lens' ProjectsDeidentifyTemplatesCreate (Maybe Text)
pdtcCallback
= lens _pdtcCallback (\ s a -> s{_pdtcCallback = a})
instance GoogleRequest
ProjectsDeidentifyTemplatesCreate where
type Rs ProjectsDeidentifyTemplatesCreate =
GooglePrivacyDlpV2DeidentifyTemplate
type Scopes ProjectsDeidentifyTemplatesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsDeidentifyTemplatesCreate'{..}
= go _pdtcParent _pdtcXgafv _pdtcUploadProtocol
_pdtcAccessToken
_pdtcUploadType
_pdtcCallback
(Just AltJSON)
_pdtcPayload
dLPService
where go
= buildClient
(Proxy ::
Proxy ProjectsDeidentifyTemplatesCreateResource)
mempty