{-# 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.StoredInfoTypes.Create
(
OrganizationsStoredInfoTypesCreateResource
, organizationsStoredInfoTypesCreate
, OrganizationsStoredInfoTypesCreate
, ositcParent
, ositcXgafv
, ositcUploadProtocol
, ositcAccessToken
, ositcUploadType
, ositcPayload
, ositcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type OrganizationsStoredInfoTypesCreateResource =
"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 OrganizationsStoredInfoTypesCreate = OrganizationsStoredInfoTypesCreate'
{ _ositcParent :: !Text
, _ositcXgafv :: !(Maybe Xgafv)
, _ositcUploadProtocol :: !(Maybe Text)
, _ositcAccessToken :: !(Maybe Text)
, _ositcUploadType :: !(Maybe Text)
, _ositcPayload :: !GooglePrivacyDlpV2CreateStoredInfoTypeRequest
, _ositcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsStoredInfoTypesCreate
:: Text
-> GooglePrivacyDlpV2CreateStoredInfoTypeRequest
-> OrganizationsStoredInfoTypesCreate
organizationsStoredInfoTypesCreate pOsitcParent_ pOsitcPayload_ =
OrganizationsStoredInfoTypesCreate'
{ _ositcParent = pOsitcParent_
, _ositcXgafv = Nothing
, _ositcUploadProtocol = Nothing
, _ositcAccessToken = Nothing
, _ositcUploadType = Nothing
, _ositcPayload = pOsitcPayload_
, _ositcCallback = Nothing
}
ositcParent :: Lens' OrganizationsStoredInfoTypesCreate Text
ositcParent
= lens _ositcParent (\ s a -> s{_ositcParent = a})
ositcXgafv :: Lens' OrganizationsStoredInfoTypesCreate (Maybe Xgafv)
ositcXgafv
= lens _ositcXgafv (\ s a -> s{_ositcXgafv = a})
ositcUploadProtocol :: Lens' OrganizationsStoredInfoTypesCreate (Maybe Text)
ositcUploadProtocol
= lens _ositcUploadProtocol
(\ s a -> s{_ositcUploadProtocol = a})
ositcAccessToken :: Lens' OrganizationsStoredInfoTypesCreate (Maybe Text)
ositcAccessToken
= lens _ositcAccessToken
(\ s a -> s{_ositcAccessToken = a})
ositcUploadType :: Lens' OrganizationsStoredInfoTypesCreate (Maybe Text)
ositcUploadType
= lens _ositcUploadType
(\ s a -> s{_ositcUploadType = a})
ositcPayload :: Lens' OrganizationsStoredInfoTypesCreate GooglePrivacyDlpV2CreateStoredInfoTypeRequest
ositcPayload
= lens _ositcPayload (\ s a -> s{_ositcPayload = a})
ositcCallback :: Lens' OrganizationsStoredInfoTypesCreate (Maybe Text)
ositcCallback
= lens _ositcCallback
(\ s a -> s{_ositcCallback = a})
instance GoogleRequest
OrganizationsStoredInfoTypesCreate where
type Rs OrganizationsStoredInfoTypesCreate =
GooglePrivacyDlpV2StoredInfoType
type Scopes OrganizationsStoredInfoTypesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OrganizationsStoredInfoTypesCreate'{..}
= go _ositcParent _ositcXgafv _ositcUploadProtocol
_ositcAccessToken
_ositcUploadType
_ositcCallback
(Just AltJSON)
_ositcPayload
dLPService
where go
= buildClient
(Proxy ::
Proxy OrganizationsStoredInfoTypesCreateResource)
mempty