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.



2763
2764
2765
# File 'lib/google/apis/places_v1/classes.rb', line 2763

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)


2752
2753
2754
# File 'lib/google/apis/places_v1/classes.rb', line 2752

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



2761
2762
2763
# File 'lib/google/apis/places_v1/classes.rb', line 2761

def legs
  @legs
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2768
2769
2770
2771
# File 'lib/google/apis/places_v1/classes.rb', line 2768

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