Package-level declarations

Types

Link copied to clipboard
@Serializable
class ActivityEnd

Marks the end of user activity.

Link copied to clipboard
@Serializable
value class ActivityHandling(val value: String)

The different ways of handling user activity.

Link copied to clipboard
@Serializable
class ActivityStart

Marks the start of user activity.

Link copied to clipboard
@Serializable
value class AdapterSize(val value: String)

Adapter size for tuning. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class AggregationMetric(val value: String)

Aggregation metric. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class AggregationOutput(val aggregationResults: List<AggregationResult>? = null, val dataset: EvaluationDataset? = null)

The aggregation result for the entire dataset and all metrics. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class AggregationResult(val aggregationMetric: AggregationMetric? = null, val bleuMetricValue: BleuMetricValue? = null, val customCodeExecutionResult: CustomCodeExecutionResult? = null, val exactMatchMetricValue: ExactMatchMetricValue? = null, val pairwiseMetricResult: PairwiseMetricResult? = null, val pointwiseMetricResult: PointwiseMetricResult? = null, val rougeMetricValue: RougeMetricValue? = null)

The aggregation result for a single metric. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ApiAuth(val apiKeyConfig: ApiAuthApiKeyConfig? = null)

The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ApiAuthApiKeyConfig(val apiKeySecretVersion: String? = null, val apiKeyString: String? = null)

The API secret. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ApiKeyConfig(val apiKeySecret: String? = null, val apiKeyString: String? = null, val httpElementLocation: HttpElementLocation? = null, val name: String? = null)

Config for authentication with API key. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class ApiSpec(val value: String)

The API spec that the external API implements. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class AspectRatio(val value: String)

The aspect ratio for the image output.

Link copied to clipboard
@Serializable
data class AudioResponseFormat(val bitRate: Int? = null, val delivery: Delivery? = null, val mimeType: String? = null, val sampleRate: Int? = null)

Configuration for audio-specific output formatting.

Link copied to clipboard
@Serializable
data class AudioTranscriptionConfig(val languageCodes: List<String>? = null, val languageAuto: LanguageAuto? = null, val languageHints: LanguageHints? = null, val customVocabulary: List<String>? = null, val adaptationPhrases: List<String>? = null, val diarization: Boolean? = null, val wordTimestamp: Boolean? = null)

The audio transcription configuration in Setup.

Link copied to clipboard
@Serializable
data class AuthConfig(val apiKey: String? = null, val apiKeyConfig: ApiKeyConfig? = null, val authType: AuthType? = null, val googleServiceAccountConfig: AuthConfigGoogleServiceAccountConfig? = null, val httpBasicAuthConfig: AuthConfigHttpBasicAuthConfig? = null, val oauthConfig: AuthConfigOauthConfig? = null, val oidcConfig: AuthConfigOidcConfig? = null)

The authentication config to access the API.

Link copied to clipboard
@Serializable
data class AuthConfigGoogleServiceAccountConfig(val serviceAccount: String? = null)

Config for Google Service Account Authentication. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class AuthConfigHttpBasicAuthConfig(val credentialSecret: String? = null)

Config for HTTP Basic Authentication. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class AuthConfigOauthConfig(val accessToken: String? = null, val serviceAccount: String? = null)

Config for user oauth. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class AuthConfigOidcConfig(val idToken: String? = null, val serviceAccount: String? = null)

Config for user OIDC auth. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class AuthType(val value: String)

Type of auth scheme. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class AutomaticActivityDetection(val disabled: Boolean? = null, val startOfSpeechSensitivity: StartSensitivity? = null, val endOfSpeechSensitivity: EndSensitivity? = null, val prefixPaddingMs: Int? = null, val silenceDurationMs: Int? = null)

Configures automatic detection of activity.

Link copied to clipboard
@Serializable
data class AutoraterConfig(val samplingCount: Int? = null, val flipEnabled: Boolean? = null, val autoraterModel: String? = null, val generationConfig: GenerationConfig? = null)

Autorater config used for evaluation.

Link copied to clipboard
@Serializable
data class AvatarConfig(val avatarName: String? = null, val customizedAvatar: CustomizedAvatar? = null, val audioBitrateBps: Int? = null, val videoBitrateBps: Int? = null)

Configures the avatar to be used in the session.

Link copied to clipboard
@Serializable
data class BatchJob(val name: String? = null, val displayName: String? = null, val state: JobState? = null, val error: JobError? = null, val createTime: Instant? = null, val startTime: Instant? = null, val endTime: Instant? = null, val updateTime: Instant? = null, val model: String? = null, val src: BatchJobSource? = null, val dest: BatchJobDestination? = null, val completionStats: CompletionStats? = null, val outputInfo: BatchJobOutputInfo? = null)

Config for batches.create return value.

Link copied to clipboard
@Serializable
data class BatchJobDestination(val format: String? = null, val gcsUri: String? = null, val bigqueryUri: String? = null, val fileName: String? = null, val inlinedResponses: List<InlinedResponse>? = null, val inlinedEmbedContentResponses: List<InlinedEmbedContentResponse>? = null, val vertexDataset: VertexMultimodalDatasetDestination? = null)

Config for dest parameter.

Link copied to clipboard
@Serializable
data class BatchJobOutputInfo(val gcsOutputDirectory: String? = null, val bigqueryOutputTable: String? = null, val vertexMultimodalDatasetName: String? = null)

Represents the output_info field in batch jobs.

Link copied to clipboard
@Serializable
data class BatchJobSource(val format: String? = null, val gcsUri: List<String>? = null, val bigqueryUri: String? = null, val fileName: String? = null, val inlinedRequests: List<InlinedRequest>? = null, val vertexDatasetName: String? = null)

Config for src parameter.

Link copied to clipboard
@Serializable
value class Behavior(val value: String)

Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.

Link copied to clipboard
@Serializable
data class BigQuerySource(val inputUri: String? = null)

The BigQuery location for the input content. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class BleuMetricValue(val score: Double? = null)

Bleu metric value for an instance. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class Blob(val data: ByteArray? = null, val displayName: String? = null, val mimeType: String? = null)

A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video.

Link copied to clipboard
@Serializable
value class BlockedReason(val value: String)

Output only. The reason why the prompt was blocked.

Link copied to clipboard
object ByteArrayAsBase64Serializer : KSerializer<ByteArray>

A custom serializer for ByteArray that encodes to and decodes from Base64 strings.

Link copied to clipboard
@Serializable
data class CachedContent(val name: String? = null, val displayName: String? = null, val model: String? = null, val createTime: Instant? = null, val updateTime: Instant? = null, val expireTime: Instant? = null, val usageMetadata: CachedContentUsageMetadata? = null)

A resource used in LLM queries for users to explicitly specify what to cache.

Link copied to clipboard
@Serializable
data class CachedContentUsageMetadata(val audioDurationSeconds: Int? = null, val imageCount: Int? = null, val textCount: Int? = null, val totalTokenCount: Int? = null, val videoDurationSeconds: Int? = null)

Metadata on the usage of the cached content.

Link copied to clipboard
@Serializable
data class CancelBatchJobConfig(val httpOptions: HttpOptions? = null)

Optional parameters.

Link copied to clipboard
@Serializable
data class CancelBatchJobParameters(val name: String? = null, val config: CancelBatchJobConfig? = null)

Config for batches.cancel parameters.

Link copied to clipboard
@Serializable
data class CancelTuningJobConfig(val httpOptions: HttpOptions? = null)

Optional parameters for tunings.cancel method.

Link copied to clipboard
@Serializable
data class CancelTuningJobParameters(val name: String? = null, val config: CancelTuningJobConfig? = null)

Parameters for the cancel method.

Link copied to clipboard
@Serializable
data class CancelTuningJobResponse(val sdkHttpResponse: HttpResponse? = null)

Empty response for tunings.cancel method.

Link copied to clipboard
@Serializable
data class Candidate(val content: Content? = null, val citationMetadata: CitationMetadata? = null, val finishMessage: String? = null, val tokenCount: Int? = null, val finishReason: FinishReason? = null, val groundingMetadata: GroundingMetadata? = null, val avgLogprobs: Double? = null, val index: Int? = null, val logprobsResult: LogprobsResult? = null, val safetyRatings: List<SafetyRating>? = null, val urlContextMetadata: UrlContextMetadata? = null)

A response candidate generated from the model.

Link copied to clipboard
@Serializable
data class Checkpoint(val checkpointId: String? = null, val epoch: Long? = null, val step: Long? = null)

Describes the machine learning model version checkpoint.

Link copied to clipboard
@Serializable
data class Citation(val endIndex: Int? = null, val license: String? = null, val publicationDate: GoogleTypeDate? = null, val startIndex: Int? = null, val title: String? = null, val uri: String? = null)

A citation for a piece of generatedcontent. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class CitationMetadata(val citations: List<Citation>? = null)

Citation information when the model quotes another source.

Link copied to clipboard
@Serializable
data class CodeExecutionResult(val outcome: Outcome? = null, val output: String? = null, val id: String? = null)

Result of executing the ExecutableCode. Generated only when the CodeExecution tool is used.

Link copied to clipboard
@Serializable
data class CompletionStats(val failedCount: Long? = null, val incompleteCount: Long? = null, val successfulCount: Long? = null, val successfulForecastPointCount: Long? = null)

Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. This data type is not supported in Gemini API.

Link copied to clipboard

Composite reinforcement tuning reward config.

@Serializable
data class CompositeReinforcementTuningRewardConfigWeightedRewardConfig(val rewardConfig: SingleReinforcementTuningRewardConfig? = null, val weight: Double? = null)

Composite reinforcement tuning reward config weighted reward config.

Link copied to clipboard
@Serializable
data class ComputerUse(val environment: Environment? = null, val excludedPredefinedFunctions: List<String>? = null, val enablePromptInjectionDetection: Boolean? = null, val disabledSafetyPolicies: List<SafetyPolicy>? = null)

Tool to support computer use.

Link copied to clipboard
@Serializable
data class ComputeTokensConfig(val httpOptions: HttpOptions? = null)

Optional parameters for computing tokens.

Link copied to clipboard
@Serializable
data class ComputeTokensParameters(val model: String? = null, val contents: List<Content>? = null, val config: ComputeTokensConfig? = null)

Parameters for computing tokens.

Link copied to clipboard
@Serializable
data class ComputeTokensResponse(val sdkHttpResponse: HttpResponse? = null, val tokensInfo: List<TokensInfo>? = null)

Response for computing tokens.

Link copied to clipboard
@Serializable
data class Content(val parts: List<Part>? = null, val role: String? = null)

Contains the multi-part content of a message.

Link copied to clipboard
@Serializable
data class ContentEmbedding(val values: List<Double>? = null, val statistics: ContentEmbeddingStatistics? = null)

The embedding generated from an input content.

Link copied to clipboard
@Serializable
data class ContentEmbeddingStatistics(val truncated: Boolean? = null, val tokenCount: Double? = null, val tokensDetails: List<ModalityTokenCount>? = null)

Statistics of the input text associated with the result of content embedding.

Link copied to clipboard
@Serializable
data class ContextWindowCompressionConfig(val triggerTokens: Long? = null, val slidingWindow: SlidingWindow? = null)

