Skip to main content

hab_rs_api_client/models/
template.rs

1/*
2 * openHAB REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 8
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Template {
16    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
17    pub description: Option<String>,
18    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
19    pub label: Option<String>,
20    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
21    pub tags: Option<Vec<String>>,
22    #[serde(rename = "uid", skip_serializing_if = "Option::is_none")]
23    pub uid: Option<String>,
24    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
25    pub visibility: Option<Visibility>,
26}
27
28impl Template {
29    pub fn new() -> Template {
30        Template {
31            description: None,
32            label: None,
33            tags: None,
34            uid: None,
35            visibility: None,
36        }
37    }
38}
39///
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Visibility {
42    #[serde(rename = "VISIBLE")]
43    Visible,
44    #[serde(rename = "HIDDEN")]
45    Hidden,
46    #[serde(rename = "EXPERT")]
47    Expert,
48}
49
50impl Default for Visibility {
51    fn default() -> Visibility {
52        Self::Visible
53    }
54}