#[non_exhaustive]pub struct CreateWorkloadRequest {
pub parent: String,
pub workload: Option<Workload>,
pub external_id: String,
/* private fields */
}Expand description
Request for creating a workload.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The resource name of the new Workload’s parent.
Must be of the form organizations/{org_id}/locations/{location_id}.
workload: Option<Workload>Required. Assured Workload to create
external_id: StringOptional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value.
Implementations§
Source§impl CreateWorkloadRequest
impl CreateWorkloadRequest
pub fn new() -> Self
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_workload<T>(self, v: T) -> Self
pub fn set_workload<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_workload<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_workload<T>(self, v: Option<T>) -> Self
Sourcepub fn set_external_id<T: Into<String>>(self, v: T) -> Self
pub fn set_external_id<T: Into<String>>(self, v: T) -> Self
Sets the value of external_id.
§Example
ⓘ
let x = CreateWorkloadRequest::new().set_external_id("example");Trait Implementations§
Source§impl Clone for CreateWorkloadRequest
impl Clone for CreateWorkloadRequest
Source§fn clone(&self) -> CreateWorkloadRequest
fn clone(&self) -> CreateWorkloadRequest
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 CreateWorkloadRequest
impl Debug for CreateWorkloadRequest
Source§impl Default for CreateWorkloadRequest
impl Default for CreateWorkloadRequest
Source§fn default() -> CreateWorkloadRequest
fn default() -> CreateWorkloadRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateWorkloadRequest
impl Message for CreateWorkloadRequest
Source§impl PartialEq for CreateWorkloadRequest
impl PartialEq for CreateWorkloadRequest
impl StructuralPartialEq for CreateWorkloadRequest
Auto Trait Implementations§
impl Freeze for CreateWorkloadRequest
impl RefUnwindSafe for CreateWorkloadRequest
impl Send for CreateWorkloadRequest
impl Sync for CreateWorkloadRequest
impl Unpin for CreateWorkloadRequest
impl UnsafeUnpin for CreateWorkloadRequest
impl UnwindSafe for CreateWorkloadRequest
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