hab_rs_api_client/models/
icon_set.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 IconSet {
16    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
17    pub description: Option<String>,
18    #[serde(rename = "formats", skip_serializing_if = "Option::is_none")]
19    pub formats: Option<std::collections::HashSet<Formats>>,
20    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21    pub id: Option<String>,
22    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
23    pub label: Option<String>,
24}
25
26impl IconSet {
27    pub fn new() -> IconSet {
28        IconSet {
29            description: None,
30            formats: None,
31            id: None,
32            label: None,
33        }
34    }
35}
36///
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Formats {
39    #[serde(rename = "PNG")]
40    Png,
41    #[serde(rename = "SVG")]
42    Svg,
43}
44
45impl Default for Formats {
46    fn default() -> Formats {
47        Self::Png
48    }
49}