Package com.google.genai.types
Class SearchTypes
-
- All Implemented Interfaces:
public abstract class SearchTypes extends JsonSerializable
Different types of search that can be enabled on the GoogleSearch tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSearchTypes.BuilderBuilder for SearchTypes.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SearchTypes()
-
Method Summary
Modifier and Type Method Description abstract Optional<WebSearch>webSearch()Optional. abstract Optional<ImageSearch>imageSearch()Optional. static SearchTypes.Builderbuilder()Instantiates a builder for SearchTypes. abstract SearchTypes.BuildertoBuilder()Creates a builder with the same values as this instance. static SearchTypesfromJson(String jsonString)Deserializes a JSON string to a SearchTypes 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
-
webSearch
abstract Optional<WebSearch> webSearch()
Optional. Setting this field enables web search. Only text results are returned.
-
imageSearch
abstract Optional<ImageSearch> imageSearch()
Optional. Setting this field enables image search. Image bytes are returned.
-
builder
static SearchTypes.Builder builder()
Instantiates a builder for SearchTypes.
-
toBuilder
abstract SearchTypes.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SearchTypes fromJson(String jsonString)
Deserializes a JSON string to a SearchTypes object.
-
-
-
-