Skip to main content

nautobot_openapi/models/
subdevice_role_enum.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11///
12#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum SubdeviceRoleEnum {
14    #[serde(rename = "parent")]
15    Parent,
16    #[serde(rename = "child")]
17    Child,
18    #[serde(rename = "parent-child")]
19    ParentChild,
20}
21
22impl ToString for SubdeviceRoleEnum {
23    fn to_string(&self) -> String {
24        match self {
25            Self::Parent => String::from("parent"),
26            Self::Child => String::from("child"),
27            Self::ParentChild => String::from("parent-child"),
28        }
29    }
30}
31
32impl Default for SubdeviceRoleEnum {
33    fn default() -> SubdeviceRoleEnum {
34        Self::Parent
35    }
36}