Class JsonSerializable

java.lang.Object
com.google.genai.JsonSerializable
Direct Known Subclasses:
ActivityEnd, ActivityStart, ApiKeyConfig, AudioTranscriptionConfig, AuthConfig, AuthConfigGoogleServiceAccountConfig, AuthConfigHttpBasicAuthConfig, AuthConfigOauthConfig, AuthConfigOidcConfig, AuthToken, AutomaticActivityDetection, AutomaticFunctionCallingConfig, Blob, CachedContent, CachedContentUsageMetadata, Candidate, Checkpoint, Citation, CitationMetadata, CodeExecutionResult, ComputeTokensConfig, ComputeTokensParameters, ComputeTokensResponse, Content, ContentEmbedding, ContentEmbeddingStatistics, ContextWindowCompressionConfig, ControlReferenceConfig, ControlReferenceImage, CountTokensConfig, CountTokensParameters, CountTokensResponse, CreateAuthTokenConfig, CreateAuthTokenParameters, CreateCachedContentConfig, CreateCachedContentParameters, CreateFileConfig, CreateFileParameters, CreateFileResponse, DeleteCachedContentConfig, DeleteCachedContentParameters, DeleteCachedContentResponse, DeleteFileConfig, DeleteFileParameters, DeleteFileResponse, DeleteModelConfig, DeleteModelParameters, DeleteModelResponse, DownloadFileConfig, DynamicRetrievalConfig, EditImageConfig, EditImageParameters, EditImageResponse, EmbedContentConfig, EmbedContentMetadata, EmbedContentParameters, EmbedContentResponse, Endpoint, EnterpriseWebSearch, ExecutableCode, FetchPredictOperationConfig, FetchPredictOperationParameters, File, FileData, FileStatus, FunctionCall, FunctionCallingConfig, FunctionDeclaration, FunctionResponse, GenerateContentConfig, GenerateContentParameters, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GeneratedImage, GeneratedVideo, GenerateImagesConfig, GenerateImagesParameters, GenerateImagesResponse, GenerateVideosConfig, GenerateVideosOperation, GenerateVideosParameters, GenerateVideosResponse, GenerationConfig, GenerationConfigRoutingConfig, GenerationConfigRoutingConfigAutoRoutingMode, GenerationConfigRoutingConfigManualRoutingMode, GetCachedContentConfig, GetCachedContentParameters, GetFileConfig, GetFileParameters, GetModelConfig, GetModelParameters, GetOperationConfig, GetOperationParameters, GoogleMaps, GoogleSearch, GoogleSearchRetrieval, GoogleTypeDate, GroundingChunk, GroundingChunkRetrievedContext, GroundingChunkWeb, GroundingMetadata, GroundingSupport, HttpOptions, HttpResponse, Image, Interval, LatLng, ListCachedContentsConfig, ListCachedContentsParameters, ListCachedContentsResponse, ListFilesConfig, ListFilesParameters, ListFilesResponse, ListModelsConfig, ListModelsParameters, ListModelsResponse, LiveClientContent, LiveClientMessage, LiveClientRealtimeInput, LiveClientSetup, LiveClientToolResponse, LiveConnectConfig, LiveConnectParameters, LiveConstrainedParameters, LiveEphemeralParameters, LiveSendClientContentParameters, LiveSendRealtimeInputParameters, LiveSendToolResponseParameters, LiveServerContent, LiveServerGoAway, LiveServerMessage, LiveServerSessionResumptionUpdate, LiveServerSetupComplete, LiveServerToolCall, LiveServerToolCallCancellation, LogprobsResult, LogprobsResultCandidate, LogprobsResultTopCandidates, MaskReferenceConfig, MaskReferenceImage, ModalityTokenCount, Model, ModelSelectionConfig, MultiSpeakerVoiceConfig, Part, PrebuiltVoiceConfig, ProactivityConfig, RagRetrievalConfig, RagRetrievalConfigFilter, RagRetrievalConfigHybridSearch, RagRetrievalConfigRanking, RagRetrievalConfigRankingLlmRanker, RagRetrievalConfigRankingRankService, RawReferenceImage, RealtimeInputConfig, ReferenceImageAPI, ReplayFile, ReplayInteraction, ReplayRequest, ReplayResponse, Retrieval, RetrievalConfig, RetrievalMetadata, SafetyAttributes, SafetyRating, SafetySetting, Schema, SearchEntryPoint, Segment, SessionResumptionConfig, SlidingWindow, SpeakerVoiceConfig, SpeechConfig, StyleReferenceConfig, StyleReferenceImage, SubjectReferenceConfig, SubjectReferenceImage, TestTableFile, TestTableItem, ThinkingConfig, TokensInfo, Tool, ToolCodeExecution, ToolConfig, Transcription, TunedModelInfo, UpdateModelConfig, UpdateModelParameters, UploadFileConfig, UpscaleImageAPIConfig, UpscaleImageAPIParameters, UpscaleImageConfig, UpscaleImageParameters, UpscaleImageResponse, UrlContext, UrlContextMetadata, UrlMetadata, UsageMetadata, VertexAISearch, VertexRagStore, VertexRagStoreRagResource, Video, VideoMetadata, VoiceConfig

public abstract class JsonSerializable extends Object
A class that can be serialized to JSON and deserialized from JSON.
  • Constructor Details

    • JsonSerializable

      public JsonSerializable()
  • Method Details

    • toJson

      public String toJson()
      Serializes the instance to a Json string.