#![allow(unused_imports, clippy::too_many_arguments)]
use reqwest::Method;
use serde::{Deserialize, Serialize};
use crate::client::{Client, Request, NO_BODY, NO_QUERY};
use crate::error::Result;
use crate::generated::models;
use crate::multipart::{field_text, FilePart};
use crate::util::encode_path;
#[derive(Debug, Clone)]
pub struct GDPRApi {
pub(crate) client: Client,
}
impl Client {
pub fn gdpr(&self) -> GDPRApi {
GDPRApi { client: self.clone() }
}
}
impl GDPRApi {
pub async fn data_subject_access(&self) -> Result<serde_json::Map<String, serde_json::Value>> {
self.client
.request_json(Request {
method: Method::GET,
path: "/api/v1/data-subject/access".to_string(),
query: NO_QUERY,
body: NO_BODY,
headers: Vec::new(),
idempotent: false,
})
.await
}
pub async fn data_subject_erasure(&self, body: &serde_json::Map<String, serde_json::Value>) -> Result<serde_json::Map<String, serde_json::Value>> {
self.client
.request_json(Request {
method: Method::POST,
path: "/api/v1/data-subject/erasure".to_string(),
query: NO_QUERY,
body: Some(body),
headers: Vec::new(),
idempotent: true,
})
.await
}
}