Enables context window compression -- mechanism managing model context window so it does not exceed given length.

Link copied to clipboard
@Serializable
data class CountTokensConfig(val httpOptions: HttpOptions? = null, val systemInstruction: Content? = null, val tools: List<Tool>? = null, val generationConfig: GenerationConfig? = null)

Config for the count_tokens method.

Link copied to clipboard
@Serializable
data class CountTokensParameters(val model: String? = null, val contents: List<Content>? = null, val config: CountTokensConfig? = null)

Parameters for counting tokens.

Link copied to clipboard
@Serializable
data class CountTokensResponse(val sdkHttpResponse: HttpResponse? = null, val totalTokens: Int? = null, val cachedContentTokenCount: Int? = null)

Response for counting tokens.

Link copied to clipboard
@Serializable
data class CreateBatchJobConfig(val httpOptions: HttpOptions? = null, val displayName: String? = null, val dest: BatchJobDestination? = null, val webhookConfig: WebhookConfig? = null)

Config for optional parameters.

Link copied to clipboard
@Serializable
data class CreateBatchJobParameters(val model: String? = null, val src: BatchJobSource? = null, val config: CreateBatchJobConfig? = null)

Config for batches.create parameters.

Link copied to clipboard
@Serializable
data class CreateCachedContentConfig(val httpOptions: HttpOptions? = null, val ttl: Duration? = null, val expireTime: Instant? = null, val displayName: String? = null, val contents: List<Content>? = null, val systemInstruction: Content? = null, val tools: List<Tool>? = null, val toolConfig: ToolConfig? = null, val kmsKeyName: String? = null)

Optional configuration for cached content creation.

Link copied to clipboard
@Serializable
data class CreateCachedContentParameters(val model: String? = null, val config: CreateCachedContentConfig? = null)

Parameters for caches.create method.

Link copied to clipboard
@Serializable
data class CreateEmbeddingsBatchJobConfig(val httpOptions: HttpOptions? = null, val displayName: String? = null)

Config for optional parameters.

Link copied to clipboard
@Serializable
data class CreateEmbeddingsBatchJobParameters(val model: String? = null, val src: EmbeddingsBatchJobSource? = null, val config: CreateEmbeddingsBatchJobConfig? = null)

Config for batches.create parameters.

Link copied to clipboard
@Serializable
data class CreateFileConfig(val httpOptions: HttpOptions? = null, val shouldReturnHttpResponse: Boolean? = null)

Used to override the default configuration.

Link copied to clipboard
@Serializable
data class CreateFileParameters(val file: File? = null, val config: CreateFileConfig? = null)

Generates the parameters for the private _create method.

Link copied to clipboard
@Serializable
data class CreateFileResponse(val sdkHttpResponse: HttpResponse? = null)

Response for the create file method.

Link copied to clipboard
@Serializable
data class CreateTuningJobConfig(val httpOptions: HttpOptions? = null, val method: TuningMethod? = null, val validationDataset: TuningValidationDataset? = null, val tunedModelDisplayName: String? = null, val description: String? = null, val epochCount: Int? = null, val learningRateMultiplier: Double? = null, val exportLastCheckpointOnly: Boolean? = null, val preTunedModelCheckpointId: String? = null, val adapterSize: AdapterSize? = null, val tuningMode: TuningMode? = null, val customBaseModel: String? = null, val batchSize: Int? = null, val learningRate: Double? = null, val labels: Map<String, String>? = null, val beta: Double? = null, val baseTeacherModel: String? = null, val tunedTeacherModelSource: String? = null, val sftLossWeightMultiplier: Double? = null, val outputUri: String? = null, val encryptionSpec: EncryptionSpec? = null, val rewardConfig: SingleReinforcementTuningRewardConfig? = null, val compositeRewardConfig: CompositeReinforcementTuningRewardConfig? = null, val samplesPerPrompt: Int? = null, val evaluateInterval: Int? = null, val checkpointInterval: Int? = null, val maxOutputTokens: Int? = null, val thinkingLevel: ReinforcementTuningThinkingLevel? = null, val validationDatasetUri: String? = null)

Fine-tuning job creation request - optional fields.

Link copied to clipboard
@Serializable
data class CreateTuningJobParametersPrivate(val baseModel: String? = null, val preTunedModel: PreTunedModel? = null, val trainingDataset: TuningDataset? = null, val config: CreateTuningJobConfig? = null)

Fine-tuning job creation parameters - optional fields.

Link copied to clipboard
@Serializable
data class CustomCodeExecutionResult(val score: Double? = null)

Result for custom code execution metric. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class CustomizedAvatar(val imageMimeType: String? = null, val imageData: ByteArray? = null)

Configures the customized avatar to be used in the session.

Link copied to clipboard
@Serializable
data class CustomOutput(val rawOutputs: RawOutput? = null)

Spec for custom output. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class DatasetDistribution(val buckets: List<DatasetDistributionDistributionBucket>? = null, val max: Double? = null, val mean: Double? = null, val median: Double? = null, val min: Double? = null, val p5: Double? = null, val p95: Double? = null, val sum: Double? = null)

Distribution computed over a tuning dataset. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class DatasetDistributionDistributionBucket(val count: Long? = null, val left: Double? = null, val right: Double? = null)

Dataset bucket used to create a histogram for the distribution given a population of values. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class DatasetStats(val droppedExampleIndices: List<Long>? = null, val droppedExampleReasons: List<String>? = null, val totalBillableCharacterCount: Long? = null, val totalTuningCharacterCount: Long? = null, val tuningDatasetExampleCount: Long? = null, val tuningStepCount: Long? = null, val userDatasetExamples: List<Content>? = null, val userInputTokenDistribution: DatasetDistribution? = null, val userMessagePerExampleDistribution: DatasetDistribution? = null, val userOutputTokenDistribution: DatasetDistribution? = null, val contentsPerExampleDistribution: DatasetDistribution? = null, val reinforcementTuningUserDatasetExamples: ReinforcementTuningUserDatasetExamples? = null, val totalBillableTokenCount: Long? = null)

Statistics computed over a tuning dataset. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class DeleteBatchJobConfig(val httpOptions: HttpOptions? = null)

Optional parameters for models.get method.

Link copied to clipboard
@Serializable
data class DeleteBatchJobParameters(val name: String? = null, val config: DeleteBatchJobConfig? = null)

Config for batches.delete parameters.

Link copied to clipboard
@Serializable
data class DeleteCachedContentConfig(val httpOptions: HttpOptions? = null)

Optional parameters for caches.delete method.

Link copied to clipboard
@Serializable
data class DeleteCachedContentParameters(val name: String? = null, val config: DeleteCachedContentConfig? = null)

Parameters for caches.delete method.

Link copied to clipboard
@Serializable
data class DeleteCachedContentResponse(val sdkHttpResponse: HttpResponse? = null)

Empty response for caches.delete method.

Link copied to clipboard
@Serializable
data class DeleteFileConfig(val httpOptions: HttpOptions? = null)

Used to override the default configuration.

Link copied to clipboard
@Serializable
data class DeleteFileParameters(val name: String? = null, val config: DeleteFileConfig? = null)

Generates the parameters for the get method.

Link copied to clipboard
@Serializable
data class DeleteFileResponse(val sdkHttpResponse: HttpResponse? = null)

Response for the delete file method.

Link copied to clipboard
@Serializable
data class DeleteModelConfig(val httpOptions: HttpOptions? = null)

Configuration for deleting a tuned model.

Link copied to clipboard
@Serializable
data class DeleteModelParameters(val model: String? = null, val config: DeleteModelConfig? = null)

Parameters for deleting a tuned model.

Link copied to clipboard
@Serializable
data class DeleteModelResponse(val sdkHttpResponse: HttpResponse? = null)
Link copied to clipboard
@Serializable
data class DeleteResourceJob(val sdkHttpResponse: HttpResponse? = null, val name: String? = null, val done: Boolean? = null, val error: JobError? = null)

The return value of delete operation.

Link copied to clipboard
@Serializable
value class Delivery(val value: String)

Delivery mode for the generated content.

Link copied to clipboard
@Serializable
data class DistillationDataStats(val trainingDatasetStats: DatasetStats? = null)

Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class DistillationHyperParameters(val adapterSize: AdapterSize? = null, val epochCount: Long? = null, val learningRateMultiplier: Double? = null, val generationConfig: GenerationConfig? = null, val learningRate: Double? = null, val batchSize: Int? = null)

Distillation hyperparameters for tuning.

Link copied to clipboard
@Serializable
data class DistillationSamplingSpec(val baseTeacherModel: String? = null, val tunedTeacherModelSource: String? = null, val validationDatasetUri: String? = null, val promptDatasetUri: String? = null, val hyperparameters: DistillationHyperParameters? = null)

Distillation sampling spec for tuning.

Link copied to clipboard
@Serializable
data class DistillationSpec(val promptDatasetUri: String? = null, val baseTeacherModel: String? = null, val hyperParameters: DistillationHyperParameters? = null, val pipelineRootDirectory: String? = null, val studentModel: String? = null, val trainingDatasetUri: String? = null, val tunedTeacherModelSource: String? = null, val validationDatasetUri: String? = null, val tuningMode: TuningMode? = null)

Distillation tuning spec for tuning.

Link copied to clipboard
@Serializable
data class DownloadFileConfig(val httpOptions: HttpOptions? = null)

Used to override the default configuration.

Link copied to clipboard
object DurationStringSerializer : KSerializer<Duration>

A custom serializer for Duration that formats it as a string ending in 's'.

Link copied to clipboard
@Serializable
data class DynamicRetrievalConfig(val dynamicThreshold: Double? = null, val mode: DynamicRetrievalConfigMode? = null)

Describes the options to customize dynamic retrieval.

Link copied to clipboard
@Serializable
value class DynamicRetrievalConfigMode(val value: String)

The mode of the predictor to be used in dynamic retrieval.

Link copied to clipboard
@Serializable
data class EmbedContentBatch(val contents: List<Content>? = null, val config: EmbedContentConfig? = null)

Parameters for the embed_content method.

Link copied to clipboard
@Serializable
data class EmbedContentConfig(val taskType: String? = null, val title: String? = null, val outputDimensionality: Int? = null, val mimeType: String? = null, val autoTruncate: Boolean? = null, val documentOcr: Boolean? = null, val audioTrackExtraction: Boolean? = null, val httpOptions: HttpOptions? = null)

Optional parameters for the embed_content method.

Link copied to clipboard
@Serializable
data class EmbedContentMetadata(val billableCharacterCount: Int? = null)

Request-level metadata for the Gemini Enterprise Agent Platform Embed Content API.

Link copied to clipboard
@Serializable
data class EmbedContentParametersPrivate(val model: String? = null, val contents: List<Content>? = null, val content: Content? = null, val embeddingApiType: EmbeddingApiType? = null, val config: EmbedContentConfig? = null)

Parameters for the _embed_content method.

Link copied to clipboard
@Serializable
data class EmbedContentResponse(val sdkHttpResponse: HttpResponse? = null, val embeddings: List<ContentEmbedding>? = null, val metadata: EmbedContentMetadata? = null)

