vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateGoHighLevelMcpCredentialDto {
    #[serde(rename = "provider")]
    pub provider: ProviderTrue,
    /// This is the authentication session for the credential.
    #[serde(rename = "authenticationSession")]
    pub authentication_session: models::Oauth2AuthenticationSession,
    /// This is the name of credential. This is just for your reference.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl CreateGoHighLevelMcpCredentialDto {
    pub fn new(
        provider: ProviderTrue,
        authentication_session: models::Oauth2AuthenticationSession,
    ) -> CreateGoHighLevelMcpCredentialDto {
        CreateGoHighLevelMcpCredentialDto {
            provider,
            authentication_session,
            name: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
    #[serde(rename = "ghl.oauth2-authorization")]
    GhlPeriodOauth2Authorization,
}

impl Default for ProviderTrue {
    fn default() -> ProviderTrue {
        Self::GhlPeriodOauth2Authorization
    }
}