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

Contains a search result from a position search query that is run on a place * index resource.

See Also:

AWS * API Reference

*/ class SearchForPositionResult { public: AWS_LOCATIONSERVICE_API SearchForPositionResult(); AWS_LOCATIONSERVICE_API SearchForPositionResult(Aws::Utils::Json::JsonView jsonValue); AWS_LOCATIONSERVICE_API SearchForPositionResult& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The distance in meters of a great-circle arc between the query position and * the result.

A great-circle arc is the shortest path on a sphere, * in this case the Earth. This returns the shortest distance between two * locations.

*/ inline double GetDistance() const{ return m_distance; } /** *

The distance in meters of a great-circle arc between the query position and * the result.

A great-circle arc is the shortest path on a sphere, * in this case the Earth. This returns the shortest distance between two * locations.

*/ inline bool DistanceHasBeenSet() const { return m_distanceHasBeenSet; } /** *

The distance in meters of a great-circle arc between the query position and * the result.

A great-circle arc is the shortest path on a sphere, * in this case the Earth. This returns the shortest distance between two * locations.

*/ inline void SetDistance(double value) { m_distanceHasBeenSet = true; m_distance = value; } /** *

The distance in meters of a great-circle arc between the query position and * the result.

A great-circle arc is the shortest path on a sphere, * in this case the Earth. This returns the shortest distance between two * locations.

*/ inline SearchForPositionResult& WithDistance(double value) { SetDistance(value); return *this;} /** *

Details about the search result, such as its address and position.

*/ inline const Place& GetPlace() const{ return m_place; } /** *

Details about the search result, such as its address and position.

*/ inline bool PlaceHasBeenSet() const { return m_placeHasBeenSet; } /** *

Details about the search result, such as its address and position.

*/ inline void SetPlace(const Place& value) { m_placeHasBeenSet = true; m_place = value; } /** *

Details about the search result, such as its address and position.

*/ inline void SetPlace(Place&& value) { m_placeHasBeenSet = true; m_place = std::move(value); } /** *

Details about the search result, such as its address and position.

*/ inline SearchForPositionResult& WithPlace(const Place& value) { SetPlace(value); return *this;} /** *

Details about the search result, such as its address and position.

*/ inline SearchForPositionResult& WithPlace(Place&& value) { SetPlace(std::move(value)); return *this;} /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline const Aws::String& GetPlaceId() const{ return m_placeId; } /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline bool PlaceIdHasBeenSet() const { return m_placeIdHasBeenSet; } /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline void SetPlaceId(const Aws::String& value) { m_placeIdHasBeenSet = true; m_placeId = value; } /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline void SetPlaceId(Aws::String&& value) { m_placeIdHasBeenSet = true; m_placeId = std::move(value); } /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline void SetPlaceId(const char* value) { m_placeIdHasBeenSet = true; m_placeId.assign(value); } /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline SearchForPositionResult& WithPlaceId(const Aws::String& value) { SetPlaceId(value); return *this;} /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline SearchForPositionResult& WithPlaceId(Aws::String&& value) { SetPlaceId(std::move(value)); return *this;} /** *

The unique identifier of the place. You can use this with the * GetPlace operation to find the place again later.

For * SearchPlaceIndexForPosition operations, the PlaceId is * returned only by place indexes that use HERE or Grab as a data provider.

* */ inline SearchForPositionResult& WithPlaceId(const char* value) { SetPlaceId(value); return *this;} private: double m_distance; bool m_distanceHasBeenSet = false; Place m_place; bool m_placeHasBeenSet = false; Aws::String m_placeId; bool m_placeIdHasBeenSet = false; }; } // namespace Model } // namespace LocationService } // namespace Aws