Response for the embed_content method.

Link copied to clipboard
@Serializable
value class EmbeddingApiType(val value: String)

Enum representing the Gemini Enterprise Agent Platform embedding API to use.

Link copied to clipboard
@Serializable
data class EmbeddingsBatchJobSource(val fileName: String? = null, val inlinedRequests: EmbedContentBatch? = null)
Link copied to clipboard
@Serializable
data class EncryptionSpec(val kmsKeyName: String? = null)

Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class Endpoint(val name: String? = null, val deployedModelId: String? = null)

An endpoint where you deploy models.

Link copied to clipboard
@Serializable
value class EndSensitivity(val value: String)

End of speech sensitivity.

Link copied to clipboard
@Serializable
data class EnterpriseWebSearch(val blockingConfidence: PhishBlockThreshold? = null, val excludeDomains: List<String>? = null)

Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class Environment(val value: String)

The environment being operated.

Link copied to clipboard
@Serializable
data class EvaluateDatasetResponse(val aggregationOutput: AggregationOutput? = null, val outputInfo: OutputInfo? = null)

The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class EvaluateDatasetRun(val checkpointId: String? = null, val error: GoogleRpcStatus? = null, val evaluateDatasetResponse: EvaluateDatasetResponse? = null, val evaluationRun: String? = null, val operationName: String? = null)

Evaluate Dataset Run Result for Tuning Job. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class EvaluationDataset(val bigquerySource: BigQuerySource? = null, val gcsSource: GcsSource? = null)

The dataset used for evaluation. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ExactMatchMetricValue(val score: Double? = null)

Exact match metric value for an instance. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ExecutableCode(val code: String? = null, val language: Language? = null, val id: String? = null)

Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated.

Link copied to clipboard
@Serializable
data class ExternalApi(val apiAuth: ApiAuth? = null, val apiSpec: ApiSpec? = null, val authConfig: AuthConfig? = null, val elasticSearchParams: ExternalApiElasticSearchParams? = null, val endpoint: String? = null, val simpleSearchParams: ExternalApiSimpleSearchParams? = null)

Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ExternalApiElasticSearchParams(val index: String? = null, val numHits: Int? = null, val searchTemplate: String? = null)

The search parameters to use for the ELASTIC_SEARCH spec. This data type is not supported in Gemini API.

Link copied to clipboard

The search parameters to use for SIMPLE_SEARCH spec. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class FeatureSelectionPreference(val value: String)

Options for feature selection preference.

Link copied to clipboard
@Serializable
data class File(val name: String? = null, val displayName: String? = null, val mimeType: String? = null, val sizeBytes: Long? = null, val createTime: Instant? = null, val expirationTime: Instant? = null, val updateTime: Instant? = null, val sha256Hash: String? = null, val uri: String? = null, val downloadUri: String? = null, val state: FileState? = null, val source: FileSource? = null, val videoMetadata: Map<String, JsonElement>? = null, val error: FileStatus? = null)

A file uploaded to the API.

Link copied to clipboard
@Serializable
data class FileData(val displayName: String? = null, val fileUri: String? = null, val mimeType: String? = null)

URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage.

Link copied to clipboard
@Serializable
data class FileSearch(val fileSearchStoreNames: List<String>? = null, val metadataFilter: String? = null, val topK: Int? = null)

The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
value class FileSource(val value: String)

Source of the File.

Link copied to clipboard
@Serializable
value class FileState(val value: String)

State for the lifecycle of a File.

Link copied to clipboard
@Serializable
data class FileStatus(val details: List<Map<String, JsonElement>>? = null, val message: String? = null, val code: Int? = null)

Status of a File that uses a common error model.

Link copied to clipboard
@Serializable
value class FinishReason(val value: String)

Output only. The reason why the model stopped generating tokens.

Link copied to clipboard
@Serializable
data class FullFineTuningSpec(val hyperParameters: SupervisedHyperParameters? = null, val trainingDatasetUri: String? = null, val validationDatasetUri: String? = null)

Tuning Spec for Full Fine Tuning. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class FunctionCall(val id: String? = null, val args: Map<String, JsonElement>? = null, val name: String? = null, val partialArgs: List<PartialArg>? = null, val willContinue: Boolean? = null)

A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values.

Link copied to clipboard
@Serializable
data class FunctionCallingConfig(val allowedFunctionNames: List<String>? = null, val mode: FunctionCallingConfigMode? = null, val streamFunctionCallArguments: Boolean? = null)

Function calling config.

Link copied to clipboard
@Serializable
value class FunctionCallingConfigMode(val value: String)

Function calling mode.

Link copied to clipboard
@Serializable
data class FunctionDeclaration(val description: String? = null, val name: String? = null, val parameters: Schema? = null, val parametersJsonSchema: JsonElement? = null, val response: Schema? = null, val responseJsonSchema: JsonElement? = null, val behavior: Behavior? = null)

Structured representation of a function declaration as defined by the OpenAPI 3.0 specification. Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

Link copied to clipboard
@Serializable
data class FunctionResponse(val willContinue: Boolean? = null, val scheduling: FunctionResponseScheduling? = null, val parts: List<FunctionResponsePart>? = null, val id: String? = null, val name: String? = null, val response: Map<String, JsonElement>? = null)

The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a FunctionCall made based on model prediction.

Link copied to clipboard
@Serializable
data class FunctionResponseBlob(val mimeType: String? = null, val data: ByteArray? = null, val displayName: String? = null)

Raw media bytes for function response. Text should not be sent as raw bytes, use the 'text' field.

Link copied to clipboard
@Serializable
data class FunctionResponseFileData(val fileUri: String? = null, val mimeType: String? = null, val displayName: String? = null)

URI based data for function response. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class FunctionResponsePart(val inlineData: FunctionResponseBlob? = null, val fileData: FunctionResponseFileData? = null)

A datatype containing media that is part of a FunctionResponse message. A FunctionResponsePart consists of data which has an associated datatype. A FunctionResponsePart can only contain one of the accepted types in FunctionResponsePart.data. A FunctionResponsePart must have a fixed IANA MIME type identifying the type and subtype of the media if the inline_data field is filled with raw bytes.

Link copied to clipboard
@Serializable
value class FunctionResponseScheduling(val value: String)

Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.

Link copied to clipboard
@Serializable
data class GcsSource(val uris: List<String>? = null)

The Google Cloud Storage location for the input content. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GeminiPreferenceExample(val completions: List<GeminiPreferenceExampleCompletion>? = null, val contents: List<Content>? = null)

Input example for preference optimization. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GeminiPreferenceExampleCompletion(val completion: Content? = null, val score: Double? = null)

Completion and its preference score. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GenerateContentConfig(val httpOptions: HttpOptions? = null, val shouldReturnHttpResponse: Boolean? = null, val systemInstruction: Content? = null, val temperature: Double? = null, val topP: Double? = null, val topK: Double? = null, val candidateCount: Int? = null, val maxOutputTokens: Int? = null, val stopSequences: List<String>? = null, val responseLogprobs: Boolean? = null, val logprobs: Int? = null, val presencePenalty: Double? = null, val frequencyPenalty: Double? = null, val seed: Int? = null, val responseMimeType: String? = null, val responseSchema: Schema? = null, val responseJsonSchema: JsonElement? = null, val modelSelectionConfig: ModelSelectionConfig? = null, val safetySettings: List<SafetySetting>? = null, val tools: List<Tool>? = null, val toolConfig: ToolConfig? = null, val cachedContent: String? = null, val responseModalities: List<String>? = null, val mediaResolution: MediaResolution? = null, val speechConfig: SpeechConfig? = null, val audioTimestamp: Boolean? = null, val thinkingConfig: ThinkingConfig? = null, val imageConfig: ImageConfig? = null, val enableEnhancedCivicAnswers: Boolean? = null, val modelArmorConfig: ModelArmorConfig? = null, val serviceTier: ServiceTier? = null, val routingConfig: GenerationConfigRoutingConfig? = null, val labels: Map<String, String>? = null, val audioTranscriptionConfig: AudioTranscriptionConfig? = null)

Optional model configuration parameters.

Link copied to clipboard
@Serializable
data class GenerateContentParameters(val model: String? = null, val contents: List<Content>? = null, val config: GenerateContentConfig? = null)

Config for models.generate_content parameters.

Link copied to clipboard
@Serializable
data class GenerateContentResponse(val sdkHttpResponse: HttpResponse? = null, val candidates: List<Candidate>? = null, val createTime: Instant? = null, val modelVersion: String? = null, val promptFeedback: GenerateContentResponsePromptFeedback? = null, val responseId: String? = null, val usageMetadata: GenerateContentResponseUsageMetadata? = null, val modelStatus: ModelStatus? = null)

Response message for PredictionService.GenerateContent.

Link copied to clipboard
@Serializable
data class GenerateContentResponsePromptFeedback(val blockReason: BlockedReason? = null, val blockReasonMessage: String? = null, val safetyRatings: List<SafetyRating>? = null)

Content filter results for a prompt sent in the request. Note: This is sent only in the first stream chunk and only if no candidates were generated due to content violations.

Link copied to clipboard
@Serializable
data class GenerateContentResponseUsageMetadata(val cacheTokensDetails: List<ModalityTokenCount>? = null, val cachedContentTokenCount: Int? = null, val candidatesTokenCount: Int? = null, val candidatesTokensDetails: List<ModalityTokenCount>? = null, val promptTokenCount: Int? = null, val promptTokensDetails: List<ModalityTokenCount>? = null, val thoughtsTokenCount: Int? = null, val toolUsePromptTokenCount: Int? = null, val toolUsePromptTokensDetails: List<ModalityTokenCount>? = null, val totalTokenCount: Int? = null, val trafficType: TrafficType? = null)

Usage metadata about the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GenerationConfig(val modelSelectionConfig: ModelSelectionConfig? = null, val responseJsonSchema: JsonElement? = null, val audioTimestamp: Boolean? = null, val candidateCount: Int? = null, val enableAffectiveDialog: Boolean? = null, val frequencyPenalty: Double? = null, val logprobs: Int? = null, val maxOutputTokens: Int? = null, val mediaResolution: MediaResolution? = null, val presencePenalty: Double? = null, val responseLogprobs: Boolean? = null, val responseMimeType: String? = null, val responseModalities: List<Modality>? = null, val responseSchema: Schema? = null, val routingConfig: GenerationConfigRoutingConfig? = null, val seed: Int? = null, val speechConfig: SpeechConfig? = null, val stopSequences: List<String>? = null, val temperature: Double? = null, val thinkingConfig: ThinkingConfig? = null, val topK: Double? = null, val topP: Double? = null, val enableEnhancedCivicAnswers: Boolean? = null, val responseFormat: List<ResponseFormat>? = null, val translationConfig: TranslationConfig? = null, val audioTranscriptionConfig: AudioTranscriptionConfig? = null)

Generation config.

Link copied to clipboard

The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API.

@Serializable
data class GenerationConfigRoutingConfigAutoRoutingMode(val modelRoutingPreference: ModelRoutingPreference? = null)

The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API.

@Serializable
data class GenerationConfigRoutingConfigManualRoutingMode(val modelName: String? = null)

