#[non_exhaustive]pub struct CreateBatchRequest {
pub parent: String,
pub batch: Option<Batch>,
pub batch_id: String,
pub request_id: String,
/* private fields */
}Expand description
A request to create a batch workload.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent resource where this batch will be created.
batch: Option<Batch>Required. The batch to create.
batch_id: StringOptional. The ID to use for the batch, which will become the final component of the batch’s resource name.
This value must be 4-63 characters. Valid characters are /[a-z][0-9]-/.
request_id: StringOptional. A unique ID used to identify the request. If the service
receives two
CreateBatchRequests with the same request_id, the second request is
ignored and the operation that corresponds to the first Batch created and
stored in the backend is returned.
Recommendation: Set this value to a UUID.
The value must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Implementations§
Source§impl CreateBatchRequest
impl CreateBatchRequest
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_batch<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_batch<T>(self, v: Option<T>) -> Self
Sourcepub fn set_batch_id<T: Into<String>>(self, v: T) -> Self
pub fn set_batch_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_request_id<T: Into<String>>(self, v: T) -> Self
pub fn set_request_id<T: Into<String>>(self, v: T) -> Self
Sets the value of request_id.
§Example
let x = CreateBatchRequest::new().set_request_id("example");Trait Implementations§
Source§impl Clone for CreateBatchRequest
impl Clone for CreateBatchRequest
Source§fn clone(&self) -> CreateBatchRequest
fn clone(&self) -> CreateBatchRequest
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 CreateBatchRequest
impl Debug for CreateBatchRequest
Source§impl Default for CreateBatchRequest
impl Default for CreateBatchRequest
Source§fn default() -> CreateBatchRequest
fn default() -> CreateBatchRequest
Source§impl Message for CreateBatchRequest
impl Message for CreateBatchRequest
Source§impl PartialEq for CreateBatchRequest
impl PartialEq for CreateBatchRequest
impl StructuralPartialEq for CreateBatchRequest
Auto Trait Implementations§
impl Freeze for CreateBatchRequest
impl RefUnwindSafe for CreateBatchRequest
impl Send for CreateBatchRequest
impl Sync for CreateBatchRequest
impl Unpin for CreateBatchRequest
impl UnsafeUnpin for CreateBatchRequest
impl UnwindSafe for CreateBatchRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request