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<Box<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(members: Vec<models::SquadMemberDto>, id: String, org_id: String, created_at: String, updated_at: String) -> Squad {
41        Squad {
42            name: None,
43            members,
44            members_overrides: None,
45            id,
46            org_id,
47            created_at,
48            updated_at,
49        }
50    }
51}
52