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