{-# 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.StoredInfoTypes.Create
(
ProjectsStoredInfoTypesCreateResource
, projectsStoredInfoTypesCreate
, ProjectsStoredInfoTypesCreate
, psitcParent
, psitcXgafv
, psitcUploadProtocol
, psitcAccessToken
, psitcUploadType
, psitcPayload
, psitcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsStoredInfoTypesCreateResource =
"v2" :>
Capture "parent" Text :>
"storedInfoTypes" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GooglePrivacyDlpV2CreateStoredInfoTypeRequest
:> Post '[JSON] GooglePrivacyDlpV2StoredInfoType
data ProjectsStoredInfoTypesCreate = ProjectsStoredInfoTypesCreate'
{ _psitcParent :: !Text
, _psitcXgafv :: !(Maybe Xgafv)
, _psitcUploadProtocol :: !(Maybe Text)
, _psitcAccessToken :: !(Maybe Text)
, _psitcUploadType :: !(Maybe Text)
, _psitcPayload :: !GooglePrivacyDlpV2CreateStoredInfoTypeRequest
, _psitcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsStoredInfoTypesCreate
:: Text
-> GooglePrivacyDlpV2CreateStoredInfoTypeRequest
-> ProjectsStoredInfoTypesCreate
projectsStoredInfoTypesCreate pPsitcParent_ pPsitcPayload_ =
ProjectsStoredInfoTypesCreate'
{ _psitcParent = pPsitcParent_
, _psitcXgafv = Nothing
, _psitcUploadProtocol = Nothing
, _psitcAccessToken = Nothing
, _psitcUploadType = Nothing
, _psitcPayload = pPsitcPayload_
, _psitcCallback = Nothing
}
psitcParent :: Lens' ProjectsStoredInfoTypesCreate Text
psitcParent
= lens _psitcParent (\ s a -> s{_psitcParent = a})
psitcXgafv :: Lens' ProjectsStoredInfoTypesCreate (Maybe Xgafv)
psitcXgafv
= lens _psitcXgafv (\ s a -> s{_psitcXgafv = a})
psitcUploadProtocol :: Lens' ProjectsStoredInfoTypesCreate (Maybe Text)
psitcUploadProtocol
= lens _psitcUploadProtocol
(\ s a -> s{_psitcUploadProtocol = a})
psitcAccessToken :: Lens' ProjectsStoredInfoTypesCreate (Maybe Text)
psitcAccessToken
= lens _psitcAccessToken
(\ s a -> s{_psitcAccessToken = a})
psitcUploadType :: Lens' ProjectsStoredInfoTypesCreate (Maybe Text)
psitcUploadType
= lens _psitcUploadType
(\ s a -> s{_psitcUploadType = a})
psitcPayload :: Lens' ProjectsStoredInfoTypesCreate GooglePrivacyDlpV2CreateStoredInfoTypeRequest
psitcPayload
= lens _psitcPayload (\ s a -> s{_psitcPayload = a})
psitcCallback :: Lens' ProjectsStoredInfoTypesCreate (Maybe Text)
psitcCallback
= lens _psitcCallback
(\ s a -> s{_psitcCallback = a})
instance GoogleRequest ProjectsStoredInfoTypesCreate
where
type Rs ProjectsStoredInfoTypesCreate =
GooglePrivacyDlpV2StoredInfoType
type Scopes ProjectsStoredInfoTypesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsStoredInfoTypesCreate'{..}
= go _psitcParent _psitcXgafv _psitcUploadProtocol
_psitcAccessToken
_psitcUploadType
_psitcCallback
(Just AltJSON)
_psitcPayload
dLPService
where go
= buildClient
(Proxy ::
Proxy ProjectsStoredInfoTypesCreateResource)
mempty