pub struct BatchObject {Show 20 fields
pub id: String,
pub object: String,
pub endpoint: String,
pub errors: Option<BatchErrors>,
pub input_file_id: String,
pub completion_window: String,
pub status: BatchStatus,
pub output_file_id: Option<String>,
pub error_file_id: Option<String>,
pub created_at: i64,
pub in_progress_at: Option<i64>,
pub expires_at: Option<i64>,
pub finalizing_at: Option<i64>,
pub completed_at: Option<i64>,
pub failed_at: Option<i64>,
pub expired_at: Option<i64>,
pub cancelling_at: Option<i64>,
pub cancelled_at: Option<i64>,
pub request_counts: Option<RequestCounts>,
pub metadata: Option<HashMap<String, String>>,
}Expand description
A batch object representing an async batch job.
The Batch API allows you to send asynchronous groups of requests with 50% lower costs and higher rate limits.
Fields§
§id: StringThe unique identifier for the batch.
object: StringThe object type (always “batch”).
endpoint: StringThe API endpoint used for the batch.
errors: Option<BatchErrors>Any errors that occurred during batch processing.
input_file_id: StringThe ID of the input file containing the requests.
completion_window: StringThe time window for batch completion (e.g., “24h”).
status: BatchStatusThe current status of the batch.
output_file_id: Option<String>The ID of the output file containing the results.
error_file_id: Option<String>The ID of the error file containing failed requests.
created_at: i64The Unix timestamp when the batch was created.
in_progress_at: Option<i64>The Unix timestamp when processing started.
expires_at: Option<i64>The Unix timestamp when the batch expires.
finalizing_at: Option<i64>The Unix timestamp when finalization started.
completed_at: Option<i64>The Unix timestamp when the batch completed.
failed_at: Option<i64>The Unix timestamp when the batch failed.
expired_at: Option<i64>The Unix timestamp when the batch expired.
cancelling_at: Option<i64>The Unix timestamp when cancellation started.
cancelled_at: Option<i64>The Unix timestamp when the batch was cancelled.
request_counts: Option<RequestCounts>Counts of requests in different states.
metadata: Option<HashMap<String, String>>User-defined metadata attached to the batch.
Trait Implementations§
Source§impl Clone for BatchObject
impl Clone for BatchObject
Source§fn clone(&self) -> BatchObject
fn clone(&self) -> BatchObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatchObject
impl Debug for BatchObject
Source§impl<'de> Deserialize<'de> for BatchObject
impl<'de> Deserialize<'de> for BatchObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BatchObject
impl RefUnwindSafe for BatchObject
impl Send for BatchObject
impl Sync for BatchObject
impl Unpin for BatchObject
impl UnsafeUnpin for BatchObject
impl UnwindSafe for BatchObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more