#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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 UnsafeUnpin 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
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