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