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: Provider,
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 unique identifier for the credential.
35    #[serde(rename = "id")]
36    pub id: String,
37    /// This is the unique identifier for the org that this credential belongs to.
38    #[serde(rename = "orgId")]
39    pub org_id: String,
40    /// This is the ISO 8601 date-time string of when the credential was created.
41    #[serde(rename = "createdAt")]
42    pub created_at: String,
43    /// This is the ISO 8601 date-time string of when the assistant was last updated.
44    #[serde(rename = "updatedAt")]
45    pub updated_at: String,
46    /// This is the name of credential. This is just for your reference.
47    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
48    pub name: Option<String>,
49}
50
51impl S3Credential {
52    pub fn new(provider: Provider, aws_access_key_id: String, aws_secret_access_key: String, region: String, s3_bucket_name: String, s3_path_prefix: String, id: String, org_id: String, created_at: String, updated_at: String) -> S3Credential {
53        S3Credential {
54            provider,
55            aws_access_key_id,
56            aws_secret_access_key,
57            region,
58            s3_bucket_name,
59            s3_path_prefix,
60            id,
61            org_id,
62            created_at,
63            updated_at,
64            name: None,
65        }
66    }
67}
68/// Credential provider. Only allowed value is s3
69#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum Provider {
71    #[serde(rename = "s3")]
72    S3,
73}
74
75impl Default for Provider {
76    fn default() -> Provider {
77        Self::S3
78    }
79}
80