vapi_client/models/
squad.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 Squad {
17    /// This is the name of the squad.
18    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19    pub name: Option<String>,
20    /// This is the list of assistants that make up the squad.  The call will start with the first assistant in the list.
21    #[serde(rename = "members")]
22    pub members: Vec<models::SquadMemberDto>,
23    /// This can be used to override all the assistants' settings and provide values for their template variables.  Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override.
24    #[serde(rename = "membersOverrides", skip_serializing_if = "Option::is_none")]
25    pub members_overrides: Option<models::AssistantOverrides>,
26    /// This is the unique identifier for the squad.
27    #[serde(rename = "id")]
28    pub id: String,
29    /// This is the unique identifier for the org that this squad belongs to.
30    #[serde(rename = "orgId")]
31    pub org_id: String,
32    /// This is the ISO 8601 date-time string of when the squad was created.
33    #[serde(rename = "createdAt")]
34    pub created_at: String,
35    /// This is the ISO 8601 date-time string of when the squad was last updated.
36    #[serde(rename = "updatedAt")]
37    pub updated_at: String,
38}
39
40impl Squad {
41    pub fn new(
42        members: Vec<models::SquadMemberDto>,
43        id: String,
44        org_id: String,
45        created_at: String,
46        updated_at: String,
47    ) -> Squad {
48        Squad {
49            name: None,
50            members,
51            members_overrides: None,
52            id,
53            org_id,
54            created_at,
55            updated_at,
56        }
57    }
58}