Skip to main content

doppler_rs/models/
webhook_authentication.rs

1/*
2 * Core
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0-oas3.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/*
12 * Core
13 *
14 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15 *
16 * The version of the OpenAPI document: 1.0.0-oas3.1
17 * 
18 * Generated by: https://openapi-generator.tech
19 */
20
21use crate::models;
22use serde::{Deserialize, Serialize};
23use chrono::{DateTime, NaiveDate, Utc};
24/// WebhookAuthentication
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct WebhookAuthentication {
27    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
28    pub r#type: Option<String >,
29    /// Used when type = Bearer
30    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
31    pub token: Option<String >,
32    /// Used when type = Basic
33    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
34    pub username: Option<String >,
35    /// Used when type = Basic
36    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
37    pub password: Option<String >,
38}
39
40impl WebhookAuthentication {
41    pub fn new() -> WebhookAuthentication {
42        WebhookAuthentication {
43            r#type: None,
44            token: None,
45            username: None,
46            password: None,
47        }
48    }
49}
50/// String enumeration
51#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
52pub enum Type {
53    #[serde(rename = "None")]
54    None,
55    #[serde(rename = "Bearer")]
56    Bearer,
57    #[serde(rename = "Basic")]
58    Basic,
59}
60
61impl Default for Type {
62    fn default() -> Type {
63        Self::None
64    }
65}
66