Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummary

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

The duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. Note: Adding routingSummaries in the field mask without also including either the routingParameters.origin parameter or the searchAlongRouteParameters. polyline.encodedPolyline parameter in the request causes an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummary

Returns a new instance of GoogleMapsPlacesV1RoutingSummary.



2846
2847
2848
# File 'lib/google/apis/places_v1/classes.rb', line 2846

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

Instance Attribute Details

#directions_uriString

A link to show directions on Google Maps using the waypoints from the given routing summary. The route generated by this link is not guaranteed to be the same as the route used to generate the routing summary. The link uses information provided in the request, from fields including routingParameters and searchAlongRouteParameters when applicable, to generate the directions link. Corresponds to the JSON property directionsUri

Returns:

  • (String)


2835
2836
2837
# File 'lib/google/apis/places_v1/classes.rb', line 2835

def directions_uri
  @directions_uri
end

#legsArray<Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg>

The legs of the trip. When you calculate travel duration and distance from a set origin, legs contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, legs contains two legs: one from the origin to place, and one from the place to the destination. Corresponds to the JSON property legs



2844
2845
2846
# File 'lib/google/apis/places_v1/classes.rb', line 2844

def legs
  @legs
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2851
2852
2853
2854
# File 'lib/google/apis/places_v1/classes.rb', line 2851

def update!(**args)
  @directions_uri = args[:directions_uri] if args.key?(:directions_uri)
  @legs = args[:legs] if args.key?(:legs)
end