#[non_exhaustive]pub struct CreateServiceRequest {
pub parent: String,
pub service: Option<Service>,
pub service_id: String,
pub validate_only: bool,
/* private fields */
}Expand description
Request message for creating a Service.
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 location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens.
service: Option<Service>Required. The Service instance to create.
service_id: StringRequired. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes {parent}/services/{service_id}.
validate_only: boolIndicates that the request should be validated and default values populated, without persisting the request or creating any resources.
Implementations§
Source§impl CreateServiceRequest
impl CreateServiceRequest
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_service<T>(self, v: T) -> Self
pub fn set_service<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_service<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_service<T>(self, v: Option<T>) -> Self
Sourcepub fn set_service_id<T: Into<String>>(self, v: T) -> Self
pub fn set_service_id<T: Into<String>>(self, v: T) -> Self
Sets the value of service_id.
§Example
ⓘ
let x = CreateServiceRequest::new().set_service_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 = CreateServiceRequest::new().set_validate_only(true);Trait Implementations§
Source§impl Clone for CreateServiceRequest
impl Clone for CreateServiceRequest
Source§fn clone(&self) -> CreateServiceRequest
fn clone(&self) -> CreateServiceRequest
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 CreateServiceRequest
impl Debug for CreateServiceRequest
Source§impl Default for CreateServiceRequest
impl Default for CreateServiceRequest
Source§fn default() -> CreateServiceRequest
fn default() -> CreateServiceRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateServiceRequest
impl Message for CreateServiceRequest
Source§impl PartialEq for CreateServiceRequest
impl PartialEq for CreateServiceRequest
impl StructuralPartialEq for CreateServiceRequest
Auto Trait Implementations§
impl Freeze for CreateServiceRequest
impl RefUnwindSafe for CreateServiceRequest
impl Send for CreateServiceRequest
impl Sync for CreateServiceRequest
impl Unpin for CreateServiceRequest
impl UnwindSafe for CreateServiceRequest
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