openai_struct/models/
batch.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct Batch {
16    /// The Unix timestamp (in seconds) for when the batch was cancelled.
17    #[serde(rename = "cancelled_at")]
18    pub cancelled_at: Option<i32>,
19    /// The Unix timestamp (in seconds) for when the batch started cancelling.
20    #[serde(rename = "cancelling_at")]
21    pub cancelling_at: Option<i32>,
22    /// The Unix timestamp (in seconds) for when the batch was completed.
23    #[serde(rename = "completed_at")]
24    pub completed_at: Option<i32>,
25    /// The time frame within which the batch should be processed.
26    #[serde(rename = "completion_window")]
27    pub completion_window: String,
28    /// The Unix timestamp (in seconds) for when the batch was created.
29    #[serde(rename = "created_at")]
30    pub created_at: i32,
31    /// The OpenAI API endpoint used by the batch.
32    #[serde(rename = "endpoint")]
33    pub endpoint: String,
34    /// The ID of the file containing the outputs of requests with errors.
35    #[serde(rename = "error_file_id")]
36    pub error_file_id: Option<String>,
37    #[serde(rename = "errors")]
38    pub errors: Option<crate::models::BatchErrors>,
39    /// The Unix timestamp (in seconds) for when the batch expired.
40    #[serde(rename = "expired_at")]
41    pub expired_at: Option<i32>,
42    /// The Unix timestamp (in seconds) for when the batch will expire.
43    #[serde(rename = "expires_at")]
44    pub expires_at: Option<i32>,
45    /// The Unix timestamp (in seconds) for when the batch failed.
46    #[serde(rename = "failed_at")]
47    pub failed_at: Option<i32>,
48    /// The Unix timestamp (in seconds) for when the batch started finalizing.
49    #[serde(rename = "finalizing_at")]
50    pub finalizing_at: Option<i32>,
51    #[serde(rename = "id")]
52    pub id: String,
53    /// The Unix timestamp (in seconds) for when the batch started processing.
54    #[serde(rename = "in_progress_at")]
55    pub in_progress_at: Option<i32>,
56    /// The ID of the input file for the batch.
57    #[serde(rename = "input_file_id")]
58    pub input_file_id: String,
59    #[serde(rename = "metadata")]
60    pub metadata: Option<crate::models::Metadata>,
61    /// The object type, which is always `batch`.
62    #[serde(rename = "object")]
63    pub object: String,
64    /// The ID of the file containing the outputs of successfully executed requests.
65    #[serde(rename = "output_file_id")]
66    pub output_file_id: Option<String>,
67    #[serde(rename = "request_counts")]
68    pub request_counts: Option<crate::models::BatchRequestCounts>,
69    /// The current status of the batch.
70    #[serde(rename = "status")]
71    pub status: String,
72}