The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GetBatchJobConfig(val httpOptions: HttpOptions? = null)

Optional parameters.

Link copied to clipboard
@Serializable
data class GetBatchJobParameters(val name: String? = null, val config: GetBatchJobConfig? = null)

Config for batches.get parameters.

Link copied to clipboard
@Serializable
data class GetCachedContentConfig(val httpOptions: HttpOptions? = null)

Optional parameters for caches.get method.

Link copied to clipboard
@Serializable
data class GetCachedContentParameters(val name: String? = null, val config: GetCachedContentConfig? = null)

Parameters for caches.get method.

Link copied to clipboard
@Serializable
data class GetFileConfig(val httpOptions: HttpOptions? = null)

Used to override the default configuration.

Link copied to clipboard
@Serializable
data class GetFileParameters(val name: String? = null, val config: GetFileConfig? = null)

Generates the parameters for the get method.

Link copied to clipboard
@Serializable
data class GetModelConfig(val httpOptions: HttpOptions? = null)

Optional parameters for models.get method.

Link copied to clipboard
@Serializable
data class GetModelParameters(val model: String? = null, val config: GetModelConfig? = null)
Link copied to clipboard
@Serializable
data class GetTuningJobConfig(val httpOptions: HttpOptions? = null)

Optional parameters for tunings.get method.

Link copied to clipboard
@Serializable
data class GetTuningJobParameters(val name: String? = null, val config: GetTuningJobConfig? = null)

Parameters for the get method.

Link copied to clipboard
@Serializable
data class GoogleMaps(val authConfig: AuthConfig? = null, val enableWidget: Boolean? = null, val groundingTypes: GoogleMapsGroundingTypes? = null)

Tool to retrieve knowledge from Google Maps.

Link copied to clipboard
@Serializable
data class GoogleMapsGroundingTypes(val places: GoogleMapsPlaces? = null, val routing: GoogleMapsRouting? = null)

Defines the types of Google Maps grounding that can be enabled and their configurations. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
class GoogleMapsPlaces

Grounding with Google Maps Places data (e.g. QueryPlaces). This is the default Google Maps grounding type when no other type is specified. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
class GoogleMapsRouting

Grounding with Google Maps Routing APIs (ComputeRoutes and SearchAlongRoute). This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GoogleRpcStatus(val code: Int? = null, val details: List<Map<String, JsonElement>>? = null, val message: String? = null)

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GoogleSearch(val searchTypes: SearchTypes? = null, val blockingConfidence: PhishBlockThreshold? = null, val excludeDomains: List<String>? = null, val timeRangeFilter: Interval? = null)

GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.

Link copied to clipboard
@Serializable
data class GoogleSearchRetrieval(val dynamicRetrievalConfig: DynamicRetrievalConfig? = null)

Tool to retrieve public web data for grounding, powered by Google.

Link copied to clipboard
@Serializable
data class GoogleTypeDate(val day: Int? = null, val month: Int? = null, val year: Int? = null)

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GroundingChunk(val image: GroundingChunkImage? = null, val maps: GroundingChunkMaps? = null, val retrievedContext: GroundingChunkRetrievedContext? = null, val web: GroundingChunkWeb? = null)

A piece of evidence that supports a claim made by the model.

Link copied to clipboard
@Serializable
data class GroundingChunkCustomMetadata(val key: String? = null, val numericValue: Double? = null, val stringListValue: GroundingChunkStringList? = null, val stringValue: String? = null)

User provided metadata about the GroundingFact. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
data class GroundingChunkImage(val sourceUri: String? = null, val imageUri: String? = null, val title: String? = null, val domain: String? = null)

An Image chunk is a piece of evidence that comes from an image search result. It contains the URI of the image search result and the URI of the image. This is used to provide the user with a link to the source of the information.

Link copied to clipboard
@Serializable
data class GroundingChunkMaps(val placeAnswerSources: GroundingChunkMapsPlaceAnswerSources? = null, val placeId: String? = null, val text: String? = null, val title: String? = null, val uri: String? = null, val route: GroundingChunkMapsRoute? = null)

A Maps chunk is a piece of evidence that comes from Google Maps.

Link copied to clipboard
@Serializable
data class GroundingChunkMapsPlaceAnswerSources(val reviewSnippet: List<GroundingChunkMapsPlaceAnswerSourcesReviewSnippet>? = null, val flagContentUri: String? = null, val reviewSnippets: List<GroundingChunkMapsPlaceAnswerSourcesReviewSnippet>? = null)

The sources that were used to generate the place answer.

@Serializable
data class GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution(val displayName: String? = null, val photoUri: String? = null, val uri: String? = null)

Author attribution for a photo or review.

@Serializable
data class GroundingChunkMapsPlaceAnswerSourcesReviewSnippet(val authorAttribution: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution? = null, val flagContentUri: String? = null, val googleMapsUri: String? = null, val relativePublishTimeDescription: String? = null, val review: String? = null, val reviewId: String? = null, val title: String? = null)

Encapsulates a review snippet.

Link copied to clipboard
@Serializable
data class GroundingChunkMapsRoute(val distanceMeters: Int? = null, val duration: Duration? = null, val encodedPolyline: String? = null)

Route information from Google Maps. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GroundingChunkRetrievedContext(val documentName: String? = null, val ragChunk: RagChunk? = null, val text: String? = null, val title: String? = null, val uri: String? = null, val customMetadata: List<GroundingChunkCustomMetadata>? = null, val fileSearchStore: String? = null, val pageNumber: Int? = null, val mediaId: String? = null)

Context retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset.

Link copied to clipboard
@Serializable
data class GroundingChunkStringList(val values: List<String>? = null)

A list of string values. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
data class GroundingChunkWeb(val domain: String? = null, val title: String? = null, val uri: String? = null)

A Web chunk is a piece of evidence that comes from a web page. It contains the URI of the web page, the title of the page, and the domain of the page. This is used to provide the user with a link to the source of the information.

Link copied to clipboard
@Serializable
data class GroundingMetadata(val imageSearchQueries: List<String>? = null, val groundingChunks: List<GroundingChunk>? = null, val groundingSupports: List<GroundingSupport>? = null, val retrievalMetadata: RetrievalMetadata? = null, val searchEntryPoint: SearchEntryPoint? = null, val webSearchQueries: List<String>? = null, val googleMapsWidgetContextToken: String? = null, val retrievalQueries: List<String>? = null, val sourceFlaggingUris: List<GroundingMetadataSourceFlaggingUri>? = null)

Information for various kinds of grounding.

Link copied to clipboard
@Serializable
data class GroundingMetadataSourceFlaggingUri(val flagContentUri: String? = null, val sourceId: String? = null)

A URI that can be used to flag a place or review for inappropriate content. This is populated only when the grounding source is Google Maps. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class GroundingSupport(val confidenceScores: List<Double>? = null, val groundingChunkIndices: List<Int>? = null, val segment: Segment? = null, val renderedParts: List<Int>? = null)

Grounding support.

Link copied to clipboard
@Serializable
value class HarmBlockMethod(val value: String)

The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class HarmBlockThreshold(val value: String)

The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.

Link copied to clipboard
@Serializable
value class HarmCategory(val value: String)

The harm category to be blocked.

Link copied to clipboard
@Serializable
value class HarmProbability(val value: String)

Output only. The probability of harm for this category.

Link copied to clipboard
@Serializable
value class HarmSeverity(val value: String)

Output only. The severity of harm for this category. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class HistoryConfig(val initialHistoryInClientContent: Boolean? = null)

Configuration for history exchange between client and server.

Link copied to clipboard
@Serializable
value class HttpElementLocation(val value: String)

The location of the API key. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class HttpOptions(val baseUrl: String? = null, val apiVersion: String? = null, val headers: Map<String, String>? = null, val timeout: Int? = null)

HTTP options to be used in each of the requests.

Link copied to clipboard
@Serializable
data class HttpResponse(val headers: Map<String, String>? = null, val body: String? = null)

A wrapper class for the http response.

Link copied to clipboard
@Serializable
data class ImageConfig(val aspectRatio: String? = null, val imageSize: String? = null, val personGeneration: String? = null, val prominentPeople: ProminentPeople? = null, val outputMimeType: String? = null, val outputCompressionQuality: Int? = null, val imageOutputOptions: ImageConfigImageOutputOptions? = null)

The image generation configuration to be used in GenerateContentConfig.

Link copied to clipboard
@Serializable
data class ImageConfigImageOutputOptions(val compressionQuality: Int? = null, val mimeType: String? = null)

The image output format for generated images. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ImageResponseFormat(val aspectRatio: AspectRatio? = null, val delivery: Delivery? = null, val imageSize: ImageSize? = null, val mimeType: String? = null)

Configuration for image-specific output formatting.

Link copied to clipboard
@Serializable
class ImageSearch

Image search for grounding and related configurations.

Link copied to clipboard
@Serializable
value class ImageSize(val value: String)

The size of the image output.

Link copied to clipboard
@Serializable
data class InlinedEmbedContentResponse(val response: SingleEmbedContentResponse? = null, val error: JobError? = null, val metadata: Map<String, JsonElement>? = null)

Config for inlined_embedding_responses parameter.

Link copied to clipboard
@Serializable
data class InlinedRequest(val model: String? = null, val contents: List<Content>? = null, val metadata: Map<String, String>? = null, val config: GenerateContentConfig? = null)

Config for inlined request.

Link copied to clipboard
@Serializable
data class InlinedResponse(val response: GenerateContentResponse? = null, val metadata: Map<String, String>? = null, val error: JobError? = null)

Config for inlined_responses parameter.

Link copied to clipboard
expect class Instant
actual class Instant(val value: <Error class: unknown class>)
Link copied to clipboard
object InstantSerializer : KSerializer<Instant>

A custom serializer for Instant that encodes to and decodes from ISO-8601 strings.

Link copied to clipboard
@Serializable
data class Interval(val endTime: Instant? = null, val startTime: Instant? = null)

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.

Link copied to clipboard
@Serializable
data class JobError(val details: List<String>? = null, val code: Int? = null, val message: String? = null)

Job error.

Link copied to clipboard
@Serializable
value class JobState(val value: String)

Job state.

Link copied to clipboard
@Serializable
value class Language(val value: String)

Programming language of the code.

Link copied to clipboard
@Serializable
class LanguageAuto

Deprecated: Language auto-detection is now the default when language_codes is omitted.

Link copied to clipboard
@Serializable
data class LanguageHints(val languageCodes: List<String>? = null)

Deprecated: Use AudioTranscriptionConfig.language_codes instead.

Link copied to clipboard
@Serializable
data class LatLng(val latitude: Double? = null, val longitude: Double? = null)

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

Link copied to clipboard
@Serializable
data class ListBatchJobsConfig(val httpOptions: HttpOptions? = null, val pageSize: Int? = null, val pageToken: String? = null, val filter: String? = null)

Config for optional parameters.

Link copied to clipboard
@Serializable
data class ListBatchJobsParameters(val config: ListBatchJobsConfig? = null)

Config for batches.list parameters.

