Skip to main content

mistral_openapi_client/models/
resource_visibility.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum ResourceVisibility {
17    #[serde(rename = "shared_global")]
18    SharedGlobal,
19    #[serde(rename = "shared_org")]
20    SharedOrg,
21    #[serde(rename = "shared_workspace")]
22    SharedWorkspace,
23    #[serde(rename = "private")]
24    Private,
25
26}
27
28impl std::fmt::Display for ResourceVisibility {
29    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30        match self {
31            Self::SharedGlobal => write!(f, "shared_global"),
32            Self::SharedOrg => write!(f, "shared_org"),
33            Self::SharedWorkspace => write!(f, "shared_workspace"),
34            Self::Private => write!(f, "private"),
35        }
36    }
37}
38
39impl Default for ResourceVisibility {
40    fn default() -> ResourceVisibility {
41        Self::SharedGlobal
42    }
43}
44