Table of Contents

Class GroundingChunkMapsRoute

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

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

string

EncodedPolyline

[JsonPropertyName("encodedPolyline")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? EncodedPolyline { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GroundingChunkMapsRoute object.

public static GroundingChunkMapsRoute? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GroundingChunkMapsRoute

The deserialized GroundingChunkMapsRoute object, or null if deserialization fails.