Link copied to clipboard
@Serializable
data class ListBatchJobsResponse(val sdkHttpResponse: HttpResponse? = null, val nextPageToken: String? = null, val batchJobs: List<BatchJob>? = null)

Config for batches.list return value.

Link copied to clipboard
@Serializable
data class ListCachedContentsConfig(val httpOptions: HttpOptions? = null, val pageSize: Int? = null, val pageToken: String? = null)

Config for caches.list method.

Link copied to clipboard
@Serializable
data class ListCachedContentsParameters(val config: ListCachedContentsConfig? = null)

Parameters for caches.list method.

Link copied to clipboard
@Serializable
data class ListCachedContentsResponse(val sdkHttpResponse: HttpResponse? = null, val nextPageToken: String? = null, val cachedContents: List<CachedContent>? = null)
Link copied to clipboard
@Serializable
data class ListFilesConfig(val httpOptions: HttpOptions? = null, val pageSize: Int? = null, val pageToken: String? = null)

Used to override the default configuration.

Link copied to clipboard
@Serializable
data class ListFilesParameters(val config: ListFilesConfig? = null)

Generates the parameters for the list method.

Link copied to clipboard
@Serializable
data class ListFilesResponse(val sdkHttpResponse: HttpResponse? = null, val nextPageToken: String? = null, val files: List<File>? = null)

Response for the list files method.

Link copied to clipboard
@Serializable
data class ListModelsConfig(val httpOptions: HttpOptions? = null, val pageSize: Int? = null, val pageToken: String? = null, val filter: String? = null, val queryBase: Boolean? = null)
Link copied to clipboard
@Serializable
data class ListModelsParameters(val config: ListModelsConfig? = null)
Link copied to clipboard
@Serializable
data class ListModelsResponse(val sdkHttpResponse: HttpResponse? = null, val nextPageToken: String? = null, val models: List<Model>? = null)
Link copied to clipboard
@Serializable
data class ListTuningJobsConfig(val httpOptions: HttpOptions? = null, val pageSize: Int? = null, val pageToken: String? = null, val filter: String? = null)

Configuration for the list tuning jobs method.

Link copied to clipboard
@Serializable
data class ListTuningJobsParameters(val config: ListTuningJobsConfig? = null)

Parameters for the list tuning jobs method.

Link copied to clipboard
@Serializable
data class ListTuningJobsResponse(val sdkHttpResponse: HttpResponse? = null, val nextPageToken: String? = null, val tuningJobs: List<TuningJob>? = null)

Response for the list tuning jobs method.

Link copied to clipboard
@Serializable
data class LiveClientContent(val turns: List<Content>? = null, val turnComplete: Boolean? = null)

Incremental update of the current conversation delivered from the client.

Link copied to clipboard
@Serializable
data class LiveClientMessage(val setup: LiveClientSetup? = null, val clientContent: LiveClientContent? = null, val realtimeInput: LiveClientRealtimeInput? = null, val toolResponse: LiveClientToolResponse? = null)

Messages sent by the client in the API call.

Link copied to clipboard
@Serializable
data class LiveClientRealtimeInput(val activityStart: ActivityStart? = null, val activityEnd: ActivityEnd? = null, val audio: Blob? = null, val audioStreamEnd: Boolean? = null, val video: Blob? = null, val text: String? = null)

User input that is sent in real time.

Link copied to clipboard
@Serializable
data class LiveClientSetup(val model: String? = null, val generationConfig: GenerationConfig? = null, val systemInstruction: Content? = null, val tools: List<Tool>? = null, val sessionResumption: SessionResumptionConfig? = null, val contextWindowCompression: ContextWindowCompressionConfig? = null, val inputAudioTranscription: AudioTranscriptionConfig? = null, val outputAudioTranscription: AudioTranscriptionConfig? = null, val proactivity: ProactivityConfig? = null, val explicitVadSignal: Boolean? = null, val avatarConfig: AvatarConfig? = null, val safetySettings: List<SafetySetting>? = null, val historyConfig: HistoryConfig? = null, val realtimeInputConfig: RealtimeInputConfig? = null)

Message contains configuration that will apply for the duration of the streaming session.

Link copied to clipboard
@Serializable
data class LiveClientToolResponse(val functionResponses: List<FunctionResponse>? = null)

Client generated response to a ToolCall received from the server.

Link copied to clipboard
@Serializable
data class LiveConnectConfig(val httpOptions: HttpOptions? = null, val responseModalities: List<Modality>? = null, val temperature: Double? = null, val topP: Double? = null, val topK: Double? = null, val maxOutputTokens: Int? = null, val mediaResolution: MediaResolution? = null, val seed: Int? = null, val speechConfig: SpeechConfig? = null, val thinkingConfig: ThinkingConfig? = null, val enableAffectiveDialog: Boolean? = null, val systemInstruction: Content? = null, val tools: List<Tool>? = null, val sessionResumption: SessionResumptionConfig? = null, val inputAudioTranscription: AudioTranscriptionConfig? = null, val outputAudioTranscription: AudioTranscriptionConfig? = null, val realtimeInputConfig: RealtimeInputConfig? = null, val contextWindowCompression: ContextWindowCompressionConfig? = null, val proactivity: ProactivityConfig? = null, val explicitVadSignal: Boolean? = null, val avatarConfig: AvatarConfig? = null, val safetySettings: List<SafetySetting>? = null, val translationConfig: TranslationConfig? = null)

Session config for the API connection.

Link copied to clipboard
@Serializable
data class LiveServerContent(val modelTurn: Content? = null, val turnComplete: Boolean? = null, val interrupted: Boolean? = null, val groundingMetadata: GroundingMetadata? = null, val generationComplete: Boolean? = null, val inputTranscription: Transcription? = null, val outputTranscription: Transcription? = null, val urlContextMetadata: UrlContextMetadata? = null, val turnCompleteReason: TurnCompleteReason? = null, val waitingForInput: Boolean? = null, val interimInputTranscription: Transcription? = null)

Incremental server update generated by the model in response to client messages.

Link copied to clipboard
@Serializable
data class LiveServerGoAway(val timeLeft: Duration? = null)

Server will not be able to service client soon.

Link copied to clipboard
@Serializable
data class LiveServerMessage(val setupComplete: LiveServerSetupComplete? = null, val serverContent: LiveServerContent? = null, val toolCall: LiveServerToolCall? = null, val toolCallCancellation: LiveServerToolCallCancellation? = null, val usageMetadata: UsageMetadata? = null, val goAway: LiveServerGoAway? = null, val sessionResumptionUpdate: LiveServerSessionResumptionUpdate? = null, val voiceActivityDetectionSignal: VoiceActivityDetectionSignal? = null, val voiceActivity: VoiceActivity? = null)

Response message for API call.

Link copied to clipboard
@Serializable
data class LiveServerSessionResumptionUpdate(val newHandle: String? = null, val resumable: Boolean? = null, val lastConsumedClientMessageIndex: Long? = null)

Update of the session resumption state.

Link copied to clipboard
@Serializable
data class LiveServerSetupComplete(val sessionId: String? = null, val voiceConsentSignature: VoiceConsentSignature? = null)

Sent in response to a LiveGenerateContentSetup message from the client.

Link copied to clipboard
@Serializable
data class LiveServerToolCall(val functionCalls: List<FunctionCall>? = null)

Request for the client to execute the function_calls and return the responses with the matching ids.

Link copied to clipboard
@Serializable
data class LiveServerToolCallCancellation(val ids: List<String>? = null)

Notification for the client that a previously issued ToolCallMessage with the specified ids should have been not executed and should be cancelled.

Link copied to clipboard
@Serializable
data class LogprobsResult(val chosenCandidates: List<LogprobsResultCandidate>? = null, val topCandidates: List<LogprobsResultTopCandidates>? = null, val logProbabilitySum: Double? = null)

The log probabilities of the tokens generated by the model. This is useful for understanding the model's confidence in its predictions and for debugging. For example, you can use log probabilities to identify when the model is making a less confident prediction or to explore alternative responses that the model considered. A low log probability can also indicate that the model is "hallucinating" or generating factually incorrect information.

Link copied to clipboard
@Serializable
data class LogprobsResultCandidate(val logProbability: Double? = null, val token: String? = null, val tokenId: Int? = null)

A single token and its associated log probability.

Link copied to clipboard
@Serializable
data class LogprobsResultTopCandidates(val candidates: List<LogprobsResultCandidate>? = null)

A list of the top candidate tokens and their log probabilities at each decoding step. This can be used to see what other tokens the model considered.

Link copied to clipboard
@Serializable
value class MatchOperation(val value: String)

Match operation to use for evaluating rewards. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class McpServer(val name: String? = null, val streamableHttpTransport: StreamableHttpTransport? = null)

A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
value class MediaModality(val value: String)

The modality that this token count applies to.

Link copied to clipboard
@Serializable
value class MediaResolution(val value: String)

The media resolution to use.

Link copied to clipboard
@Serializable
value class Modality(val value: String)

Server content modalities.

Link copied to clipboard
@Serializable
data class ModalityTokenCount(val modality: MediaModality? = null, val tokenCount: Int? = null)

Represents a breakdown of token usage by modality. This message is used in CountTokensResponse and GenerateContentResponse.UsageMetadata to provide a detailed view of how many tokens are used by each modality (e.g., text, image, video) in a request. This is particularly useful for multimodal models, allowing you to track and manage token consumption for billing and quota purposes.

Link copied to clipboard
@Serializable
data class Model(val name: String? = null, val displayName: String? = null, val description: String? = null, val version: String? = null, val endpoints: List<Endpoint>? = null, val labels: Map<String, String>? = null, val tunedModelInfo: TunedModelInfo? = null, val inputTokenLimit: Int? = null, val outputTokenLimit: Int? = null, val supportedActions: List<String>? = null, val defaultCheckpointId: String? = null, val checkpoints: List<Checkpoint>? = null, val temperature: Double? = null, val maxTemperature: Double? = null, val topP: Double? = null, val topK: Int? = null, val thinking: Boolean? = null)

A trained machine learning model.

Link copied to clipboard
@Serializable
data class ModelArmorConfig(val promptTemplateName: String? = null, val responseTemplateName: String? = null)

Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class ModelRoutingPreference(val value: String)

The model routing preference.

Link copied to clipboard
@Serializable
data class ModelSelectionConfig(val featureSelectionPreference: FeatureSelectionPreference? = null)

Config for model selection.

Link copied to clipboard
@Serializable
value class ModelStage(val value: String)

The stage of the underlying model. This enum is not supported in Vertex AI.

Link copied to clipboard
@Serializable
data class ModelStatus(val message: String? = null, val modelStage: ModelStage? = null, val retirementTime: Instant? = null)

The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
data class MultiSpeakerVoiceConfig(val speakerVoiceConfigs: List<SpeakerVoiceConfig>? = null)

Configuration for a multi-speaker text-to-speech request.

Link copied to clipboard
@Serializable
value class NullValue(val value: String)

Optional. Represents a null value.

Link copied to clipboard
@Serializable
value class Outcome(val value: String)

Outcome of the code execution.

Link copied to clipboard
@Serializable
data class OutputInfo(val gcsOutputDirectory: String? = null)

