vapi_client/models/
create_slack_o_auth2_authorization_credential_dto.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateSlackOAuth2AuthorizationCredentialDto {
16    #[serde(rename = "provider")]
17    pub provider: Provider,
18    /// The authorization ID for the OAuth2 authorization
19    #[serde(rename = "authorizationId")]
20    pub authorization_id: String,
21    /// This is the name of credential. This is just for your reference.
22    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
23    pub name: Option<String>,
24}
25
26impl CreateSlackOAuth2AuthorizationCredentialDto {
27    pub fn new(provider: Provider, authorization_id: String) -> CreateSlackOAuth2AuthorizationCredentialDto {
28        CreateSlackOAuth2AuthorizationCredentialDto {
29            provider,
30            authorization_id,
31            name: None,
32        }
33    }
34}
35/// 
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Provider {
38    #[serde(rename = "slack.oauth2-authorization")]
39    SlackPeriodOauth2Authorization,
40}
41
42impl Default for Provider {
43    fn default() -> Provider {
44        Self::SlackPeriodOauth2Authorization
45    }
46}
47