Skip to main content

nautobot_openapi/models/
http_method_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 HttpMethodEnum {
14    #[serde(rename = "GET")]
15    Get,
16    #[serde(rename = "POST")]
17    Post,
18    #[serde(rename = "PUT")]
19    Put,
20    #[serde(rename = "PATCH")]
21    Patch,
22    #[serde(rename = "DELETE")]
23    Delete,
24}
25
26impl ToString for HttpMethodEnum {
27    fn to_string(&self) -> String {
28        match self {
29            Self::Get => String::from("GET"),
30            Self::Post => String::from("POST"),
31            Self::Put => String::from("PUT"),
32            Self::Patch => String::from("PATCH"),
33            Self::Delete => String::from("DELETE"),
34        }
35    }
36}
37
38impl Default for HttpMethodEnum {
39    fn default() -> HttpMethodEnum {
40        Self::Get
41    }
42}