#[non_exhaustive]pub struct CreateWorkerPoolRequest {
pub parent: String,
pub worker_pool: Option<WorkerPool>,
pub worker_pool_id: String,
pub validate_only: bool,
/* private fields */
}Expand description
Request to create a new WorkerPool.
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 parent resource where this worker pool will be created.
Format: projects/{project}/locations/{location}.
worker_pool: Option<WorkerPool>Required. WorkerPool resource to create.
worker_pool_id: StringRequired. Immutable. The ID to use for the WorkerPool, which will become
the final component of the resource name.
This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.
validate_only: boolIf set, validate the request and preview the response, but do not actually post it.
Implementations§
Source§impl CreateWorkerPoolRequest
impl CreateWorkerPoolRequest
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_worker_pool<T>(self, v: T) -> Selfwhere
T: Into<WorkerPool>,
pub fn set_worker_pool<T>(self, v: T) -> Selfwhere
T: Into<WorkerPool>,
Sets the value of worker_pool.
§Example
ⓘ
use google_cloud_build_v1::model::WorkerPool;
let x = CreateWorkerPoolRequest::new().set_worker_pool(WorkerPool::default()/* use setters */);Sourcepub fn set_or_clear_worker_pool<T>(self, v: Option<T>) -> Selfwhere
T: Into<WorkerPool>,
pub fn set_or_clear_worker_pool<T>(self, v: Option<T>) -> Selfwhere
T: Into<WorkerPool>,
Sets or clears the value of worker_pool.
§Example
ⓘ
use google_cloud_build_v1::model::WorkerPool;
let x = CreateWorkerPoolRequest::new().set_or_clear_worker_pool(Some(WorkerPool::default()/* use setters */));
let x = CreateWorkerPoolRequest::new().set_or_clear_worker_pool(None::<WorkerPool>);Sourcepub fn set_worker_pool_id<T: Into<String>>(self, v: T) -> Self
pub fn set_worker_pool_id<T: Into<String>>(self, v: T) -> Self
Sets the value of worker_pool_id.
§Example
ⓘ
let x = CreateWorkerPoolRequest::new().set_worker_pool_id("example");Sourcepub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
pub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
Sets the value of validate_only.
§Example
ⓘ
let x = CreateWorkerPoolRequest::new().set_validate_only(true);Trait Implementations§
Source§impl Clone for CreateWorkerPoolRequest
impl Clone for CreateWorkerPoolRequest
Source§fn clone(&self) -> CreateWorkerPoolRequest
fn clone(&self) -> CreateWorkerPoolRequest
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 CreateWorkerPoolRequest
impl Debug for CreateWorkerPoolRequest
Source§impl Default for CreateWorkerPoolRequest
impl Default for CreateWorkerPoolRequest
Source§fn default() -> CreateWorkerPoolRequest
fn default() -> CreateWorkerPoolRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateWorkerPoolRequest
impl Message for CreateWorkerPoolRequest
Source§impl PartialEq for CreateWorkerPoolRequest
impl PartialEq for CreateWorkerPoolRequest
impl StructuralPartialEq for CreateWorkerPoolRequest
Auto Trait Implementations§
impl Freeze for CreateWorkerPoolRequest
impl RefUnwindSafe for CreateWorkerPoolRequest
impl Send for CreateWorkerPoolRequest
impl Sync for CreateWorkerPoolRequest
impl Unpin for CreateWorkerPoolRequest
impl UnwindSafe for CreateWorkerPoolRequest
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