Skip to main content

paperless_api/metadata/
storage_path.rs

1//! Types related to storage paths.
2
3use serde::{Deserialize, Serialize};
4
5use paperless_api_macros::CreateDto;
6
7use super::MatchAlgorithm;
8use super::permission::ItemPermissions;
9
10/// A storage path
11#[derive(Debug, Clone, Deserialize, Serialize, CreateDto)]
12#[api_info(endpoint = "storage_paths")]
13pub struct StoragePath {
14    pub id: crate::id::StoragePathId,
15    pub slug: String,
16    pub name: String,
17    pub path: String,
18
19    #[serde(rename = "match")]
20    pub match_pattern: Option<String>,
21    pub matching_algorithm: MatchAlgorithm,
22    pub is_insensitive: bool,
23
24    #[serde(default)]
25    pub document_count: u32,
26
27    pub owner: Option<crate::id::UserId>,
28
29    /// The permissions for this tag.
30    #[serde(flatten)]
31    pub permissions: ItemPermissions,
32}