{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-maps/json-schema/google-maps-directions-response-schema.json",
  "title": "DirectionsResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-maps-platform-openapi.yml#/components/schemas/DirectionsResponse",
  "type": "object",
  "required": [
    "routes",
    "status"
  ],
  "properties": {
    "geocoded_waypoints": {
      "description": "Contains an array with details about the geocoding of origin, destination and waypoints. Elements in the geocoded_waypoints array correspond, by their zero-based position, to the origin, the waypoints in the order they are specified, and the destination.\n\nThese details will not be present for waypoints specified as textual latitude/longitude values if the service returns no results. This is because such waypoints are only reverse geocoded to obtain their representative address after a route has been found. An empty JSON object will occupy the corresponding places in the geocoded_waypoints array.\n",
      "type": "array",
      "items": {
        "$ref": "#/$defs/DirectionsGeocodedWaypoint"
      }
    },
    "routes": {
      "description": "Contains an array of routes from the origin to the destination. Routes consist of nested Legs and Steps.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/DirectionsRoute"
      }
    },
    "status": {
      "description": "Contains the status of the request, and may contain debugging information to help you track down why the request failed.",
      "$ref": "#/$defs/DirectionsStatus"
    },
    "available_travel_modes": {
      "description": "Contains an array of available travel modes. This field is returned when a request specifies a travel mode and gets no results. The array contains the available travel modes in the countries of the given set of waypoints. This field is not returned if one or more of the waypoints are 'via waypoints'.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/TravelMode"
      }
    },
    "error_message": {
      "description": "When the service returns a status code other than `OK`, there may be an additional `error_message` field within the response object. This field contains more detailed information about the reasons behind the given status code. This field is not always returned, and its content is subject to change.\n",
      "type": "string"
    }
  },
  "$defs": {
    "Bounds": {
      "title": "Bounds",
      "type": "object",
      "description": "A rectangle in geographical coordinates from points at the southwest and northeast corners.",
      "required": [
        "northeast",
        "southwest"
      ],
      "properties": {
        "northeast": {
          "$ref": "#/$defs/LatLngLiteral"
        },
        "southwest": {
          "$ref": "#/$defs/LatLngLiteral"
        }
      }
    },
    "DirectionsGeocodedWaypoint": {
      "type": "object",
      "title": "DirectionsGeocodedWaypoint",
      "properties": {
        "geocoder_status": {
          "description": "Indicates the status code resulting from the geocoding operation. This field may contain the following values.",
          "type": "string",
          "enum": [
            "OK",
            "ZERO_RESULTS"
          ]
        },
        "partial_match": {
          "description": "Indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the requested address. You may wish to examine the original request for misspellings and/or an incomplete address.\n\nPartial matches most often occur for street addresses that do not exist within the locality you pass in the request. Partial matches may also be returned when a request matches two or more locations in the same locality. For example, \"21 Henr St, Bristol, UK\" will return a partial match for both Henry Street and Henrietta Street. Note that if a request includes a misspelled address component, the geocoding service may suggest an alternative address. Suggestions triggered in this way will also be marked as a partial match.\n"
        },
        "place_id": {
          "description": "A unique identifier that can be used with other Google APIs. See the [Place ID overview](https://developers.google.com/maps/documentation/places/web-service/place-id).",
          "type": "string"
        },
        "types": {
          "description": "Indicates the address type of the geocoding result used for calculating directions.\n\n* `administrative_area_level_1` indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels. In most cases, administrative_area_level_1 short names will closely match ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based on a variety of signals and location data.\n* `administrative_area_level_2` indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. Not all nations exhibit these administrative levels.\n* `administrative_area_level_3` indicates a third-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.\n* `administrative_area_level_4` indicates a fourth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.\n* `administrative_area_level_5` indicates a fifth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.\n* `airport` indicates an airport.\n* `colloquial_area` indicates a commonly-used alternative name for the entity.\n* `country` indicates the national political entity, and is typically the highest order type returned by the Geocoder.\n* `intersection` indicates a major intersection, usually of two major roads.\n* `locality` indicates an incorporated city or town political entity.\n* `natural_feature` indicates a prominent natural feature.\n* `neighborhood` indicates a named neighborhood\n* `park` indicates a named park.\n* `plus_code` indicates an encoded location reference, derived from latitude and longitude. Plus codes can be used as a replacement for street addresses in places where they do not exist (where buildings are not numbered or streets are not named). See [https://plus.codes](https://plus.codes/) for details.\n* `point_of_interest` indicates a named point of interest. Typically, these \"POI\"s are prominent local entities that don't easily fit in another category, such as \"Empire State Building\" or \"Eiffel Tower\".\n* `political` indicates a political entity. Usually, this type indicates a polygon of some civil administration.\n* `postal_code` indicates a postal code as used to address postal mail within the country.\n* `premise` indicates a named location, usually a building or collection of buildings with a common name\n* `route` indicates a named route (such as \"US 101\").\n* `street_address` indicates a precise street address.\n* `sublocality` indicates a first-order civil entity below a locality. For some locations may receive one of the additional types: sublocality_level_1 to sublocality_level_5. Each sublocality level is a civil entity. Larger numbers indicate a smaller geographic area.\n* `subpremise` indicates a first-order entity below a named location, usually a singular building within a collection of buildings with a common name\n* `tourist_attraction` indicates a tourist attraction.\n* `train_station` indicates a train station.\n* `transit_station` indicates a transit station.\n\nAn empty list of types indicates there are no known types for the particular address component, for example, Lieu-dit in France.\n",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "administrative_area_level_1",
              "administrative_area_level_2",
              "administrative_area_level_3",
              "administrative_area_level_4",
              "administrative_area_level_5",
              "amusement_park",
              "airport",
              "colloquial_area",
              "country",
              "establishment",
              "intersection",
              "locality",
              "natural_feature",
              "neighborhood",
              "park",
              "plus_code",
              "point_of_interest",
              "political",
              "postal_code",
              "premise",
              "route",
              "street_address",
              "sublocality",
              "sublocality_level_1",
              "subpremise",
              "tourist_attraction",
              "train_station",
              "transit_station"
            ]
          }
        }
      }
    },
    "DirectionsLeg": {
      "type": "object",
      "title": "DirectionsLeg",
      "required": [
        "end_address",
        "end_location",
        "start_address",
        "start_location",
        "steps",
        "traffic_speed_entry",
        "via_waypoint"
      ],
      "properties": {
        "arrival_time": {
          "description": "Contains the estimated time of arrival for this leg. This property is only returned for transit directions.",
          "$ref": "#/$defs/TimeZoneTextValueObject"
        },
        "departure_time": {
          "description": "Contains the estimated time of departure for this leg, specified as a Time object. The `departure_time` is only available for transit directions.",
          "$ref": "#/$defs/TimeZoneTextValueObject"
        },
        "distance": {
          "description": "The total distance covered by this leg.",
          "$ref": "#/$defs/TextValueObject"
        },
        "duration": {
          "description": "The total duration of this leg.",
          "$ref": "#/$defs/TextValueObject"
        },
        "duration_in_traffic": {
          "description": "Indicates the total duration of this leg. This value is an estimate of the time in traffic based on current and historical traffic conditions. See the `traffic_model` request parameter for the options you can use to request that the returned value is optimistic, pessimistic, or a best-guess estimate. The duration in traffic is returned only if all of the following are true:\n\n* The request does not include stopover waypoints. If the request includes waypoints, they must be prefixed with `via:` to avoid stopovers.\n* The request is specifically for driving directions—the mode parameter is set to `driving`.\n* The request includes a `departure_time` parameter.\n* Traffic conditions are available for the requested route.\n",
          "$ref": "#/$defs/TextValueObject"
        },
        "end_address": {
          "description": "Contains the human-readable address (typically a street address) from reverse geocoding the `end_location` of this leg. This content is meant to be read as-is. Do not programmatically parse the formatted address.",
          "type": "string"
        },
        "end_location": {
          "description": "The latitude/longitude coordinates of the given destination of this leg. Because the Directions API calculates directions between locations by using the nearest transportation option (usually a road) at the start and end points, `end_location` may be different than the provided destination of this leg if, for example, a road is not near the destination.",
          "$ref": "#/$defs/LatLngLiteral"
        },
        "start_address": {
          "description": "Contains the human-readable address (typically a street address) resulting from reverse geocoding the `start_location` of this leg. This content is meant to be read as-is. Do not programmatically parse the formatted address.",
          "type": "string"
        },
        "start_location": {
          "description": "The latitude/longitude coordinates of the origin of this leg. Because the Directions API calculates directions between locations by using the nearest transportation option (usually a road) at the start and end points, `start_location` may be different than the provided origin of this leg if, for example, a road is not near the origin.",
          "$ref": "#/$defs/LatLngLiteral"
        },
        "steps": {
          "description": "An array of steps denoting information about each separate step of the leg of the journey.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DirectionsStep"
          }
        },
        "traffic_speed_entry": {
          "deprecated": true,
          "description": "Information about traffic speed along the leg.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DirectionsTrafficSpeedEntry"
          }
        },
        "via_waypoint": {
          "description": "The locations of via waypoints along this leg.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DirectionsViaWaypoint"
          }
        }
      }
    },
    "DirectionsPolyline": {
      "type": "object",
      "title": "DirectionsPolyline",
      "description": "[Polyline encoding](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) is a lossy compression algorithm that allows you to store a series of coordinates as a single string. Point coordinates are encoded using signed values. If you only have a few static points, you may also wish to use the interactive polyline encoding utility.\n\nThe encoding process converts a binary value into a series of character codes for ASCII characters using the familiar base64 encoding scheme: to ensure proper display of these characters, encoded values are summed with 63 (the ASCII character '?') before converting them into ASCII. The algorithm also checks for additional character codes for a given point by checking the least significant bit of each byte group; if this bit is set to 1, the point is not yet fully formed and additional data must follow.\n\nAdditionally, to conserve space, points only include the offset from the previous point (except of course for the first point). All points are encoded in Base64 as signed integers, as latitudes and longitudes are signed values. The encoding format within a polyline needs to represent two coordinates representing latitude and longitude to a reasonable precision. Given a maximum longitude of +/- 180 degrees to a precision of 5 decimal places (180.00000 to -180.00000), this results in the need for a 32 bit signed binary integer value.\n",
      "required": [
        "points"
      ],
      "properties": {
        "points": {
          "type": "string",
          "description": "A single string representation of the polyline."
        }
      }
    },
    "DirectionsRoute": {
      "type": "object",
      "title": "DirectionsRoute",
      "description": "Routes consist of nested `legs` and `steps`.",
      "required": [
        "bounds",
        "copyrights",
        "legs",
        "overview_polyline",
        "summary",
        "warnings",
        "waypoint_order"
      ],
      "properties": {
        "legs": {
          "description": "An array which contains information about a leg of the route, between two locations within the given route. A separate leg will be present for each waypoint or destination specified. (A route with no waypoints will contain exactly one leg within the legs array.) Each leg consists of a series of steps.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DirectionsLeg"
          }
        },
        "bounds": {
          "description": "Contains the viewport bounding box of the `overview_polyline`.",
          "$ref": "#/$defs/Bounds"
        },
        "copyrights": {
          "type": "string",
          "description": "Contains an array of warnings to be displayed when showing these directions. You must handle and display these warnings yourself."
        },
        "summary": {
          "type": "string",
          "description": "Contains a short textual description for the route, suitable for naming and disambiguating the route from alternatives."
        },
        "waypoint_order": {
          "type": "array",
          "description": "An array indicating the order of any waypoints in the calculated route. This waypoints may be reordered if the request was passed optimize:true within its waypoints parameter.",
          "items": {
            "type": "integer"
          }
        },
        "warnings": {
          "type": "array",
          "description": "Contains an array of warnings to be displayed when showing these directions. You must handle and display these warnings yourself.",
          "items": {
            "type": "string"
          }
        },
        "overview_polyline": {
          "description": "Contains an object that holds an encoded polyline representation of the route. This polyline is an approximate (smoothed) path of the resulting directions.",
          "$ref": "#/$defs/DirectionsPolyline"
        },
        "fare": {
          "description": "If present, contains the total fare (that is, the total ticket costs) on this route. This property is only returned for transit requests and only for routes where fare information is available for all transit legs.",
          "$ref": "#/$defs/Fare"
        }
      }
    },
    "DirectionsStatus": {
      "type": "string",
      "title": "DirectionsStatus",
      "description": "The status field within the Directions response object contains the status of the request, and may contain debugging information to help you track down why the Directions service failed. The status field may contain the following values:\n\n- `OK` indicates the response contains a valid result.\n- `NOT_FOUND` indicates at least one of the locations specified in the request's origin, destination, or waypoints could not be geocoded.\n- `ZERO_RESULTS` indicates no route could be found between the origin and destination.\n- `MAX_WAYPOINTS_EXCEEDED` indicates that too many waypoints were provided in the request. For applications using the Directions API as a web service, or the directions service in the Maps JavaScript API, the maximum allowed number of waypoints is 25, plus the origin and destination.\n- `MAX_ROUTE_LENGTH_EXCEEDED` indicates the requested route is too long and cannot be processed. This error occurs when more complex directions are returned. Try reducing the number of waypoints, turns, or instructions.\n- `INVALID_REQUEST` indicates that the provided request was invalid. Common causes of this status include an invalid parameter or parameter value.\n- `OVER_DAILY_LIMIT` indicates any of the following:\n    - The API key is missing or invalid.\n    - Billing has not been enabled on your account.\n    - A self-imposed usage cap has been exceeded.\n    - The provided method of payment is no longer valid (for example, a credit card has expired).\n    See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this.\n- `OVER_QUERY_LIMIT` indicates the service has received too many requests from your application within the allowed time period.\n- `REQUEST_DENIED` indicates that the service denied use of the directions service by your application.\n- `UNKNOWN_ERROR` indicates a directions request could not be processed due to a server error. The request may succeed if you try again.\n",
      "enum": [
        "OK",
        "NOT_FOUND",
        "ZERO_RESULTS",
        "MAX_WAYPOINTS_EXCEEDED",
        "MAX_ROUTE_LENGTH_EXCEEDED",
        "INVALID_REQUEST",
        "OVER_DAILY_LIMIT",
        "OVER_QUERY_LIMIT",
        "REQUEST_DENIED",
        "UNKNOWN_ERROR"
      ]
    },
    "DirectionsStep": {
      "type": "object",
      "title": "DirectionsStep",
      "description": "Each element in the steps array defines a single step of the calculated directions. A step is the most atomic unit of a direction's route, containing a single step describing a specific, single instruction on the journey. E.g. \"Turn left at W. 4th St.\" The step not only describes the instruction but also contains distance and duration information relating to how this step relates to the following step. For example, a step denoted as \"Merge onto I-80 West\" may contain a duration of \"37 miles\" and \"40 minutes,\" indicating that the next step is 37 miles/40 minutes from this step.\n\nWhen using the Directions API to search for transit directions, the steps array will include additional transit details in the form of a transit_details array. If the directions include multiple modes of transportation, detailed directions will be provided for walking or driving steps in an inner steps array. For example, a walking step will include directions from the start and end locations: \"Walk to Innes Ave & Fitch St\". That step will include detailed walking directions for that route in the inner steps array, such as: \"Head north-west\", \"Turn left onto Arelious Walker\", and \"Turn left onto Innes Ave\".\n",
      "required": [
        "duration",
        "end_location",
        "start_location",
        "html_instructions",
        "polyline",
        "travel_mode"
      ],
      "properties": {
        "distance": {
          "description": "Contains the distance covered by this step until the next step. This field may be undefined if the distance is unknown.",
          "$ref": "#/$defs/TextValueObject"
        },
        "duration": {
          "description": "Contains the typical time required to perform the step, until the next step. This field may be undefined if the duration is unknown.",
          "$ref": "#/$defs/TextValueObject"
        },
        "end_location": {
          "description": "Contains the location of the last point of this step.",
          "$ref": "#/$defs/LatLngLiteral"
        },
        "html_instructions": {
          "type": "string",
          "description": "Contains formatted instructions for this step, presented as an HTML text string. This content is meant to be read as-is. Do not programmatically parse this display-only content."
        },
        "maneuver": {
          "type": "string",
          "description": "Contains the action to take for the current step (turn left, merge, straight, etc.). Values are subject to change, and new values may be introduced without prior notice.",
          "enum": [
            "turn-slight-left",
            "turn-sharp-left",
            "turn-left",
            "turn-slight-right",
            "turn-sharp-right",
            "keep-right",
            "keep-left",
            "uturn-left",
            "uturn-right",
            "turn-right",
            "straight",
            "ramp-left",
            "ramp-right",
            "merge",
            "fork-left",
            "fork-right",
            "ferry",
            "ferry-train",
            "roundabout-left",
            "roundabout-right"
          ]
        },
        "polyline": {
          "$ref": "#/$defs/DirectionsPolyline",
          "description": "Contains a single points object that holds an [encoded polyline](https://developers..google.com/maps/documentation/utilities/polylinealgorithm) representation of the step. This polyline is an approximate (smoothed) path of the step."
        },
        "start_location": {
          "description": "Contains the location of the starting point of this step.",
          "$ref": "#/$defs/LatLngLiteral"
        },
        "transit_details": {
          "description": "Details pertaining to this step if the travel mode is `TRANSIT`.",
          "$ref": "#/$defs/DirectionsTransitDetails"
        },
        "travel_mode": {
          "description": "Contains the type of travel mode used.",
          "$ref": "#/$defs/TravelMode"
        },
        "steps": {
          "description": "Contains detailed directions for walking or driving steps in transit directions. Substeps are only available when travel_mode is set to \"transit\". The inner steps array is of the same type as steps."
        }
      }
    },
    "DirectionsTrafficSpeedEntry": {
      "type": "object",
      "title": "DirectionsTrafficSpeedEntry",
      "required": [
        "speed_category",
        "offset_meters"
      ],
      "deprecated": true,
      "properties": {
        "speed_category": {
          "type": "string",
          "description": "The current traffic/speed conditions on this portion of a path."
        },
        "offset_meters": {
          "type": "number",
          "description": "The offset along the path (in meters) up to which this speed category is valid."
        }
      }
    },
    "DirectionsTransitAgency": {
      "type": "object",
      "title": "DirectionsTransitAgency",
      "properties": {
        "name": {
          "description": "The name of this transit agency.",
          "type": "string"
        },
        "phone": {
          "description": "The transit agency's phone number.",
          "type": "string"
        },
        "url": {
          "description": "The transit agency's URL.",
          "type": "string"
        }
      }
    },
    "DirectionsTransitDetails": {
      "type": "object",
      "title": "DirectionsTransitDetails",
      "description": "Additional information that is not relevant for other modes of transportation.",
      "properties": {
        "arrival_stop": {
          "description": "The arrival transit stop.",
          "$ref": "#/$defs/DirectionsTransitStop"
        },
        "arrival_time": {
          "$ref": "#/$defs/TimeZoneTextValueObject"
        },
        "departure_stop": {
          "description": "The departure transit stop.",
          "$ref": "#/$defs/DirectionsTransitStop"
        },
        "departure_time": {
          "$ref": "#/$defs/TimeZoneTextValueObject"
        },
        "headsign": {
          "description": "Specifies the direction in which to travel on this line, as it is marked on the vehicle or at the departure stop. This will often be the terminus station.",
          "type": "string"
        },
        "headway": {
          "description": "Specifies the expected number of seconds between departures from the same stop at this time. For example, with a `headway` value of 600, you would expect a ten minute wait if you should miss your bus.",
          "type": "integer"
        },
        "line": {
          "description": "Contains information about the transit line used in this step.",
          "$ref": "#/$defs/DirectionsTransitLine"
        },
        "num_stops": {
          "description": "The number of stops from the departure to the arrival stop. This includes the arrival stop, but not the departure stop. For example, if your directions involve leaving from Stop A, passing through stops B and C, and arriving at stop D, `num_stops` will return 3.",
          "type": "integer"
        },
        "trip_short_name": {
          "description": "The text that appears in schedules and sign boards to identify a transit trip to passengers. The text should uniquely identify a trip within a service day. For example, \"538\" is the `trip_short_name` of the Amtrak train that leaves San Jose, CA at 15:10 on weekdays to Sacramento, CA.",
          "type": "string"
        }
      }
    },
    "DirectionsTransitLine": {
      "type": "object",
      "title": "DirectionsTransitLine",
      "required": [
        "agencies",
        "name"
      ],
      "properties": {
        "agencies": {
          "description": "The transit agency (or agencies) that operates this transit line.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DirectionsTransitAgency"
          }
        },
        "color": {
          "description": "The color commonly used in signage for this line.",
          "type": "string"
        },
        "name": {
          "description": "The full name of this transit line, e.g. \"8 Avenue Local\".",
          "type": "string"
        },
        "short_name": {
          "description": "The short name of this transit line. This will normally be a line number, such as \"M7\" or \"355\".",
          "type": "string"
        },
        "text_color": {
          "description": "The color commonly used in signage for this line.",
          "type": "string"
        },
        "url": {
          "description": "Contains the URL for this transit line as provided by the transit agency.",
          "type": "string"
        },
        "icon": {
          "description": "Contains the URL for the icon associated with this line.",
          "type": "string"
        },
        "vehicle": {
          "description": "The type of vehicle that operates on this transit line.",
          "$ref": "#/$defs/DirectionsTransitVehicle"
        }
      }
    },
    "DirectionsTransitStop": {
      "type": "object",
      "title": "DirectionsTransitStop",
      "required": [
        "location",
        "name"
      ],
      "properties": {
        "location": {
          "description": "The location of the stop.",
          "$ref": "#/$defs/LatLngLiteral"
        },
        "name": {
          "description": "The name of the transit stop.",
          "type": "string"
        }
      }
    },
    "DirectionsTransitVehicle": {
      "type": "object",
      "title": "DirectionsTransitVehicle",
      "required": [
        "type",
        "name"
      ],
      "properties": {
        "icon": {
          "description": "Contains the URL for an icon associated with this vehicle type.",
          "type": "string"
        },
        "local_icon": {
          "description": "Contains the URL for the icon associated with this vehicle type, based on the local transport signage.",
          "type": "string"
        },
        "name": {
          "description": "The name of this vehicle, capitalized.",
          "type": "string"
        },
        "type": {
          "description": "The type of vehicle used.\n\n* `BUS` -\tBus.\n* `CABLE_CAR` -\tA vehicle that operates on a cable, usually on the ground. Aerial cable cars may be of the type GONDOLA_LIFT.\n* `COMMUTER_TRAIN` -\tCommuter rail.\n* `FERRY` -\tFerry.\n* `FUNICULAR` -\tA vehicle that is pulled up a steep incline by a cable. A Funicular typically consists of two cars, with each car acting as a counterweight for the other.\n* `GONDOLA_LIFT` -\tAn aerial cable car.\n* `HEAVY_RAIL` -\tHeavy rail.\n* `HIGH_SPEED_TRAIN` -\tHigh speed train.\n* `INTERCITY_BUS` -\tIntercity bus.\n* `LONG_DISTANCE_TRAIN` -\tLong distance train.\n* `METRO_RAIL` -\tLight rail transit.\n* `MONORAIL` -\tMonorail.\n* `OTHER` -\tAll other vehicles will return this type.\n* `RAIL` -\tRail.\n* `SHARE_TAXI` -\tShare taxi is a kind of bus with the ability to drop off and pick up passengers anywhere on its route.\n* `SUBWAY` -\tUnderground light rail.\n* `TRAM` -\tAbove ground light rail.\n* `TROLLEYBUS` -\tTrolleybus.\n",
          "type": "string",
          "enum": [
            "BUS",
            "CABLE_CAR",
            "COMMUTER_TRAIN",
            "FERRY",
            "FUNICULAR",
            "GONDOLA_LIFT",
            "HEAVY_RAIL",
            "HIGH_SPEED_TRAIN",
            "INTERCITY_BUS",
            "LONG_DISTANCE_TRAIN",
            "METRO_RAIL",
            "MONORAIL",
            "OTHER",
            "RAIL",
            "SHARE_TAXI",
            "SUBWAY",
            "TRAM",
            "TROLLEYBUS"
          ]
        }
      }
    },
    "DirectionsViaWaypoint": {
      "type": "object",
      "title": "DirectionsViaWaypoint",
      "properties": {
        "location": {
          "description": "The location of the waypoint.",
          "$ref": "#/$defs/LatLngLiteral"
        },
        "step_index": {
          "description": "The index of the step containing the waypoint.",
          "type": "integer"
        },
        "step_interpolation": {
          "description": "The position of the waypoint along the step's polyline, expressed as a ratio from 0 to 1.",
          "type": "number"
        }
      }
    },
    "Fare": {
      "type": "object",
      "title": "Fare",
      "description": "The total fare for the route.\n\n```\n{\n  \"currency\" : \"USD\",\n  \"value\" : 6,\n  \"text\" : \"$6.00\"\n}\n```\n",
      "required": [
        "currency",
        "value",
        "text"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "description": "An [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) indicating the currency that the amount is expressed in."
        },
        "value": {
          "type": "number",
          "description": "The total fare amount, in the currency specified."
        },
        "text": {
          "type": "string",
          "description": "The total fare amount, formatted in the requested language."
        }
      }
    },
    "LatLngLiteral": {
      "type": "object",
      "title": "LatLngLiteral",
      "description": "An object describing a specific location with Latitude and Longitude in decimal degrees.",
      "required": [
        "lat",
        "lng"
      ],
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude in decimal degrees"
        },
        "lng": {
          "type": "number",
          "description": "Longitude in decimal degrees"
        }
      }
    },
    "TextValueObject": {
      "type": "object",
      "title": "TextValueObject",
      "description": "An object containing a numeric value and its formatted text representation.",
      "required": [
        "text",
        "value"
      ],
      "properties": {
        "text": {
          "description": "String value.",
          "type": "string"
        },
        "value": {
          "description": "Numeric value.",
          "type": "number"
        }
      }
    },
    "TimeZoneTextValueObject": {
      "type": "object",
      "title": "TimeZoneTextValueObject",
      "description": "An object containing Unix time, a time zone, and its formatted text representation.",
      "required": [
        "text",
        "time_zone",
        "value"
      ],
      "properties": {
        "text": {
          "description": "The time specified as a string in the time zone.",
          "type": "string"
        },
        "value": {
          "description": "The time specified as Unix time, or seconds since midnight, January 1, 1970 UTC.",
          "type": "number"
        },
        "time_zone": {
          "description": "Contains the time zone. The value is the name of the time zone as defined in the [IANA Time Zone Database](http://www.iana.org/time-zones), e.g. \"America/New_York\".",
          "type": "string"
        }
      }
    },
    "TravelMode": {
      "type": "string",
      "title": "TravelMode",
      "description": "- `DRIVING` (default) indicates calculation using the road network.\n- `BICYCLING` requests calculation for bicycling via bicycle paths & preferred streets (where available).\n- `TRANSIT` requests calculation via public transit routes (where available). \n- `WALKING` requests calculation for walking via pedestrian paths & sidewalks (where available).\n",
      "enum": [
        "DRIVING",
        "BICYCLING",
        "TRANSIT",
        "WALKING"
      ]
    }
  }
}