Describes the info for output of EvaluationService. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class PairwiseChoice(val value: String)

Output only. Pairwise metric choice. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class PairwiseMetricResult(val customOutput: CustomOutput? = null, val explanation: String? = null, val pairwiseChoice: PairwiseChoice? = null)

Spec for pairwise metric result. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class Part(val mediaResolution: PartMediaResolution? = null, val codeExecutionResult: CodeExecutionResult? = null, val executableCode: ExecutableCode? = null, val fileData: FileData? = null, val functionCall: FunctionCall? = null, val functionResponse: FunctionResponse? = null, val inlineData: Blob? = null, val text: String? = null, val thought: Boolean? = null, val thoughtSignature: ByteArray? = null, val videoMetadata: VideoMetadata? = null, val toolCall: ToolCall? = null, val toolResponse: ToolResponse? = null, val partMetadata: Map<String, JsonElement>? = null, val audioTranscription: Transcription? = null)

A datatype containing media content.

Link copied to clipboard
@Serializable
data class PartialArg(val boolValue: Boolean? = null, val jsonPath: String? = null, val nullValue: NullValue? = null, val numberValue: Double? = null, val stringValue: String? = null, val willContinue: Boolean? = null)

Partial argument value of the function call. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class PartMediaResolution(val level: PartMediaResolutionLevel? = null, val numTokens: Int? = null)

Media resolution for the input media.

Link copied to clipboard
@Serializable
value class PartMediaResolutionLevel(val value: String)

The tokenization quality used for given media.

Link copied to clipboard
@Serializable
data class PartnerModelTuningSpec(val hyperParameters: Map<String, JsonElement>? = null, val trainingDatasetUri: String? = null, val validationDatasetUri: String? = null)

Tuning spec for Partner models. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class PhishBlockThreshold(val value: String)

Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class PointwiseMetricResult(val customOutput: CustomOutput? = null, val explanation: String? = null, val score: Double? = null)

Spec for pointwise metric result. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class PrebuiltVoiceConfig(val voiceName: String? = null)

Configuration for a prebuilt voice.

Link copied to clipboard
@Serializable
data class PreferenceOptimizationDataStats(val droppedExampleIndices: List<Long>? = null, val droppedExampleReasons: List<String>? = null, val scoreVariancePerExampleDistribution: DatasetDistribution? = null, val scoresDistribution: DatasetDistribution? = null, val totalBillableTokenCount: Long? = null, val tuningDatasetExampleCount: Long? = null, val tuningStepCount: Long? = null, val userDatasetExamples: List<GeminiPreferenceExample>? = null, val userInputTokenDistribution: DatasetDistribution? = null, val userOutputTokenDistribution: DatasetDistribution? = null)

Statistics computed for datasets used for preference optimization. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class PreferenceOptimizationHyperParameters(val adapterSize: AdapterSize? = null, val beta: Double? = null, val epochCount: Long? = null, val learningRateMultiplier: Double? = null)

Hyperparameters for Preference Optimization. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class PreferenceOptimizationSpec(val exportLastCheckpointOnly: Boolean? = null, val hyperParameters: PreferenceOptimizationHyperParameters? = null, val trainingDatasetUri: String? = null, val validationDatasetUri: String? = null)

Preference optimization tuning spec for tuning.

Link copied to clipboard
@Serializable
data class PreTunedModel(val baseModel: String? = null, val checkpointId: String? = null, val tunedModelName: String? = null)

A pre-tuned model for continuous tuning. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ProactivityConfig(val proactiveAudio: Boolean? = null)

Config for proactivity features.

Link copied to clipboard
@Serializable
value class ProminentPeople(val value: String)

Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagChunk(val pageSpan: RagChunkPageSpan? = null, val text: String? = null, val chunkId: String? = null, val fileId: String? = null)

A RagChunk includes the content of a chunk of a RagFile, and associated metadata. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagChunkPageSpan(val firstPage: Int? = null, val lastPage: Int? = null)

Represents where the chunk starts and ends in the document. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagRetrievalConfig(val filter: RagRetrievalConfigFilter? = null, val hybridSearch: RagRetrievalConfigHybridSearch? = null, val ranking: RagRetrievalConfigRanking? = null, val topK: Int? = null)

Specifies the context retrieval config. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagRetrievalConfigFilter(val metadataFilter: String? = null, val vectorDistanceThreshold: Double? = null, val vectorSimilarityThreshold: Double? = null)

Config for filters. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagRetrievalConfigHybridSearch(val alpha: Double? = null)

Config for Hybrid Search. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagRetrievalConfigRanking(val llmRanker: RagRetrievalConfigRankingLlmRanker? = null, val rankService: RagRetrievalConfigRankingRankService? = null)

Config for ranking and reranking. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagRetrievalConfigRankingLlmRanker(val modelName: String? = null)

Config for LlmRanker. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RagRetrievalConfigRankingRankService(val modelName: String? = null)

Config for Rank Service. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RawOutput(val rawOutput: List<String>? = null)

Raw output. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RealtimeInputConfig(val automaticActivityDetection: AutomaticActivityDetection? = null, val activityHandling: ActivityHandling? = null, val turnCoverage: TurnCoverage? = null)

Marks the end of user activity.

Link copied to clipboard
@Serializable
data class ReinforcementTuningAutoraterScorer(val autoraterConfig: AutoraterConfig? = null, val autoraterPrompt: String? = null, val autoraterResponseParseConfig: ReinforcementTuningParseResponseConfig? = null, val parsedResponseConversionScorer: ReinforcementTuningAutoraterScorerParsedResponseConversionScorer? = null, val exactMatchScorer: ReinforcementTuningAutoraterScorerExactMatchScorer? = null)

Reinforcement tuning autorater scorer.

@Serializable
data class ReinforcementTuningAutoraterScorerExactMatchScorer(val correctAnswerReward: Double? = null, val wrongAnswerReward: Double? = null, val expression: String? = null)

Scores autorater responses by using exact string match reward scorer. This data type is not supported in Gemini API.

Scores responses by directly converting the parsed autorater response to a float reward. Note: Reward is clipped to be within [-1, 1], i.e., reward = max(min(reward, 1.0), -1.0). This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ReinforcementTuningCloudRunRewardScorer(val cloudRunUri: String? = null)

ReinforcementTuningCloudRunRewardScorer allows users to implement a reward function through GCP Cloud Run. Comparing with ReinforcementTuningCodeExecutionRewardScorer that runs in a Sandbox and has no internet access, Cloud Run reward scorer is fully controlled by users. The Cloud Run service should implement the following HTTP API: HTTP method: POST HTTP request body: `` { "example": ReinforcementTuningExample, "response": Content, "metadata": { "step": int "tuning_job_id": int64 } } `` * example is a ReinforcementTuningExample in ProtoJSON format, (i.e., the format is the same as as one line in the training/validation dataset except that the keys must be in camel case). System instructions (i.e., example.get("systemInstruction")) and references (i.e., example.get("references")) are also included in the example provided that they are set in the training/validation dataset. * response is a Content in ProtoJSON format (i.e., keys must be in camel case), which is the same as the Online Prediction response for Gemini models. HTTP response body: { "reward": float, "user_requested_aux_info": str // Optional } where the field "user_requested_aux_info" is any (optional) string provided by users for assisting debugging. It's in snake case. This field is mostly useful when calling the GenAiTuningService.ValidateReinforcementTuningReward API, where the proto field (not Cloud Run HTTP response body) userRequestedAuxInfo will be populated if the Cloud Run reward function sets this field in the HTTP response. The following are examples for the HTTP request and response body. Example HTTP request body: `` { "example": { "contents": [ { "role": "user", "parts": [ { "text": "What is the capital of France?" } ] } ], "references": { "answer": "Paris" } }, "response": { "parts": [ { "text": "London" } ] }, "metadata": { "step": 1, "tuning_job_id": 123456789 } } `` Example HTTP response body: `` { "reward": -1.0 } `` Note: Reward output by Cloud Run reward function is clipped to be within [-1, 1], i.e., reward = max(min(reward, 1.0), -1.0). This data type is not supported in Gemini API.

@Serializable
data class ReinforcementTuningCodeExecutionRewardScorer(val pythonCodeSnippet: String? = null)

ReinforcementTuningCodeExecutionRewardScorer allows users to implement a function to evaluate rewards for the sample response. The function signature is as follows: `` def evaluate(example: dict[str, Any], response: dict[str, Any]) -> float: ... `` example is a ReinforcementTuningExample in ProtoJSON format, (i.e., the format is the same as as one line in the training/validation dataset except that the keys must be in camel case). System instructions (i.e., example.get("systemInstruction")) and references (i.e., example.get("references")) are also included in the example provided that they are set in the training/validation dataset. response is a Content in ProtoJSON format (i.e., keys must be in camel case), which is the same as the Online Prediction response for Gemini models. Note: Reward output by the evaluate function is clipped to be within [-1, 1], i.e., reward = max(min(reward, 1.0), -1.0). This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ReinforcementTuningExample(val contents: List<Content>? = null, val references: Map<String, String>? = null, val systemInstruction: Content? = null)

User-facing format for Gemini Reinforcement Tuning examples on Vertex.

Link copied to clipboard
@Serializable
data class ReinforcementTuningHyperParameters(val epochCount: Long? = null, val learningRateMultiplier: Double? = null, val adapterSize: AdapterSize? = null, val samplesPerPrompt: Int? = null, val batchSize: Int? = null, val evaluateInterval: Int? = null, val checkpointInterval: Int? = null, val maxOutputTokens: Int? = null, val thinkingLevel: ReinforcementTuningThinkingLevel? = null, val thinkingBudget: Int? = null)

Hyperparameters for Reinforcement Tuning.

Link copied to clipboard
@Serializable
data class ReinforcementTuningParseResponseConfig(val parseType: ResponseParseType? = null, val regexExtractExpression: String? = null)

Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: "Perform step-by-step thoughts first to problem A, finally output answer in the block." The sample response from the model under tuning might look like: "Yes" Here, users can define the following parse config: `` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } `` The resulting parsed response would be "Yes" and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ReinforcementTuningRewardInfo(val reward: Double? = null, val userRequestedAuxInfo: String? = null)

The reward info for a reward function.

Link copied to clipboard
@Serializable
data class ReinforcementTuningSpec(val compositeRewardConfig: CompositeReinforcementTuningRewardConfig? = null, val trainingDatasetUri: String? = null, val validationDatasetUri: String? = null, val hyperParameters: ReinforcementTuningHyperParameters? = null, val singleRewardConfig: SingleReinforcementTuningRewardConfig? = null)

Reinforcement tuning spec for tuning.

@Serializable
data class ReinforcementTuningStringMatchRewardScorer(val wrongAnswerReward: Double? = null, val correctAnswerReward: Double? = null, val stringMatchExpression: ReinforcementTuningStringMatchRewardScorerStringMatchExpression? = null, val jsonMatchExpression: ReinforcementTuningStringMatchRewardScorerJsonMatchExpression? = null)

ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for string matching use cases. For example, for math problems, users can use string match scorer to check if the correct exact answer is generated. Note: Reward returned by the string match reward function is clipped to be within [-1, 1] if wrongAnswerReward or correctAnswerReward are beyond the range, i.e., reward = max(min(reward, 1.0), -1.0). This data type is not supported in Gemini API.

