#![cfg(feature = "cloudflare_data")]
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
#![allow(
clippy::missing_errors_doc,
clippy::doc_markdown,
clippy::useless_format
)]
#![allow(unused_imports)]
use foundation_macros::JsonHash;
use foundation_netio::shared::client::http_client::HttpClient;
use foundation_netio::{DynNetClient, PreparedRequestBuilder};
use serde::{Deserialize, Serialize};
use super::shared::ApiResponse;
pub type DlpApiResponseCommon = super::shared::ErrorsMessagesSuccessObject;
pub type DlpApiResponseSingle = super::shared::ErrorsMessagesSuccessObject;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpContextAwareness {
pub enabled: bool,
pub skip: DlpSkipConfig,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpCustomEntry {
pub created_at: String,
pub description: Option<String>,
pub enabled: bool,
pub id: String,
pub name: String,
pub pattern: DlpPattern,
pub profile_id: Option<String>,
pub updated_at: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpCustomEntryUpdate {
pub description: Option<String>,
pub enabled: bool,
pub name: String,
pub pattern: DlpPattern,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpCustomEntryUpdateType {
pub description: Option<String>,
pub name: String,
pub pattern: DlpPattern,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpCustomProfile {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: i64,
pub confidence_threshold: Option<serde_json::Value>,
pub context_awareness: Option<DlpContextAwareness>,
pub created_at: String,
pub data_classes: Option<Vec<String>>,
pub data_tags: Option<Vec<String>>,
pub description: Option<String>,
pub entries: Option<Vec<serde_json::Value>>,
pub id: String,
pub name: String,
pub ocr_enabled: bool,
pub sensitivity_levels: Option<Vec<DlpSensitivityLevelRef>>,
pub shared_entries: Option<Vec<serde_json::Value>>,
pub updated_at: String,
}
pub type DlpCustomProfileArray = Vec<DlpCustomProfile>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpCustomProfileUpdate {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: Option<i64>,
pub confidence_threshold: Option<String>,
pub context_awareness: Option<DlpContextAwareness>,
pub data_classes: Option<Vec<String>>,
pub data_tags: Option<Vec<String>>,
pub description: Option<String>,
pub entries: Option<Vec<serde_json::Value>>,
pub name: String,
pub ocr_enabled: Option<bool>,
pub sensitivity_levels: Option<Vec<DlpSensitivityLevelRef>>,
pub shared_entries: Option<Vec<DlpSharedEntryUpdate>>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDataset {
pub case_sensitive: Option<bool>,
pub columns: Vec<DlpDatasetColumn>,
pub created_at: String,
pub description: Option<String>,
pub encoding_version: i64,
pub id: String,
pub name: String,
pub num_cells: i64,
pub secret: bool,
pub status: String,
pub updated_at: String,
pub uploads: Vec<DlpDatasetUpload>,
}
pub type DlpDatasetArray = Vec<DlpDataset>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetColumn {
pub entry_id: String,
pub header_name: String,
pub num_cells: i64,
pub upload_status: String,
}
pub type DlpDatasetColumnArray = Vec<DlpDatasetColumn>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetCreation {
pub dataset: DlpDataset,
pub encoding_version: i64,
pub max_cells: i64,
pub secret: Option<String>,
pub version: i64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetNewVersion {
pub case_sensitive: Option<bool>,
pub columns: Option<Vec<DlpDatasetColumn>>,
pub encoding_version: i64,
pub max_cells: i64,
pub secret: Option<String>,
pub version: i64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetUpload {
pub num_cells: i64,
pub status: String,
pub version: i64,
}
pub type DlpDatasetUploadStatus = String;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetsCreateRequest {
pub case_sensitive: Option<bool>,
pub description: Option<String>,
pub encoding_version: Option<i64>,
pub name: String,
pub secret: Option<bool>,
}
pub type DlpDatasetsCreateResponse = super::shared::ApiEnvelope<Option<DlpDatasetCreation>>;
pub type DlpDatasetsCreateVersionResponse =
super::shared::ApiEnvelope<Option<DlpDatasetNewVersion>>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetsDefineColumnsRequestItem {
pub header_name: String,
pub num_cells: i64,
}
pub type DlpDatasetsDefineColumnsResponse =
super::shared::ApiEnvelope<Option<Vec<DlpDatasetColumn>>>;
pub type DlpDatasetsReadAllResponse = super::shared::ApiEnvelope<Option<Vec<DlpDataset>>>;
pub type DlpDatasetsReadResponse = super::shared::ApiEnvelope<Option<DlpDataset>>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDatasetsUpdateRequest {
pub case_sensitive: Option<bool>,
pub description: Option<String>,
pub name: Option<String>,
}
pub type DlpDatasetsUpdateResponse = super::shared::ApiEnvelope<Option<DlpDataset>>;
pub type DlpDatasetsUploadDatasetColumnResponse =
super::shared::ApiEnvelope<Option<DlpDatasetColumn>>;
pub type DlpDatasetsUploadVersionResponse = super::shared::ApiEnvelope<Option<DlpDataset>>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDlpSettings {
pub ai_context_analysis: bool,
pub ocr: bool,
pub payload_logging: DlpPayloadLogSetting,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDlpSettingsUpdate {
pub ai_context_analysis: Option<bool>,
pub ocr: Option<bool>,
pub payload_logging: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpDocumentFingerprintEntry {
pub created_at: String,
pub enabled: bool,
pub id: String,
pub name: String,
pub updated_at: String,
}
pub type DlpEmpty = serde_json::Value;
pub type DlpEntriesCreateEntryResponse = super::shared::ApiEnvelope<Option<DlpCustomEntry>>;
pub type DlpEntriesCreateIntegrationEntryResponse =
super::shared::ApiEnvelope<Option<DlpIntegrationEntry>>;
pub type DlpEntriesCreatePredefinedEntryResponse =
super::shared::ApiEnvelope<Option<DlpPredefinedEntry>>;
pub type DlpEntriesDeleteEntryResponse = super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpEntriesDeleteIntegrationEntryResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpEntriesDeletePredefinedEntryResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpEntriesGetDlpEntryResponse =
super::shared::ApiEnvelope<Option<DlpEntryWithSharedProfiles>>;
pub type DlpEntriesListAllEntriesResponse =
super::shared::ApiEnvelope<Option<Vec<DlpEntryWithUploadStatus>>>;
pub type DlpEntriesUpdateCustomEntryResponse = super::shared::ApiEnvelope<Option<DlpCustomEntry>>;
pub type DlpEntriesUpdateEntryResponse = super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpEntriesUpdateIntegrationEntryResponse =
super::shared::ApiEnvelope<Option<DlpIntegrationEntry>>;
pub type DlpEntriesUpdatePredefinedEntryResponse =
super::shared::ApiEnvelope<Option<DlpPredefinedEntry>>;
pub type DlpEntry = serde_json::Value;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpEntryConfidence {
pub ai_context_available: bool,
pub available: bool,
}
pub type DlpEntryOfNewProfile = serde_json::Value;
pub type DlpEntryProfile = super::shared::IdNameObject2;
pub type DlpEntryUpdate = super::shared::EnabledObject;
pub type DlpEntryUpdateType = serde_json::Value;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpEntryWithSharedProfiles {
pub profiles: Vec<DlpEntryProfile>,
pub upload_status: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpEntryWithUploadStatus {
pub upload_status: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpExactDataEntry {
pub case_sensitive: bool,
pub created_at: String,
pub enabled: bool,
pub id: String,
pub name: String,
pub secret: bool,
pub updated_at: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpIntegrationEntry {
pub created_at: String,
pub enabled: bool,
pub id: String,
pub name: String,
pub profile_id: Option<String>,
pub updated_at: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpIntegrationProfile {
pub created_at: String,
pub description: Option<String>,
pub entries: Vec<serde_json::Value>,
pub id: String,
pub name: String,
pub shared_entries: Vec<serde_json::Value>,
pub updated_at: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpLimits {
pub max_dataset_cells: i64,
}
pub type DlpLimitsGetResponse = super::shared::ApiEnvelope<Option<DlpLimits>>;
pub type DlpMessages = Vec<std::collections::HashMap<String, serde_json::Value>>;
pub type DlpNewCustomEntry = DlpCustomEntryUpdate;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpNewCustomEntryWithId {
pub description: Option<String>,
pub enabled: bool,
pub entry_id: String,
pub name: String,
pub pattern: DlpPattern,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpNewCustomProfile {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: Option<i64>,
pub confidence_threshold: Option<String>,
pub context_awareness: Option<DlpContextAwareness>,
pub data_classes: Option<Vec<String>>,
pub data_tags: Option<Vec<String>>,
pub description: Option<String>,
pub entries: Option<Vec<serde_json::Value>>,
pub name: String,
pub ocr_enabled: Option<bool>,
pub sensitivity_levels: Option<Vec<DlpSensitivityLevelRef>>,
pub shared_entries: Option<Vec<DlpNewSharedEntry>>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpNewEntry {
pub description: Option<String>,
pub enabled: bool,
pub name: String,
pub pattern: DlpPattern,
pub profile_id: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpNewPredefinedEntry {
pub enabled: bool,
pub entry_id: String,
pub profile_id: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpNewPredefinedProfile {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: Option<i64>,
pub confidence_threshold: Option<String>,
pub context_awareness: Option<DlpContextAwareness>,
pub entries: Option<Vec<DlpPredefinedProfileEntryUpdate>>,
pub ocr_enabled: Option<bool>,
pub profile_id: String,
}
pub type DlpNewSharedEntry = super::shared::EnabledEntryIdObject;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpNewWordListEntry {
pub enabled: bool,
pub name: String,
pub words: Vec<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPattern {
pub regex: String,
pub validation: Option<serde_json::Value>,
}
pub type DlpPatternValidateResponse = super::shared::ApiEnvelope<Option<DlpRegexValidationResult>>;
pub type DlpPayloadLogSetting = super::shared::MaskingLevelPublicKeyUpdatedAtObject;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPredefinedEntry {
pub confidence: DlpEntryConfidence,
pub enabled: bool,
pub id: String,
pub name: String,
pub profile_id: Option<String>,
pub variant: Option<serde_json::Value>,
}
pub type DlpPredefinedEntryUpdate = super::shared::EnabledObject;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPredefinedProfile {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: i64,
pub confidence_threshold: Option<serde_json::Value>,
pub context_awareness: Option<DlpContextAwareness>,
pub entries: Vec<serde_json::Value>,
pub id: String,
pub name: String,
pub ocr_enabled: Option<bool>,
pub open_access: Option<bool>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPredefinedProfileConfig {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: i64,
pub confidence_threshold: Option<String>,
pub enabled_entries: Vec<String>,
pub entries: Vec<serde_json::Value>,
pub id: String,
pub name: String,
pub ocr_enabled: Option<bool>,
pub open_access: Option<bool>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPredefinedProfileConfigUpdate {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: Option<i64>,
pub confidence_threshold: Option<String>,
pub enabled_entries: Option<Vec<String>>,
pub entries: Option<Vec<DlpPredefinedProfileEntryUpdate>>,
pub ocr_enabled: Option<bool>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPredefinedProfileEntryUpdate {
pub enabled: bool,
pub id: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpPredefinedProfileUpdate {
pub ai_context_enabled: Option<bool>,
pub allowed_match_count: Option<i64>,
pub confidence_threshold: Option<String>,
pub context_awareness: Option<DlpContextAwareness>,
pub entries: Option<Vec<DlpPredefinedProfileEntryUpdate>>,
pub ocr_enabled: Option<bool>,
}
pub type DlpProfile = serde_json::Value;
pub type DlpProfileArray = Vec<serde_json::Value>;
pub type DlpProfileEntryUpdate = serde_json::Value;
pub type DlpProfilesCreateCustomProfilesResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesCreatePredefinedProfileConfigResponse =
super::shared::ApiEnvelope<Option<DlpPredefinedProfileConfig>>;
pub type DlpProfilesCreatePredefinedProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesDeleteCustomProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesDeletePredefinedProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesGetCustomProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesGetDlpProfileResponse = super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesGetPredefinedProfileConfigResponse =
super::shared::ApiEnvelope<Option<DlpPredefinedProfileConfig>>;
pub type DlpProfilesGetPredefinedProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesListAllCustomProfilesResponse =
super::shared::ApiEnvelope<Option<Vec<DlpCustomProfile>>>;
pub type DlpProfilesListAllProfilesResponse =
super::shared::ApiEnvelope<Option<Vec<serde_json::Value>>>;
pub type DlpProfilesUpdateCustomProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
pub type DlpProfilesUpdatePredefinedProfileConfigResponse =
super::shared::ApiEnvelope<Option<DlpPredefinedProfileConfig>>;
pub type DlpProfilesUpdatePredefinedProfileResponse =
super::shared::ApiEnvelope<Option<serde_json::Value>>;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpRegexValidationQuery {
pub max_match_bytes: Option<i64>,
pub regex: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpRegexValidationResult {
pub valid: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpSensitivityLevelRef {
pub group_id: String,
pub level_id: String,
}
pub type DlpSettingsDeleteResponse = super::shared::ApiEnvelope<Option<DlpDlpSettings>>;
pub type DlpSettingsEditResponse = super::shared::ApiEnvelope<Option<DlpDlpSettings>>;
pub type DlpSettingsGetResponse = super::shared::ApiEnvelope<Option<DlpDlpSettings>>;
pub type DlpSettingsUpdateResponse = super::shared::ApiEnvelope<Option<DlpDlpSettings>>;
pub type DlpSharedEntryUpdate = super::shared::EnabledEntryIdObject;
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpSkipConfig {
pub files: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonHash)]
pub struct DlpWordListEntry {
pub created_at: String,
pub enabled: bool,
pub id: String,
pub name: String,
pub profile_id: Option<String>,
pub updated_at: String,
pub word_list: serde_json::Value,
}
pub type DlpDatasetsReadAllArgs = super::shared::AccountIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpDatasetsCreateArgs {
pub account_id: String,
pub body: DlpDatasetsCreateRequest,
}
pub type DlpDatasetsReadArgs = super::shared::AccountIdDatasetIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpDatasetsUpdateArgs {
pub account_id: String,
pub dataset_id: String,
pub body: DlpDatasetsUpdateRequest,
}
pub type DlpDatasetsDeleteArgs = super::shared::AccountIdDatasetIdArgs;
pub type DlpDatasetsCreateVersionArgs = super::shared::AccountIdDatasetIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpDatasetsUploadVersionArgs {
pub account_id: String,
pub dataset_id: String,
pub version: String,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpDatasetsDefineColumnsArgs {
pub account_id: String,
pub dataset_id: String,
pub version: String,
pub body: Vec<DlpDatasetsDefineColumnsRequestItem>,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpDatasetsUploadDatasetColumnArgs {
pub account_id: String,
pub dataset_id: String,
pub version: String,
pub entry_id: String,
}
pub type DlpEntriesListAllEntriesArgs = super::shared::AccountIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpEntriesCreateEntryArgs {
pub account_id: String,
pub body: DlpNewEntry,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpEntriesUpdateCustomEntryArgs {
pub account_id: String,
pub entry_id: String,
pub body: DlpCustomEntryUpdate,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpEntriesCreateIntegrationEntryArgs {
pub account_id: String,
pub body: DlpNewPredefinedEntry,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpEntriesUpdateIntegrationEntryArgs {
pub account_id: String,
pub entry_id: String,
pub body: DlpPredefinedEntryUpdate,
}
pub type DlpEntriesDeleteIntegrationEntryArgs = super::shared::AccountIdEntryIdArgs;
pub type DlpEntriesCreatePredefinedEntryArgs = DlpEntriesCreateIntegrationEntryArgs;
pub type DlpEntriesUpdatePredefinedEntryArgs = DlpEntriesUpdateIntegrationEntryArgs;
pub type DlpEntriesDeletePredefinedEntryArgs = super::shared::AccountIdEntryIdArgs;
pub type DlpEntriesGetDlpEntryArgs = super::shared::AccountIdEntryIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpEntriesUpdateEntryArgs {
pub account_id: String,
pub entry_id: String,
pub body: DlpEntryUpdate,
}
pub type DlpEntriesDeleteEntryArgs = super::shared::AccountIdEntryIdArgs;
pub type DlpLimitsGetArgs = super::shared::AccountIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpPatternValidateArgs {
pub account_id: String,
pub body: DlpRegexValidationQuery,
}
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpProfilesListAllProfilesArgs {
pub account_id: String,
pub all: Option<String>,
}
pub type DlpProfilesListAllCustomProfilesArgs = super::shared::AccountIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpProfilesCreateCustomProfilesArgs {
pub account_id: String,
pub body: DlpNewCustomProfile,
}
pub type DlpProfilesGetCustomProfileArgs = super::shared::AccountIdProfileIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpProfilesUpdateCustomProfileArgs {
pub account_id: String,
pub profile_id: String,
pub body: DlpCustomProfileUpdate,
}
pub type DlpProfilesDeleteCustomProfileArgs = super::shared::AccountIdProfileIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpProfilesCreatePredefinedProfileArgs {
pub account_id: String,
pub body: DlpNewPredefinedProfile,
}
pub type DlpProfilesGetPredefinedProfileArgs = super::shared::AccountIdProfileIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpProfilesUpdatePredefinedProfileArgs {
pub account_id: String,
pub profile_id: String,
pub body: DlpPredefinedProfileUpdate,
}
pub type DlpProfilesDeletePredefinedProfileArgs = super::shared::AccountIdProfileIdArgs;
pub type DlpProfilesGetPredefinedProfileConfigArgs = super::shared::AccountIdProfileIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpProfilesCreatePredefinedProfileConfigArgs {
pub account_id: String,
pub profile_id: String,
pub body: DlpPredefinedProfileConfigUpdate,
}
pub type DlpProfilesUpdatePredefinedProfileConfigArgs =
DlpProfilesCreatePredefinedProfileConfigArgs;
pub type DlpProfilesGetDlpProfileArgs = super::shared::AccountIdProfileIdArgs;
pub type DlpSettingsGetArgs = super::shared::AccountIdArgs;
#[derive(Debug, Clone, Default, Serialize, JsonHash)]
pub struct DlpSettingsUpdateArgs {
pub account_id: String,
pub body: DlpDlpSettingsUpdate,
}
pub type DlpSettingsEditArgs = DlpSettingsUpdateArgs;
pub type DlpSettingsDeleteArgs = super::shared::AccountIdArgs;
pub async fn dlp_datasets_read_all_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsReadAllArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsReadAllResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/datasets", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_create_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsCreateArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsCreateResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/datasets", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_read_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsReadArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsReadResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}",
args.account_id, args.dataset_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_update_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsUpdateArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsUpdateResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}",
args.account_id, args.dataset_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_delete_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsDeleteArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<()>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}",
args.account_id, args.dataset_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_without_body(client.into(), builder.build()).await
}
pub async fn dlp_datasets_create_version_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsCreateVersionArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsCreateVersionResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}/upload",
args.account_id, args.dataset_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_upload_version_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsUploadVersionArgs,
base_url: &str,
body: foundation_netio::shared::http::SendSafeBody,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsUploadVersionResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}/upload/{}",
args.account_id, args.dataset_id, args.version,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = super::shared::with_raw_body(builder, "application/octet-stream", body);
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_define_columns_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsDefineColumnsArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsDefineColumnsResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}/versions/{}",
args.account_id, args.dataset_id, args.version,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_datasets_upload_dataset_column_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpDatasetsUploadDatasetColumnArgs,
base_url: &str,
body: foundation_netio::shared::http::SendSafeBody,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpDatasetsUploadDatasetColumnResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/datasets/{}/versions/{}/entries/{}",
args.account_id, args.dataset_id, args.version, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = super::shared::with_raw_body(builder, "application/octet-stream", body);
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_list_all_entries_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesListAllEntriesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesListAllEntriesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/entries", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_create_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesCreateEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesCreateEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/entries", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_update_custom_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesUpdateCustomEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesUpdateCustomEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/custom/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_create_integration_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesCreateIntegrationEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesCreateIntegrationEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/entries/integration", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_update_integration_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesUpdateIntegrationEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesUpdateIntegrationEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/integration/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_delete_integration_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesDeleteIntegrationEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesDeleteIntegrationEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/integration/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_create_predefined_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesCreatePredefinedEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesCreatePredefinedEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/entries/predefined", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_update_predefined_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesUpdatePredefinedEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesUpdatePredefinedEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/predefined/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_delete_predefined_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesDeletePredefinedEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesDeletePredefinedEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/predefined/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_get_dlp_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesGetDlpEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesGetDlpEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_update_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesUpdateEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesUpdateEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_entries_delete_entry_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpEntriesDeleteEntryArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpEntriesDeleteEntryResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/entries/{}",
args.account_id, args.entry_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_limits_get_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpLimitsGetArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpLimitsGetResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/limits", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_pattern_validate_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpPatternValidateArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpPatternValidateResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/patterns/validate", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_list_all_profiles_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesListAllProfilesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesListAllProfilesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/profiles", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder.query("all", args.all.as_deref());
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_list_all_custom_profiles_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesListAllCustomProfilesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesListAllCustomProfilesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/profiles/custom", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_create_custom_profiles_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesCreateCustomProfilesArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesCreateCustomProfilesResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/profiles/custom", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_get_custom_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesGetCustomProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesGetCustomProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/custom/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_update_custom_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesUpdateCustomProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesUpdateCustomProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/custom/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_delete_custom_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesDeleteCustomProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesDeleteCustomProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/custom/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_create_predefined_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesCreatePredefinedProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesCreatePredefinedProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/profiles/predefined", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_get_predefined_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesGetPredefinedProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesGetPredefinedProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/predefined/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_update_predefined_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesUpdatePredefinedProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesUpdatePredefinedProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/predefined/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_delete_predefined_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesDeletePredefinedProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesDeletePredefinedProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/predefined/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_get_predefined_profile_config_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesGetPredefinedProfileConfigArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesGetPredefinedProfileConfigResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/predefined/{}/config",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_create_predefined_profile_config_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesCreatePredefinedProfileConfigArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesCreatePredefinedProfileConfigResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/predefined/{}/config",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::post(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_update_predefined_profile_config_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesUpdatePredefinedProfileConfigArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesUpdatePredefinedProfileConfigResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/predefined/{}/config",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_profiles_get_dlp_profile_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpProfilesGetDlpProfileArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpProfilesGetDlpProfileResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!(
"/accounts/{}/dlp/profiles/{}",
args.account_id, args.profile_id,
);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_settings_get_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpSettingsGetArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpSettingsGetResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/settings", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::get(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_settings_update_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpSettingsUpdateArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpSettingsUpdateResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/settings", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::put(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_settings_edit_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpSettingsEditArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpSettingsEditResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/settings", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::patch(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
builder = builder
.body_json(&args.body)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}
pub async fn dlp_settings_delete_request<F>(
client: impl Into<super::shared::ApiClient>,
args: &DlpSettingsDeleteArgs,
base_url: &str,
builder_mod: Option<F>,
) -> Result<ApiResponse<DlpSettingsDeleteResponse>, super::shared::ApiError>
where
F: FnOnce(&mut PreparedRequestBuilder),
{
let path = format!("/accounts/{}/dlp/settings", args.account_id,);
let endpoint_url = format!("{}{}", base_url, path);
let mut builder = PreparedRequestBuilder::delete(&endpoint_url)
.map_err(|e| super::shared::ApiError::RequestBuildFailed(e.to_string()))?;
if let Some(f) = builder_mod {
f(&mut builder);
}
super::shared::send_json(client.into(), builder.build()).await
}