doppler-rs 0.0.1

Unofficial client library for the Doppler API - secure secrets management platform
Documentation
/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0-oas3.1
 * 
 * Generated by: https://openapi-generator.tech
 */

/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0-oas3.1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};
use chrono::{DateTime, NaiveDate, Utc};
/// WebhookAuthentication
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookAuthentication {
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String >,
    /// Used when type = Bearer
    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
    pub token: Option<String >,
    /// Used when type = Basic
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String >,
    /// Used when type = Basic
    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
    pub password: Option<String >,
}

impl WebhookAuthentication {
    pub fn new() -> WebhookAuthentication {
        WebhookAuthentication {
            r#type: None,
            token: None,
            username: None,
            password: None,
        }
    }
}
/// String enumeration
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "None")]
    None,
    #[serde(rename = "Bearer")]
    Bearer,
    #[serde(rename = "Basic")]
    Basic,
}

impl Default for Type {
    fn default() -> Type {
        Self::None
    }
}