vapi_client/models/
get_session_paginated_dto.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 GetSessionPaginatedDto {
16    /// This is the name of the session to filter by.
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// This is the ID of the assistant to filter sessions by.
20    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
21    pub assistant_id: Option<String>,
22    /// This is the ID of the workflow to filter sessions by.
23    #[serde(rename = "workflowId", skip_serializing_if = "Option::is_none")]
24    pub workflow_id: Option<String>,
25    /// This is the page number to return. Defaults to 1.
26    #[serde(rename = "page", skip_serializing_if = "Option::is_none")]
27    pub page: Option<f64>,
28    /// This is the sort order for pagination. Defaults to 'DESC'.
29    #[serde(rename = "sortOrder", skip_serializing_if = "Option::is_none")]
30    pub sort_order: Option<SortOrderTrue>,
31    /// This is the maximum number of items to return. Defaults to 100.
32    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
33    pub limit: Option<f64>,
34    /// This will return items where the createdAt is greater than the specified value.
35    #[serde(rename = "createdAtGt", skip_serializing_if = "Option::is_none")]
36    pub created_at_gt: Option<String>,
37    /// This will return items where the createdAt is less than the specified value.
38    #[serde(rename = "createdAtLt", skip_serializing_if = "Option::is_none")]
39    pub created_at_lt: Option<String>,
40    /// This will return items where the createdAt is greater than or equal to the specified value.
41    #[serde(rename = "createdAtGe", skip_serializing_if = "Option::is_none")]
42    pub created_at_ge: Option<String>,
43    /// This will return items where the createdAt is less than or equal to the specified value.
44    #[serde(rename = "createdAtLe", skip_serializing_if = "Option::is_none")]
45    pub created_at_le: Option<String>,
46    /// This will return items where the updatedAt is greater than the specified value.
47    #[serde(rename = "updatedAtGt", skip_serializing_if = "Option::is_none")]
48    pub updated_at_gt: Option<String>,
49    /// This will return items where the updatedAt is less than the specified value.
50    #[serde(rename = "updatedAtLt", skip_serializing_if = "Option::is_none")]
51    pub updated_at_lt: Option<String>,
52    /// This will return items where the updatedAt is greater than or equal to the specified value.
53    #[serde(rename = "updatedAtGe", skip_serializing_if = "Option::is_none")]
54    pub updated_at_ge: Option<String>,
55    /// This will return items where the updatedAt is less than or equal to the specified value.
56    #[serde(rename = "updatedAtLe", skip_serializing_if = "Option::is_none")]
57    pub updated_at_le: Option<String>,
58}
59
60impl GetSessionPaginatedDto {
61    pub fn new() -> GetSessionPaginatedDto {
62        GetSessionPaginatedDto {
63            name: None,
64            assistant_id: None,
65            workflow_id: None,
66            page: None,
67            sort_order: None,
68            limit: None,
69            created_at_gt: None,
70            created_at_lt: None,
71            created_at_ge: None,
72            created_at_le: None,
73            updated_at_gt: None,
74            updated_at_lt: None,
75            updated_at_ge: None,
76            updated_at_le: None,
77        }
78    }
79}
80/// This is the sort order for pagination. Defaults to 'DESC'.
81#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
82pub enum SortOrderTrue {
83    #[serde(rename = "ASC")]
84    Asc,
85    #[serde(rename = "DESC")]
86    Desc,
87}
88
89impl Default for SortOrderTrue {
90    fn default() -> SortOrderTrue {
91        Self::Asc
92    }
93}