pub struct BatchCreateParams {
pub requests: Vec<BatchRequest>,
pub metadata: HashMap<String, String>,
pub completion_window: Option<u32>,
}
Expand description
Parameters for creating a new batch
Fields§
§requests: Vec<BatchRequest>
Array of individual requests
metadata: HashMap<String, String>
Custom metadata for the batch
completion_window: Option<u32>
Completion window for the batch (in hours, default 24)
Implementations§
Source§impl BatchCreateParams
impl BatchCreateParams
Sourcepub fn new(requests: Vec<BatchRequest>) -> Self
pub fn new(requests: Vec<BatchRequest>) -> Self
Create new batch parameters
Sourcepub fn with_metadata(self, metadata: HashMap<String, String>) -> Self
pub fn with_metadata(self, metadata: HashMap<String, String>) -> Self
Add metadata to the batch
Sourcepub fn with_completion_window(self, hours: u32) -> Self
pub fn with_completion_window(self, hours: u32) -> Self
Set completion window in hours
Trait Implementations§
Source§impl Clone for BatchCreateParams
impl Clone for BatchCreateParams
Source§fn clone(&self) -> BatchCreateParams
fn clone(&self) -> BatchCreateParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BatchCreateParams
impl Debug for BatchCreateParams
Source§impl<'de> Deserialize<'de> for BatchCreateParams
impl<'de> Deserialize<'de> for BatchCreateParams
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BatchCreateParams
impl RefUnwindSafe for BatchCreateParams
impl Send for BatchCreateParams
impl Sync for BatchCreateParams
impl Unpin for BatchCreateParams
impl UnwindSafe for BatchCreateParams
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
Mutably borrows from an owned value. Read more