Package com.google.genai.types
Class GroundingChunkCustomMetadata
-
- All Implemented Interfaces:
public abstract class GroundingChunkCustomMetadata extends JsonSerializable
User provided metadata about the GroundingFact. This data type is not supported in Vertex AI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGroundingChunkCustomMetadata.BuilderBuilder for GroundingChunkCustomMetadata.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GroundingChunkCustomMetadata()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>key()The key of the metadata. abstract Optional<Float>numericValue()Optional. abstract Optional<GroundingChunkStringList>stringListValue()Optional. abstract Optional<String>stringValue()Optional. static GroundingChunkCustomMetadata.Builderbuilder()Instantiates a builder for GroundingChunkCustomMetadata. abstract GroundingChunkCustomMetadata.BuildertoBuilder()Creates a builder with the same values as this instance. static GroundingChunkCustomMetadatafromJson(String jsonString)Deserializes a JSON string to a GroundingChunkCustomMetadata 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
-
-
Method Detail
-
numericValue
abstract Optional<Float> numericValue()
Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used.
-
stringListValue
abstract Optional<GroundingChunkStringList> stringListValue()
Optional. A list of string values for the metadata.
-
stringValue
abstract Optional<String> stringValue()
Optional. The string value of the metadata.
-
builder
static GroundingChunkCustomMetadata.Builder builder()
Instantiates a builder for GroundingChunkCustomMetadata.
-
toBuilder
abstract GroundingChunkCustomMetadata.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GroundingChunkCustomMetadata fromJson(String jsonString)
Deserializes a JSON string to a GroundingChunkCustomMetadata object.
-
-
-
-