/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace LocationService { namespace Model { /** *

Returns the result of the route calculation. Metadata includes legs and route * summary.

See Also:

AWS * API Reference

*/ class CalculateRouteResult { public: AWS_LOCATIONSERVICE_API CalculateRouteResult(); AWS_LOCATIONSERVICE_API CalculateRouteResult(const Aws::AmazonWebServiceResult& result); AWS_LOCATIONSERVICE_API CalculateRouteResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline const Aws::Vector& GetLegs() const{ return m_legs; } /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline void SetLegs(const Aws::Vector& value) { m_legs = value; } /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline void SetLegs(Aws::Vector&& value) { m_legs = std::move(value); } /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline CalculateRouteResult& WithLegs(const Aws::Vector& value) { SetLegs(value); return *this;} /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline CalculateRouteResult& WithLegs(Aws::Vector&& value) { SetLegs(std::move(value)); return *this;} /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline CalculateRouteResult& AddLegs(const Leg& value) { m_legs.push_back(value); return *this; } /** *

Contains details about each path between a pair of positions included along a * route such as: StartPosition, EndPosition, * Distance, DurationSeconds, Geometry, and * Steps. The number of legs returned corresponds to one fewer than * the total number of positions in the request.

For example, a route with * a departure position and destination position returns one leg with the positions * snapped * to a nearby road:

  • The StartPosition is the * departure position.

  • The EndPosition is the * destination position.

A route with a waypoint between the * departure and destination position returns two legs with the positions snapped * to a nearby road:

  • Leg 1: The StartPosition is the * departure position . The EndPosition is the waypoint positon.

    *
  • Leg 2: The StartPosition is the waypoint position. * The EndPosition is the destination position.

*/ inline CalculateRouteResult& AddLegs(Leg&& value) { m_legs.push_back(std::move(value)); return *this; } /** *

Contains information about the whole route, such as: RouteBBox, * DataSource, Distance, DistanceUnit, and * DurationSeconds.

*/ inline const CalculateRouteSummary& GetSummary() const{ return m_summary; } /** *

Contains information about the whole route, such as: RouteBBox, * DataSource, Distance, DistanceUnit, and * DurationSeconds.

*/ inline void SetSummary(const CalculateRouteSummary& value) { m_summary = value; } /** *

Contains information about the whole route, such as: RouteBBox, * DataSource, Distance, DistanceUnit, and * DurationSeconds.

*/ inline void SetSummary(CalculateRouteSummary&& value) { m_summary = std::move(value); } /** *

Contains information about the whole route, such as: RouteBBox, * DataSource, Distance, DistanceUnit, and * DurationSeconds.

*/ inline CalculateRouteResult& WithSummary(const CalculateRouteSummary& value) { SetSummary(value); return *this;} /** *

Contains information about the whole route, such as: RouteBBox, * DataSource, Distance, DistanceUnit, and * DurationSeconds.

*/ inline CalculateRouteResult& WithSummary(CalculateRouteSummary&& value) { SetSummary(std::move(value)); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline CalculateRouteResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline CalculateRouteResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline CalculateRouteResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Vector m_legs; CalculateRouteSummary m_summary; Aws::String m_requestId; }; } // namespace Model } // namespace LocationService } // namespace Aws