#[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 message for creating a WorkerPool.
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 location and project in which this worker pool should be
created. Format: projects/{project}/locations/{location}, where
{project} can be project id or number. Only lowercase characters, digits,
and hyphens.
worker_pool: Option<WorkerPool>Required. The WorkerPool instance to create.
worker_pool_id: StringRequired. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
{parent}/workerPools/{worker_pool_id}.
validate_only: boolOptional. Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.
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_run_v2::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_run_v2::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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more