langgraph_api/generated/models/
runs_cancel.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/// RunsCancel : Payload for cancelling runs.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RunsCancel {
17    /// Filter runs by status to cancel. Must be one of 'pending', 'running', or 'all'.
18    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
19    pub status: Option<Status>,
20    /// The ID of the thread containing runs to cancel.
21    #[serde(rename = "thread_id", skip_serializing_if = "Option::is_none")]
22    pub thread_id: Option<uuid::Uuid>,
23    /// List of run IDs to cancel.
24    #[serde(rename = "run_ids", skip_serializing_if = "Option::is_none")]
25    pub run_ids: Option<Vec<uuid::Uuid>>,
26}
27
28impl RunsCancel {
29    /// Payload for cancelling runs.
30    pub fn new() -> RunsCancel {
31        RunsCancel {
32            status: None,
33            thread_id: None,
34            run_ids: None,
35        }
36    }
37}
38/// Filter runs by status to cancel. Must be one of 'pending', 'running', or 'all'.
39#[derive(
40    Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize,
41)]
42pub enum Status {
43    #[serde(rename = "pending")]
44    #[default]
45    Pending,
46    #[serde(rename = "running")]
47    Running,
48    #[serde(rename = "all")]
49    All,
50}