fusionauth_rust_client/models/
http_method.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.55.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// HttpMethod : 
15/// 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum HttpMethod {
18    #[serde(rename = "GET")]
19    Get,
20    #[serde(rename = "POST")]
21    Post,
22    #[serde(rename = "PUT")]
23    Put,
24    #[serde(rename = "DELETE")]
25    Delete,
26    #[serde(rename = "HEAD")]
27    Head,
28    #[serde(rename = "OPTIONS")]
29    Options,
30    #[serde(rename = "PATCH")]
31    Patch,
32
33}
34
35impl std::fmt::Display for HttpMethod {
36    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
37        match self {
38            Self::Get => write!(f, "GET"),
39            Self::Post => write!(f, "POST"),
40            Self::Put => write!(f, "PUT"),
41            Self::Delete => write!(f, "DELETE"),
42            Self::Head => write!(f, "HEAD"),
43            Self::Options => write!(f, "OPTIONS"),
44            Self::Patch => write!(f, "PATCH"),
45        }
46    }
47}
48
49impl Default for HttpMethod {
50    fn default() -> HttpMethod {
51        Self::Get
52    }
53}
54