vapi_client/models/
create_google_credential_dto.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateGoogleCredentialDto {
17    /// This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey
18    #[serde(rename = "provider")]
19    pub provider: Provider,
20    /// This is not returned in the API.
21    #[serde(rename = "apiKey")]
22    pub api_key: String,
23    /// This is the name of credential. This is just for your reference.
24    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
25    pub name: Option<String>,
26}
27
28impl CreateGoogleCredentialDto {
29    pub fn new(provider: Provider, api_key: String) -> CreateGoogleCredentialDto {
30        CreateGoogleCredentialDto {
31            provider,
32            api_key,
33            name: None,
34        }
35    }
36}
37/// This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Provider {
40    #[serde(rename = "google")]
41    Google,
42}
43
44impl Default for Provider {
45    fn default() -> Provider {
46        Self::Google
47    }
48}