Class GoogleMaps

  • All Implemented Interfaces:

    
    public abstract class GoogleMaps
    extends JsonSerializable
                        

    Tool to retrieve knowledge from Google Maps.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class GoogleMaps.Builder

      Builder for GoogleMaps.

    • Constructor Summary

      Constructors 
      Constructor Description
      GoogleMaps()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Optional<AuthConfig> authConfig() The authentication config to access the API.
      abstract Optional<Boolean> enableWidget() Optional.
      static GoogleMaps.Builder builder() Instantiates a builder for GoogleMaps.
      abstract GoogleMaps.Builder toBuilder() Creates a builder with the same values as this instance.
      static GoogleMaps fromJson(String jsonString) Deserializes a JSON string to a GoogleMaps object.
      • Methods inherited from class com.google.genai.JsonSerializable

        fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GoogleMaps

        GoogleMaps()
    • Method Detail

      • authConfig

         abstract Optional<AuthConfig> authConfig()

        The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API.

      • enableWidget

         abstract Optional<Boolean> enableWidget()

        Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response.