#[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
Source§fn eq(&self, other: &CreateBatchRequest) -> bool
fn eq(&self, other: &CreateBatchRequest) -> bool
self and other values to be equal, and is used by ==.