vapi_client/models/
o_auth2_authentication_plan.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct OAuth2AuthenticationPlan {
16 #[serde(rename = "type")]
17 pub r#type: Type,
18 #[serde(rename = "url")]
20 pub url: String,
21 #[serde(rename = "clientId")]
23 pub client_id: String,
24 #[serde(rename = "clientSecret")]
26 pub client_secret: String,
27 #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
29 pub scope: Option<String>,
30}
31
32impl OAuth2AuthenticationPlan {
33 pub fn new(r#type: Type, url: String, client_id: String, client_secret: String) -> OAuth2AuthenticationPlan {
34 OAuth2AuthenticationPlan {
35 r#type,
36 url,
37 client_id,
38 client_secret,
39 scope: None,
40 }
41 }
42}
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Type {
46 #[serde(rename = "oauth2")]
47 Oauth2,
48}
49
50impl Default for Type {
51 fn default() -> Type {
52 Self::Oauth2
53 }
54}
55