Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingParameters

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingParameters

Returns a new instance of GoogleMapsPlacesV1RoutingParameters.



2277
2278
2279
# File 'lib/google/apis/places_v1/classes.rb', line 2277

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#originGoogle::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



2256
2257
2258
# File 'lib/google/apis/places_v1/classes.rb', line 2256

def origin
  @origin
end

#route_modifiersGoogle::Apis::PlacesV1::GoogleMapsPlacesV1RouteModifiers

Encapsulates a set of optional conditions to satisfy when calculating the routes. Corresponds to the JSON property routeModifiers



2262
2263
2264
# File 'lib/google/apis/places_v1/classes.rb', line 2262

def route_modifiers
  @route_modifiers
end

#routing_preferenceString

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

Returns:

  • (String)


2270
2271
2272
# File 'lib/google/apis/places_v1/classes.rb', line 2270

def routing_preference
  @routing_preference
end

#travel_modeString

Optional. The travel mode. Corresponds to the JSON property travelMode

Returns:

  • (String)


2275
2276
2277
# File 'lib/google/apis/places_v1/classes.rb', line 2275

def travel_mode
  @travel_mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2282
2283
2284
2285
2286
2287
# File 'lib/google/apis/places_v1/classes.rb', line 2282

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