Class GroundingChunkMapsRoute
Route information from Google Maps. This data type is not supported in Gemini API.
public record GroundingChunkMapsRoute : IEquatable<GroundingChunkMapsRoute>
- Inheritance
-
GroundingChunkMapsRoute
- Implements
- Inherited Members
Properties
DistanceMeters
The total distance of the route, in meters.
[JsonPropertyName("distanceMeters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? DistanceMeters { get; set; }
Property Value
- int?
Duration
The total duration of the route.
[JsonPropertyName("duration")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Duration { get; set; }
Property Value
EncodedPolyline
An encoded polyline of the route. See https://developers.google.com/maps/documentation/utilities/polylinealgorithm
[JsonPropertyName("encodedPolyline")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? EncodedPolyline { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a GroundingChunkMapsRoute object.
public static GroundingChunkMapsRoute? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- GroundingChunkMapsRoute
The deserialized GroundingChunkMapsRoute object, or null if deserialization fails.