#[non_exhaustive]pub struct CreateVehicleRequest {
pub header: Option<RequestHeader>,
pub parent: String,
pub vehicle_id: String,
pub vehicle: Option<Vehicle>,
/* private fields */
}Expand description
CreateVehicle request message.
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.header: Option<RequestHeader>The standard Fleet Engine request header.
parent: StringRequired. Must be in the format providers/{provider}.
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_id: StringRequired. Unique Vehicle ID. Subject to the following restrictions:
- Must be a valid Unicode string.
- Limited to a maximum length of 64 characters.
- Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).
- May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.
vehicle: Option<Vehicle>Required. The Vehicle entity to create. When creating a Vehicle, the following fields are required:
vehicleStatesupportedTripTypesmaximumCapacityvehicleType
When creating a Vehicle, the following fields are ignored:
namecurrentTripsavailableCapacitycurrent_route_segmentcurrent_route_segment_end_pointcurrent_route_segment_versioncurrent_route_segment_trafficroutewaypointswaypoints_versionremaining_distance_metersremaining_time_secondseta_to_next_waypointnavigation_status
All other fields are optional and used if provided.
Implementations§
Source§impl CreateVehicleRequest
impl CreateVehicleRequest
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_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_vehicle_id<T: Into<String>>(self, v: T) -> Self
pub fn set_vehicle_id<T: Into<String>>(self, v: T) -> Self
Sets the value of vehicle_id.
§Example
ⓘ
let x = CreateVehicleRequest::new().set_vehicle_id("example");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
Trait Implementations§
Source§impl Clone for CreateVehicleRequest
impl Clone for CreateVehicleRequest
Source§fn clone(&self) -> CreateVehicleRequest
fn clone(&self) -> CreateVehicleRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateVehicleRequest
impl Debug for CreateVehicleRequest
Source§impl Default for CreateVehicleRequest
impl Default for CreateVehicleRequest
Source§fn default() -> CreateVehicleRequest
fn default() -> CreateVehicleRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateVehicleRequest
impl Message for CreateVehicleRequest
Source§impl PartialEq for CreateVehicleRequest
impl PartialEq for CreateVehicleRequest
impl StructuralPartialEq for CreateVehicleRequest
Auto Trait Implementations§
impl Freeze for CreateVehicleRequest
impl RefUnwindSafe for CreateVehicleRequest
impl Send for CreateVehicleRequest
impl Sync for CreateVehicleRequest
impl Unpin for CreateVehicleRequest
impl UnsafeUnpin for CreateVehicleRequest
impl UnwindSafe for CreateVehicleRequest
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