vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetChatPaginatedDto {
    /// This is the unique identifier for the assistant that will be used for the chat.
    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
    pub assistant_id: Option<String>,
    /// This is the unique identifier for the workflow that will be used for the chat.
    #[serde(rename = "workflowId", skip_serializing_if = "Option::is_none")]
    pub workflow_id: Option<String>,
    /// This is the unique identifier for the session that will be used for the chat.
    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    /// This is the page number to return. Defaults to 1.
    #[serde(rename = "page", skip_serializing_if = "Option::is_none")]
    pub page: Option<f64>,
    /// This is the sort order for pagination. Defaults to 'DESC'.
    #[serde(rename = "sortOrder", skip_serializing_if = "Option::is_none")]
    pub sort_order: Option<SortOrderTrue>,
    /// This is the maximum number of items to return. Defaults to 100.
    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
    pub limit: Option<f64>,
    /// This will return items where the createdAt is greater than the specified value.
    #[serde(rename = "createdAtGt", skip_serializing_if = "Option::is_none")]
    pub created_at_gt: Option<String>,
    /// This will return items where the createdAt is less than the specified value.
    #[serde(rename = "createdAtLt", skip_serializing_if = "Option::is_none")]
    pub created_at_lt: Option<String>,
    /// This will return items where the createdAt is greater than or equal to the specified value.
    #[serde(rename = "createdAtGe", skip_serializing_if = "Option::is_none")]
    pub created_at_ge: Option<String>,
    /// This will return items where the createdAt is less than or equal to the specified value.
    #[serde(rename = "createdAtLe", skip_serializing_if = "Option::is_none")]
    pub created_at_le: Option<String>,
    /// This will return items where the updatedAt is greater than the specified value.
    #[serde(rename = "updatedAtGt", skip_serializing_if = "Option::is_none")]
    pub updated_at_gt: Option<String>,
    /// This will return items where the updatedAt is less than the specified value.
    #[serde(rename = "updatedAtLt", skip_serializing_if = "Option::is_none")]
    pub updated_at_lt: Option<String>,
    /// This will return items where the updatedAt is greater than or equal to the specified value.
    #[serde(rename = "updatedAtGe", skip_serializing_if = "Option::is_none")]
    pub updated_at_ge: Option<String>,
    /// This will return items where the updatedAt is less than or equal to the specified value.
    #[serde(rename = "updatedAtLe", skip_serializing_if = "Option::is_none")]
    pub updated_at_le: Option<String>,
}

impl GetChatPaginatedDto {
    pub fn new() -> GetChatPaginatedDto {
        GetChatPaginatedDto {
            assistant_id: None,
            workflow_id: None,
            session_id: None,
            page: None,
            sort_order: None,
            limit: None,
            created_at_gt: None,
            created_at_lt: None,
            created_at_ge: None,
            created_at_le: None,
            updated_at_gt: None,
            updated_at_lt: None,
            updated_at_ge: None,
            updated_at_le: None,
        }
    }
}
/// This is the sort order for pagination. Defaults to 'DESC'.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SortOrderTrue {
    #[serde(rename = "ASC")]
    Asc,
    #[serde(rename = "DESC")]
    Desc,
}

impl Default for SortOrderTrue {
    fn default() -> SortOrderTrue {
        Self::Asc
    }
}