Struct aws_sdk_location::operation::calculate_route_matrix::builders::CalculateRouteMatrixInputBuilder
source · #[non_exhaustive]pub struct CalculateRouteMatrixInputBuilder { /* private fields */ }Expand description
A builder for CalculateRouteMatrixInput.
Implementations§
source§impl CalculateRouteMatrixInputBuilder
impl CalculateRouteMatrixInputBuilder
sourcepub fn calculator_name(self, input: impl Into<String>) -> Self
pub fn calculator_name(self, input: impl Into<String>) -> Self
The name of the route calculator resource that you want to use to calculate the route matrix.
This field is required.sourcepub fn set_calculator_name(self, input: Option<String>) -> Self
pub fn set_calculator_name(self, input: Option<String>) -> Self
The name of the route calculator resource that you want to use to calculate the route matrix.
sourcepub fn get_calculator_name(&self) -> &Option<String>
pub fn get_calculator_name(&self) -> &Option<String>
The name of the route calculator resource that you want to use to calculate the route matrix.
sourcepub fn departure_positions(self, input: Vec<f64>) -> Self
pub fn departure_positions(self, input: Vec<f64>) -> Self
Appends an item to departure_positions.
To override the contents of this collection use set_departure_positions.
The list of departure (origin) positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: \[longitude, latitude\]. For example, \[-123.115, 49.285\].
Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.
For route calculators that use Esri as the data provider, if you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDeparturePositions.
Valid Values: \[-180 to 180,-90 to 90\]
sourcepub fn set_departure_positions(self, input: Option<Vec<Vec<f64>>>) -> Self
pub fn set_departure_positions(self, input: Option<Vec<Vec<f64>>>) -> Self
The list of departure (origin) positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: \[longitude, latitude\]. For example, \[-123.115, 49.285\].
Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.
For route calculators that use Esri as the data provider, if you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDeparturePositions.
Valid Values: \[-180 to 180,-90 to 90\]
sourcepub fn get_departure_positions(&self) -> &Option<Vec<Vec<f64>>>
pub fn get_departure_positions(&self) -> &Option<Vec<Vec<f64>>>
The list of departure (origin) positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: \[longitude, latitude\]. For example, \[-123.115, 49.285\].
Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.
For route calculators that use Esri as the data provider, if you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDeparturePositions.
Valid Values: \[-180 to 180,-90 to 90\]
sourcepub fn destination_positions(self, input: Vec<f64>) -> Self
pub fn destination_positions(self, input: Vec<f64>) -> Self
Appends an item to destination_positions.
To override the contents of this collection use set_destination_positions.
The list of destination positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: \[longitude, latitude\]. For example, \[-122.339, 47.615\]
Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.
For route calculators that use Esri as the data provider, if you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDestinationPositions.
Valid Values: \[-180 to 180,-90 to 90\]
sourcepub fn set_destination_positions(self, input: Option<Vec<Vec<f64>>>) -> Self
pub fn set_destination_positions(self, input: Option<Vec<Vec<f64>>>) -> Self
The list of destination positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: \[longitude, latitude\]. For example, \[-122.339, 47.615\]
Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.
For route calculators that use Esri as the data provider, if you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDestinationPositions.
Valid Values: \[-180 to 180,-90 to 90\]
sourcepub fn get_destination_positions(&self) -> &Option<Vec<Vec<f64>>>
pub fn get_destination_positions(&self) -> &Option<Vec<Vec<f64>>>
The list of destination positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: \[longitude, latitude\]. For example, \[-122.339, 47.615\]
Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.
For route calculators that use Esri as the data provider, if you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDestinationPositions.
Valid Values: \[-180 to 180,-90 to 90\]
sourcepub fn travel_mode(self, input: TravelMode) -> Self
pub fn travel_mode(self, input: TravelMode) -> Self
Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.
The TravelMode you specify also determines how you specify route preferences:
-
If traveling by
Caruse theCarModeOptionsparameter. -
If traveling by
Truckuse theTruckModeOptionsparameter.
Bicycle or Motorcycle are only valid when using Grab as a data provider, and only within Southeast Asia.
Truck is not available for Grab.
For more information about using Grab as a data provider, see GrabMaps in the Amazon Location Service Developer Guide.
Default Value: Car
sourcepub fn set_travel_mode(self, input: Option<TravelMode>) -> Self
pub fn set_travel_mode(self, input: Option<TravelMode>) -> Self
Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.
The TravelMode you specify also determines how you specify route preferences:
-
If traveling by
Caruse theCarModeOptionsparameter. -
If traveling by
Truckuse theTruckModeOptionsparameter.
Bicycle or Motorcycle are only valid when using Grab as a data provider, and only within Southeast Asia.
Truck is not available for Grab.
For more information about using Grab as a data provider, see GrabMaps in the Amazon Location Service Developer Guide.
Default Value: Car
sourcepub fn get_travel_mode(&self) -> &Option<TravelMode>
pub fn get_travel_mode(&self) -> &Option<TravelMode>
Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.
The TravelMode you specify also determines how you specify route preferences:
-
If traveling by
Caruse theCarModeOptionsparameter. -
If traveling by
Truckuse theTruckModeOptionsparameter.
Bicycle or Motorcycle are only valid when using Grab as a data provider, and only within Southeast Asia.
Truck is not available for Grab.
For more information about using Grab as a data provider, see GrabMaps in the Amazon Location Service Developer Guide.
Default Value: Car
sourcepub fn departure_time(self, input: DateTime) -> Self
pub fn departure_time(self, input: DateTime) -> Self
Specifies the desired time of departure. Uses the given time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.
Setting a departure time in the past returns a 400 ValidationException error.
-
In ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ. For example,2020–07-2T12:15:20.000Z+01:00
sourcepub fn set_departure_time(self, input: Option<DateTime>) -> Self
pub fn set_departure_time(self, input: Option<DateTime>) -> Self
Specifies the desired time of departure. Uses the given time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.
Setting a departure time in the past returns a 400 ValidationException error.
-
In ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ. For example,2020–07-2T12:15:20.000Z+01:00
sourcepub fn get_departure_time(&self) -> &Option<DateTime>
pub fn get_departure_time(&self) -> &Option<DateTime>
Specifies the desired time of departure. Uses the given time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.
Setting a departure time in the past returns a 400 ValidationException error.
-
In ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ. For example,2020–07-2T12:15:20.000Z+01:00
sourcepub fn depart_now(self, input: bool) -> Self
pub fn depart_now(self, input: bool) -> Self
Sets the time of departure as the current time. Uses the current time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.
Default Value: false
Valid Values: false | true
sourcepub fn set_depart_now(self, input: Option<bool>) -> Self
pub fn set_depart_now(self, input: Option<bool>) -> Self
Sets the time of departure as the current time. Uses the current time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.
Default Value: false
Valid Values: false | true
sourcepub fn get_depart_now(&self) -> &Option<bool>
pub fn get_depart_now(&self) -> &Option<bool>
Sets the time of departure as the current time. Uses the current time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.
Default Value: false
Valid Values: false | true
sourcepub fn distance_unit(self, input: DistanceUnit) -> Self
pub fn distance_unit(self, input: DistanceUnit) -> Self
Set the unit system to specify the distance.
Default Value: Kilometers
sourcepub fn set_distance_unit(self, input: Option<DistanceUnit>) -> Self
pub fn set_distance_unit(self, input: Option<DistanceUnit>) -> Self
Set the unit system to specify the distance.
Default Value: Kilometers
sourcepub fn get_distance_unit(&self) -> &Option<DistanceUnit>
pub fn get_distance_unit(&self) -> &Option<DistanceUnit>
Set the unit system to specify the distance.
Default Value: Kilometers
sourcepub fn car_mode_options(self, input: CalculateRouteCarModeOptions) -> Self
pub fn car_mode_options(self, input: CalculateRouteCarModeOptions) -> Self
Specifies route preferences when traveling by Car, such as avoiding routes that use ferries or tolls.
Requirements: TravelMode must be specified as Car.
sourcepub fn set_car_mode_options(
self,
input: Option<CalculateRouteCarModeOptions>,
) -> Self
pub fn set_car_mode_options( self, input: Option<CalculateRouteCarModeOptions>, ) -> Self
Specifies route preferences when traveling by Car, such as avoiding routes that use ferries or tolls.
Requirements: TravelMode must be specified as Car.
sourcepub fn get_car_mode_options(&self) -> &Option<CalculateRouteCarModeOptions>
pub fn get_car_mode_options(&self) -> &Option<CalculateRouteCarModeOptions>
Specifies route preferences when traveling by Car, such as avoiding routes that use ferries or tolls.
Requirements: TravelMode must be specified as Car.
sourcepub fn truck_mode_options(self, input: CalculateRouteTruckModeOptions) -> Self
pub fn truck_mode_options(self, input: CalculateRouteTruckModeOptions) -> Self
Specifies route preferences when traveling by Truck, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.
Requirements: TravelMode must be specified as Truck.
sourcepub fn set_truck_mode_options(
self,
input: Option<CalculateRouteTruckModeOptions>,
) -> Self
pub fn set_truck_mode_options( self, input: Option<CalculateRouteTruckModeOptions>, ) -> Self
Specifies route preferences when traveling by Truck, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.
Requirements: TravelMode must be specified as Truck.
sourcepub fn get_truck_mode_options(&self) -> &Option<CalculateRouteTruckModeOptions>
pub fn get_truck_mode_options(&self) -> &Option<CalculateRouteTruckModeOptions>
Specifies route preferences when traveling by Truck, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.
Requirements: TravelMode must be specified as Truck.
sourcepub fn key(self, input: impl Into<String>) -> Self
pub fn key(self, input: impl Into<String>) -> Self
The optional API key to authorize the request.
sourcepub fn set_key(self, input: Option<String>) -> Self
pub fn set_key(self, input: Option<String>) -> Self
The optional API key to authorize the request.
sourcepub fn build(self) -> Result<CalculateRouteMatrixInput, BuildError>
pub fn build(self) -> Result<CalculateRouteMatrixInput, BuildError>
Consumes the builder and constructs a CalculateRouteMatrixInput.
source§impl CalculateRouteMatrixInputBuilder
impl CalculateRouteMatrixInputBuilder
sourcepub async fn send_with(
self,
client: &Client,
) -> Result<CalculateRouteMatrixOutput, SdkError<CalculateRouteMatrixError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<CalculateRouteMatrixOutput, SdkError<CalculateRouteMatrixError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for CalculateRouteMatrixInputBuilder
impl Clone for CalculateRouteMatrixInputBuilder
source§fn clone(&self) -> CalculateRouteMatrixInputBuilder
fn clone(&self) -> CalculateRouteMatrixInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for CalculateRouteMatrixInputBuilder
impl Default for CalculateRouteMatrixInputBuilder
source§fn default() -> CalculateRouteMatrixInputBuilder
fn default() -> CalculateRouteMatrixInputBuilder
source§impl PartialEq for CalculateRouteMatrixInputBuilder
impl PartialEq for CalculateRouteMatrixInputBuilder
source§fn eq(&self, other: &CalculateRouteMatrixInputBuilder) -> bool
fn eq(&self, other: &CalculateRouteMatrixInputBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for CalculateRouteMatrixInputBuilder
Auto Trait Implementations§
impl Freeze for CalculateRouteMatrixInputBuilder
impl RefUnwindSafe for CalculateRouteMatrixInputBuilder
impl Send for CalculateRouteMatrixInputBuilder
impl Sync for CalculateRouteMatrixInputBuilder
impl Unpin for CalculateRouteMatrixInputBuilder
impl UnwindSafe for CalculateRouteMatrixInputBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more