@Serializable
data class ReinforcementTuningStringMatchRewardScorerJsonMatchExpression(val keyName: String? = null, val valueStringMatchExpression: ReinforcementTuningStringMatchRewardScorerStringMatchExpression? = null)

JsonMatchExpression supports converting the parsed responses to JSON format, finding the value in the JSON response that matches the key_name in the first level, and performing StringMatchExpression operation on the matched JSON value. This data type is not supported in Gemini API.

@Serializable
data class ReinforcementTuningStringMatchRewardScorerStringMatchExpression(val matchOperation: MatchOperation? = null, val expression: String? = null)

Evaluates parsed response using match type against the expression. Returns true if MatchOperation(target, expression) evaluates to true, and false otherwise. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class ReinforcementTuningThinkingLevel(val value: String)

Represents how much to think for the tuning job.

Link copied to clipboard
@Serializable
data class ReinforcementTuningUserDatasetExamples(val userDatasetExamples: List<ReinforcementTuningExample>? = null)

Sample reinforcement tuning user data in the training dataset. The contents are truncated for better UI showing. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ReplicatedVoiceConfig(val mimeType: String? = null, val voiceSampleAudio: ByteArray? = null, val consentAudio: ByteArray? = null, val voiceConsentSignature: VoiceConsentSignature? = null)

The configuration for the replicated voice to use.

Link copied to clipboard
@Serializable
data class ResponseFormat(val audio: AudioResponseFormat? = null, val image: ImageResponseFormat? = null, val text: TextResponseFormat? = null, val video: VideoResponseFormat? = null)

Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class ResponseParseType(val value: String)

Defines the type for parsing sample response. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class Retrieval(val disableAttribution: Boolean? = null, val externalApi: ExternalApi? = null, val vertexAiSearch: VertexAISearch? = null, val vertexRagStore: VertexRagStore? = null)

Defines a retrieval tool that model can call to access external knowledge. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class RetrievalConfig(val latLng: LatLng? = null, val languageCode: String? = null)

Retrieval config.

Link copied to clipboard
@Serializable
data class RetrievalMetadata(val googleSearchDynamicRetrievalScore: Double? = null)

Metadata returned to client when grounding is enabled.

Link copied to clipboard
@Serializable
data class RougeMetricValue(val score: Double? = null)

Rouge metric value for an instance. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class SafetyPolicy(val value: String)

SafetyPolicy

Link copied to clipboard
@Serializable
data class SafetyRating(val blocked: Boolean? = null, val category: HarmCategory? = null, val overwrittenThreshold: HarmBlockThreshold? = null, val probability: HarmProbability? = null, val probabilityScore: Double? = null, val severity: HarmSeverity? = null, val severityScore: Double? = null)

A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level.

Link copied to clipboard
@Serializable
data class SafetySetting(val category: HarmCategory? = null, val method: HarmBlockMethod? = null, val threshold: HarmBlockThreshold? = null)

A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category.

Link copied to clipboard
@Serializable
data class Schema(val anyOf: List<Schema>? = null, val default: JsonElement? = null, val description: String? = null, val enum: List<String>? = null, val example: JsonElement? = null, val format: String? = null, val items: Schema? = null, val maxItems: Long? = null, val maxLength: Long? = null, val maxProperties: Long? = null, val maximum: Double? = null, val minItems: Long? = null, val minLength: Long? = null, val minProperties: Long? = null, val minimum: Double? = null, val nullable: Boolean? = null, val pattern: String? = null, val properties: Map<String, Schema>? = null, val propertyOrdering: List<String>? = null, val required: List<String>? = null, val title: String? = null, val type: Type? = null)

Schema is used to define the format of input/output data.

Link copied to clipboard
@Serializable
data class SearchEntryPoint(val renderedContent: String? = null, val sdkBlob: ByteArray? = null)

The entry point used to search for grounding sources.

Link copied to clipboard
@Serializable
data class SearchTypes(val webSearch: WebSearch? = null, val imageSearch: ImageSearch? = null)

Different types of search that can be enabled on the GoogleSearch tool.

Link copied to clipboard
@Serializable
data class Segment(val startIndex: Int? = null, val endIndex: Int? = null, val partIndex: Int? = null, val text: String? = null)

Segment of the content this support belongs to.

Link copied to clipboard
@Serializable
value class ServiceTier(val value: String)

Pricing and performance service tier.

Link copied to clipboard
@Serializable
data class SessionResumptionConfig(val handle: String? = null, val transparent: Boolean? = null)

Configuration of session resumption mechanism.

Link copied to clipboard
@Serializable
data class SingleEmbedContentResponse(val embedding: ContentEmbedding? = null, val tokenCount: Long? = null)

Config for response parameter.

Link copied to clipboard
@Serializable
data class SingleReinforcementTuningRewardConfig(val autoraterScorer: ReinforcementTuningAutoraterScorer? = null, val rewardName: String? = null, val parseResponseConfig: ReinforcementTuningParseResponseConfig? = null, val codeExecutionRewardScorer: ReinforcementTuningCodeExecutionRewardScorer? = null, val stringMatchRewardScorer: ReinforcementTuningStringMatchRewardScorer? = null, val cloudRunRewardScorer: ReinforcementTuningCloudRunRewardScorer? = null)

Single reinforcement tuning reward config.

Link copied to clipboard
@Serializable
data class SlidingWindow(val targetTokens: Long? = null)

Context window will be truncated by keeping only suffix of it.

Link copied to clipboard
@Serializable
data class SpeakerVoiceConfig(val speaker: String? = null, val voiceConfig: VoiceConfig? = null)

Configuration for a single speaker in a multi-speaker setup.

Link copied to clipboard
@Serializable
data class SpeechConfig(val voiceConfig: VoiceConfig? = null, val languageCode: String? = null, val multiSpeakerVoiceConfig: MultiSpeakerVoiceConfig? = null)

Config for speech generation and transcription.

Link copied to clipboard
@Serializable
value class StartSensitivity(val value: String)

Start of speech sensitivity.

Link copied to clipboard
@Serializable
data class StreamableHttpTransport(val headers: Map<String, String>? = null, val sseReadTimeout: Duration? = null, val terminateOnClose: Boolean? = null, val timeout: Duration? = null, val url: String? = null)

A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
data class SupervisedHyperParameters(val adapterSize: AdapterSize? = null, val batchSize: Long? = null, val epochCount: Long? = null, val learningRate: Double? = null, val learningRateMultiplier: Double? = null)

Hyperparameters for SFT. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class SupervisedTuningDatasetDistribution(val billableSum: Long? = null, val buckets: List<SupervisedTuningDatasetDistributionDatasetBucket>? = null, val max: Double? = null, val mean: Double? = null, val median: Double? = null, val min: Double? = null, val p5: Double? = null, val p95: Double? = null, val sum: Long? = null)

Dataset distribution for Supervised Tuning. This data type is not supported in Gemini API.

@Serializable
data class SupervisedTuningDatasetDistributionDatasetBucket(val count: Double? = null, val left: Double? = null, val right: Double? = null)

Dataset bucket used to create a histogram for the distribution given a population of values. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class SupervisedTuningDataStats(val droppedExampleReasons: List<String>? = null, val totalBillableCharacterCount: Long? = null, val totalBillableTokenCount: Long? = null, val totalTruncatedExampleCount: Long? = null, val totalTuningCharacterCount: Long? = null, val truncatedExampleIndices: List<Long>? = null, val tuningDatasetExampleCount: Long? = null, val tuningStepCount: Long? = null, val userDatasetExamples: List<Content>? = null, val userInputTokenDistribution: SupervisedTuningDatasetDistribution? = null, val userMessagePerExampleDistribution: SupervisedTuningDatasetDistribution? = null, val userOutputTokenDistribution: SupervisedTuningDatasetDistribution? = null)

Tuning data statistics for Supervised Tuning. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class SupervisedTuningSpec(val exportLastCheckpointOnly: Boolean? = null, val hyperParameters: SupervisedHyperParameters? = null, val trainingDatasetUri: String? = null, val tuningMode: TuningMode? = null, val validationDatasetUri: String? = null)

Supervised tuning spec for tuning.

Link copied to clipboard
@Serializable
data class TextResponseFormat(val mimeType: String? = null, val schema: JsonElement? = null)

Configuration for text-specific output formatting.

Link copied to clipboard
@Serializable
data class ThinkingConfig(val includeThoughts: Boolean? = null, val thinkingBudget: Int? = null, val thinkingLevel: ThinkingLevel? = null)

The thinking features configuration.

Link copied to clipboard
@Serializable
value class ThinkingLevel(val value: String)

The number of thoughts tokens that the model should generate.

Link copied to clipboard
@Serializable
data class TokensInfo(val role: String? = null, val tokenIds: List<Long>? = null, val tokens: List<@Serializable(with = ByteArrayAsBase64Serializer::class) ByteArray>? = null)

Tokens info with a list of tokens and the corresponding list of token ids.

Link copied to clipboard
@Serializable
data class Tool(val retrieval: Retrieval? = null, val computerUse: ComputerUse? = null, val fileSearch: FileSearch? = null, val googleSearch: GoogleSearch? = null, val googleMaps: GoogleMaps? = null, val codeExecution: ToolCodeExecution? = null, val enterpriseWebSearch: EnterpriseWebSearch? = null, val functionDeclarations: List<FunctionDeclaration>? = null, val googleSearchRetrieval: GoogleSearchRetrieval? = null, val parallelAiSearch: ToolParallelAiSearch? = null, val urlContext: UrlContext? = null, val mcpServers: List<McpServer>? = null, val exaAiSearch: ToolExaAiSearch? = null)

Tool details of a tool that the model may use to generate a response.

Link copied to clipboard
@Serializable
data class ToolCall(val id: String? = null, val toolType: ToolType? = null, val args: Map<String, JsonElement>? = null)

A predicted server-side ToolCall returned from the model.

Link copied to clipboard
@Serializable
class ToolCodeExecution

Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ToolConfig(val retrievalConfig: RetrievalConfig? = null, val functionCallingConfig: FunctionCallingConfig? = null, val includeServerSideToolInvocations: Boolean? = null)

Tool config. This config is shared for all tools provided in the request.

Link copied to clipboard
@Serializable
data class ToolExaAiSearch(val apiKey: String? = null, val customConfigs: Map<String, JsonElement>? = null)

ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ToolParallelAiSearch(val apiKey: String? = null, val customConfigs: Map<String, JsonElement>? = null)

ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class ToolResponse(val id: String? = null, val toolType: ToolType? = null, val response: Map<String, JsonElement>? = null)

The output from a server-side ToolCall execution.

Link copied to clipboard
@Serializable
value class ToolType(val value: String)

The type of tool in the function call.

Link copied to clipboard
@Serializable
value class TrafficType(val value: String)

Output only. The traffic type for this request. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class Transcription(val text: String? = null, val finished: Boolean? = null, val languageCode: String? = null, val speakerLabel: String? = null, val words: List<WordInfo>? = null)

