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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct CreateGoogleCredentialDto {
19    /// This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey
20    #[serde(rename = "provider")]
21    pub provider: Provider,
22    /// This is not returned in the API.
23    #[serde(rename = "apiKey")]
24    pub api_key: String,
25    /// This is the name of credential. This is just for your reference.
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28}
29
30impl CreateGoogleCredentialDto {
31    pub fn new(provider: Provider, api_key: String) -> CreateGoogleCredentialDto {
32        CreateGoogleCredentialDto {
33            provider,
34            api_key,
35            name: None,
36        }
37    }
38}
39/// This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
41pub enum Provider {
42    #[serde(rename = "google")]
43    Google,
44}
45
46impl Default for Provider {
47    fn default() -> Provider {
48        Self::Google
49    }
50}