langgraph_api/generated/models/
ttl.rs

1/*
2 * LangSmith Deployment
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Ttl : The time-to-live for the thread.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Ttl {
17    /// The TTL strategy. 'delete' removes the entire thread.
18    #[serde(rename = "strategy", skip_serializing_if = "Option::is_none")]
19    pub strategy: Option<Strategy>,
20    /// The time-to-live in minutes from now until thread should be swept.
21    #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
22    pub ttl: Option<f64>,
23}
24
25impl Ttl {
26    /// The time-to-live for the thread.
27    pub fn new() -> Ttl {
28        Ttl {
29            strategy: None,
30            ttl: None,
31        }
32    }
33}
34/// The TTL strategy. 'delete' removes the entire thread.
35#[derive(
36    Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize,
37)]
38pub enum Strategy {
39    #[serde(rename = "delete")]
40    #[default]
41    Delete,
42}