Class CustomMetadata

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CustomMetadata

public abstract class CustomMetadata extends JsonSerializable
User provided metadata stored as key-value pairs. This data type is not supported in Vertex AI.
  • Constructor Details

    • CustomMetadata

      public CustomMetadata()
  • Method Details

    • key

      public abstract Optional<String> key()
      Required. The key of the metadata to store.
    • numericValue

      public abstract Optional<Float> numericValue()
      The numeric value of the metadata to store.
    • stringListValue

      public abstract Optional<StringList> stringListValue()
      The StringList value of the metadata to store.
    • stringValue

      public abstract Optional<String> stringValue()
      The string value of the metadata to store.
    • builder

      public static CustomMetadata.Builder builder()
      Instantiates a builder for CustomMetadata.
    • toBuilder

      public abstract CustomMetadata.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static CustomMetadata fromJson(String jsonString)
      Deserializes a JSON string to a CustomMetadata object.