{-# 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.Patch
(
ProjectsInspectTemplatesPatchResource
, projectsInspectTemplatesPatch
, ProjectsInspectTemplatesPatch
, pitpXgafv
, pitpUploadProtocol
, pitpAccessToken
, pitpUploadType
, pitpPayload
, pitpName
, pitpCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsInspectTemplatesPatchResource =
"v2" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GooglePrivacyDlpV2UpdateInspectTemplateRequest
:> Patch '[JSON] GooglePrivacyDlpV2InspectTemplate
data ProjectsInspectTemplatesPatch = ProjectsInspectTemplatesPatch'
{ _pitpXgafv :: !(Maybe Xgafv)
, _pitpUploadProtocol :: !(Maybe Text)
, _pitpAccessToken :: !(Maybe Text)
, _pitpUploadType :: !(Maybe Text)
, _pitpPayload :: !GooglePrivacyDlpV2UpdateInspectTemplateRequest
, _pitpName :: !Text
, _pitpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInspectTemplatesPatch
:: GooglePrivacyDlpV2UpdateInspectTemplateRequest
-> Text
-> ProjectsInspectTemplatesPatch
projectsInspectTemplatesPatch pPitpPayload_ pPitpName_ =
ProjectsInspectTemplatesPatch'
{ _pitpXgafv = Nothing
, _pitpUploadProtocol = Nothing
, _pitpAccessToken = Nothing
, _pitpUploadType = Nothing
, _pitpPayload = pPitpPayload_
, _pitpName = pPitpName_
, _pitpCallback = Nothing
}
pitpXgafv :: Lens' ProjectsInspectTemplatesPatch (Maybe Xgafv)
pitpXgafv
= lens _pitpXgafv (\ s a -> s{_pitpXgafv = a})
pitpUploadProtocol :: Lens' ProjectsInspectTemplatesPatch (Maybe Text)
pitpUploadProtocol
= lens _pitpUploadProtocol
(\ s a -> s{_pitpUploadProtocol = a})
pitpAccessToken :: Lens' ProjectsInspectTemplatesPatch (Maybe Text)
pitpAccessToken
= lens _pitpAccessToken
(\ s a -> s{_pitpAccessToken = a})
pitpUploadType :: Lens' ProjectsInspectTemplatesPatch (Maybe Text)
pitpUploadType
= lens _pitpUploadType
(\ s a -> s{_pitpUploadType = a})
pitpPayload :: Lens' ProjectsInspectTemplatesPatch GooglePrivacyDlpV2UpdateInspectTemplateRequest
pitpPayload
= lens _pitpPayload (\ s a -> s{_pitpPayload = a})
pitpName :: Lens' ProjectsInspectTemplatesPatch Text
pitpName = lens _pitpName (\ s a -> s{_pitpName = a})
pitpCallback :: Lens' ProjectsInspectTemplatesPatch (Maybe Text)
pitpCallback
= lens _pitpCallback (\ s a -> s{_pitpCallback = a})
instance GoogleRequest ProjectsInspectTemplatesPatch
where
type Rs ProjectsInspectTemplatesPatch =
GooglePrivacyDlpV2InspectTemplate
type Scopes ProjectsInspectTemplatesPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsInspectTemplatesPatch'{..}
= go _pitpName _pitpXgafv _pitpUploadProtocol
_pitpAccessToken
_pitpUploadType
_pitpCallback
(Just AltJSON)
_pitpPayload
dLPService
where go
= buildClient
(Proxy ::
Proxy ProjectsInspectTemplatesPatchResource)
mempty