Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingParameters
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingParameters
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
Parameters to configure the routing calculations to the places in the response, both along a route (where result ranking will be influenced) and for calculating travel times on results.
Instance Attribute Summary collapse
-
#origin ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair.
-
#route_modifiers ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1RouteModifiers
Encapsulates a set of optional conditions to satisfy when calculating the routes.
-
#routing_preference ⇒ String
Optional.
-
#travel_mode ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingParameters
constructor
A new instance of GoogleMapsPlacesV1RoutingParameters.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingParameters
Returns a new instance of GoogleMapsPlacesV1RoutingParameters.
2806 2807 2808 |
# File 'lib/google/apis/places_v1/classes.rb', line 2806 def initialize(**args) update!(**args) end |
Instance Attribute Details
#origin ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair. This is expressed as a
pair of doubles to represent degrees latitude and degrees longitude. Unless
specified otherwise, this object must conform to the WGS84 standard. Values
must be within normalized ranges.
Corresponds to the JSON property origin
2785 2786 2787 |
# File 'lib/google/apis/places_v1/classes.rb', line 2785 def origin @origin end |
#route_modifiers ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1RouteModifiers
Encapsulates a set of optional conditions to satisfy when calculating the
routes.
Corresponds to the JSON property routeModifiers
2791 2792 2793 |
# File 'lib/google/apis/places_v1/classes.rb', line 2791 def route_modifiers @route_modifiers end |
#routing_preference ⇒ String
Optional. Specifies how to compute the routing summaries. The server attempts
to use the selected routing preference to compute the route. The traffic aware
routing preference is only available for the DRIVE or TWO_WHEELER
travelMode.
Corresponds to the JSON property routingPreference
2799 2800 2801 |
# File 'lib/google/apis/places_v1/classes.rb', line 2799 def routing_preference @routing_preference end |
#travel_mode ⇒ String
Optional. The travel mode.
Corresponds to the JSON property travelMode
2804 2805 2806 |
# File 'lib/google/apis/places_v1/classes.rb', line 2804 def travel_mode @travel_mode end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2811 2812 2813 2814 2815 2816 |
# File 'lib/google/apis/places_v1/classes.rb', line 2811 def update!(**args) @origin = args[:origin] if args.key?(:origin) @route_modifiers = args[:route_modifiers] if args.key?(:route_modifiers) @routing_preference = args[:routing_preference] if args.key?(:routing_preference) @travel_mode = args[:travel_mode] if args.key?(:travel_mode) end |