#[non_exhaustive]
pub struct CalculateRouteMatrixInputBuilder { /* private fields */ }
Expand description

Implementations§

source§

impl CalculateRouteMatrixInputBuilder

source

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.
source

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.

source

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.

source

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\]

source

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\]

source

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\]

source

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\]

source

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\]

source

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\]

source

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 Car use the CarModeOptions parameter.

  • If traveling by Truck use the TruckModeOptions parameter.

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

source

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 Car use the CarModeOptions parameter.

  • If traveling by Truck use the TruckModeOptions parameter.

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

source

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 Car use the CarModeOptions parameter.

  • If traveling by Truck use the TruckModeOptions parameter.

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub fn distance_unit(self, input: DistanceUnit) -> Self

Set the unit system to specify the distance.

Default Value: Kilometers

source

pub fn set_distance_unit(self, input: Option<DistanceUnit>) -> Self

Set the unit system to specify the distance.

Default Value: Kilometers

source

pub fn get_distance_unit(&self) -> &Option<DistanceUnit>

Set the unit system to specify the distance.

Default Value: Kilometers

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub fn key(self, input: impl Into<String>) -> Self

The optional API key to authorize the request.

source

pub fn set_key(self, input: Option<String>) -> Self

The optional API key to authorize the request.

source

pub fn get_key(&self) -> &Option<String>

The optional API key to authorize the request.

source

pub fn build(self) -> Result<CalculateRouteMatrixInput, BuildError>

Consumes the builder and constructs a CalculateRouteMatrixInput.

source§

impl CalculateRouteMatrixInputBuilder

source

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

source§

fn clone(&self) -> CalculateRouteMatrixInputBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CalculateRouteMatrixInputBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CalculateRouteMatrixInputBuilder

source§

fn default() -> CalculateRouteMatrixInputBuilder

Returns the “default value” for a type. Read more
source§

impl PartialEq for CalculateRouteMatrixInputBuilder

source§

fn eq(&self, other: &CalculateRouteMatrixInputBuilder) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for CalculateRouteMatrixInputBuilder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more