vapi_client/models/
s3_credential.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 S3Credential {
16    /// Credential provider. Only allowed value is s3
17    #[serde(rename = "provider")]
18    pub provider: ProviderTrue,
19    /// AWS access key ID.
20    #[serde(rename = "awsAccessKeyId")]
21    pub aws_access_key_id: String,
22    /// AWS access key secret. This is not returned in the API.
23    #[serde(rename = "awsSecretAccessKey")]
24    pub aws_secret_access_key: String,
25    /// AWS region in which the S3 bucket is located.
26    #[serde(rename = "region")]
27    pub region: String,
28    /// AWS S3 bucket name.
29    #[serde(rename = "s3BucketName")]
30    pub s3_bucket_name: String,
31    /// The path prefix for the uploaded recording. Ex. \"recordings/\"
32    #[serde(rename = "s3PathPrefix")]
33    pub s3_path_prefix: String,
34    /// This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.
35    #[serde(rename = "fallbackIndex", skip_serializing_if = "Option::is_none")]
36    pub fallback_index: Option<f64>,
37    /// This is the unique identifier for the credential.
38    #[serde(rename = "id")]
39    pub id: String,
40    /// This is the unique identifier for the org that this credential belongs to.
41    #[serde(rename = "orgId")]
42    pub org_id: String,
43    /// This is the ISO 8601 date-time string of when the credential was created.
44    #[serde(rename = "createdAt")]
45    pub created_at: String,
46    /// This is the ISO 8601 date-time string of when the assistant was last updated.
47    #[serde(rename = "updatedAt")]
48    pub updated_at: String,
49    /// This is the name of credential. This is just for your reference.
50    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
51    pub name: Option<String>,
52}
53
54impl S3Credential {
55    pub fn new(
56        provider: ProviderTrue,
57        aws_access_key_id: String,
58        aws_secret_access_key: String,
59        region: String,
60        s3_bucket_name: String,
61        s3_path_prefix: String,
62        id: String,
63        org_id: String,
64        created_at: String,
65        updated_at: String,
66    ) -> S3Credential {
67        S3Credential {
68            provider,
69            aws_access_key_id,
70            aws_secret_access_key,
71            region,
72            s3_bucket_name,
73            s3_path_prefix,
74            fallback_index: None,
75            id,
76            org_id,
77            created_at,
78            updated_at,
79            name: None,
80        }
81    }
82}
83/// Credential provider. Only allowed value is s3
84#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
85pub enum ProviderTrue {
86    #[serde(rename = "s3")]
87    S3,
88}
89
90impl Default for ProviderTrue {
91    fn default() -> ProviderTrue {
92        Self::S3
93    }
94}