unofficial_appwrite/models/attribute_enum.rs
1use serde::{Deserialize, Serialize};
2use serde_json::Value;
3
4/// AttributeEnum
5#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq)]
6pub struct AttributeEnum {
7 /// Attribute Key.
8 pub key: String,
9
10 /// Attribute type.
11 #[serde(rename = "type")]
12 pub attribute_type: String,
13
14 /// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
15 pub status: String,
16
17 /// Error message. Displays error generated on failure of creating or deleting an attribute.
18 pub error: String,
19
20 /// Is attribute required?
21 pub xrequired: bool,
22
23 /// Is attribute an array?
24 pub array: Option<bool>,
25
26 /// Array of elements in enumerated type.
27 pub elements: Vec<Value>,
28
29 /// String format.
30 pub format: String,
31
32 /// Default value for attribute when not provided. Cannot be set when attribute is required.
33 pub xdefault: Option<String>,
34}