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