nautobot_openapi/models/
subdevice_role_enum.rs1#[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}