aws_sdk_georoutes/operation/calculate_routes/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::calculate_routes::_calculate_routes_output::CalculateRoutesOutputBuilder;
3
4pub use crate::operation::calculate_routes::_calculate_routes_input::CalculateRoutesInputBuilder;
5
6impl crate::operation::calculate_routes::builders::CalculateRoutesInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::calculate_routes::CalculateRoutesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::calculate_routes::CalculateRoutesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.calculate_routes();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CalculateRoutes`.
24///
25/// <p><code>CalculateRoutes</code> computes routes given the following required parameters: <code>Origin</code> and <code>Destination</code>.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CalculateRoutesFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::calculate_routes::builders::CalculateRoutesInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::calculate_routes::CalculateRoutesOutput,
35 crate::operation::calculate_routes::CalculateRoutesError,
36 > for CalculateRoutesFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::calculate_routes::CalculateRoutesOutput,
44 crate::operation::calculate_routes::CalculateRoutesError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CalculateRoutesFluentBuilder {
51 /// Creates a new `CalculateRoutesFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the CalculateRoutes as a reference.
60 pub fn as_input(&self) -> &crate::operation::calculate_routes::builders::CalculateRoutesInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::calculate_routes::CalculateRoutesOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::calculate_routes::CalculateRoutesError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::calculate_routes::CalculateRoutes::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::calculate_routes::CalculateRoutes::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::calculate_routes::CalculateRoutesOutput,
97 crate::operation::calculate_routes::CalculateRoutesError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>Features that are allowed while calculating a route.</p>
112 pub fn allow(mut self, input: crate::types::RouteAllowOptions) -> Self {
113 self.inner = self.inner.allow(input);
114 self
115 }
116 /// <p>Features that are allowed while calculating a route.</p>
117 pub fn set_allow(mut self, input: ::std::option::Option<crate::types::RouteAllowOptions>) -> Self {
118 self.inner = self.inner.set_allow(input);
119 self
120 }
121 /// <p>Features that are allowed while calculating a route.</p>
122 pub fn get_allow(&self) -> &::std::option::Option<crate::types::RouteAllowOptions> {
123 self.inner.get_allow()
124 }
125 /// <p>Time of arrival at the destination.</p>
126 /// <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code></p>
127 /// <p>Examples:</p>
128 /// <p><code>2020-04-22T17:57:24Z</code></p>
129 /// <p><code>2020-04-22T17:57:24+02:00</code></p>
130 pub fn arrival_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.inner = self.inner.arrival_time(input.into());
132 self
133 }
134 /// <p>Time of arrival at the destination.</p>
135 /// <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code></p>
136 /// <p>Examples:</p>
137 /// <p><code>2020-04-22T17:57:24Z</code></p>
138 /// <p><code>2020-04-22T17:57:24+02:00</code></p>
139 pub fn set_arrival_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_arrival_time(input);
141 self
142 }
143 /// <p>Time of arrival at the destination.</p>
144 /// <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code></p>
145 /// <p>Examples:</p>
146 /// <p><code>2020-04-22T17:57:24Z</code></p>
147 /// <p><code>2020-04-22T17:57:24+02:00</code></p>
148 pub fn get_arrival_time(&self) -> &::std::option::Option<::std::string::String> {
149 self.inner.get_arrival_time()
150 }
151 /// <p>Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, it violates the avoidance and the returned response produces a notice for the violation.</p>
152 pub fn avoid(mut self, input: crate::types::RouteAvoidanceOptions) -> Self {
153 self.inner = self.inner.avoid(input);
154 self
155 }
156 /// <p>Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, it violates the avoidance and the returned response produces a notice for the violation.</p>
157 pub fn set_avoid(mut self, input: ::std::option::Option<crate::types::RouteAvoidanceOptions>) -> Self {
158 self.inner = self.inner.set_avoid(input);
159 self
160 }
161 /// <p>Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, it violates the avoidance and the returned response produces a notice for the violation.</p>
162 pub fn get_avoid(&self) -> &::std::option::Option<crate::types::RouteAvoidanceOptions> {
163 self.inner.get_avoid()
164 }
165 /// <p>Uses the current time as the time of departure.</p>
166 pub fn depart_now(mut self, input: bool) -> Self {
167 self.inner = self.inner.depart_now(input);
168 self
169 }
170 /// <p>Uses the current time as the time of departure.</p>
171 pub fn set_depart_now(mut self, input: ::std::option::Option<bool>) -> Self {
172 self.inner = self.inner.set_depart_now(input);
173 self
174 }
175 /// <p>Uses the current time as the time of departure.</p>
176 pub fn get_depart_now(&self) -> &::std::option::Option<bool> {
177 self.inner.get_depart_now()
178 }
179 /// <p>Time of departure from thr origin.</p>
180 /// <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code></p>
181 /// <p>Examples:</p>
182 /// <p><code>2020-04-22T17:57:24Z</code></p>
183 /// <p><code>2020-04-22T17:57:24+02:00</code></p>
184 pub fn departure_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.inner = self.inner.departure_time(input.into());
186 self
187 }
188 /// <p>Time of departure from thr origin.</p>
189 /// <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code></p>
190 /// <p>Examples:</p>
191 /// <p><code>2020-04-22T17:57:24Z</code></p>
192 /// <p><code>2020-04-22T17:57:24+02:00</code></p>
193 pub fn set_departure_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.inner = self.inner.set_departure_time(input);
195 self
196 }
197 /// <p>Time of departure from thr origin.</p>
198 /// <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code></p>
199 /// <p>Examples:</p>
200 /// <p><code>2020-04-22T17:57:24Z</code></p>
201 /// <p><code>2020-04-22T17:57:24+02:00</code></p>
202 pub fn get_departure_time(&self) -> &::std::option::Option<::std::string::String> {
203 self.inner.get_departure_time()
204 }
205 ///
206 /// Appends an item to `Destination`.
207 ///
208 /// To override the contents of this collection use [`set_destination`](Self::set_destination).
209 ///
210 /// <p>The final position for the route. In the World Geodetic System (WGS 84) format: <code>\[longitude, latitude\]</code>.</p>
211 pub fn destination(mut self, input: f64) -> Self {
212 self.inner = self.inner.destination(input);
213 self
214 }
215 /// <p>The final position for the route. In the World Geodetic System (WGS 84) format: <code>\[longitude, latitude\]</code>.</p>
216 pub fn set_destination(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
217 self.inner = self.inner.set_destination(input);
218 self
219 }
220 /// <p>The final position for the route. In the World Geodetic System (WGS 84) format: <code>\[longitude, latitude\]</code>.</p>
221 pub fn get_destination(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
222 self.inner.get_destination()
223 }
224 /// <p>Destination related options.</p>
225 pub fn destination_options(mut self, input: crate::types::RouteDestinationOptions) -> Self {
226 self.inner = self.inner.destination_options(input);
227 self
228 }
229 /// <p>Destination related options.</p>
230 pub fn set_destination_options(mut self, input: ::std::option::Option<crate::types::RouteDestinationOptions>) -> Self {
231 self.inner = self.inner.set_destination_options(input);
232 self
233 }
234 /// <p>Destination related options.</p>
235 pub fn get_destination_options(&self) -> &::std::option::Option<crate::types::RouteDestinationOptions> {
236 self.inner.get_destination_options()
237 }
238 /// <p>Driver related options.</p>
239 pub fn driver(mut self, input: crate::types::RouteDriverOptions) -> Self {
240 self.inner = self.inner.driver(input);
241 self
242 }
243 /// <p>Driver related options.</p>
244 pub fn set_driver(mut self, input: ::std::option::Option<crate::types::RouteDriverOptions>) -> Self {
245 self.inner = self.inner.set_driver(input);
246 self
247 }
248 /// <p>Driver related options.</p>
249 pub fn get_driver(&self) -> &::std::option::Option<crate::types::RouteDriverOptions> {
250 self.inner.get_driver()
251 }
252 /// <p>Features to be strictly excluded while calculating the route.</p>
253 pub fn exclude(mut self, input: crate::types::RouteExclusionOptions) -> Self {
254 self.inner = self.inner.exclude(input);
255 self
256 }
257 /// <p>Features to be strictly excluded while calculating the route.</p>
258 pub fn set_exclude(mut self, input: ::std::option::Option<crate::types::RouteExclusionOptions>) -> Self {
259 self.inner = self.inner.set_exclude(input);
260 self
261 }
262 /// <p>Features to be strictly excluded while calculating the route.</p>
263 pub fn get_exclude(&self) -> &::std::option::Option<crate::types::RouteExclusionOptions> {
264 self.inner.get_exclude()
265 }
266 /// <p>Measurement system to be used for instructions within steps in the response.</p>
267 pub fn instructions_measurement_system(mut self, input: crate::types::MeasurementSystem) -> Self {
268 self.inner = self.inner.instructions_measurement_system(input);
269 self
270 }
271 /// <p>Measurement system to be used for instructions within steps in the response.</p>
272 pub fn set_instructions_measurement_system(mut self, input: ::std::option::Option<crate::types::MeasurementSystem>) -> Self {
273 self.inner = self.inner.set_instructions_measurement_system(input);
274 self
275 }
276 /// <p>Measurement system to be used for instructions within steps in the response.</p>
277 pub fn get_instructions_measurement_system(&self) -> &::std::option::Option<crate::types::MeasurementSystem> {
278 self.inner.get_instructions_measurement_system()
279 }
280 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
281 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282 self.inner = self.inner.key(input.into());
283 self
284 }
285 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
286 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287 self.inner = self.inner.set_key(input);
288 self
289 }
290 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
291 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
292 self.inner.get_key()
293 }
294 ///
295 /// Appends an item to `Languages`.
296 ///
297 /// To override the contents of this collection use [`set_languages`](Self::set_languages).
298 ///
299 /// <p>List of languages for instructions within steps in the response.</p><note>
300 /// <p>Instructions in the requested language are returned only if they are available.</p>
301 /// </note>
302 pub fn languages(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303 self.inner = self.inner.languages(input.into());
304 self
305 }
306 /// <p>List of languages for instructions within steps in the response.</p><note>
307 /// <p>Instructions in the requested language are returned only if they are available.</p>
308 /// </note>
309 pub fn set_languages(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
310 self.inner = self.inner.set_languages(input);
311 self
312 }
313 /// <p>List of languages for instructions within steps in the response.</p><note>
314 /// <p>Instructions in the requested language are returned only if they are available.</p>
315 /// </note>
316 pub fn get_languages(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
317 self.inner.get_languages()
318 }
319 ///
320 /// Appends an item to `LegAdditionalFeatures`.
321 ///
322 /// To override the contents of this collection use [`set_leg_additional_features`](Self::set_leg_additional_features).
323 ///
324 /// <p>A list of optional additional parameters such as timezone that can be requested for each result.</p>
325 /// <ul>
326 /// <li>
327 /// <p><code>Elevation</code>: Retrieves the elevation information for each location.</p></li>
328 /// <li>
329 /// <p><code>Incidents</code>: Provides information on traffic incidents along the route.</p></li>
330 /// <li>
331 /// <p><code>PassThroughWaypoints</code>: Indicates waypoints that are passed through without stopping.</p></li>
332 /// <li>
333 /// <p><code>Summary</code>: Returns a summary of the route, including distance and duration.</p></li>
334 /// <li>
335 /// <p><code>Tolls</code>: Supplies toll cost information along the route.</p></li>
336 /// <li>
337 /// <p><code>TravelStepInstructions</code>: Provides step-by-step instructions for travel along the route.</p></li>
338 /// <li>
339 /// <p><code>TruckRoadTypes</code>: Returns information about road types suitable for trucks.</p></li>
340 /// <li>
341 /// <p><code>TypicalDuration</code>: Gives typical travel duration based on historical data.</p></li>
342 /// <li>
343 /// <p><code>Zones</code>: Specifies the time zone information for each waypoint.</p></li>
344 /// </ul>
345 pub fn leg_additional_features(mut self, input: crate::types::RouteLegAdditionalFeature) -> Self {
346 self.inner = self.inner.leg_additional_features(input);
347 self
348 }
349 /// <p>A list of optional additional parameters such as timezone that can be requested for each result.</p>
350 /// <ul>
351 /// <li>
352 /// <p><code>Elevation</code>: Retrieves the elevation information for each location.</p></li>
353 /// <li>
354 /// <p><code>Incidents</code>: Provides information on traffic incidents along the route.</p></li>
355 /// <li>
356 /// <p><code>PassThroughWaypoints</code>: Indicates waypoints that are passed through without stopping.</p></li>
357 /// <li>
358 /// <p><code>Summary</code>: Returns a summary of the route, including distance and duration.</p></li>
359 /// <li>
360 /// <p><code>Tolls</code>: Supplies toll cost information along the route.</p></li>
361 /// <li>
362 /// <p><code>TravelStepInstructions</code>: Provides step-by-step instructions for travel along the route.</p></li>
363 /// <li>
364 /// <p><code>TruckRoadTypes</code>: Returns information about road types suitable for trucks.</p></li>
365 /// <li>
366 /// <p><code>TypicalDuration</code>: Gives typical travel duration based on historical data.</p></li>
367 /// <li>
368 /// <p><code>Zones</code>: Specifies the time zone information for each waypoint.</p></li>
369 /// </ul>
370 pub fn set_leg_additional_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RouteLegAdditionalFeature>>) -> Self {
371 self.inner = self.inner.set_leg_additional_features(input);
372 self
373 }
374 /// <p>A list of optional additional parameters such as timezone that can be requested for each result.</p>
375 /// <ul>
376 /// <li>
377 /// <p><code>Elevation</code>: Retrieves the elevation information for each location.</p></li>
378 /// <li>
379 /// <p><code>Incidents</code>: Provides information on traffic incidents along the route.</p></li>
380 /// <li>
381 /// <p><code>PassThroughWaypoints</code>: Indicates waypoints that are passed through without stopping.</p></li>
382 /// <li>
383 /// <p><code>Summary</code>: Returns a summary of the route, including distance and duration.</p></li>
384 /// <li>
385 /// <p><code>Tolls</code>: Supplies toll cost information along the route.</p></li>
386 /// <li>
387 /// <p><code>TravelStepInstructions</code>: Provides step-by-step instructions for travel along the route.</p></li>
388 /// <li>
389 /// <p><code>TruckRoadTypes</code>: Returns information about road types suitable for trucks.</p></li>
390 /// <li>
391 /// <p><code>TypicalDuration</code>: Gives typical travel duration based on historical data.</p></li>
392 /// <li>
393 /// <p><code>Zones</code>: Specifies the time zone information for each waypoint.</p></li>
394 /// </ul>
395 pub fn get_leg_additional_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RouteLegAdditionalFeature>> {
396 self.inner.get_leg_additional_features()
397 }
398 /// <p>Specifies the format of the geometry returned for each leg of the route. You can choose between two different geometry encoding formats.</p>
399 /// <p><code>FlexiblePolyline</code>: A compact and precise encoding format for the leg geometry. For more information on the format, see the GitHub repository for <a href="https://github.com/heremaps/flexible-polyline"> <code>FlexiblePolyline</code> </a>.</p>
400 /// <p><code>Simple</code>: A less compact encoding, which is easier to decode but may be less precise and result in larger payloads.</p>
401 pub fn leg_geometry_format(mut self, input: crate::types::GeometryFormat) -> Self {
402 self.inner = self.inner.leg_geometry_format(input);
403 self
404 }
405 /// <p>Specifies the format of the geometry returned for each leg of the route. You can choose between two different geometry encoding formats.</p>
406 /// <p><code>FlexiblePolyline</code>: A compact and precise encoding format for the leg geometry. For more information on the format, see the GitHub repository for <a href="https://github.com/heremaps/flexible-polyline"> <code>FlexiblePolyline</code> </a>.</p>
407 /// <p><code>Simple</code>: A less compact encoding, which is easier to decode but may be less precise and result in larger payloads.</p>
408 pub fn set_leg_geometry_format(mut self, input: ::std::option::Option<crate::types::GeometryFormat>) -> Self {
409 self.inner = self.inner.set_leg_geometry_format(input);
410 self
411 }
412 /// <p>Specifies the format of the geometry returned for each leg of the route. You can choose between two different geometry encoding formats.</p>
413 /// <p><code>FlexiblePolyline</code>: A compact and precise encoding format for the leg geometry. For more information on the format, see the GitHub repository for <a href="https://github.com/heremaps/flexible-polyline"> <code>FlexiblePolyline</code> </a>.</p>
414 /// <p><code>Simple</code>: A less compact encoding, which is easier to decode but may be less precise and result in larger payloads.</p>
415 pub fn get_leg_geometry_format(&self) -> &::std::option::Option<crate::types::GeometryFormat> {
416 self.inner.get_leg_geometry_format()
417 }
418 /// <p>Maximum number of alternative routes to be provided in the response, if available.</p>
419 pub fn max_alternatives(mut self, input: i32) -> Self {
420 self.inner = self.inner.max_alternatives(input);
421 self
422 }
423 /// <p>Maximum number of alternative routes to be provided in the response, if available.</p>
424 pub fn set_max_alternatives(mut self, input: ::std::option::Option<i32>) -> Self {
425 self.inner = self.inner.set_max_alternatives(input);
426 self
427 }
428 /// <p>Maximum number of alternative routes to be provided in the response, if available.</p>
429 pub fn get_max_alternatives(&self) -> &::std::option::Option<i32> {
430 self.inner.get_max_alternatives()
431 }
432 /// <p>Specifies the optimization criteria for calculating a route.</p>
433 /// <p>Default Value: <code>FastestRoute</code></p>
434 pub fn optimize_routing_for(mut self, input: crate::types::RoutingObjective) -> Self {
435 self.inner = self.inner.optimize_routing_for(input);
436 self
437 }
438 /// <p>Specifies the optimization criteria for calculating a route.</p>
439 /// <p>Default Value: <code>FastestRoute</code></p>
440 pub fn set_optimize_routing_for(mut self, input: ::std::option::Option<crate::types::RoutingObjective>) -> Self {
441 self.inner = self.inner.set_optimize_routing_for(input);
442 self
443 }
444 /// <p>Specifies the optimization criteria for calculating a route.</p>
445 /// <p>Default Value: <code>FastestRoute</code></p>
446 pub fn get_optimize_routing_for(&self) -> &::std::option::Option<crate::types::RoutingObjective> {
447 self.inner.get_optimize_routing_for()
448 }
449 ///
450 /// Appends an item to `Origin`.
451 ///
452 /// To override the contents of this collection use [`set_origin`](Self::set_origin).
453 ///
454 /// <p>The start position for the route.</p>
455 pub fn origin(mut self, input: f64) -> Self {
456 self.inner = self.inner.origin(input);
457 self
458 }
459 /// <p>The start position for the route.</p>
460 pub fn set_origin(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
461 self.inner = self.inner.set_origin(input);
462 self
463 }
464 /// <p>The start position for the route.</p>
465 pub fn get_origin(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
466 self.inner.get_origin()
467 }
468 /// <p>Origin related options.</p>
469 pub fn origin_options(mut self, input: crate::types::RouteOriginOptions) -> Self {
470 self.inner = self.inner.origin_options(input);
471 self
472 }
473 /// <p>Origin related options.</p>
474 pub fn set_origin_options(mut self, input: ::std::option::Option<crate::types::RouteOriginOptions>) -> Self {
475 self.inner = self.inner.set_origin_options(input);
476 self
477 }
478 /// <p>Origin related options.</p>
479 pub fn get_origin_options(&self) -> &::std::option::Option<crate::types::RouteOriginOptions> {
480 self.inner.get_origin_options()
481 }
482 ///
483 /// Appends an item to `SpanAdditionalFeatures`.
484 ///
485 /// To override the contents of this collection use [`set_span_additional_features`](Self::set_span_additional_features).
486 ///
487 /// <p>A list of optional features such as SpeedLimit that can be requested for a Span. A span is a section of a Leg for which the requested features have the same values.</p>
488 pub fn span_additional_features(mut self, input: crate::types::RouteSpanAdditionalFeature) -> Self {
489 self.inner = self.inner.span_additional_features(input);
490 self
491 }
492 /// <p>A list of optional features such as SpeedLimit that can be requested for a Span. A span is a section of a Leg for which the requested features have the same values.</p>
493 pub fn set_span_additional_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RouteSpanAdditionalFeature>>) -> Self {
494 self.inner = self.inner.set_span_additional_features(input);
495 self
496 }
497 /// <p>A list of optional features such as SpeedLimit that can be requested for a Span. A span is a section of a Leg for which the requested features have the same values.</p>
498 pub fn get_span_additional_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RouteSpanAdditionalFeature>> {
499 self.inner.get_span_additional_features()
500 }
501 /// <p>Toll related options.</p>
502 pub fn tolls(mut self, input: crate::types::RouteTollOptions) -> Self {
503 self.inner = self.inner.tolls(input);
504 self
505 }
506 /// <p>Toll related options.</p>
507 pub fn set_tolls(mut self, input: ::std::option::Option<crate::types::RouteTollOptions>) -> Self {
508 self.inner = self.inner.set_tolls(input);
509 self
510 }
511 /// <p>Toll related options.</p>
512 pub fn get_tolls(&self) -> &::std::option::Option<crate::types::RouteTollOptions> {
513 self.inner.get_tolls()
514 }
515 /// <p>Traffic related options.</p>
516 pub fn traffic(mut self, input: crate::types::RouteTrafficOptions) -> Self {
517 self.inner = self.inner.traffic(input);
518 self
519 }
520 /// <p>Traffic related options.</p>
521 pub fn set_traffic(mut self, input: ::std::option::Option<crate::types::RouteTrafficOptions>) -> Self {
522 self.inner = self.inner.set_traffic(input);
523 self
524 }
525 /// <p>Traffic related options.</p>
526 pub fn get_traffic(&self) -> &::std::option::Option<crate::types::RouteTrafficOptions> {
527 self.inner.get_traffic()
528 }
529 /// <p>Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.</p>
530 /// <p>Default Value: <code>Car</code></p>
531 pub fn travel_mode(mut self, input: crate::types::RouteTravelMode) -> Self {
532 self.inner = self.inner.travel_mode(input);
533 self
534 }
535 /// <p>Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.</p>
536 /// <p>Default Value: <code>Car</code></p>
537 pub fn set_travel_mode(mut self, input: ::std::option::Option<crate::types::RouteTravelMode>) -> Self {
538 self.inner = self.inner.set_travel_mode(input);
539 self
540 }
541 /// <p>Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.</p>
542 /// <p>Default Value: <code>Car</code></p>
543 pub fn get_travel_mode(&self) -> &::std::option::Option<crate::types::RouteTravelMode> {
544 self.inner.get_travel_mode()
545 }
546 /// <p>Travel mode related options for the provided travel mode.</p>
547 pub fn travel_mode_options(mut self, input: crate::types::RouteTravelModeOptions) -> Self {
548 self.inner = self.inner.travel_mode_options(input);
549 self
550 }
551 /// <p>Travel mode related options for the provided travel mode.</p>
552 pub fn set_travel_mode_options(mut self, input: ::std::option::Option<crate::types::RouteTravelModeOptions>) -> Self {
553 self.inner = self.inner.set_travel_mode_options(input);
554 self
555 }
556 /// <p>Travel mode related options for the provided travel mode.</p>
557 pub fn get_travel_mode_options(&self) -> &::std::option::Option<crate::types::RouteTravelModeOptions> {
558 self.inner.get_travel_mode_options()
559 }
560 /// <p>Type of step returned by the response. Default provides basic steps intended for web based applications. TurnByTurn provides detailed instructions with more granularity intended for a turn based navigation system.</p>
561 pub fn travel_step_type(mut self, input: crate::types::RouteTravelStepType) -> Self {
562 self.inner = self.inner.travel_step_type(input);
563 self
564 }
565 /// <p>Type of step returned by the response. Default provides basic steps intended for web based applications. TurnByTurn provides detailed instructions with more granularity intended for a turn based navigation system.</p>
566 pub fn set_travel_step_type(mut self, input: ::std::option::Option<crate::types::RouteTravelStepType>) -> Self {
567 self.inner = self.inner.set_travel_step_type(input);
568 self
569 }
570 /// <p>Type of step returned by the response. Default provides basic steps intended for web based applications. TurnByTurn provides detailed instructions with more granularity intended for a turn based navigation system.</p>
571 pub fn get_travel_step_type(&self) -> &::std::option::Option<crate::types::RouteTravelStepType> {
572 self.inner.get_travel_step_type()
573 }
574 ///
575 /// Appends an item to `Waypoints`.
576 ///
577 /// To override the contents of this collection use [`set_waypoints`](Self::set_waypoints).
578 ///
579 /// <p>List of waypoints between the Origin and Destination.</p>
580 pub fn waypoints(mut self, input: crate::types::RouteWaypoint) -> Self {
581 self.inner = self.inner.waypoints(input);
582 self
583 }
584 /// <p>List of waypoints between the Origin and Destination.</p>
585 pub fn set_waypoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RouteWaypoint>>) -> Self {
586 self.inner = self.inner.set_waypoints(input);
587 self
588 }
589 /// <p>List of waypoints between the Origin and Destination.</p>
590 pub fn get_waypoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RouteWaypoint>> {
591 self.inner.get_waypoints()
592 }
593}