#[non_exhaustive]pub struct UpdateVehicleRequest {
pub header: Option<RequestHeader>,
pub name: String,
pub vehicle: Option<Vehicle>,
pub update_mask: Option<FieldMask>,
/* private fields */
}Expand description
`UpdateVehicle request message.
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.header: Option<RequestHeader>The standard Fleet Engine request header.
name: StringRequired. Must be in the format
providers/{provider}/vehicles/{vehicle}.
The {provider} must be the Project ID (for example, sample-cloud-project)
of the Google Cloud Project of which the service account making
this call is a member.
vehicle: Option<Vehicle>Required. The Vehicle entity values to apply. When updating a Vehicle,
the following fields may not be updated as they are managed by the
server.
available_capacitycurrent_route_segment_versioncurrent_tripsnamewaypoints_version
If the attributes field is updated, all the vehicle’s attributes are
replaced with the attributes provided in the request. If you want to update
only some attributes, see the UpdateVehicleAttributes method.
Likewise, the waypoints field can be updated, but must contain all the
waypoints currently on the vehicle, and no other waypoints.
update_mask: Option<FieldMask>Required. A field mask indicating which fields of the Vehicle to update.
At least one field name must be provided.
Implementations§
Source§impl UpdateVehicleRequest
impl UpdateVehicleRequest
Sourcepub fn set_header<T>(self, v: T) -> Selfwhere
T: Into<RequestHeader>,
pub fn set_header<T>(self, v: T) -> Selfwhere
T: Into<RequestHeader>,
Sourcepub fn set_or_clear_header<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestHeader>,
pub fn set_or_clear_header<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestHeader>,
Sourcepub fn set_vehicle<T>(self, v: T) -> Self
pub fn set_vehicle<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_vehicle<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vehicle<T>(self, v: Option<T>) -> Self
Sourcepub fn set_update_mask<T>(self, v: T) -> Self
pub fn set_update_mask<T>(self, v: T) -> Self
Sets the value of update_mask.
§Example
use wkt::FieldMask;
let x = UpdateVehicleRequest::new().set_update_mask(FieldMask::default()/* use setters */);Sourcepub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_mask.
§Example
use wkt::FieldMask;
let x = UpdateVehicleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
let x = UpdateVehicleRequest::new().set_or_clear_update_mask(None::<FieldMask>);Trait Implementations§
Source§impl Clone for UpdateVehicleRequest
impl Clone for UpdateVehicleRequest
Source§fn clone(&self) -> UpdateVehicleRequest
fn clone(&self) -> UpdateVehicleRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more