#[non_exhaustive]pub struct SearchTripsRequest {
pub header: Option<RequestHeader>,
pub parent: String,
pub vehicle_id: String,
pub active_trips_only: bool,
pub page_size: i32,
pub page_token: String,
pub minimum_staleness: Option<Duration>,
/* private fields */
}Expand description
SearchTrips 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.
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: StringThe vehicle associated with the trips in the request. If unspecified, the returned trips do not contain:
current_route_segmentremaining_waypointsremaining_distance_meterseta_to_first_waypoint
active_trips_only: boolIf set to true, the response includes Trips that influence a driver’s route.
page_size: i32If not set, the server decides the number of results to return.
page_token: StringSet this to a value previously returned in the SearchTripsResponse to
continue from previous results.
minimum_staleness: Option<Duration>If specified, returns the trips that have not been updated after the time
(current - minimum_staleness).
Implementations§
Source§impl SearchTripsRequest
impl SearchTripsRequest
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 = SearchTripsRequest::new().set_vehicle_id("example");Sourcepub fn set_active_trips_only<T: Into<bool>>(self, v: T) -> Self
pub fn set_active_trips_only<T: Into<bool>>(self, v: T) -> Self
Sets the value of active_trips_only.
§Example
let x = SearchTripsRequest::new().set_active_trips_only(true);Sourcepub fn set_page_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_page_size<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_page_token<T: Into<String>>(self, v: T) -> Self
pub fn set_page_token<T: Into<String>>(self, v: T) -> Self
Sets the value of page_token.
§Example
let x = SearchTripsRequest::new().set_page_token("example");Sourcepub fn set_minimum_staleness<T>(self, v: T) -> Self
pub fn set_minimum_staleness<T>(self, v: T) -> Self
Sets the value of minimum_staleness.
§Example
use wkt::Duration;
let x = SearchTripsRequest::new().set_minimum_staleness(Duration::default()/* use setters */);Sourcepub fn set_or_clear_minimum_staleness<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_minimum_staleness<T>(self, v: Option<T>) -> Self
Sets or clears the value of minimum_staleness.
§Example
use wkt::Duration;
let x = SearchTripsRequest::new().set_or_clear_minimum_staleness(Some(Duration::default()/* use setters */));
let x = SearchTripsRequest::new().set_or_clear_minimum_staleness(None::<Duration>);Trait Implementations§
Source§impl Clone for SearchTripsRequest
impl Clone for SearchTripsRequest
Source§fn clone(&self) -> SearchTripsRequest
fn clone(&self) -> SearchTripsRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more