{-# 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.InspectTemplates.Create
(
ProjectsInspectTemplatesCreateResource
, projectsInspectTemplatesCreate
, ProjectsInspectTemplatesCreate
, pitcParent
, pitcXgafv
, pitcUploadProtocol
, pitcAccessToken
, pitcUploadType
, pitcPayload
, pitcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsInspectTemplatesCreateResource =
"v2" :>
Capture "parent" Text :>
"inspectTemplates" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GooglePrivacyDlpV2CreateInspectTemplateRequest
:> Post '[JSON] GooglePrivacyDlpV2InspectTemplate
data ProjectsInspectTemplatesCreate = ProjectsInspectTemplatesCreate'
{ _pitcParent :: !Text
, _pitcXgafv :: !(Maybe Xgafv)
, _pitcUploadProtocol :: !(Maybe Text)
, _pitcAccessToken :: !(Maybe Text)
, _pitcUploadType :: !(Maybe Text)
, _pitcPayload :: !GooglePrivacyDlpV2CreateInspectTemplateRequest
, _pitcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInspectTemplatesCreate
:: Text
-> GooglePrivacyDlpV2CreateInspectTemplateRequest
-> ProjectsInspectTemplatesCreate
projectsInspectTemplatesCreate pPitcParent_ pPitcPayload_ =
ProjectsInspectTemplatesCreate'
{ _pitcParent = pPitcParent_
, _pitcXgafv = Nothing
, _pitcUploadProtocol = Nothing
, _pitcAccessToken = Nothing
, _pitcUploadType = Nothing
, _pitcPayload = pPitcPayload_
, _pitcCallback = Nothing
}
pitcParent :: Lens' ProjectsInspectTemplatesCreate Text
pitcParent
= lens _pitcParent (\ s a -> s{_pitcParent = a})
pitcXgafv :: Lens' ProjectsInspectTemplatesCreate (Maybe Xgafv)
pitcXgafv
= lens _pitcXgafv (\ s a -> s{_pitcXgafv = a})
pitcUploadProtocol :: Lens' ProjectsInspectTemplatesCreate (Maybe Text)
pitcUploadProtocol
= lens _pitcUploadProtocol
(\ s a -> s{_pitcUploadProtocol = a})
pitcAccessToken :: Lens' ProjectsInspectTemplatesCreate (Maybe Text)
pitcAccessToken
= lens _pitcAccessToken
(\ s a -> s{_pitcAccessToken = a})
pitcUploadType :: Lens' ProjectsInspectTemplatesCreate (Maybe Text)
pitcUploadType
= lens _pitcUploadType
(\ s a -> s{_pitcUploadType = a})
pitcPayload :: Lens' ProjectsInspectTemplatesCreate GooglePrivacyDlpV2CreateInspectTemplateRequest
pitcPayload
= lens _pitcPayload (\ s a -> s{_pitcPayload = a})
pitcCallback :: Lens' ProjectsInspectTemplatesCreate (Maybe Text)
pitcCallback
= lens _pitcCallback (\ s a -> s{_pitcCallback = a})
instance GoogleRequest ProjectsInspectTemplatesCreate
where
type Rs ProjectsInspectTemplatesCreate =
GooglePrivacyDlpV2InspectTemplate
type Scopes ProjectsInspectTemplatesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsInspectTemplatesCreate'{..}
= go _pitcParent _pitcXgafv _pitcUploadProtocol
_pitcAccessToken
_pitcUploadType
_pitcCallback
(Just AltJSON)
_pitcPayload
dLPService
where go
= buildClient
(Proxy ::
Proxy ProjectsInspectTemplatesCreateResource)
mempty