Audio transcription in Server Content.

Link copied to clipboard
@Serializable
data class TranslationConfig(val echoTargetLanguage: Boolean? = null, val targetLanguageCode: String? = null)

Config for stream translation.

Link copied to clipboard
@Serializable
data class TunedModel(val model: String? = null, val endpoint: String? = null, val checkpoints: List<TunedModelCheckpoint>? = null)

TunedModel for the Tuned Model of a Tuning Job.

Link copied to clipboard
@Serializable
data class TunedModelCheckpoint(val checkpointId: String? = null, val epoch: Long? = null, val step: Long? = null, val endpoint: String? = null)

TunedModelCheckpoint for the Tuned Model of a Tuning Job.

Link copied to clipboard
@Serializable
data class TunedModelInfo(val baseModel: String? = null, val createTime: Instant? = null, val updateTime: Instant? = null)

A tuned machine learning model.

Link copied to clipboard
@Serializable
data class TuningDataset(val gcsUri: String? = null, val vertexDatasetResource: String? = null, val examples: List<TuningExample>? = null)

Supervised fine-tuning training dataset.

Link copied to clipboard
@Serializable
data class TuningDataStats(val distillationDataStats: DistillationDataStats? = null, val preferenceOptimizationDataStats: PreferenceOptimizationDataStats? = null, val supervisedTuningDataStats: SupervisedTuningDataStats? = null, val reinforcementTuningDataStats: DatasetStats? = null)

The tuning data statistic values for TuningJob. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class TuningExample(val output: String? = null, val textInput: String? = null)

A single example for tuning. This data type is not supported in Vertex AI.

Link copied to clipboard
@Serializable
data class TuningJob(val sdkHttpResponse: HttpResponse? = null, val name: String? = null, val state: JobState? = null, val createTime: Instant? = null, val startTime: Instant? = null, val endTime: Instant? = null, val updateTime: Instant? = null, val error: GoogleRpcStatus? = null, val description: String? = null, val baseModel: String? = null, val tunedModel: TunedModel? = null, val preTunedModel: PreTunedModel? = null, val supervisedTuningSpec: SupervisedTuningSpec? = null, val preferenceOptimizationSpec: PreferenceOptimizationSpec? = null, val distillationSpec: DistillationSpec? = null, val reinforcementTuningSpec: ReinforcementTuningSpec? = null, val tuningDataStats: TuningDataStats? = null, val encryptionSpec: EncryptionSpec? = null, val partnerModelTuningSpec: PartnerModelTuningSpec? = null, val customBaseModel: String? = null, val evaluateDatasetRuns: List<EvaluateDatasetRun>? = null, val experiment: String? = null, val fullFineTuningSpec: FullFineTuningSpec? = null, val labels: Map<String, String>? = null, val outputUri: String? = null, val pipelineJob: String? = null, val serviceAccount: String? = null, val tunedModelDisplayName: String? = null, val tuningJobState: TuningJobState? = null, val veoTuningSpec: VeoTuningSpec? = null, val tuningJobMetadata: TuningJobMetadata? = null, val veoLoraTuningSpec: VeoLoraTuningSpec? = null, val distillationSamplingSpec: DistillationSamplingSpec? = null)

A tuning job.

Link copied to clipboard
@Serializable
data class TuningJobMetadata(val completedEpochCount: Long? = null, val completedStepCount: Long? = null)

Tuning job metadata. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class TuningJobState(val value: String)

Output only. The detail state of the tuning job (while the overall JobState is running). This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class TuningMethod(val value: String)

Enum representing the tuning method.

Link copied to clipboard
@Serializable
value class TuningMode(val value: String)

Tuning mode. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class TuningOperation(val sdkHttpResponse: HttpResponse? = null, val name: String? = null, val metadata: Map<String, JsonElement>? = null, val done: Boolean? = null, val error: Map<String, JsonElement>? = null)

A long-running operation.

Link copied to clipboard
@Serializable
value class TuningSpeed(val value: String)

The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
value class TuningTask(val value: String)

The tuning task for Veo. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class TuningValidationDataset(val gcsUri: String? = null, val vertexDatasetResource: String? = null)
Link copied to clipboard
@Serializable
value class TurnCompleteReason(val value: String)

The reason why the turn is complete.

Link copied to clipboard
@Serializable
value class TurnCoverage(val value: String)

Options about which input is included in the user's turn.

Link copied to clipboard
@Serializable
value class Type(val value: String)

Data type of the schema field.

Link copied to clipboard
@Serializable
data class UpdateCachedContentConfig(val httpOptions: HttpOptions? = null, val ttl: Duration? = null, val expireTime: Instant? = null)

Optional parameters for caches.update method.

Link copied to clipboard
@Serializable
data class UpdateCachedContentParameters(val name: String? = null, val config: UpdateCachedContentConfig? = null)
Link copied to clipboard
@Serializable
data class UpdateModelConfig(val httpOptions: HttpOptions? = null, val displayName: String? = null, val description: String? = null, val defaultCheckpointId: String? = null, val updateMask: String? = null)

Configuration for updating a tuned model.

Link copied to clipboard
@Serializable
data class UpdateModelParameters(val model: String? = null, val config: UpdateModelConfig? = null)

Configuration for updating a tuned model.

Link copied to clipboard
@Serializable
data class UploadFileConfig(val httpOptions: HttpOptions? = null, val name: String? = null, val mimeType: String? = null, val displayName: String? = null)

Used to override the default configuration.

Link copied to clipboard
@Serializable
class UrlContext

Tool to support URL context.

Link copied to clipboard
@Serializable
data class UrlContextMetadata(val urlMetadata: List<UrlMetadata>? = null)

Metadata returned when the model uses the url_context tool to get information from a user-provided URL.

Link copied to clipboard
@Serializable
data class UrlMetadata(val retrievedUrl: String? = null, val urlRetrievalStatus: UrlRetrievalStatus? = null)

The metadata for a single URL retrieval.

Link copied to clipboard
@Serializable
value class UrlRetrievalStatus(val value: String)

The status of the URL retrieval.

Link copied to clipboard
@Serializable
data class UsageMetadata(val promptTokenCount: Int? = null, val cachedContentTokenCount: Int? = null, val responseTokenCount: Int? = null, val toolUsePromptTokenCount: Int? = null, val thoughtsTokenCount: Int? = null, val totalTokenCount: Int? = null, val promptTokensDetails: List<ModalityTokenCount>? = null, val cacheTokensDetails: List<ModalityTokenCount>? = null, val responseTokensDetails: List<ModalityTokenCount>? = null, val toolUsePromptTokensDetails: List<ModalityTokenCount>? = null, val trafficType: TrafficType? = null, val serviceTier: ServiceTier? = null)

Usage metadata about response(s).

Link copied to clipboard
@Serializable
value class VadSignalType(val value: String)

The type of the VAD signal.

Link copied to clipboard
@Serializable
data class ValidateRewardConfig(val httpOptions: HttpOptions? = null)

Optional parameters for tunings.validate_reward.

Link copied to clipboard
@Serializable
data class ValidateRewardParameters(val parent: String? = null, val sampleResponse: Content? = null, val example: ReinforcementTuningExample? = null, val singleRewardConfig: SingleReinforcementTuningRewardConfig? = null, val compositeRewardConfig: CompositeReinforcementTuningRewardConfig? = null, val config: ValidateRewardConfig? = null)

Parameters for the validate_reward method.

Link copied to clipboard
@Serializable
data class ValidateRewardResponse(val sdkHttpResponse: HttpResponse? = null, val overallReward: Double? = null, val error: String? = null, val rewardInfoDetails: Map<String, ReinforcementTuningRewardInfo>? = null)

Response for the validate_reward method.

Link copied to clipboard
@Serializable
data class VeoHyperParameters(val epochCount: Long? = null, val learningRateMultiplier: Double? = null, val tuningTask: TuningTask? = null, val veoDataMixtureRatio: Double? = null, val adapterSize: AdapterSize? = null, val tuningSpeed: TuningSpeed? = null)

Hyperparameters for Veo. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VeoLoraTuningSpec(val hyperParameters: VeoHyperParameters? = null, val trainingDatasetUri: String? = null, val validationDatasetUri: String? = null, val videoOrientation: VideoOrientation? = null)

Tuning Spec for Veo LoRA Model Tuning. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VeoTuningSpec(val hyperParameters: VeoHyperParameters? = null, val trainingDatasetUri: String? = null, val validationDatasetUri: String? = null)

Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VertexAISearch(val dataStoreSpecs: List<VertexAISearchDataStoreSpec>? = null, val datastore: String? = null, val engine: String? = null, val filter: String? = null, val maxResults: Int? = null)

Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VertexAISearchDataStoreSpec(val dataStore: String? = null, val filter: String? = null)

Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VertexMultimodalDatasetDestination(val bigqueryDestination: String? = null, val displayName: String? = null)

This class is experimental and may change in future versions.

Link copied to clipboard
@Serializable
data class VertexRagStore(val ragCorpora: List<String>? = null, val ragResources: List<VertexRagStoreRagResource>? = null, val ragRetrievalConfig: RagRetrievalConfig? = null, val similarityTopK: Int? = null, val storeContext: Boolean? = null, val vectorDistanceThreshold: Double? = null)

Retrieve from Vertex RAG Store for grounding. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VertexRagStoreRagResource(val ragCorpus: String? = null, val ragFileIds: List<String>? = null)

The definition of the Rag resource. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VideoMetadata(val endOffset: Duration? = null, val fps: Double? = null, val startOffset: Duration? = null)

Provides metadata for a video, including the start and end offsets for clipping and the frame rate.

Link copied to clipboard
@Serializable
value class VideoOrientation(val value: String)

The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VideoResponseFormat(val aspectRatio: AspectRatio? = null, val delivery: Delivery? = null, val duration: Duration? = null, val gcsUri: String? = null)

Configuration for video-specific output formatting. This data type is not supported in Gemini API.

Link copied to clipboard
@Serializable
data class VoiceActivity(val voiceActivityType: VoiceActivityType? = null, val audioOffset: Duration? = null)

Voice activity signal.

Link copied to clipboard
@Serializable
data class VoiceActivityDetectionSignal(val vadSignalType: VadSignalType? = null)
Link copied to clipboard
@Serializable
value class VoiceActivityType(val value: String)

The type of the voice activity signal.

Link copied to clipboard
@Serializable
data class VoiceConfig(val replicatedVoiceConfig: ReplicatedVoiceConfig? = null, val prebuiltVoiceConfig: PrebuiltVoiceConfig? = null)

The configuration for the voice to use.

Link copied to clipboard
@Serializable
data class VoiceConsentSignature(val signature: String? = null)

The signature of the voice consent check.

Link copied to clipboard
@Serializable
data class WebhookConfig(val uris: List<String>? = null, val userMetadata: Map<String, JsonElement>? = null)

Configuration for webhook notifications.

Link copied to clipboard
@Serializable
class WebSearch

Standard web search for grounding and related configurations. Only text results are returned.

Link copied to clipboard
@Serializable
data class WordInfo(val word: String? = null, val startOffset: String? = null, val endOffset: String? = null)

Information about a single recognized word.