{-# 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.Organizations.InspectTemplates.Create
(
OrganizationsInspectTemplatesCreateResource
, organizationsInspectTemplatesCreate
, OrganizationsInspectTemplatesCreate
, oitcParent
, oitcXgafv
, oitcUploadProtocol
, oitcAccessToken
, oitcUploadType
, oitcPayload
, oitcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type OrganizationsInspectTemplatesCreateResource =
"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 OrganizationsInspectTemplatesCreate = OrganizationsInspectTemplatesCreate'
{ _oitcParent :: !Text
, _oitcXgafv :: !(Maybe Xgafv)
, _oitcUploadProtocol :: !(Maybe Text)
, _oitcAccessToken :: !(Maybe Text)
, _oitcUploadType :: !(Maybe Text)
, _oitcPayload :: !GooglePrivacyDlpV2CreateInspectTemplateRequest
, _oitcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsInspectTemplatesCreate
:: Text
-> GooglePrivacyDlpV2CreateInspectTemplateRequest
-> OrganizationsInspectTemplatesCreate
organizationsInspectTemplatesCreate pOitcParent_ pOitcPayload_ =
OrganizationsInspectTemplatesCreate'
{ _oitcParent = pOitcParent_
, _oitcXgafv = Nothing
, _oitcUploadProtocol = Nothing
, _oitcAccessToken = Nothing
, _oitcUploadType = Nothing
, _oitcPayload = pOitcPayload_
, _oitcCallback = Nothing
}
oitcParent :: Lens' OrganizationsInspectTemplatesCreate Text
oitcParent
= lens _oitcParent (\ s a -> s{_oitcParent = a})
oitcXgafv :: Lens' OrganizationsInspectTemplatesCreate (Maybe Xgafv)
oitcXgafv
= lens _oitcXgafv (\ s a -> s{_oitcXgafv = a})
oitcUploadProtocol :: Lens' OrganizationsInspectTemplatesCreate (Maybe Text)
oitcUploadProtocol
= lens _oitcUploadProtocol
(\ s a -> s{_oitcUploadProtocol = a})
oitcAccessToken :: Lens' OrganizationsInspectTemplatesCreate (Maybe Text)
oitcAccessToken
= lens _oitcAccessToken
(\ s a -> s{_oitcAccessToken = a})
oitcUploadType :: Lens' OrganizationsInspectTemplatesCreate (Maybe Text)
oitcUploadType
= lens _oitcUploadType
(\ s a -> s{_oitcUploadType = a})
oitcPayload :: Lens' OrganizationsInspectTemplatesCreate GooglePrivacyDlpV2CreateInspectTemplateRequest
oitcPayload
= lens _oitcPayload (\ s a -> s{_oitcPayload = a})
oitcCallback :: Lens' OrganizationsInspectTemplatesCreate (Maybe Text)
oitcCallback
= lens _oitcCallback (\ s a -> s{_oitcCallback = a})
instance GoogleRequest
OrganizationsInspectTemplatesCreate where
type Rs OrganizationsInspectTemplatesCreate =
GooglePrivacyDlpV2InspectTemplate
type Scopes OrganizationsInspectTemplatesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
OrganizationsInspectTemplatesCreate'{..}
= go _oitcParent _oitcXgafv _oitcUploadProtocol
_oitcAccessToken
_oitcUploadType
_oitcCallback
(Just AltJSON)
_oitcPayload
dLPService
where go
= buildClient
(Proxy ::
Proxy OrganizationsInspectTemplatesCreateResource)
mempty