mobilitydata_client/models/
license_rule.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct LicenseRule {
16 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18 pub name: Option<String>,
19 #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
21 pub label: Option<String>,
22 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24 pub description: Option<String>,
25 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
27 pub r#type: Option<Type>,
28}
29
30impl LicenseRule {
31 pub fn new() -> LicenseRule {
32 LicenseRule {
33 name: None,
34 label: None,
35 description: None,
36 r#type: None,
37 }
38 }
39}
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43 #[serde(rename = "permission")]
44 Permission,
45 #[serde(rename = "condition")]
46 Condition,
47 #[serde(rename = "limitation")]
48 Limitation,
49}
50
51impl Default for Type {
52 fn default() -> Type {
53 Self::Permission
54 }
55}
56