gaato/gemini/gen does not have a README file

    ValidationError

    pub(all) suberror ValidationError {
    ValidationError(parameter~ : String, message~ : String)
    } derive(
    Debug
    )

    A canonical resource name failed validation before request construction.

    ValidationError::to_repr

    automatically derived

    AttributionSourceId

    pub(all) struct AttributionSourceId {
    semantic_retriever_chunk : SemanticRetrieverChunk?
    grounding_passage : GroundingPassageId?
    } derive(Eq,
    Debug
    )

    Identifier for the source contributing to this attribution.

    AttributionSourceId::equal

    automatically derived

    AttributionSourceId::new

    fn AttributionSourceId::new(semantic_retriever_chunk? : SemanticRetrieverChunk, grounding_passage? : GroundingPassageId) -> AttributionSourceId

    Creates a AttributionSourceId with omitted optional fields absent.

    AttributionSourceId::not_equal

    automatically derived

    AttributionSourceId::to_json

    Encodes this value as JSON.

    AttributionSourceId::to_repr

    automatically derived

    AudioMetadata

    pub(all) struct AudioMetadata {
    start_offset : String?
    end_offset : String?
    } derive(Eq,
    Debug
    )

    Metadata describes the input audio content. Set this in Part.audio_metadata or FunctionResponsePart.audio_metadata when inline_data or file_data contains audio to configure static audio preprocessing.

    AudioMetadata::equal

    automatically derived

    AudioMetadata::new

    fn AudioMetadata::new(start_offset? : String, end_offset? : String) -> AudioMetadata

    Creates a AudioMetadata with omitted optional fields absent.

    AudioMetadata::not_equal

    fn AudioMetadata::not_equal(x : AudioMetadata, y : AudioMetadata) -> Bool
    automatically derived

    AudioMetadata::to_json

    Encodes this value as JSON.

    AudioMetadata::to_repr

    automatically derived

    AudioResponseFormat

    pub(all) struct AudioResponseFormat {
    bit_rate : Int?
    sample_rate : Int?
    mime_type : AudioResponseFormatMimeType?
    delivery : AudioResponseFormatDelivery?
    } derive(Eq,
    Debug
    )

    Configuration for audio output format.

    AudioResponseFormat::equal

    automatically derived

    AudioResponseFormat::new

    fn AudioResponseFormat::new(bit_rate? : Int, sample_rate? : Int, mime_type? : AudioResponseFormatMimeType, delivery? : AudioResponseFormatDelivery) -> AudioResponseFormat

    Creates a AudioResponseFormat with omitted optional fields absent.

    AudioResponseFormat::not_equal

    automatically derived

    AudioResponseFormat::to_json

    Encodes this value as JSON.

    AudioResponseFormat::to_repr

    automatically derived

    AudioResponseFormatDelivery

    pub(all) enum AudioResponseFormatDelivery {
    DELIVERYUNSPECIFIED
    INLINE
    URI
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The delivery mode for the audio output. Enum values: DELIVERY_UNSPECIFIED: Default value. This value is unused.; INLINE: Audio data is returned inline in the response.; URI: Audio data is returned as a URI.

    AudioResponseFormatDelivery::equal

    automatically derived

    AudioResponseFormatDelivery::not_equal

    automatically derived

    AudioResponseFormatDelivery::to_json

    Encodes this string enum as JSON.

    AudioResponseFormatDelivery::to_repr

    automatically derived

    AudioResponseFormatMimeType

    pub(all) enum AudioResponseFormatMimeType {
    MIMETYPEUNSPECIFIED
    AUDIOMP3
    AUDIOOGGOPUS
    AUDIOL16
    AUDIOWAV
    AUDIOALAW
    AUDIOMULAW
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The MIME type of the audio output. Enum values: MIME_TYPE_UNSPECIFIED: Default value. This value is unused.; AUDIO_MP3: MP3 audio format.; AUDIO_OGG_OPUS: OGG Opus audio format.; AUDIO_L16: Raw PCM (L16) audio format.; AUDIO_WAV: WAV audio format.; AUDIO_ALAW: A-law audio format.; AUDIO_MULAW: Mu-law audio format.

    AudioResponseFormatMimeType::equal

    automatically derived

    AudioResponseFormatMimeType::not_equal

    automatically derived

    AudioResponseFormatMimeType::to_json

    Encodes this string enum as JSON.

    AudioResponseFormatMimeType::to_repr

    automatically derived

    AudioTranscription

    pub(all) struct AudioTranscription {
    speaker_label : String?
    text : String?
    words : Array[WordInfo]?
    } derive(Eq,
    Debug
    )

    The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label.

    AudioTranscription::equal

    automatically derived

    AudioTranscription::new

    fn AudioTranscription::new(speaker_label? : String, text? : String, words? : Array[WordInfo]) -> AudioTranscription

    Creates a AudioTranscription with omitted optional fields absent.

    AudioTranscription::not_equal

    automatically derived

    AudioTranscription::to_json

    Encodes this value as JSON.

    AudioTranscription::to_repr

    automatically derived

    AudioTranscriptionConfig

    pub(all) struct AudioTranscriptionConfig {
    adaptation_phrases : Array[String]?
    diarization : Bool?
    word_timestamp : Bool?
    language_hints : LanguageHints?
    source_text : String?
    custom_vocabulary : Array[String]?
    mode : AudioTranscriptionConfigMode?
    language_codes : Array[String]?
    language_auto :
    Json
    ?
    } derive(Eq,
    Debug
    )

    The audio transcription configuration.

    AudioTranscriptionConfig::equal

    automatically derived

    AudioTranscriptionConfig::new

    fn AudioTranscriptionConfig::new(adaptation_phrases? : Array[String], diarization? : Bool, word_timestamp? : Bool, language_hints? : LanguageHints, source_text? : String, custom_vocabulary? : Array[String], mode? : AudioTranscriptionConfigMode, language_codes? : Array[String], language_auto? :
    Json
    ) -> AudioTranscriptionConfig

    Creates a AudioTranscriptionConfig with omitted optional fields absent.

    AudioTranscriptionConfig::not_equal

    automatically derived

    AudioTranscriptionConfig::to_json

    Encodes this value as JSON.

    AudioTranscriptionConfig::to_repr

    automatically derived

    AudioTranscriptionConfigMode

    pub(all) enum AudioTranscriptionConfigMode {
    MODEUNSPECIFIED
    VERBATIM
    SMART
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. Configures transcription mode. Supported values: VERBATIM, SMART. If unspecified, defaults to VERBATIM transcription. In SMART mode, the model performs disfluency removal (eliminating filler words, repetitions, and false starts), light grammatical cleanup, automatic formatting (paragraphs, bullet points, numbered lists), and minor user edits (inline self-corrections). Timestamps and diarization are incompatible with mode SMART. Enum values: MODE_UNSPECIFIED: Unspecified transcription mode.; VERBATIM: Verbatim transcription mode.; SMART: Smart transcription mode.

    AudioTranscriptionConfigMode::equal

    automatically derived

    AudioTranscriptionConfigMode::not_equal

    automatically derived

    AudioTranscriptionConfigMode::to_json

    Encodes this string enum as JSON.

    AudioTranscriptionConfigMode::to_repr

    automatically derived

    BatchEmbedContentsRequest

    pub(all) struct BatchEmbedContentsRequest {
    requests : Array[EmbedContentRequest]?
    } derive(Eq,
    Debug
    )

    Batch request to get embeddings from the model for a list of prompts.

    BatchEmbedContentsRequest::equal

    automatically derived

    BatchEmbedContentsRequest::new

    Creates a BatchEmbedContentsRequest with omitted optional fields absent.

    BatchEmbedContentsRequest::not_equal

    automatically derived

    BatchEmbedContentsRequest::to_json

    Encodes this value as JSON.

    BatchEmbedContentsRequest::to_repr

    automatically derived

    BatchEmbedContentsResponse

    pub(all) struct BatchEmbedContentsResponse {
    usage_metadata : EmbeddingUsageMetadata?
    embeddings : Array[ContentEmbedding]?
    } derive(Eq,
    Debug
    )

    The response to a BatchEmbedContentsRequest.

    BatchEmbedContentsResponse::equal

    automatically derived

    BatchEmbedContentsResponse::new

    Creates a BatchEmbedContentsResponse with omitted optional fields absent.

    BatchEmbedContentsResponse::not_equal

    automatically derived

    BatchEmbedContentsResponse::to_json

    Encodes this value as JSON.

    BatchEmbedContentsResponse::to_repr

    automatically derived

    Blob

    pub(all) struct Blob {
    data : String?
    display_name : String?
    mime_type : String?
    } derive(Eq,
    Debug
    )

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

    Blob::equal

    fn Blob::equal(Blob, Blob) -> Bool
    automatically derived

    Blob::new

    fn Blob::new(data? : String, display_name? : String, mime_type? : String) -> Blob

    Creates a Blob with omitted optional fields absent.

    Blob::not_equal

    fn Blob::not_equal(x : Blob, y : Blob) -> Bool
    automatically derived

    Blob::to_json

    Encodes this value as JSON.

    Blob::to_repr

    automatically derived

    CachedContent

    pub(all) struct CachedContent {
    usage_metadata : CachedContentUsageMetadata?
    update_time : String?
    model : String?
    create_time : String?
    contents : Array[Content]?
    expire_time : String?
    ttl : String?
    tool_config : ToolConfig?
    display_name : String?
    name : String?
    tools : Array[Tool]?
    system_instruction : Content?
    } derive(Eq,
    Debug
    )

    Content that has been preprocessed and can be used in subsequent request to GenerativeService. Cached content can be only used with model it was created for.

    CachedContent::equal

    automatically derived

    CachedContent::new

    fn CachedContent::new(usage_metadata? : CachedContentUsageMetadata, update_time? : String, model? : String, create_time? : String, contents? : Array[Content], expire_time? : String, ttl? : String, tool_config? : ToolConfig, display_name? : String, name? : String, tools? : Array[Tool], system_instruction? : Content) -> CachedContent

    Creates a CachedContent with omitted optional fields absent.

    CachedContent::not_equal

    fn CachedContent::not_equal(x : CachedContent, y : CachedContent) -> Bool
    automatically derived

    CachedContent::to_json

    Encodes this value as JSON.

    CachedContent::to_repr

    automatically derived

    CachedContentUsageMetadata

    pub(all) struct CachedContentUsageMetadata {
    total_token_count : Int?
    } derive(Eq,
    Debug
    )

    Metadata on the usage of the cached content.

    CachedContentUsageMetadata::equal

    automatically derived

    CachedContentUsageMetadata::new

    fn CachedContentUsageMetadata::new(total_token_count? : Int) -> CachedContentUsageMetadata

    Creates a CachedContentUsageMetadata with omitted optional fields absent.

    CachedContentUsageMetadata::not_equal

    automatically derived

    CachedContentUsageMetadata::to_json

    Encodes this value as JSON.

    CachedContentUsageMetadata::to_repr

    automatically derived

    Candidate

    pub(all) struct Candidate {
    continuation_token : String?
    citation_metadata : CitationMetadata?
    content : Content?
    grounding_attributions : Array[GroundingAttribution]?
    finish_reason : CandidateFinishReason?
    avg_logprobs : Double?
    grounding_metadata : GroundingMetadata?
    safety_ratings : Array[SafetyRating]?
    token_count : Int?
    logprobs_result : LogprobsResult?
    index : Int?
    finish_message : String?
    url_context_metadata : UrlContextMetadata?
    } derive(Eq,
    Debug
    )

    A response candidate generated from the model.

    Candidate::equal

    fn Candidate::equal(Candidate, Candidate) -> Bool
    automatically derived

    Candidate::new

    fn Candidate::new(continuation_token? : String, citation_metadata? : CitationMetadata, content? : Content, grounding_attributions? : Array[GroundingAttribution], finish_reason? : CandidateFinishReason, avg_logprobs? : Double, grounding_metadata? : GroundingMetadata, safety_ratings? : Array[SafetyRating], token_count? : Int, logprobs_result? : LogprobsResult, index? : Int, finish_message? : String, url_context_metadata? : UrlContextMetadata) -> Candidate

    Creates a Candidate with omitted optional fields absent.

    Candidate::not_equal

    fn Candidate::not_equal(x : Candidate, y : Candidate) -> Bool
    automatically derived

    Candidate::to_json

    Encodes this value as JSON.

    Candidate::to_repr

    automatically derived

    CandidateFinishReason

    pub(all) enum CandidateFinishReason {
    FINISHREASONUNSPECIFIED
    STOP
    MAXTOKENS
    SAFETY
    RECITATION
    LANGUAGE
    OTHER
    BLOCKLIST
    PROHIBITEDCONTENT
    SPII
    MALFORMEDFUNCTIONCALL
    IMAGESAFETY
    IMAGEPROHIBITEDCONTENT
    IMAGEOTHER
    NOIMAGE
    IMAGERECITATION
    UNEXPECTEDTOOLCALL
    TOOMANYTOOLCALLS
    MISSINGTHOUGHTSIGNATURE
    MALFORMEDRESPONSE
    ESCALATION
    PUPLIMITEDDISABLED
    CONTINUATION
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens. Enum values: FINISH_REASON_UNSPECIFIED: Default value. This value is unused.; STOP: Natural stop point of the model or provided stop sequence.; MAX_TOKENS: The maximum number of tokens as specified in the request was reached.; SAFETY: The response candidate content was flagged for safety reasons.; RECITATION: The response candidate content was flagged for recitation reasons.; LANGUAGE: The response candidate content was flagged for using an unsupported language.; OTHER: Unknown reason.; BLOCKLIST: Token generation stopped because the content contains forbidden terms.; PROHIBITED_CONTENT: Token generation stopped for potentially containing prohibited content.; SPII: Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).; MALFORMED_FUNCTION_CALL: The function call generated by the model is invalid.; IMAGE_SAFETY: Token generation stopped because generated images contain safety violations.; IMAGE_PROHIBITED_CONTENT: Image generation stopped because generated images has other prohibited content.; IMAGE_OTHER: Image generation stopped because of other miscellaneous issue.; NO_IMAGE: The model was expected to generate an image, but none was generated.; IMAGE_RECITATION: Image generation stopped due to recitation.; UNEXPECTED_TOOL_CALL: Model generated a tool call but no tools were enabled in the request.; TOO_MANY_TOOL_CALLS: Model called too many tools consecutively, thus the system exited execution.; MISSING_THOUGHT_SIGNATURE: Request has at least one thought signature missing.; MALFORMED_RESPONSE: Finished due to malformed response.; ESCALATION: Request was filtered by an escalation rule.; PUP_LIMITED_DISABLED: Indicates that token generation stopped because the user account is limited or disabled due to Prohibited Use Policy (PUP) violations.; CONTINUATION: Token generation was stopped because the response reached the per-request token limit, but generation is not yet complete. The model response can be continued via a subsequent request using the returned continuation_token. Note, the max_output_tokens is cumulative across continuation hops and must be monotonically increased or omitted.

    CandidateFinishReason::equal

    automatically derived

    CandidateFinishReason::not_equal

    automatically derived

    CandidateFinishReason::to_json

    Encodes this string enum as JSON.

    CandidateFinishReason::to_repr

    automatically derived

    CitationMetadata

    pub(all) struct CitationMetadata {
    citation_sources : Array[CitationSource]?
    } derive(Eq,
    Debug
    )

    A collection of source attributions for a piece of content.

    CitationMetadata::equal

    automatically derived

    CitationMetadata::new

    fn CitationMetadata::new(citation_sources? : Array[CitationSource]) -> CitationMetadata

    Creates a CitationMetadata with omitted optional fields absent.

    CitationMetadata::not_equal

    fn CitationMetadata::not_equal(x : CitationMetadata, y : CitationMetadata) -> Bool
    automatically derived

    CitationMetadata::to_json

    Encodes this value as JSON.

    CitationMetadata::to_repr

    automatically derived

    CitationSource

    pub(all) struct CitationSource {
    start_index : Int?
    uri : String?
    end_index : Int?
    license : String?
    } derive(Eq,
    Debug
    )

    A citation to a source for a portion of a specific response.

    CitationSource::equal

    automatically derived

    CitationSource::new

    fn CitationSource::new(start_index? : Int, uri? : String, end_index? : Int, license? : String) -> CitationSource

    Creates a CitationSource with omitted optional fields absent.

    CitationSource::not_equal

    fn CitationSource::not_equal(x : CitationSource, y : CitationSource) -> Bool
    automatically derived

    CitationSource::to_json

    Encodes this value as JSON.

    CitationSource::to_repr

    automatically derived

    CodeExecutionResult

    pub(all) struct CodeExecutionResult {
    id : String?
    outcome : CodeExecutionResultOutcome?
    output : String?
    } derive(Eq,
    Debug
    )

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

    CodeExecutionResult::equal

    automatically derived

    CodeExecutionResult::new

    fn CodeExecutionResult::new(id? : String, outcome? : CodeExecutionResultOutcome, output? : String) -> CodeExecutionResult

    Creates a CodeExecutionResult with omitted optional fields absent.

    CodeExecutionResult::not_equal

    automatically derived

    CodeExecutionResult::to_json

    Encodes this value as JSON.

    CodeExecutionResult::to_repr

    automatically derived

    CodeExecutionResultOutcome

    pub(all) enum CodeExecutionResultOutcome {
    OUTCOMEUNSPECIFIED
    OUTCOMEOK
    OUTCOMEFAILED
    OUTCOMEDEADLINEEXCEEDED
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. Outcome of the code execution. Enum values: OUTCOME_UNSPECIFIED: Unspecified status. This value should not be used.; OUTCOME_OK: Code execution completed successfully. output contains the stdout, if any.; OUTCOME_FAILED: Code execution failed. output contains the stderr and stdout, if any.; OUTCOME_DEADLINE_EXCEEDED: Code execution ran for too long, and was cancelled. There may or may not be a partial output present.

    CodeExecutionResultOutcome::equal

    automatically derived

    CodeExecutionResultOutcome::not_equal

    automatically derived

    CodeExecutionResultOutcome::to_json

    Encodes this string enum as JSON.

    CodeExecutionResultOutcome::to_repr

    automatically derived

    ComputerUse

    pub(all) struct ComputerUse {
    disabled_safety_policies : Array[ComputerUseDisabledSafetyPoliciesItem]?
    excluded_predefined_functions : Array[String]?
    environment : ComputerUseEnvironment?
    enable_prompt_injection_detection : Bool?
    } derive(Eq,
    Debug
    )

    Computer Use tool type.

    ComputerUse::equal

    fn ComputerUse::equal(ComputerUse, ComputerUse) -> Bool
    automatically derived

    ComputerUse::new

    fn ComputerUse::new(disabled_safety_policies? : Array[ComputerUseDisabledSafetyPoliciesItem], excluded_predefined_functions? : Array[String], environment? : ComputerUseEnvironment, enable_prompt_injection_detection? : Bool) -> ComputerUse

    Creates a ComputerUse with omitted optional fields absent.

    ComputerUse::not_equal

    fn ComputerUse::not_equal(x : ComputerUse, y : ComputerUse) -> Bool
    automatically derived

    ComputerUse::to_json

    Encodes this value as JSON.

    ComputerUse::to_repr

    automatically derived

    ComputerUseDisabledSafetyPoliciesItem

    pub(all) enum ComputerUseDisabledSafetyPoliciesItem {
    SAFETYPOLICYUNSPECIFIED
    FINANCIALTRANSACTIONS
    SENSITIVEDATAMODIFICATION
    COMMUNICATIONTOOL
    ACCOUNTCREATION
    DATAMODIFICATION
    USERCONSENTMANAGEMENT
    LEGALTERMSANDAGREEMENTS
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Enum values: SAFETY_POLICY_UNSPECIFIED: Unspecified safety policy.; FINANCIAL_TRANSACTIONS: Safety policy for financial transactions.; SENSITIVE_DATA_MODIFICATION: Safety policy for sensitive data modification.; COMMUNICATION_TOOL: Safety policy for communication tools (e.g. Gmail, Chat, Meet).; ACCOUNT_CREATION: Safety policy for account creation.; DATA_MODIFICATION: Safety policy for data modification.; USER_CONSENT_MANAGEMENT: Safety policy for user consent management.; LEGAL_TERMS_AND_AGREEMENTS: Safety policy for legal terms and agreements.

    ComputerUseDisabledSafetyPoliciesItem::equal

    automatically derived

    ComputerUseDisabledSafetyPoliciesItem::not_equal

    automatically derived

    ComputerUseDisabledSafetyPoliciesItem::to_json

    Encodes this string enum as JSON.

    ComputerUseDisabledSafetyPoliciesItem::to_repr

    automatically derived

    ComputerUseEnvironment

    pub(all) enum ComputerUseEnvironment {
    ENVIRONMENTUNSPECIFIED
    ENVIRONMENTBROWSER
    ENVIRONMENTMOBILE
    ENVIRONMENTDESKTOP
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. The environment being operated. Enum values: ENVIRONMENT_UNSPECIFIED: Defaults to browser.; ENVIRONMENT_BROWSER: Operates in a web browser.; ENVIRONMENT_MOBILE: Operates in a mobile environment.; ENVIRONMENT_DESKTOP: Operates in a desktop environment.

    ComputerUseEnvironment::equal

    automatically derived

    ComputerUseEnvironment::not_equal

    automatically derived

    ComputerUseEnvironment::to_json

    Encodes this string enum as JSON.

    ComputerUseEnvironment::to_repr

    automatically derived

    Content

    pub(all) struct Content {
    parts : Array[Part]?
    role : String?
    } derive(Eq,
    Debug
    )

    The base structured datatype containing multi-part content of a message. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.

    Content::equal

    fn Content::equal(Content, Content) -> Bool
    automatically derived

    Content::new

    fn Content::new(parts? : Array[Part], role? : String) -> Content

    Creates a Content with omitted optional fields absent.

    Content::not_equal

    fn Content::not_equal(x : Content, y : Content) -> Bool
    automatically derived

    Content::to_json

    Encodes this value as JSON.

    Content::to_repr

    automatically derived

    ContentEmbedding

    pub(all) struct ContentEmbedding {
    shape : Array[Int]?
    values : Array[Double]?
    } derive(Eq,
    Debug
    )

    A list of floats representing an embedding.

    ContentEmbedding::equal

    automatically derived

    ContentEmbedding::new

    fn ContentEmbedding::new(shape? : Array[Int], values? : Array[Double]) -> ContentEmbedding

    Creates a ContentEmbedding with omitted optional fields absent.

    ContentEmbedding::not_equal

    fn ContentEmbedding::not_equal(x : ContentEmbedding, y : ContentEmbedding) -> Bool
    automatically derived

    ContentEmbedding::to_json

    Encodes this value as JSON.

    ContentEmbedding::to_repr

    automatically derived

    CountTokensRequest

    pub(all) struct CountTokensRequest {
    contents : Array[Content]?
    generate_content_request : GenerateContentRequest?
    } derive(Eq,
    Debug
    )

    Counts the number of tokens in the prompt sent to a model. Models may tokenize text differently, so each model may return a different token_count.

    CountTokensRequest::equal

    automatically derived

    CountTokensRequest::new

    fn CountTokensRequest::new(contents? : Array[Content], generate_content_request? : GenerateContentRequest) -> CountTokensRequest

    Creates a CountTokensRequest with omitted optional fields absent.

    CountTokensRequest::not_equal

    automatically derived

    CountTokensRequest::to_json

    Encodes this value as JSON.

    CountTokensRequest::to_repr

    automatically derived

    CountTokensResponse

    pub(all) struct CountTokensResponse {
    prompt_tokens_details : Array[ModalityTokenCount]?
    cache_tokens_details : Array[ModalityTokenCount]?
    cached_content_token_count : Int?
    total_tokens : Int?
    } derive(Eq,
    Debug
    )

    A response from CountTokens. It returns the model's token_count for the prompt.

    CountTokensResponse::equal

    automatically derived

    CountTokensResponse::new

    fn CountTokensResponse::new(prompt_tokens_details? : Array[ModalityTokenCount], cache_tokens_details? : Array[ModalityTokenCount], cached_content_token_count? : Int, total_tokens? : Int) -> CountTokensResponse

    Creates a CountTokensResponse with omitted optional fields absent.

    CountTokensResponse::not_equal

    automatically derived

    CountTokensResponse::to_json

    Encodes this value as JSON.

    CountTokensResponse::to_repr

    automatically derived

    CreateFileRequest

    pub(all) struct CreateFileRequest {
    file : File?
    } derive(Eq,
    Debug
    )

    Request for CreateFile.

    CreateFileRequest::equal

    automatically derived

    CreateFileRequest::new

    Creates a CreateFileRequest with omitted optional fields absent.

    CreateFileRequest::not_equal

    fn CreateFileRequest::not_equal(x : CreateFileRequest, y : CreateFileRequest) -> Bool
    automatically derived

    CreateFileRequest::to_json

    Encodes this value as JSON.

    CreateFileRequest::to_repr

    automatically derived

    CreateFileResponse

    pub(all) struct CreateFileResponse {
    file : File?
    } derive(Eq,
    Debug
    )

    Response for CreateFile.

    CreateFileResponse::equal

    automatically derived

    CreateFileResponse::new

    Creates a CreateFileResponse with omitted optional fields absent.

    CreateFileResponse::not_equal

    automatically derived

    CreateFileResponse::to_json

    Encodes this value as JSON.

    CreateFileResponse::to_repr

    automatically derived

    DocumentMetadata

    pub(all) struct DocumentMetadata {
    end_page : Int?
    content_layers : Array[DocumentMetadataContentLayersItem]?
    start_page : Int?
    } derive(Eq,
    Debug
    )

    Metadata describes the input document content. Set this in Part.document_metadata or FunctionResponsePart.document_metadata when inline_data or file_data contains a document to configure static document preprocessing.

    DocumentMetadata::equal

    automatically derived

    DocumentMetadata::new

    fn DocumentMetadata::new(end_page? : Int, content_layers? : Array[DocumentMetadataContentLayersItem], start_page? : Int) -> DocumentMetadata

    Creates a DocumentMetadata with omitted optional fields absent.

    DocumentMetadata::not_equal

    fn DocumentMetadata::not_equal(x : DocumentMetadata, y : DocumentMetadata) -> Bool
    automatically derived

    DocumentMetadata::to_json

    Encodes this value as JSON.

    DocumentMetadata::to_repr

    automatically derived

    DocumentMetadataContentLayersItem

    pub(all) enum DocumentMetadataContentLayersItem {
    CONTENTLAYERUNSPECIFIED
    PAGEIMAGE
    PAGETEXT
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Enum values: CONTENT_LAYER_UNSPECIFIED: Default value.; PAGE_IMAGE: Rendered page images.; PAGE_TEXT: Extracted page text.

    DocumentMetadataContentLayersItem::equal

    automatically derived

    DocumentMetadataContentLayersItem::not_equal

    automatically derived

    DocumentMetadataContentLayersItem::to_json

    Encodes this string enum as JSON.

    DocumentMetadataContentLayersItem::to_repr

    automatically derived

    DynamicRetrievalConfig

    pub(all) struct DynamicRetrievalConfig {
    mode : DynamicRetrievalConfigMode?
    dynamic_threshold : Double?
    } derive(Eq,
    Debug
    )

    Describes the options to customize dynamic retrieval.

    DynamicRetrievalConfig::equal

    automatically derived

    DynamicRetrievalConfig::new

    fn DynamicRetrievalConfig::new(mode? : DynamicRetrievalConfigMode, dynamic_threshold? : Double) -> DynamicRetrievalConfig

    Creates a DynamicRetrievalConfig with omitted optional fields absent.

    DynamicRetrievalConfig::not_equal

    automatically derived

    DynamicRetrievalConfig::to_json

    Encodes this value as JSON.

    DynamicRetrievalConfig::to_repr

    automatically derived

    DynamicRetrievalConfigMode

    pub(all) enum DynamicRetrievalConfigMode {
    MODEUNSPECIFIED
    MODEDYNAMIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    The mode of the predictor to be used in dynamic retrieval. Enum values: MODE_UNSPECIFIED: Always trigger retrieval.; MODE_DYNAMIC: Run retrieval only when system decides it is necessary.

    DynamicRetrievalConfigMode::equal

    automatically derived

    DynamicRetrievalConfigMode::not_equal

    automatically derived

    DynamicRetrievalConfigMode::to_json

    Encodes this string enum as JSON.

    DynamicRetrievalConfigMode::to_repr

    automatically derived

    EmbedContentConfig

    pub(all) struct EmbedContentConfig {
    output_dimensionality : Int?
    audio_track_extraction : Bool?
    title : String?
    document_ocr : Bool?
    task_type : EmbedContentConfigTaskType?
    auto_truncate : Bool?
    } derive(Eq,
    Debug
    )

    Configurations for the EmbedContent request.

    EmbedContentConfig::equal

    automatically derived

    EmbedContentConfig::new

    fn EmbedContentConfig::new(output_dimensionality? : Int, audio_track_extraction? : Bool, title? : String, document_ocr? : Bool, task_type? : EmbedContentConfigTaskType, auto_truncate? : Bool) -> EmbedContentConfig

    Creates a EmbedContentConfig with omitted optional fields absent.

    EmbedContentConfig::not_equal

    automatically derived

    EmbedContentConfig::to_json

    Encodes this value as JSON.

    EmbedContentConfig::to_repr

    automatically derived

    EmbedContentConfigTaskType

    pub(all) enum EmbedContentConfigTaskType {
    TASKTYPEUNSPECIFIED
    RETRIEVALQUERY
    RETRIEVALDOCUMENT
    SEMANTICSIMILARITY
    CLASSIFICATION
    CLUSTERING
    QUESTIONANSWERING
    FACTVERIFICATION
    CODERETRIEVALQUERY
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The task type of the embedding. Enum values: TASK_TYPE_UNSPECIFIED: Unset value, which will default to one of the other enum values.; RETRIEVAL_QUERY: Specifies the given text is a query in a search/retrieval setting.; RETRIEVAL_DOCUMENT: Specifies the given text is a document from the corpus being searched.; SEMANTIC_SIMILARITY: Specifies the given text will be used for STS.; CLASSIFICATION: Specifies that the given text will be classified.; CLUSTERING: Specifies that the embeddings will be used for clustering.; QUESTION_ANSWERING: Specifies that the given text will be used for question answering.; FACT_VERIFICATION: Specifies that the given text will be used for fact verification.; CODE_RETRIEVAL_QUERY: Specifies that the given text will be used for code retrieval.

    EmbedContentConfigTaskType::equal

    automatically derived

    EmbedContentConfigTaskType::not_equal

    automatically derived

    EmbedContentConfigTaskType::to_json

    Encodes this string enum as JSON.

    EmbedContentConfigTaskType::to_repr

    automatically derived

    EmbedContentRequest

    pub(all) struct EmbedContentRequest {
    task_type : EmbedContentRequestTaskType?
    content : Content?
    output_dimensionality : Int?
    embed_content_config : EmbedContentConfig?
    model : String?
    title : String?
    } derive(Eq,
    Debug
    )

    Request containing the Content for the model to embed.

    EmbedContentRequest::equal

    automatically derived

    EmbedContentRequest::new

    fn EmbedContentRequest::new(task_type? : EmbedContentRequestTaskType, content? : Content, output_dimensionality? : Int, embed_content_config? : EmbedContentConfig, model? : String, title? : String) -> EmbedContentRequest

    Creates a EmbedContentRequest with omitted optional fields absent.

    EmbedContentRequest::not_equal

    automatically derived

    EmbedContentRequest::to_json

    Encodes this value as JSON.

    EmbedContentRequest::to_repr

    automatically derived

    EmbedContentRequestTaskType

    pub(all) enum EmbedContentRequestTaskType {
    TASKTYPEUNSPECIFIED
    RETRIEVALQUERY
    RETRIEVALDOCUMENT
    SEMANTICSIMILARITY
    CLASSIFICATION
    CLUSTERING
    QUESTIONANSWERING
    FACTVERIFICATION
    CODERETRIEVALQUERY
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (models/embedding-001). Enum values: TASK_TYPE_UNSPECIFIED: Unset value, which will default to one of the other enum values.; RETRIEVAL_QUERY: Specifies the given text is a query in a search/retrieval setting.; RETRIEVAL_DOCUMENT: Specifies the given text is a document from the corpus being searched.; SEMANTIC_SIMILARITY: Specifies the given text will be used for STS.; CLASSIFICATION: Specifies that the given text will be classified.; CLUSTERING: Specifies that the embeddings will be used for clustering.; QUESTION_ANSWERING: Specifies that the given text will be used for question answering.; FACT_VERIFICATION: Specifies that the given text will be used for fact verification.; CODE_RETRIEVAL_QUERY: Specifies that the given text will be used for code retrieval.

    EmbedContentRequestTaskType::equal

    automatically derived

    EmbedContentRequestTaskType::not_equal

    automatically derived

    EmbedContentRequestTaskType::to_json

    Encodes this string enum as JSON.

    EmbedContentRequestTaskType::to_repr

    automatically derived

    EmbedContentResponse

    pub(all) struct EmbedContentResponse {
    embedding : ContentEmbedding?
    usage_metadata : EmbeddingUsageMetadata?
    } derive(Eq,
    Debug
    )

    The response to an EmbedContentRequest.

    EmbedContentResponse::equal

    automatically derived

    EmbedContentResponse::new

    Creates a EmbedContentResponse with omitted optional fields absent.

    EmbedContentResponse::not_equal

    automatically derived

    EmbedContentResponse::to_json

    Encodes this value as JSON.

    EmbedContentResponse::to_repr

    automatically derived

    EmbeddingUsageMetadata

    pub(all) struct EmbeddingUsageMetadata {
    prompt_token_count : Int?
    prompt_token_details : Array[ModalityTokenCount]?
    } derive(Eq,
    Debug
    )

    Metadata on the usage of the embedding request.

    EmbeddingUsageMetadata::equal

    automatically derived

    EmbeddingUsageMetadata::new

    fn EmbeddingUsageMetadata::new(prompt_token_count? : Int, prompt_token_details? : Array[ModalityTokenCount]) -> EmbeddingUsageMetadata

    Creates a EmbeddingUsageMetadata with omitted optional fields absent.

    EmbeddingUsageMetadata::not_equal

    automatically derived

    EmbeddingUsageMetadata::to_json

    Encodes this value as JSON.

    EmbeddingUsageMetadata::to_repr

    automatically derived

    ExecutableCode

    pub(all) struct ExecutableCode {
    code : String?
    language : ExecutableCodeLanguage?
    id : String?
    } derive(Eq,
    Debug
    )

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

    ExecutableCode::equal

    automatically derived

    ExecutableCode::new

    fn ExecutableCode::new(code? : String, language? : ExecutableCodeLanguage, id? : String) -> ExecutableCode

    Creates a ExecutableCode with omitted optional fields absent.

    ExecutableCode::not_equal

    fn ExecutableCode::not_equal(x : ExecutableCode, y : ExecutableCode) -> Bool
    automatically derived

    ExecutableCode::to_json

    Encodes this value as JSON.

    ExecutableCode::to_repr

    automatically derived

    ExecutableCodeLanguage

    pub(all) enum ExecutableCodeLanguage {
    LANGUAGEUNSPECIFIED
    PYTHON
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. Programming language of the code. Enum values: LANGUAGE_UNSPECIFIED: Unspecified language. This value should not be used.; PYTHON: Python >= 3.10, with numpy and simpy available. Python is the default language.

    ExecutableCodeLanguage::equal

    automatically derived

    ExecutableCodeLanguage::not_equal

    automatically derived

    ExecutableCodeLanguage::to_json

    Encodes this string enum as JSON.

    ExecutableCodeLanguage::to_repr

    automatically derived

    File

    pub(all) struct File {
    create_time : String?
    mime_type : String?
    download_uri : String?
    display_name : String?
    state : FileState?
    uri : String?
    update_time : String?
    size_bytes : Int64?
    expiration_time : String?
    video_metadata : VideoFileMetadata?
    source : FileSource?
    name : String?
    sha256_hash : String?
    error : Status?
    } derive(Eq,
    Debug
    )

    A file uploaded to the API.

    File::equal

    fn File::equal(File, File) -> Bool
    automatically derived

    File::new

    fn File::new(create_time? : String, mime_type? : String, download_uri? : String, display_name? : String, state? : FileState, uri? : String, update_time? : String, size_bytes? : Int64, expiration_time? : String, video_metadata? : VideoFileMetadata, source? : FileSource, name? : String, sha256_hash? : String, error? : Status) -> File

    Creates a File with omitted optional fields absent.

    File::not_equal

    fn File::not_equal(x : File, y : File) -> Bool
    automatically derived

    File::to_json

    Encodes this value as JSON.

    File::to_repr

    automatically derived

    FileData

    pub(all) struct FileData {
    display_name : String?
    file_uri : String?
    mime_type : String?
    } derive(Eq,
    Debug
    )

    URI based data.

    FileData::equal

    fn FileData::equal(FileData, FileData) -> Bool
    automatically derived

    FileData::new

    fn FileData::new(display_name? : String, file_uri? : String, mime_type? : String) -> FileData

    Creates a FileData with omitted optional fields absent.

    FileData::not_equal

    fn FileData::not_equal(x : FileData, y : FileData) -> Bool
    automatically derived

    FileData::to_json

    Encodes this value as JSON.

    FileData::to_repr

    automatically derived

    FileSearch

    pub(all) struct FileSearch {
    file_search_store_names : Array[String]?
    top_k : Int?
    metadata_filter : String?
    } derive(Eq,
    Debug
    )

    The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.

    FileSearch::equal

    fn FileSearch::equal(FileSearch, FileSearch) -> Bool
    automatically derived

    FileSearch::new

    fn FileSearch::new(file_search_store_names? : Array[String], top_k? : Int, metadata_filter? : String) -> FileSearch

    Creates a FileSearch with omitted optional fields absent.

    FileSearch::not_equal

    fn FileSearch::not_equal(x : FileSearch, y : FileSearch) -> Bool
    automatically derived

    FileSearch::to_json

    Encodes this value as JSON.

    FileSearch::to_repr

    automatically derived

    FileSource

    pub(all) enum FileSource {
    SOURCEUNSPECIFIED
    UPLOADED
    GENERATED
    REGISTERED
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Source of the File. Enum values: SOURCE_UNSPECIFIED: Used if source is not specified.; UPLOADED: Indicates the file is uploaded by the user.; GENERATED: Indicates the file is generated by Google.; REGISTERED: Indicates the file is a registered, i.e. a Google Cloud Storage file.

    FileSource::equal

    fn FileSource::equal(FileSource, FileSource) -> Bool
    automatically derived

    FileSource::not_equal

    fn FileSource::not_equal(x : FileSource, y : FileSource) -> Bool
    automatically derived

    FileSource::to_json

    Encodes this string enum as JSON.

    FileSource::to_repr

    automatically derived

    FileState

    pub(all) enum FileState {
    STATEUNSPECIFIED
    PROCESSING
    ACTIVE
    FAILED
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Output only. Processing state of the File. Enum values: STATE_UNSPECIFIED: The default value. This value is used if the state is omitted.; PROCESSING: File is being processed and cannot be used for inference yet.; ACTIVE: File is processed and available for inference.; FAILED: File failed processing.

    FileState::equal

    fn FileState::equal(FileState, FileState) -> Bool
    automatically derived

    FileState::not_equal

    fn FileState::not_equal(x : FileState, y : FileState) -> Bool
    automatically derived

    FileState::to_json

    Encodes this string enum as JSON.

    FileState::to_repr

    automatically derived

    FunctionCall

    pub(all) struct FunctionCall {
    id : String?
    args : Map[String,
    Json
    ]?
    name : String?
    } derive(Eq,
    Debug
    )

    A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name with the arguments and their values.

    FunctionCall::equal

    automatically derived

    FunctionCall::new

    fn FunctionCall::new(id? : String, args? : Map[String,
    Json
    ], name? : String) -> FunctionCall

    Creates a FunctionCall with omitted optional fields absent.

    FunctionCall::not_equal

    fn FunctionCall::not_equal(x : FunctionCall, y : FunctionCall) -> Bool
    automatically derived

    FunctionCall::to_json

    Encodes this value as JSON.

    FunctionCall::to_repr

    automatically derived

    FunctionCallingConfig

    pub(all) struct FunctionCallingConfig {
    mode : FunctionCallingConfigMode?
    allowed_function_names : Array[String]?
    } derive(Eq,
    Debug
    )

    Configuration for specifying function calling behavior.

    FunctionCallingConfig::equal

    automatically derived

    FunctionCallingConfig::new

    fn FunctionCallingConfig::new(mode? : FunctionCallingConfigMode, allowed_function_names? : Array[String]) -> FunctionCallingConfig

    Creates a FunctionCallingConfig with omitted optional fields absent.

    FunctionCallingConfig::not_equal

    automatically derived

    FunctionCallingConfig::to_json

    Encodes this value as JSON.

    FunctionCallingConfig::to_repr

    automatically derived

    FunctionCallingConfigMode

    pub(all) enum FunctionCallingConfigMode {
    MODEUNSPECIFIED
    AUTO
    ANY
    NONE
    VALIDATED
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO. Enum values: MODE_UNSPECIFIED: Unspecified function calling mode. This value should not be used.; AUTO: Default model behavior, model decides to predict either a function call or a natural language response.; ANY: Model is constrained to always predicting a function call only. If "allowed_function_names" are set, the predicted function call will be limited to any one of "allowed_function_names", else the predicted function call will be any one of the provided "function_declarations".; NONE: Model will not predict any function call. Model behavior is same as when not passing any function declarations.; VALIDATED: Model decides to predict either a function call or a natural language response, but will validate function calls with constrained decoding. If "allowed_function_names" are set, the predicted function call will be limited to any one of "allowed_function_names", else the predicted function call will be any one of the provided "function_declarations".

    FunctionCallingConfigMode::equal

    automatically derived

    FunctionCallingConfigMode::not_equal

    automatically derived

    FunctionCallingConfigMode::to_json

    Encodes this string enum as JSON.

    FunctionCallingConfigMode::to_repr

    automatically derived

    FunctionDeclaration

    pub(all) struct FunctionDeclaration {
    name : String?
    response : Schema?
    behavior : FunctionDeclarationBehavior?
    description : String?
    parameters : Schema?
    response_json_schema :
    Json
    ?
    parameters_json_schema :
    Json
    ?
    } derive(Eq,
    Debug
    )

    Structured representation of a function declaration as defined by the OpenAPI 3.03 specification. Included in this declaration are the function name and parameters. 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.

    FunctionDeclaration::equal

    automatically derived

    FunctionDeclaration::new

    fn FunctionDeclaration::new(name? : String, response? : Schema, behavior? : FunctionDeclarationBehavior, description? : String, parameters? : Schema, response_json_schema? :
    Json
    , parameters_json_schema? :
    Json
    ) -> FunctionDeclaration

    Creates a FunctionDeclaration with omitted optional fields absent.

    FunctionDeclaration::not_equal

    automatically derived

    FunctionDeclaration::to_json

    Encodes this value as JSON.

    FunctionDeclaration::to_repr

    automatically derived

    FunctionDeclarationBehavior

    pub(all) enum FunctionDeclarationBehavior {
    UNSPECIFIED
    BLOCKING
    NONBLOCKING
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. Enum values: UNSPECIFIED: This value is unused.; BLOCKING: If set, the system will wait to receive the function response before continuing the conversation.; NON_BLOCKING: If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model.

    FunctionDeclarationBehavior::equal

    automatically derived

    FunctionDeclarationBehavior::not_equal

    automatically derived

    FunctionDeclarationBehavior::to_json

    Encodes this string enum as JSON.

    FunctionDeclarationBehavior::to_repr

    automatically derived

    FunctionResponse

    pub(all) struct FunctionResponse {
    will_continue : Bool?
    name : String?
    scheduling : FunctionResponseScheduling?
    id : String?
    response : Map[String,
    Json
    ]?
    parts : Array[FunctionResponsePart]?
    } derive(Eq,
    Debug
    )

    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 aFunctionCall made based on model prediction.

    FunctionResponse::equal

    automatically derived

    FunctionResponse::new

    fn FunctionResponse::new(will_continue? : Bool, name? : String, scheduling? : FunctionResponseScheduling, id? : String, response? : Map[String,
    Json
    ], parts? : Array[FunctionResponsePart]) -> FunctionResponse

    Creates a FunctionResponse with omitted optional fields absent.

    FunctionResponse::not_equal

    fn FunctionResponse::not_equal(x : FunctionResponse, y : FunctionResponse) -> Bool
    automatically derived

    FunctionResponse::to_json

    Encodes this value as JSON.

    FunctionResponse::to_repr

    automatically derived

    FunctionResponseBlob

    pub(all) struct FunctionResponseBlob {
    data : String?
    display_name : String?
    mime_type : String?
    } derive(Eq,
    Debug
    )

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

    FunctionResponseBlob::equal

    automatically derived

    FunctionResponseBlob::new

    fn FunctionResponseBlob::new(data? : String, display_name? : String, mime_type? : String) -> FunctionResponseBlob

    Creates a FunctionResponseBlob with omitted optional fields absent.

    FunctionResponseBlob::not_equal

    automatically derived

    FunctionResponseBlob::to_json

    Encodes this value as JSON.

    FunctionResponseBlob::to_repr

    automatically derived

    FunctionResponseFileData

    pub(all) struct FunctionResponseFileData {
    file_uri : String?
    mime_type : String?
    display_name : String?
    } derive(Eq,
    Debug
    )

    URI based data for function response.

    FunctionResponseFileData::equal

    automatically derived

    FunctionResponseFileData::new

    fn FunctionResponseFileData::new(file_uri? : String, mime_type? : String, display_name? : String) -> FunctionResponseFileData

    Creates a FunctionResponseFileData with omitted optional fields absent.

    FunctionResponseFileData::not_equal

    automatically derived

    FunctionResponseFileData::to_json

    Encodes this value as JSON.

    FunctionResponseFileData::to_repr

    automatically derived

    FunctionResponsePart

    pub(all) struct FunctionResponsePart {
    file_data : FunctionResponseFileData?
    spreadsheet_metadata : SpreadsheetMetadata?
    media_processing : FunctionResponsePartMediaProcessing?
    inline_data : FunctionResponseBlob?
    video_metadata : VideoMetadata?
    document_metadata : DocumentMetadata?
    media_resolution : V1mainMediaResolution?
    audio_metadata : AudioMetadata?
    } derive(Eq,
    Debug
    )

    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. Media can be passed as raw bytes (inline_data) or by URI (file_data) with an IANA MIME type identifying the type and subtype of the media.

    FunctionResponsePart::equal

    automatically derived

    FunctionResponsePart::new

    fn FunctionResponsePart::new(file_data? : FunctionResponseFileData, spreadsheet_metadata? : SpreadsheetMetadata, media_processing? : FunctionResponsePartMediaProcessing, inline_data? : FunctionResponseBlob, video_metadata? : VideoMetadata, document_metadata? : DocumentMetadata, media_resolution? : V1mainMediaResolution, audio_metadata? : AudioMetadata) -> FunctionResponsePart

    Creates a FunctionResponsePart with omitted optional fields absent.

    FunctionResponsePart::not_equal

    automatically derived

    FunctionResponsePart::to_json

    Encodes this value as JSON.

    FunctionResponsePart::to_repr

    automatically derived

    FunctionResponsePartMediaProcessing

    pub(all) enum FunctionResponsePartMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field. Enum values: MEDIA_PROCESSING_UNSPECIFIED: Defaults to model-specific processing.; STATIC: Fixed-rate frame extraction. All frames placed in context.; AGENTIC: Model-driven dynamic navigation. Recommended for most use cases.

    FunctionResponsePartMediaProcessing::equal

    automatically derived

    FunctionResponsePartMediaProcessing::not_equal

    automatically derived

    FunctionResponsePartMediaProcessing::to_json

    Encodes this string enum as JSON.

    FunctionResponsePartMediaProcessing::to_repr

    automatically derived

    FunctionResponseScheduling

    pub(all) enum FunctionResponseScheduling {
    SCHEDULINGUNSPECIFIED
    SILENT
    WHENIDLE
    INTERRUPT
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. Enum values: SCHEDULING_UNSPECIFIED: This value is unused.; SILENT: Only add the result to the conversation context, do not interrupt or trigger generation.; WHEN_IDLE: Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.; INTERRUPT: Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.

    FunctionResponseScheduling::equal

    automatically derived

    FunctionResponseScheduling::not_equal

    automatically derived

    FunctionResponseScheduling::to_json

    Encodes this string enum as JSON.

    FunctionResponseScheduling::to_repr

    automatically derived

    GenerateContentRequest

    pub(all) struct GenerateContentRequest {
    continuation_token : String?
    generation_config : GenerationConfig?
    contents : Array[Content]?
    service_tier : GenerateContentRequestServiceTier?
    model : String?
    tool_config : ToolConfig?
    safety_settings : Array[SafetySetting]?
    system_instruction : Content?
    tools : Array[Tool]?
    cached_content : String?
    labels : Map[String, String]?
    store : Bool?
    } derive(Eq,
    Debug
    )

    Request to generate a completion from the model.

    GenerateContentRequest::equal

    automatically derived

    GenerateContentRequest::new

    fn GenerateContentRequest::new(continuation_token? : String, generation_config? : GenerationConfig, contents? : Array[Content], service_tier? : GenerateContentRequestServiceTier, model? : String, tool_config? : ToolConfig, safety_settings? : Array[SafetySetting], system_instruction? : Content, tools? : Array[Tool], cached_content? : String, labels? : Map[String, String], store? : Bool) -> GenerateContentRequest

    Creates a GenerateContentRequest with omitted optional fields absent.

    GenerateContentRequest::not_equal

    automatically derived

    GenerateContentRequest::to_json

    Encodes this value as JSON.

    GenerateContentRequest::to_repr

    automatically derived

    GenerateContentRequestServiceTier

    pub(all) enum GenerateContentRequestServiceTier {
    Unspecified
    Standard
    Flex
    Priority
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The service tier of the request. Enum values: unspecified: Default service tier, which is standard.; standard: Standard service tier.; flex: Flex service tier.; priority: Priority service tier.

    GenerateContentRequestServiceTier::equal

    automatically derived

    GenerateContentRequestServiceTier::not_equal

    automatically derived

    GenerateContentRequestServiceTier::to_json

    Encodes this string enum as JSON.

    GenerateContentRequestServiceTier::to_repr

    automatically derived

    GenerateContentResponse

    pub(all) struct GenerateContentResponse {
    response_id : String?
    usage_metadata : UsageMetadata?
    candidates : Array[Candidate]?
    model_version : String?
    prompt_feedback : PromptFeedback?
    model_status : ModelStatus?
    } derive(Eq,
    Debug
    )

    Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in GenerateContentResponse.prompt_feedback and for each candidate in finish_reason and in safety_ratings. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check prompt_feedback) - Reports feedback on each candidate in finish_reason and safety_ratings.

    GenerateContentResponse::equal

    automatically derived

    GenerateContentResponse::new

    fn GenerateContentResponse::new(response_id? : String, usage_metadata? : UsageMetadata, candidates? : Array[Candidate], model_version? : String, prompt_feedback? : PromptFeedback, model_status? : ModelStatus) -> GenerateContentResponse

    Creates a GenerateContentResponse with omitted optional fields absent.

    GenerateContentResponse::not_equal

    automatically derived

    GenerateContentResponse::to_json

    Encodes this value as JSON.

    GenerateContentResponse::to_repr

    automatically derived

    GenerationConfig

    pub(all) struct GenerationConfig {
    response_modalities : Array[GenerationConfigResponseModalitiesItem]?
    translation_config : TranslationConfig?
    speech_config : SpeechConfig?
    presence_penalty : Double?
    temperature : Double?
    candidate_count : Int?
    media_resolution : GenerationConfigMediaResolution?
    frequency_penalty : Double?
    enable_affective_dialog : Bool?
    response_format : ResponseFormatConfig?
    stop_sequences : Array[String]?
    response_schema : Schema?
    response_json_schema :
    Json
    ?
    logprobs : Int?
    image_config : ImageConfig?
    seed : Int?
    enable_enhanced_civic_answers : Bool?
    max_output_tokens : Int?
    thinking_config : ThinkingConfig?
    response_logprobs : Bool?
    response_json_schema_2 :
    Json
    ?
    response_mime_type : String?
    top_p : Double?
    audio_transcription_config : AudioTranscriptionConfig?
    top_k : Int?
    } derive(Eq,
    Debug
    )

    Configuration options for model generation and outputs. Not all parameters are configurable for every model.

    GenerationConfig::equal

    automatically derived

    GenerationConfig::new

    fn GenerationConfig::new(response_modalities? : Array[GenerationConfigResponseModalitiesItem], translation_config? : TranslationConfig, speech_config? : SpeechConfig, presence_penalty? : Double, temperature? : Double, candidate_count? : Int, media_resolution? : GenerationConfigMediaResolution, frequency_penalty? : Double, enable_affective_dialog? : Bool, response_format? : ResponseFormatConfig, stop_sequences? : Array[String], response_schema? : Schema, response_json_schema? :
    Json
    , logprobs? : Int, image_config? : ImageConfig, seed? : Int, enable_enhanced_civic_answers? : Bool, max_output_tokens? : Int, thinking_config? : ThinkingConfig, response_logprobs? : Bool, response_json_schema_2? :
    Json
    , response_mime_type? : String, top_p? : Double, audio_transcription_config? : AudioTranscriptionConfig, top_k? : Int) -> GenerationConfig

    Creates a GenerationConfig with omitted optional fields absent.

    GenerationConfig::not_equal

    fn GenerationConfig::not_equal(x : GenerationConfig, y : GenerationConfig) -> Bool
    automatically derived

    GenerationConfig::to_json

    Encodes this value as JSON.

    GenerationConfig::to_repr

    automatically derived

    GenerationConfigMediaResolution

    pub(all) enum GenerationConfigMediaResolution {
    MEDIARESOLUTIONUNSPECIFIED
    MEDIARESOLUTIONLOW
    MEDIARESOLUTIONMEDIUM
    MEDIARESOLUTIONHIGH
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. If specified, the media resolution specified will be used. Enum values: MEDIA_RESOLUTION_UNSPECIFIED: Media resolution has not been set.; MEDIA_RESOLUTION_LOW: Media resolution set to low (64 tokens).; MEDIA_RESOLUTION_MEDIUM: Media resolution set to medium (256 tokens).; MEDIA_RESOLUTION_HIGH: Media resolution set to high (zoomed reframing with 256 tokens).

    GenerationConfigMediaResolution::equal

    automatically derived

    GenerationConfigMediaResolution::not_equal

    automatically derived

    GenerationConfigMediaResolution::to_json

    Encodes this string enum as JSON.

    GenerationConfigMediaResolution::to_repr

    automatically derived

    GenerationConfigResponseModalitiesItem

    pub(all) enum GenerationConfigResponseModalitiesItem {
    MODALITYUNSPECIFIED
    TEXT
    IMAGE
    AUDIO
    Custom(String)
    } derive(Eq,
    Debug
    )

    Enum values: MODALITY_UNSPECIFIED: Default value.; TEXT: Indicates the model should return text.; IMAGE: Indicates the model should return images.; AUDIO: Indicates the model should return audio.

    GenerationConfigResponseModalitiesItem::equal

    automatically derived

    GenerationConfigResponseModalitiesItem::not_equal

    automatically derived

    GenerationConfigResponseModalitiesItem::to_json

    Encodes this string enum as JSON.

    GenerationConfigResponseModalitiesItem::to_repr

    automatically derived

    GoogleAiGenerativelanguageV1betaGroundingSupport

    pub(all) struct GoogleAiGenerativelanguageV1betaGroundingSupport {
    segment : GoogleAiGenerativelanguageV1betaSegment?
    confidence_scores : Array[Double]?
    grounding_chunk_indices : Array[Int]?
    rendered_parts : Array[Int]?
    } derive(Eq,
    Debug
    )

    Grounding support.

    GoogleAiGenerativelanguageV1betaGroundingSupport::new

    fn GoogleAiGenerativelanguageV1betaGroundingSupport::new(segment? : GoogleAiGenerativelanguageV1betaSegment, confidence_scores? : Array[Double], grounding_chunk_indices? : Array[Int], rendered_parts? : Array[Int]) -> GoogleAiGenerativelanguageV1betaGroundingSupport

    Creates a GoogleAiGenerativelanguageV1betaGroundingSupport with omitted optional fields absent.

    GoogleAiGenerativelanguageV1betaGroundingSupport::not_equal

    automatically derived

    GoogleAiGenerativelanguageV1betaGroundingSupport::to_json

    Encodes this value as JSON.

    GoogleAiGenerativelanguageV1betaGroundingSupport::to_repr

    automatically derived

    GoogleAiGenerativelanguageV1betaSegment

    pub(all) struct GoogleAiGenerativelanguageV1betaSegment {
    text : String?
    start_index : Int?
    end_index : Int?
    part_index : Int?
    } derive(Eq,
    Debug
    )

    Segment of the content.

    GoogleAiGenerativelanguageV1betaSegment::equal

    automatically derived

    GoogleAiGenerativelanguageV1betaSegment::new

    fn GoogleAiGenerativelanguageV1betaSegment::new(text? : String, start_index? : Int, end_index? : Int, part_index? : Int) -> GoogleAiGenerativelanguageV1betaSegment

    Creates a GoogleAiGenerativelanguageV1betaSegment with omitted optional fields absent.

    GoogleAiGenerativelanguageV1betaSegment::not_equal

    automatically derived

    GoogleAiGenerativelanguageV1betaSegment::to_json

    Encodes this value as JSON.

    GoogleAiGenerativelanguageV1betaSegment::to_repr

    automatically derived

    GoogleError

    pub(all) struct GoogleError {
    error : GoogleErrorStatus
    } derive(Eq,
    Debug
    )

    Generated representation of GoogleError.

    GoogleError::equal

    fn GoogleError::equal(GoogleError, GoogleError) -> Bool
    automatically derived

    GoogleError::new

    Creates a GoogleError with omitted optional fields absent.

    GoogleError::not_equal

    fn GoogleError::not_equal(x : GoogleError, y : GoogleError) -> Bool
    automatically derived

    GoogleError::to_json

    Encodes this value as JSON.

    GoogleError::to_repr

    automatically derived

    GoogleErrorStatus

    pub(all) struct GoogleErrorStatus {
    code : Int
    message : String
    status : String
    details : Array[
    Json
    ]?
    } derive(Eq,
    Debug
    )

    Generated representation of GoogleErrorStatus.

    GoogleErrorStatus::equal

    automatically derived

    GoogleErrorStatus::new

    fn GoogleErrorStatus::new(code~ : Int, message~ : String, status~ : String, details? : Array[
    Json
    ]) -> GoogleErrorStatus

    Creates a GoogleErrorStatus with omitted optional fields absent.

    GoogleErrorStatus::not_equal

    fn GoogleErrorStatus::not_equal(x : GoogleErrorStatus, y : GoogleErrorStatus) -> Bool
    automatically derived

    GoogleErrorStatus::to_json

    Encodes this value as JSON.

    GoogleErrorStatus::to_repr

    automatically derived

    GoogleMaps

    pub(all) struct GoogleMaps {
    enable_widget : Bool?
    } derive(Eq,
    Debug
    )

    The GoogleMaps Tool that provides geospatial context for the user's query.

    GoogleMaps::equal

    fn GoogleMaps::equal(GoogleMaps, GoogleMaps) -> Bool
    automatically derived

    GoogleMaps::new

    fn GoogleMaps::new(enable_widget? : Bool) -> GoogleMaps

    Creates a GoogleMaps with omitted optional fields absent.

    GoogleMaps::not_equal

    fn GoogleMaps::not_equal(x : GoogleMaps, y : GoogleMaps) -> Bool
    automatically derived

    GoogleMaps::to_json

    Encodes this value as JSON.

    GoogleMaps::to_repr

    automatically derived

    GoogleSearch

    pub(all) struct GoogleSearch {
    search_types : SearchTypes?
    time_range_filter : Interval?
    } derive(Eq,
    Debug
    )

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

    GoogleSearch::equal

    automatically derived

    GoogleSearch::new

    fn GoogleSearch::new(search_types? : SearchTypes, time_range_filter? : Interval) -> GoogleSearch

    Creates a GoogleSearch with omitted optional fields absent.

    GoogleSearch::not_equal

    fn GoogleSearch::not_equal(x : GoogleSearch, y : GoogleSearch) -> Bool
    automatically derived

    GoogleSearch::to_json

    Encodes this value as JSON.

    GoogleSearch::to_repr

    automatically derived

    GoogleSearchRetrieval

    pub(all) struct GoogleSearchRetrieval {
    dynamic_retrieval_config : DynamicRetrievalConfig?
    } derive(Eq,
    Debug
    )

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

    GoogleSearchRetrieval::equal

    automatically derived

    GoogleSearchRetrieval::new

    Creates a GoogleSearchRetrieval with omitted optional fields absent.

    GoogleSearchRetrieval::not_equal

    automatically derived

    GoogleSearchRetrieval::to_json

    Encodes this value as JSON.

    GoogleSearchRetrieval::to_repr

    automatically derived

    GroundingAttribution

    pub(all) struct GroundingAttribution {
    source_id : AttributionSourceId?
    content : Content?
    } derive(Eq,
    Debug
    )

    Attribution for a source that contributed to an answer.

    GroundingAttribution::equal

    automatically derived

    GroundingAttribution::new

    Creates a GroundingAttribution with omitted optional fields absent.

    GroundingAttribution::not_equal

    automatically derived

    GroundingAttribution::to_json

    Encodes this value as JSON.

    GroundingAttribution::to_repr

    automatically derived

    GroundingChunk

    pub(all) struct GroundingChunk {
    retrieved_context : RetrievedContext?
    web : Web?
    maps : Maps?
    image : Image?
    } derive(Eq,
    Debug
    )

    A GroundingChunk represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps.

    GroundingChunk::equal

    automatically derived

    GroundingChunk::new

    fn GroundingChunk::new(retrieved_context? : RetrievedContext, web? : Web, maps? : Maps, image? : Image) -> GroundingChunk

    Creates a GroundingChunk with omitted optional fields absent.

    GroundingChunk::not_equal

    fn GroundingChunk::not_equal(x : GroundingChunk, y : GroundingChunk) -> Bool
    automatically derived

    GroundingChunk::to_json

    Encodes this value as JSON.

    GroundingChunk::to_repr

    automatically derived

    GroundingChunkCustomMetadata

    pub(all) struct GroundingChunkCustomMetadata {
    string_list_value : GroundingChunkStringList?
    numeric_value : Double?
    key : String?
    string_value : String?
    } derive(Eq,
    Debug
    )

    User provided metadata about the GroundingFact.

    GroundingChunkCustomMetadata::equal

    automatically derived

    GroundingChunkCustomMetadata::new

    fn GroundingChunkCustomMetadata::new(string_list_value? : GroundingChunkStringList, numeric_value? : Double, key? : String, string_value? : String) -> GroundingChunkCustomMetadata

    Creates a GroundingChunkCustomMetadata with omitted optional fields absent.

    GroundingChunkCustomMetadata::not_equal

    automatically derived

    GroundingChunkCustomMetadata::to_json

    Encodes this value as JSON.

    GroundingChunkCustomMetadata::to_repr

    automatically derived

    GroundingChunkStringList

    pub(all) struct GroundingChunkStringList {
    values : Array[String]?
    } derive(Eq,
    Debug
    )

    A list of string values.

    GroundingChunkStringList::equal

    automatically derived

    GroundingChunkStringList::new

    Creates a GroundingChunkStringList with omitted optional fields absent.

    GroundingChunkStringList::not_equal

    automatically derived

    GroundingChunkStringList::to_json

    Encodes this value as JSON.

    GroundingChunkStringList::to_repr

    automatically derived

    GroundingMetadata

    pub(all) struct GroundingMetadata {
    grounding_chunks : Array[GroundingChunk]?
    google_maps_widget_context_token : String?
    grounding_supports : Array[GoogleAiGenerativelanguageV1betaGroundingSupport]?
    retrieval_metadata : RetrievalMetadata?
    image_search_queries : Array[String]?
    web_search_queries : Array[String]?
    search_entry_point : SearchEntryPoint?
    } derive(Eq,
    Debug
    )

    Metadata returned to client when grounding is enabled.

    GroundingMetadata::equal

    automatically derived

    GroundingMetadata::new

    fn GroundingMetadata::new(grounding_chunks? : Array[GroundingChunk], google_maps_widget_context_token? : String, grounding_supports? : Array[GoogleAiGenerativelanguageV1betaGroundingSupport], retrieval_metadata? : RetrievalMetadata, image_search_queries? : Array[String], web_search_queries? : Array[String], search_entry_point? : SearchEntryPoint) -> GroundingMetadata

    Creates a GroundingMetadata with omitted optional fields absent.

    GroundingMetadata::not_equal

    fn GroundingMetadata::not_equal(x : GroundingMetadata, y : GroundingMetadata) -> Bool
    automatically derived

    GroundingMetadata::to_json

    Encodes this value as JSON.

    GroundingMetadata::to_repr

    automatically derived

    GroundingPassageId

    pub(all) struct GroundingPassageId {
    part_index : Int?
    passage_id : String?
    } derive(Eq,
    Debug
    )

    Identifier for a part within a GroundingPassage.

    GroundingPassageId::equal

    automatically derived

    GroundingPassageId::new

    fn GroundingPassageId::new(part_index? : Int, passage_id? : String) -> GroundingPassageId

    Creates a GroundingPassageId with omitted optional fields absent.

    GroundingPassageId::not_equal

    automatically derived

    GroundingPassageId::to_json

    Encodes this value as JSON.

    GroundingPassageId::to_repr

    automatically derived

    Image

    pub(all) struct Image {
    source_uri : String?
    image_uri : String?
    title : String?
    domain : String?
    } derive(Eq,
    Debug
    )

    Chunk from image search.

    Image::equal

    fn Image::equal(Image, Image) -> Bool
    automatically derived

    Image::new

    fn Image::new(source_uri? : String, image_uri? : String, title? : String, domain? : String) -> Image

    Creates a Image with omitted optional fields absent.

    Image::not_equal

    fn Image::not_equal(x : Image, y : Image) -> Bool
    automatically derived

    Image::to_json

    Encodes this value as JSON.

    Image::to_repr

    automatically derived

    ImageConfig

    pub(all) struct ImageConfig {
    image_size : String?
    aspect_ratio : String?
    } derive(Eq,
    Debug
    )

    Config for image generation features.

    ImageConfig::equal

    fn ImageConfig::equal(ImageConfig, ImageConfig) -> Bool
    automatically derived

    ImageConfig::new

    fn ImageConfig::new(image_size? : String, aspect_ratio? : String) -> ImageConfig

    Creates a ImageConfig with omitted optional fields absent.

    ImageConfig::not_equal

    fn ImageConfig::not_equal(x : ImageConfig, y : ImageConfig) -> Bool
    automatically derived

    ImageConfig::to_json

    Encodes this value as JSON.

    ImageConfig::to_repr

    automatically derived

    ImageResponseFormat

    pub(all) struct ImageResponseFormat {
    mime_type : ImageResponseFormatMimeType?
    delivery : ImageResponseFormatDelivery?
    aspect_ratio : ImageResponseFormatAspectRatio?
    image_size : ImageResponseFormatImageSize?
    } derive(Eq,
    Debug
    )

    Configuration for image output format.

    ImageResponseFormat::equal

    automatically derived

    ImageResponseFormat::new

    Creates a ImageResponseFormat with omitted optional fields absent.

    ImageResponseFormat::not_equal

    automatically derived

    ImageResponseFormat::to_json

    Encodes this value as JSON.

    ImageResponseFormat::to_repr

    automatically derived

    ImageResponseFormatAspectRatio

    pub(all) enum ImageResponseFormatAspectRatio {
    ASPECTRATIOUNSPECIFIED
    ASPECTRATIOONEBYONE
    ASPECTRATIOTWOBYTHREE
    ASPECTRATIOTHREEBYTWO
    ASPECTRATIOTHREEBYFOUR
    ASPECTRATIOFOURBYTHREE
    ASPECTRATIOFOURBYFIVE
    ASPECTRATIOFIVEBYFOUR
    ASPECTRATIONINEBYSIXTEEN
    ASPECTRATIOSIXTEENBYNINE
    ASPECTRATIOTWENTYONEBYNINE
    ASPECTRATIOONEBYEIGHT
    ASPECTRATIOEIGHTBYONE
    ASPECTRATIOONEBYFOUR
    ASPECTRATIOFOURBYONE
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The aspect ratio for the image output. Enum values: ASPECT_RATIO_UNSPECIFIED: Default value. This value is unused.; ASPECT_RATIO_ONE_BY_ONE: 1:1 aspect ratio.; ASPECT_RATIO_TWO_BY_THREE: 2:3 aspect ratio.; ASPECT_RATIO_THREE_BY_TWO: 3:2 aspect ratio.; ASPECT_RATIO_THREE_BY_FOUR: 3:4 aspect ratio.; ASPECT_RATIO_FOUR_BY_THREE: 4:3 aspect ratio.; ASPECT_RATIO_FOUR_BY_FIVE: 4:5 aspect ratio.; ASPECT_RATIO_FIVE_BY_FOUR: 5:4 aspect ratio.; ASPECT_RATIO_NINE_BY_SIXTEEN: 9:16 aspect ratio.; ASPECT_RATIO_SIXTEEN_BY_NINE: 16:9 aspect ratio.; ASPECT_RATIO_TWENTY_ONE_BY_NINE: 21:9 aspect ratio.; ASPECT_RATIO_ONE_BY_EIGHT: 1:8 aspect ratio.; ASPECT_RATIO_EIGHT_BY_ONE: 8:1 aspect ratio.; ASPECT_RATIO_ONE_BY_FOUR: 1:4 aspect ratio.; ASPECT_RATIO_FOUR_BY_ONE: 4:1 aspect ratio.

    ImageResponseFormatAspectRatio::equal

    automatically derived

    ImageResponseFormatAspectRatio::not_equal

    automatically derived

    ImageResponseFormatAspectRatio::to_json

    Encodes this string enum as JSON.

    ImageResponseFormatAspectRatio::to_repr

    automatically derived

    ImageResponseFormatDelivery

    pub(all) enum ImageResponseFormatDelivery {
    DELIVERYUNSPECIFIED
    INLINE
    URI
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The delivery mode for the image output. Enum values: DELIVERY_UNSPECIFIED: Default value. This value is unused.; INLINE: Image data is returned inline in the response.; URI: Image data is returned as a URI.

    ImageResponseFormatDelivery::equal

    automatically derived

    ImageResponseFormatDelivery::not_equal

    automatically derived

    ImageResponseFormatDelivery::to_json

    Encodes this string enum as JSON.

    ImageResponseFormatDelivery::to_repr

    automatically derived

    ImageResponseFormatImageSize

    pub(all) enum ImageResponseFormatImageSize {
    IMAGESIZEUNSPECIFIED
    IMAGESIZEFIVETWELVE
    IMAGESIZEONEK
    IMAGESIZETWOK
    IMAGESIZEFOURK
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The size of the image output. Enum values: IMAGE_SIZE_UNSPECIFIED: Default value. This value is unused.; IMAGE_SIZE_FIVE_TWELVE: 512px image size.; IMAGE_SIZE_ONE_K: 1K image size.; IMAGE_SIZE_TWO_K: 2K image size.; IMAGE_SIZE_FOUR_K: 4K image size.

    ImageResponseFormatImageSize::equal

    automatically derived

    ImageResponseFormatImageSize::not_equal

    automatically derived

    ImageResponseFormatImageSize::to_json

    Encodes this string enum as JSON.

    ImageResponseFormatImageSize::to_repr

    automatically derived

    ImageResponseFormatMimeType

    pub(all) enum ImageResponseFormatMimeType {
    MIMETYPEUNSPECIFIED
    IMAGEJPEG
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The MIME type of the image output. Enum values: MIME_TYPE_UNSPECIFIED: Default value. This value is unused.; IMAGE_JPEG: JPEG image format.

    ImageResponseFormatMimeType::equal

    automatically derived

    ImageResponseFormatMimeType::not_equal

    automatically derived

    ImageResponseFormatMimeType::to_json

    Encodes this string enum as JSON.

    ImageResponseFormatMimeType::to_repr

    automatically derived

    Interval

    pub(all) struct Interval {
    start_time : String?
    end_time : String?
    } derive(Eq,
    Debug
    )

    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.

    Interval::equal

    fn Interval::equal(Interval, Interval) -> Bool
    automatically derived

    Interval::new

    fn Interval::new(start_time? : String, end_time? : String) -> Interval

    Creates a Interval with omitted optional fields absent.

    Interval::not_equal

    fn Interval::not_equal(x : Interval, y : Interval) -> Bool
    automatically derived

    Interval::to_json

    Encodes this value as JSON.

    Interval::to_repr

    automatically derived

    LanguageHints

    pub(all) struct LanguageHints {
    language_codes : Array[String]?
    } derive(Eq,
    Debug
    )

    Provides hints to the model about possible languages present in the audio.

    LanguageHints::equal

    automatically derived

    LanguageHints::new

    fn LanguageHints::new(language_codes? : Array[String]) -> LanguageHints

    Creates a LanguageHints with omitted optional fields absent.

    LanguageHints::not_equal

    fn LanguageHints::not_equal(x : LanguageHints, y : LanguageHints) -> Bool
    automatically derived

    LanguageHints::to_json

    Encodes this value as JSON.

    LanguageHints::to_repr

    automatically derived

    LatLng

    pub(all) struct LatLng {
    latitude : Double?
    longitude : Double?
    } derive(Eq,
    Debug
    )

    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.

    LatLng::equal

    fn LatLng::equal(LatLng, LatLng) -> Bool
    automatically derived

    LatLng::new

    fn LatLng::new(latitude? : Double, longitude? : Double) -> LatLng

    Creates a LatLng with omitted optional fields absent.

    LatLng::not_equal

    fn LatLng::not_equal(x : LatLng, y : LatLng) -> Bool
    automatically derived

    LatLng::to_json

    Encodes this value as JSON.

    LatLng::to_repr

    automatically derived

    ListCachedContentsResponse

    pub(all) struct ListCachedContentsResponse {
    cached_contents : Array[CachedContent]?
    next_page_token : String?
    } derive(Eq,
    Debug
    )

    Response with CachedContents list.

    ListCachedContentsResponse::equal

    automatically derived

    ListCachedContentsResponse::new

    fn ListCachedContentsResponse::new(cached_contents? : Array[CachedContent], next_page_token? : String) -> ListCachedContentsResponse

    Creates a ListCachedContentsResponse with omitted optional fields absent.

    ListCachedContentsResponse::not_equal

    automatically derived

    ListCachedContentsResponse::to_json

    Encodes this value as JSON.

    ListCachedContentsResponse::to_repr

    automatically derived

    ListFilesResponse

    pub(all) struct ListFilesResponse {
    files : Array[File]?
    next_page_token : String?
    } derive(Eq,
    Debug
    )

    Response for ListFiles.

    ListFilesResponse::equal

    automatically derived

    ListFilesResponse::new

    fn ListFilesResponse::new(files? : Array[File], next_page_token? : String) -> ListFilesResponse

    Creates a ListFilesResponse with omitted optional fields absent.

    ListFilesResponse::not_equal

    fn ListFilesResponse::not_equal(x : ListFilesResponse, y : ListFilesResponse) -> Bool
    automatically derived

    ListFilesResponse::to_json

    Encodes this value as JSON.

    ListFilesResponse::to_repr

    automatically derived

    ListModelsResponse

    pub(all) struct ListModelsResponse {
    models : Array[Model]?
    next_page_token : String?
    } derive(Eq,
    Debug
    )

    Response from ListModel containing a paginated list of Models.

    ListModelsResponse::equal

    automatically derived

    ListModelsResponse::new

    fn ListModelsResponse::new(models? : Array[Model], next_page_token? : String) -> ListModelsResponse

    Creates a ListModelsResponse with omitted optional fields absent.

    ListModelsResponse::not_equal

    automatically derived

    ListModelsResponse::to_json

    Encodes this value as JSON.

    ListModelsResponse::to_repr

    automatically derived

    LogprobsResult

    pub(all) struct LogprobsResult {
    top_candidates : Array[TopCandidates]?
    log_probability_sum : Double?
    chosen_candidates : Array[LogprobsResultCandidate]?
    } derive(Eq,
    Debug
    )

    Logprobs Result

    LogprobsResult::equal

    automatically derived

    LogprobsResult::new

    fn LogprobsResult::new(top_candidates? : Array[TopCandidates], log_probability_sum? : Double, chosen_candidates? : Array[LogprobsResultCandidate]) -> LogprobsResult

    Creates a LogprobsResult with omitted optional fields absent.

    LogprobsResult::not_equal

    fn LogprobsResult::not_equal(x : LogprobsResult, y : LogprobsResult) -> Bool
    automatically derived

    LogprobsResult::to_json

    Encodes this value as JSON.

    LogprobsResult::to_repr

    automatically derived

    LogprobsResultCandidate

    pub(all) struct LogprobsResultCandidate {
    token_id : Int?
    token : String?
    log_probability : Double?
    } derive(Eq,
    Debug
    )

    Candidate for the logprobs token and score.

    LogprobsResultCandidate::equal

    automatically derived

    LogprobsResultCandidate::new

    fn LogprobsResultCandidate::new(token_id? : Int, token? : String, log_probability? : Double) -> LogprobsResultCandidate

    Creates a LogprobsResultCandidate with omitted optional fields absent.

    LogprobsResultCandidate::not_equal

    automatically derived

    LogprobsResultCandidate::to_json

    Encodes this value as JSON.

    LogprobsResultCandidate::to_repr

    automatically derived

    Maps

    pub(all) struct Maps {
    place_answer_sources : PlaceAnswerSources?
    text : String?
    uri : String?
    title : String?
    place_id : String?
    } derive(Eq,
    Debug
    )

    A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.

    Maps::equal

    fn Maps::equal(Maps, Maps) -> Bool
    automatically derived

    Maps::new

    fn Maps::new(place_answer_sources? : PlaceAnswerSources, text? : String, uri? : String, title? : String, place_id? : String) -> Maps

    Creates a Maps with omitted optional fields absent.

    Maps::not_equal

    fn Maps::not_equal(x : Maps, y : Maps) -> Bool
    automatically derived

    Maps::to_json

    Encodes this value as JSON.

    Maps::to_repr

    automatically derived

    McpServer

    pub(all) struct McpServer {
    streamable_http_transport : StreamableHttpTransport?
    name : String?
    } derive(Eq,
    Debug
    )

    A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol.

    McpServer::equal

    fn McpServer::equal(McpServer, McpServer) -> Bool
    automatically derived

    McpServer::new

    fn McpServer::new(streamable_http_transport? : StreamableHttpTransport, name? : String) -> McpServer

    Creates a McpServer with omitted optional fields absent.

    McpServer::not_equal

    fn McpServer::not_equal(x : McpServer, y : McpServer) -> Bool
    automatically derived

    McpServer::to_json

    Encodes this value as JSON.

    McpServer::to_repr

    automatically derived

    ModalityTokenCount

    pub(all) struct ModalityTokenCount {
    modality : ModalityTokenCountModality?
    token_count : Int?
    } derive(Eq,
    Debug
    )

    Represents token counting info for a single modality.

    ModalityTokenCount::equal

    automatically derived

    ModalityTokenCount::new

    fn ModalityTokenCount::new(modality? : ModalityTokenCountModality, token_count? : Int) -> ModalityTokenCount

    Creates a ModalityTokenCount with omitted optional fields absent.

    ModalityTokenCount::not_equal

    automatically derived

    ModalityTokenCount::to_json

    Encodes this value as JSON.

    ModalityTokenCount::to_repr

    automatically derived

    ModalityTokenCountModality

    pub(all) enum ModalityTokenCountModality {
    MODALITYUNSPECIFIED
    TEXT
    IMAGE
    VIDEO
    AUDIO
    DOCUMENT
    Unknown(String)
    } derive(Eq,
    Debug
    )

    The modality associated with this token count. Enum values: MODALITY_UNSPECIFIED: Unspecified modality.; TEXT: Plain text.; IMAGE: Image.; VIDEO: Video.; AUDIO: Audio.; DOCUMENT: Document, e.g. PDF.

    ModalityTokenCountModality::equal

    automatically derived

    ModalityTokenCountModality::not_equal

    automatically derived

    ModalityTokenCountModality::to_json

    Encodes this string enum as JSON.

    ModalityTokenCountModality::to_repr

    automatically derived

    Model

    pub(all) struct Model {
    top_p : Double?
    top_k : Int?
    supported_generation_methods : Array[String]?
    temperature : Double?
    max_temperature : Double?
    description : String?
    output_token_limit : Int?
    display_name : String?
    input_token_limit : Int?
    thinking : Bool?
    base_model_id : String?
    name : String?
    version : String?
    } derive(Eq,
    Debug
    )

    Information about a Generative Language Model.

    Model::equal

    fn Model::equal(Model, Model) -> Bool
    automatically derived

    Model::new

    fn Model::new(top_p? : Double, top_k? : Int, supported_generation_methods? : Array[String], temperature? : Double, max_temperature? : Double, description? : String, output_token_limit? : Int, display_name? : String, input_token_limit? : Int, thinking? : Bool, base_model_id? : String, name? : String, version? : String) -> Model

    Creates a Model with omitted optional fields absent.

    Model::not_equal

    fn Model::not_equal(x : Model, y : Model) -> Bool
    automatically derived

    Model::to_json

    Encodes this value as JSON.

    Model::to_repr

    automatically derived

    ModelStatus

    pub(all) struct ModelStatus {
    message : String?
    retirement_time : String?
    model_stage : ModelStatusModelStage?
    } derive(Eq,
    Debug
    )

    The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable.

    ModelStatus::equal

    fn ModelStatus::equal(ModelStatus, ModelStatus) -> Bool
    automatically derived

    ModelStatus::new

    fn ModelStatus::new(message? : String, retirement_time? : String, model_stage? : ModelStatusModelStage) -> ModelStatus

    Creates a ModelStatus with omitted optional fields absent.

    ModelStatus::not_equal

    fn ModelStatus::not_equal(x : ModelStatus, y : ModelStatus) -> Bool
    automatically derived

    ModelStatus::to_json

    Encodes this value as JSON.

    ModelStatus::to_repr

    automatically derived

    ModelStatusModelStage

    pub(all) enum ModelStatusModelStage {
    MODELSTAGEUNSPECIFIED
    UNSTABLEEXPERIMENTAL
    EXPERIMENTAL
    PREVIEW
    STABLE
    LEGACY
    DEPRECATED
    RETIRED
    Unknown(String)
    } derive(Eq,
    Debug
    )

    The stage of the underlying model. Enum values: MODEL_STAGE_UNSPECIFIED: Unspecified model stage.; UNSTABLE_EXPERIMENTAL: The underlying model is subject to lots of tunings.; EXPERIMENTAL: Models in this stage are for experimental purposes only.; PREVIEW: Models in this stage are more mature than experimental models.; STABLE: Models in this stage are considered stable and ready for production use.; LEGACY: If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.; DEPRECATED: Models in this stage are deprecated. These models cannot be used.; RETIRED: Models in this stage are retired. These models cannot be used.

    ModelStatusModelStage::equal

    automatically derived

    ModelStatusModelStage::not_equal

    automatically derived

    ModelStatusModelStage::to_json

    Encodes this string enum as JSON.

    ModelStatusModelStage::to_repr

    automatically derived

    MultiSpeakerVoiceConfig

    pub(all) struct MultiSpeakerVoiceConfig {
    speaker_voice_configs : Array[SpeakerVoiceConfig]?
    } derive(Eq,
    Debug
    )

    The configuration for the multi-speaker setup.

    MultiSpeakerVoiceConfig::equal

    automatically derived

    MultiSpeakerVoiceConfig::new

    Creates a MultiSpeakerVoiceConfig with omitted optional fields absent.

    MultiSpeakerVoiceConfig::not_equal

    automatically derived

    MultiSpeakerVoiceConfig::to_json

    Encodes this value as JSON.

    MultiSpeakerVoiceConfig::to_repr

    automatically derived

    Part

    pub(all) enum Part {
    Text(PartText)
    InlineData(PartInlineData)
    FileData(PartFileData)
    FunctionCall(PartFunctionCall)
    FunctionResponse(PartFunctionResponse)
    ExecutableCode(PartExecutableCode)
    CodeExecutionResult(PartCodeExecutionResult)
    ToolCall(PartToolCall)
    ToolResponse(PartToolResponse)
    } derive(Eq,
    Debug
    )

    A datatype containing media that is part of a multi-part Content message. A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data. A Part 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.

    Part::equal

    fn Part::equal(Part, Part) -> Bool
    automatically derived

    Part::not_equal

    fn Part::not_equal(x : Part, y : Part) -> Bool
    automatically derived

    Part::to_json

    Part::to_repr

    automatically derived

    PartCodeExecutionResult

    pub(all) struct PartCodeExecutionResult {
    speech_metadata : SpeechMetadata?
    code_execution_result : CodeExecutionResult
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    media_processing : PartCodeExecutionResultMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartCodeExecutionResult.

    PartCodeExecutionResult::equal

    automatically derived

    PartCodeExecutionResult::new

    fn PartCodeExecutionResult::new(code_execution_result~ : CodeExecutionResult, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartCodeExecutionResultMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartCodeExecutionResult

    Creates a PartCodeExecutionResult with omitted optional fields absent.

    PartCodeExecutionResult::not_equal

    automatically derived

    PartCodeExecutionResult::to_json

    Encodes this value as JSON.

    PartCodeExecutionResult::to_repr

    automatically derived

    PartCodeExecutionResultMediaProcessing

    pub(all) enum PartCodeExecutionResultMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartCodeExecutionResultMediaProcessing::equal

    automatically derived

    PartCodeExecutionResultMediaProcessing::not_equal

    automatically derived

    PartCodeExecutionResultMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartCodeExecutionResultMediaProcessing::to_repr

    automatically derived

    PartExecutableCode

    pub(all) struct PartExecutableCode {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    executable_code : ExecutableCode
    media_processing : PartExecutableCodeMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartExecutableCode.

    PartExecutableCode::equal

    automatically derived

    PartExecutableCode::new

    fn PartExecutableCode::new(executable_code~ : ExecutableCode, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartExecutableCodeMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartExecutableCode

    Creates a PartExecutableCode with omitted optional fields absent.

    PartExecutableCode::not_equal

    automatically derived

    PartExecutableCode::to_json

    Encodes this value as JSON.

    PartExecutableCode::to_repr

    automatically derived

    PartExecutableCodeMediaProcessing

    pub(all) enum PartExecutableCodeMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartExecutableCodeMediaProcessing::equal

    automatically derived

    PartExecutableCodeMediaProcessing::not_equal

    automatically derived

    PartExecutableCodeMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartExecutableCodeMediaProcessing::to_repr

    automatically derived

    PartFileData

    pub(all) struct PartFileData {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    file_data : FileData
    part_metadata : Map[String,
    Json
    ]?
    media_processing : PartFileDataMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartFileData.

    PartFileData::equal

    automatically derived

    PartFileData::new

    fn PartFileData::new(file_data~ : FileData, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartFileDataMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartFileData

    Creates a PartFileData with omitted optional fields absent.

    PartFileData::not_equal

    fn PartFileData::not_equal(x : PartFileData, y : PartFileData) -> Bool
    automatically derived

    PartFileData::to_json

    Encodes this value as JSON.

    PartFileData::to_repr

    automatically derived

    PartFileDataMediaProcessing

    pub(all) enum PartFileDataMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartFileDataMediaProcessing::equal

    automatically derived

    PartFileDataMediaProcessing::not_equal

    automatically derived

    PartFileDataMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartFileDataMediaProcessing::to_repr

    automatically derived

    PartFunctionCall

    pub(all) struct PartFunctionCall {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    media_processing : PartFunctionCallMediaProcessing?
    function_call : FunctionCall
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartFunctionCall.

    PartFunctionCall::equal

    automatically derived

    PartFunctionCall::new

    fn PartFunctionCall::new(function_call~ : FunctionCall, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartFunctionCallMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartFunctionCall

    Creates a PartFunctionCall with omitted optional fields absent.

    PartFunctionCall::not_equal

    fn PartFunctionCall::not_equal(x : PartFunctionCall, y : PartFunctionCall) -> Bool
    automatically derived

    PartFunctionCall::to_json

    Encodes this value as JSON.

    PartFunctionCall::to_repr

    automatically derived

    PartFunctionCallMediaProcessing

    pub(all) enum PartFunctionCallMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartFunctionCallMediaProcessing::equal

    automatically derived

    PartFunctionCallMediaProcessing::not_equal

    automatically derived

    PartFunctionCallMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartFunctionCallMediaProcessing::to_repr

    automatically derived

    PartFunctionResponse

    pub(all) struct PartFunctionResponse {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    function_response : FunctionResponse
    media_processing : PartFunctionResponseMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartFunctionResponse.

    PartFunctionResponse::equal

    automatically derived

    PartFunctionResponse::new

    fn PartFunctionResponse::new(function_response~ : FunctionResponse, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartFunctionResponseMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartFunctionResponse

    Creates a PartFunctionResponse with omitted optional fields absent.

    PartFunctionResponse::not_equal

    automatically derived

    PartFunctionResponse::to_json

    Encodes this value as JSON.

    PartFunctionResponse::to_repr

    automatically derived

    PartFunctionResponseMediaProcessing

    pub(all) enum PartFunctionResponseMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartFunctionResponseMediaProcessing::equal

    automatically derived

    PartFunctionResponseMediaProcessing::not_equal

    automatically derived

    PartFunctionResponseMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartFunctionResponseMediaProcessing::to_repr

    automatically derived

    PartInlineData

    pub(all) struct PartInlineData {
    inline_data : Blob
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    media_processing : PartInlineDataMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartInlineData.

    PartInlineData::equal

    automatically derived

    PartInlineData::new

    fn PartInlineData::new(inline_data~ : Blob, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartInlineDataMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartInlineData

    Creates a PartInlineData with omitted optional fields absent.

    PartInlineData::not_equal

    fn PartInlineData::not_equal(x : PartInlineData, y : PartInlineData) -> Bool
    automatically derived

    PartInlineData::to_json

    Encodes this value as JSON.

    PartInlineData::to_repr

    automatically derived

    PartInlineDataMediaProcessing

    pub(all) enum PartInlineDataMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartInlineDataMediaProcessing::equal

    automatically derived

    PartInlineDataMediaProcessing::not_equal

    automatically derived

    PartInlineDataMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartInlineDataMediaProcessing::to_repr

    automatically derived

    PartText

    pub(all) struct PartText {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    text : String
    media_processing : PartTextMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartText.

    PartText::equal

    fn PartText::equal(PartText, PartText) -> Bool
    automatically derived

    PartText::new

    fn PartText::new(text~ : String, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartTextMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartText

    Creates a PartText with omitted optional fields absent.

    PartText::not_equal

    fn PartText::not_equal(x : PartText, y : PartText) -> Bool
    automatically derived

    PartText::to_json

    Encodes this value as JSON.

    PartText::to_repr

    automatically derived

    PartTextMediaProcessing

    pub(all) enum PartTextMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartTextMediaProcessing::equal

    automatically derived

    PartTextMediaProcessing::not_equal

    automatically derived

    PartTextMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartTextMediaProcessing::to_repr

    automatically derived

    PartToolCall

    pub(all) struct PartToolCall {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    tool_call : ToolCall
    media_processing : PartToolCallMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartToolCall.

    PartToolCall::equal

    automatically derived

    PartToolCall::new

    fn PartToolCall::new(tool_call~ : ToolCall, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartToolCallMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartToolCall

    Creates a PartToolCall with omitted optional fields absent.

    PartToolCall::not_equal

    fn PartToolCall::not_equal(x : PartToolCall, y : PartToolCall) -> Bool
    automatically derived

    PartToolCall::to_json

    Encodes this value as JSON.

    PartToolCall::to_repr

    automatically derived

    PartToolCallMediaProcessing

    pub(all) enum PartToolCallMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartToolCallMediaProcessing::equal

    automatically derived

    PartToolCallMediaProcessing::not_equal

    automatically derived

    PartToolCallMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartToolCallMediaProcessing::to_repr

    automatically derived

    PartToolResponse

    pub(all) struct PartToolResponse {
    speech_metadata : SpeechMetadata?
    thought : Bool?
    thought_signature : String?
    part_metadata : Map[String,
    Json
    ]?
    media_processing : PartToolResponseMediaProcessing?
    video_metadata : VideoMetadata?
    audio_transcription : AudioTranscription?
    tool_response : ToolResponse
    media_resolution : V1mainMediaResolution?
    } derive(Eq,
    Debug
    )

    Generated representation of PartToolResponse.

    PartToolResponse::equal

    automatically derived

    PartToolResponse::new

    fn PartToolResponse::new(tool_response~ : ToolResponse, speech_metadata? : SpeechMetadata, thought? : Bool, thought_signature? : String, part_metadata? : Map[String,
    Json
    ], media_processing? : PartToolResponseMediaProcessing, video_metadata? : VideoMetadata, audio_transcription? : AudioTranscription, media_resolution? : V1mainMediaResolution) -> PartToolResponse

    Creates a PartToolResponse with omitted optional fields absent.

    PartToolResponse::not_equal

    fn PartToolResponse::not_equal(x : PartToolResponse, y : PartToolResponse) -> Bool
    automatically derived

    PartToolResponse::to_json

    Encodes this value as JSON.

    PartToolResponse::to_repr

    automatically derived

    PartToolResponseMediaProcessing

    pub(all) enum PartToolResponseMediaProcessing {
    MEDIAPROCESSINGUNSPECIFIED
    STATIC
    AGENTIC
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. How the model processes this part's media for understanding. Only meaningful for video parts (inline_data or file_data with video mime). Non-video parts ignore this field.

    PartToolResponseMediaProcessing::equal

    automatically derived

    PartToolResponseMediaProcessing::not_equal

    automatically derived

    PartToolResponseMediaProcessing::to_json

    Encodes this string enum as JSON.

    PartToolResponseMediaProcessing::to_repr

    automatically derived

    PlaceAnswerSources

    pub(all) struct PlaceAnswerSources {
    review_snippets : Array[ReviewSnippet]?
    } derive(Eq,
    Debug
    )

    Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: "does Bar Foo have Wifi" or "is Foo Bar wheelchair accessible?"). Currently we only support review snippets as sources.

    PlaceAnswerSources::equal

    automatically derived

    PlaceAnswerSources::new

    Creates a PlaceAnswerSources with omitted optional fields absent.

    PlaceAnswerSources::not_equal

    automatically derived

    PlaceAnswerSources::to_json

    Encodes this value as JSON.

    PlaceAnswerSources::to_repr

    automatically derived

    PrebuiltVoiceConfig

    pub(all) struct PrebuiltVoiceConfig {
    voice_name : String?
    } derive(Eq,
    Debug
    )

    The configuration for the prebuilt speaker to use.

    PrebuiltVoiceConfig::equal

    automatically derived

    PrebuiltVoiceConfig::new

    fn PrebuiltVoiceConfig::new(voice_name? : String) -> PrebuiltVoiceConfig

    Creates a PrebuiltVoiceConfig with omitted optional fields absent.

    PrebuiltVoiceConfig::not_equal

    automatically derived

    PrebuiltVoiceConfig::to_json

    Encodes this value as JSON.

    PrebuiltVoiceConfig::to_repr

    automatically derived

    PromptFeedback

    pub(all) struct PromptFeedback {
    safety_ratings : Array[SafetyRating]?
    block_reason : PromptFeedbackBlockReason?
    } derive(Eq,
    Debug
    )

    A set of the feedback metadata the prompt specified in GenerateContentRequest.content.

    PromptFeedback::equal

    automatically derived

    PromptFeedback::new

    fn PromptFeedback::new(safety_ratings? : Array[SafetyRating], block_reason? : PromptFeedbackBlockReason) -> PromptFeedback

    Creates a PromptFeedback with omitted optional fields absent.

    PromptFeedback::not_equal

    fn PromptFeedback::not_equal(x : PromptFeedback, y : PromptFeedback) -> Bool
    automatically derived

    PromptFeedback::to_json

    Encodes this value as JSON.

    PromptFeedback::to_repr

    automatically derived

    PromptFeedbackBlockReason

    pub(all) enum PromptFeedbackBlockReason {
    BLOCKREASONUNSPECIFIED
    SAFETY
    OTHER
    BLOCKLIST
    PROHIBITEDCONTENT
    IMAGESAFETY
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt. Enum values: BLOCK_REASON_UNSPECIFIED: Default value. This value is unused.; SAFETY: Prompt was blocked due to safety reasons. Inspect safety_ratings to understand which safety category blocked it.; OTHER: Prompt was blocked due to unknown reasons.; BLOCKLIST: Prompt was blocked due to the terms which are included from the terminology blocklist.; PROHIBITED_CONTENT: Prompt was blocked due to prohibited content.; IMAGE_SAFETY: Candidates blocked due to unsafe image generation content.

    PromptFeedbackBlockReason::equal

    automatically derived

    PromptFeedbackBlockReason::not_equal

    automatically derived

    PromptFeedbackBlockReason::to_json

    Encodes this string enum as JSON.

    PromptFeedbackBlockReason::to_repr

    automatically derived

    ResponseFormatConfig

    pub(all) struct ResponseFormatConfig {
    image : ImageResponseFormat?
    text : TextResponseFormat?
    audio : AudioResponseFormat?
    } derive(Eq,
    Debug
    )

    Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.

    ResponseFormatConfig::equal

    automatically derived

    ResponseFormatConfig::new

    Creates a ResponseFormatConfig with omitted optional fields absent.

    ResponseFormatConfig::not_equal

    automatically derived

    ResponseFormatConfig::to_json

    Encodes this value as JSON.

    ResponseFormatConfig::to_repr

    automatically derived

    RetrievalConfig

    pub(all) struct RetrievalConfig {
    lat_lng : LatLng?
    language_code : String?
    } derive(Eq,
    Debug
    )

    Retrieval config.

    RetrievalConfig::equal

    automatically derived

    RetrievalConfig::new

    fn RetrievalConfig::new(lat_lng? : LatLng, language_code? : String) -> RetrievalConfig

    Creates a RetrievalConfig with omitted optional fields absent.

    RetrievalConfig::not_equal

    fn RetrievalConfig::not_equal(x : RetrievalConfig, y : RetrievalConfig) -> Bool
    automatically derived

    RetrievalConfig::to_json

    Encodes this value as JSON.

    RetrievalConfig::to_repr

    automatically derived

    RetrievalMetadata

    pub(all) struct RetrievalMetadata {
    google_search_dynamic_retrieval_score : Double?
    } derive(Eq,
    Debug
    )

    Metadata related to retrieval in the grounding flow.

    RetrievalMetadata::equal

    automatically derived

    RetrievalMetadata::new

    fn RetrievalMetadata::new(google_search_dynamic_retrieval_score? : Double) -> RetrievalMetadata

    Creates a RetrievalMetadata with omitted optional fields absent.

    RetrievalMetadata::not_equal

    fn RetrievalMetadata::not_equal(x : RetrievalMetadata, y : RetrievalMetadata) -> Bool
    automatically derived

    RetrievalMetadata::to_json

    Encodes this value as JSON.

    RetrievalMetadata::to_repr

    automatically derived

    RetrievedContext

    pub(all) struct RetrievedContext {
    file_search_store : String?
    page_number : Int?
    uri : String?
    media_id : String?
    custom_metadata : Array[GroundingChunkCustomMetadata]?
    text : String?
    title : String?
    } derive(Eq,
    Debug
    )

    Chunk from context retrieved by the file search tool.

    RetrievedContext::equal

    automatically derived

    RetrievedContext::new

    fn RetrievedContext::new(file_search_store? : String, page_number? : Int, uri? : String, media_id? : String, custom_metadata? : Array[GroundingChunkCustomMetadata], text? : String, title? : String) -> RetrievedContext

    Creates a RetrievedContext with omitted optional fields absent.

    RetrievedContext::not_equal

    fn RetrievedContext::not_equal(x : RetrievedContext, y : RetrievedContext) -> Bool
    automatically derived

    RetrievedContext::to_json

    Encodes this value as JSON.

    RetrievedContext::to_repr

    automatically derived

    ReviewSnippet

    pub(all) struct ReviewSnippet {
    google_maps_uri : String?
    title : String?
    review_id : String?
    } derive(Eq,
    Debug
    )

    Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

    ReviewSnippet::equal

    automatically derived

    ReviewSnippet::new

    fn ReviewSnippet::new(google_maps_uri? : String, title? : String, review_id? : String) -> ReviewSnippet

    Creates a ReviewSnippet with omitted optional fields absent.

    ReviewSnippet::not_equal

    fn ReviewSnippet::not_equal(x : ReviewSnippet, y : ReviewSnippet) -> Bool
    automatically derived

    ReviewSnippet::to_json

    Encodes this value as JSON.

    ReviewSnippet::to_repr

    automatically derived

    SafetyRating

    pub(all) struct SafetyRating {
    blocked : Bool?
    probability : SafetyRatingProbability?
    category : SafetyRatingCategory?
    } derive(Eq,
    Debug
    )

    Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

    SafetyRating::equal

    automatically derived

    SafetyRating::new

    fn SafetyRating::new(blocked? : Bool, probability? : SafetyRatingProbability, category? : SafetyRatingCategory) -> SafetyRating

    Creates a SafetyRating with omitted optional fields absent.

    SafetyRating::not_equal

    fn SafetyRating::not_equal(x : SafetyRating, y : SafetyRating) -> Bool
    automatically derived

    SafetyRating::to_json

    Encodes this value as JSON.

    SafetyRating::to_repr

    automatically derived

    SafetyRatingCategory

    pub(all) enum SafetyRatingCategory {
    HARMCATEGORYUNSPECIFIED
    HARMCATEGORYDEROGATORY
    HARMCATEGORYTOXICITY
    HARMCATEGORYVIOLENCE
    HARMCATEGORYSEXUAL
    HARMCATEGORYMEDICAL
    HARMCATEGORYDANGEROUS
    HARMCATEGORYHARASSMENT
    HARMCATEGORYHATESPEECH
    HARMCATEGORYSEXUALLYEXPLICIT
    HARMCATEGORYDANGEROUSCONTENT
    HARMCATEGORYCIVICINTEGRITY
    HARMCATEGORYJAILBREAK
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. The category for this rating. Enum values: HARM_CATEGORY_UNSPECIFIED: Category is unspecified.; HARM_CATEGORY_DEROGATORY: PaLM - Negative or harmful comments targeting identity and/or protected attribute. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_TOXICITY: PaLM - Content that is rude, disrespectful, or profane. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_VIOLENCE: PaLM - Describes scenarios depicting violence against an individual or group, or general descriptions of gore. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_SEXUAL: PaLM - Contains references to sexual acts or other lewd content. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_MEDICAL: PaLM - Promotes unchecked medical advice. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_DANGEROUS: PaLM - Dangerous content that promotes, facilitates, or encourages harmful acts. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_HARASSMENT: Gemini - Harassment content.; HARM_CATEGORY_HATE_SPEECH: Gemini - Hate speech and content.; HARM_CATEGORY_SEXUALLY_EXPLICIT: Gemini - Sexually explicit content.; HARM_CATEGORY_DANGEROUS_CONTENT: Gemini - Dangerous content.; HARM_CATEGORY_CIVIC_INTEGRITY: Gemini - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead.; HARM_CATEGORY_JAILBREAK: Gemini - Prompts attempting to bypass or subvert the model's safety guidelines (jailbreak attempts).

    SafetyRatingCategory::equal

    automatically derived

    SafetyRatingCategory::not_equal

    automatically derived

    SafetyRatingCategory::to_json

    Encodes this string enum as JSON.

    SafetyRatingCategory::to_repr

    automatically derived

    SafetyRatingProbability

    pub(all) enum SafetyRatingProbability {
    HARMPROBABILITYUNSPECIFIED
    NEGLIGIBLE
    LOW
    MEDIUM
    HIGH
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. The probability of harm for this content. Enum values: HARM_PROBABILITY_UNSPECIFIED: Probability is unspecified.; NEGLIGIBLE: Content has a negligible chance of being unsafe.; LOW: Content has a low chance of being unsafe.; MEDIUM: Content has a medium chance of being unsafe.; HIGH: Content has a high chance of being unsafe.

    SafetyRatingProbability::equal

    automatically derived

    SafetyRatingProbability::not_equal

    automatically derived

    SafetyRatingProbability::to_json

    Encodes this string enum as JSON.

    SafetyRatingProbability::to_repr

    automatically derived

    SafetySetting

    pub(all) struct SafetySetting {
    threshold : SafetySettingThreshold?
    category : SafetySettingCategory?
    } derive(Eq,
    Debug
    )

    Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.

    SafetySetting::equal

    automatically derived

    SafetySetting::new

    Creates a SafetySetting with omitted optional fields absent.

    SafetySetting::not_equal

    fn SafetySetting::not_equal(x : SafetySetting, y : SafetySetting) -> Bool
    automatically derived

    SafetySetting::to_json

    Encodes this value as JSON.

    SafetySetting::to_repr

    automatically derived

    SafetySettingCategory

    pub(all) enum SafetySettingCategory {
    HARMCATEGORYUNSPECIFIED
    HARMCATEGORYDEROGATORY
    HARMCATEGORYTOXICITY
    HARMCATEGORYVIOLENCE
    HARMCATEGORYSEXUAL
    HARMCATEGORYMEDICAL
    HARMCATEGORYDANGEROUS
    HARMCATEGORYHARASSMENT
    HARMCATEGORYHATESPEECH
    HARMCATEGORYSEXUALLYEXPLICIT
    HARMCATEGORYDANGEROUSCONTENT
    HARMCATEGORYCIVICINTEGRITY
    HARMCATEGORYJAILBREAK
    Custom(String)
    } derive(Eq,
    Debug
    )

    Required. The category for this setting. Enum values: HARM_CATEGORY_UNSPECIFIED: Category is unspecified.; HARM_CATEGORY_DEROGATORY: PaLM - Negative or harmful comments targeting identity and/or protected attribute. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_TOXICITY: PaLM - Content that is rude, disrespectful, or profane. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_VIOLENCE: PaLM - Describes scenarios depicting violence against an individual or group, or general descriptions of gore. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_SEXUAL: PaLM - Contains references to sexual acts or other lewd content. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_MEDICAL: PaLM - Promotes unchecked medical advice. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_DANGEROUS: PaLM - Dangerous content that promotes, facilitates, or encourages harmful acts. DEPRECATED: PaLM-only category, not supported by Gemini models.; HARM_CATEGORY_HARASSMENT: Gemini - Harassment content.; HARM_CATEGORY_HATE_SPEECH: Gemini - Hate speech and content.; HARM_CATEGORY_SEXUALLY_EXPLICIT: Gemini - Sexually explicit content.; HARM_CATEGORY_DANGEROUS_CONTENT: Gemini - Dangerous content.; HARM_CATEGORY_CIVIC_INTEGRITY: Gemini - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead.; HARM_CATEGORY_JAILBREAK: Gemini - Prompts attempting to bypass or subvert the model's safety guidelines (jailbreak attempts).

    SafetySettingCategory::equal

    automatically derived

    SafetySettingCategory::not_equal

    automatically derived

    SafetySettingCategory::to_json

    Encodes this string enum as JSON.

    SafetySettingCategory::to_repr

    automatically derived

    SafetySettingThreshold

    pub(all) enum SafetySettingThreshold {
    HARMBLOCKTHRESHOLDUNSPECIFIED
    BLOCKLOWANDABOVE
    BLOCKMEDIUMANDABOVE
    BLOCKONLYHIGH
    BLOCKNONE
    OFF
    Custom(String)
    } derive(Eq,
    Debug
    )

    Required. Controls the probability threshold at which harm is blocked. Enum values: HARM_BLOCK_THRESHOLD_UNSPECIFIED: Threshold is unspecified.; BLOCK_LOW_AND_ABOVE: Content with NEGLIGIBLE will be allowed.; BLOCK_MEDIUM_AND_ABOVE: Content with NEGLIGIBLE and LOW will be allowed.; BLOCK_ONLY_HIGH: Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.; BLOCK_NONE: All content will be allowed.; OFF: Turn off the safety filter.

    SafetySettingThreshold::equal

    automatically derived

    SafetySettingThreshold::not_equal

    automatically derived

    SafetySettingThreshold::to_json

    Encodes this string enum as JSON.

    SafetySettingThreshold::to_repr

    automatically derived

    Schema

    pub(all) struct Schema {
    max_items : Int64?
    maximum : Double?
    title : String?
    default :
    Json
    ?
    min_items : Int64?
    enum_ : Array[String]?
    max_length : Int64?
    max_properties : Int64?
    required : Array[String]?
    pattern : String?
    min_properties : Int64?
    description : String?
    min_length : Int64?
    properties : Map[String, Schema]?
    type_ : SchemaType?
    nullable : Bool?
    minimum : Double?
    any_of : Array[Schema]?
    items : Schema?
    format : String?
    property_ordering : Array[String]?
    example :
    Json
    ?
    } derive(Eq,
    Debug
    )

    The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.

    Schema::equal

    fn Schema::equal(Schema, Schema) -> Bool
    automatically derived

    Schema::new

    fn Schema::new(max_items? : Int64, maximum? : Double, title? : String, default? :
    Json
    , min_items? : Int64, enum_? : Array[String], max_length? : Int64, max_properties? : Int64, required? : Array[String], pattern? : String, min_properties? : Int64, description? : String, min_length? : Int64, properties? : Map[String, Schema], type_? : SchemaType, nullable? : Bool, minimum? : Double, any_of? : Array[Schema], items? : Schema, format? : String, property_ordering? : Array[String], example? :
    Json
    ) -> Schema

    Creates a Schema with omitted optional fields absent.

    Schema::not_equal

    fn Schema::not_equal(x : Schema, y : Schema) -> Bool
    automatically derived

    Schema::to_json

    Encodes this value as JSON.

    Schema::to_repr

    automatically derived

    SchemaType

    pub(all) enum SchemaType {
    TYPEUNSPECIFIED
    STRING
    NUMBER
    INTEGER
    BOOLEAN
    ARRAY
    OBJECT
    NULL
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. Data type. Enum values: TYPE_UNSPECIFIED: Not specified, should not be used.; STRING: String type.; NUMBER: Number type.; INTEGER: Integer type.; BOOLEAN: Boolean type.; ARRAY: Array type.; OBJECT: Object type.; NULL: Null type.

    SchemaType::equal

    fn SchemaType::equal(SchemaType, SchemaType) -> Bool
    automatically derived

    SchemaType::not_equal

    fn SchemaType::not_equal(x : SchemaType, y : SchemaType) -> Bool
    automatically derived

    SchemaType::to_json

    Encodes this string enum as JSON.

    SchemaType::to_repr

    automatically derived

    SearchEntryPoint

    pub(all) struct SearchEntryPoint {
    rendered_content : String?
    sdk_blob : String?
    } derive(Eq,
    Debug
    )

    Google search entry point.

    SearchEntryPoint::equal

    automatically derived

    SearchEntryPoint::new

    fn SearchEntryPoint::new(rendered_content? : String, sdk_blob? : String) -> SearchEntryPoint

    Creates a SearchEntryPoint with omitted optional fields absent.

    SearchEntryPoint::not_equal

    fn SearchEntryPoint::not_equal(x : SearchEntryPoint, y : SearchEntryPoint) -> Bool
    automatically derived

    SearchEntryPoint::to_json

    Encodes this value as JSON.

    SearchEntryPoint::to_repr

    automatically derived

    SearchTypes

    pub(all) struct SearchTypes {
    image_search :
    Json
    ?
    web_search :
    Json
    ?
    } derive(Eq,
    Debug
    )

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

    SearchTypes::equal

    fn SearchTypes::equal(SearchTypes, SearchTypes) -> Bool
    automatically derived

    SearchTypes::new

    Creates a SearchTypes with omitted optional fields absent.

    SearchTypes::not_equal

    fn SearchTypes::not_equal(x : SearchTypes, y : SearchTypes) -> Bool
    automatically derived

    SearchTypes::to_json

    Encodes this value as JSON.

    SearchTypes::to_repr

    automatically derived

    SemanticRetrieverChunk

    pub(all) struct SemanticRetrieverChunk {
    chunk : String?
    source : String?
    } derive(Eq,
    Debug
    )

    Identifier for a Chunk retrieved via Semantic Retriever specified in the GenerateAnswerRequest using SemanticRetrieverConfig.

    SemanticRetrieverChunk::equal

    automatically derived

    SemanticRetrieverChunk::new

    fn SemanticRetrieverChunk::new(chunk? : String, source? : String) -> SemanticRetrieverChunk

    Creates a SemanticRetrieverChunk with omitted optional fields absent.

    SemanticRetrieverChunk::not_equal

    automatically derived

    SemanticRetrieverChunk::to_json

    Encodes this value as JSON.

    SemanticRetrieverChunk::to_repr

    automatically derived

    SpeakerVoiceConfig

    pub(all) struct SpeakerVoiceConfig {
    speaker : String?
    voice_config : VoiceConfig?
    } derive(Eq,
    Debug
    )

    The configuration for a single speaker in a multi speaker setup.

    SpeakerVoiceConfig::equal

    automatically derived

    SpeakerVoiceConfig::new

    fn SpeakerVoiceConfig::new(speaker? : String, voice_config? : VoiceConfig) -> SpeakerVoiceConfig

    Creates a SpeakerVoiceConfig with omitted optional fields absent.

    SpeakerVoiceConfig::not_equal

    automatically derived

    SpeakerVoiceConfig::to_json

    Encodes this value as JSON.

    SpeakerVoiceConfig::to_repr

    automatically derived

    SpeechConfig

    pub(all) struct SpeechConfig {
    language_code : String?
    voice_config : VoiceConfig?
    text_normalization : SpeechConfigTextNormalization?
    multi_speaker_voice_config : MultiSpeakerVoiceConfig?
    } derive(Eq,
    Debug
    )

    Config for speech generation and transcription.

    SpeechConfig::equal

    automatically derived

    SpeechConfig::new

    fn SpeechConfig::new(language_code? : String, voice_config? : VoiceConfig, text_normalization? : SpeechConfigTextNormalization, multi_speaker_voice_config? : MultiSpeakerVoiceConfig) -> SpeechConfig

    Creates a SpeechConfig with omitted optional fields absent.

    SpeechConfig::not_equal

    fn SpeechConfig::not_equal(x : SpeechConfig, y : SpeechConfig) -> Bool
    automatically derived

    SpeechConfig::to_json

    Encodes this value as JSON.

    SpeechConfig::to_repr

    automatically derived

    SpeechConfigTextNormalization

    pub(all) enum SpeechConfigTextNormalization {
    TEXTNORMALIZATIONUNSPECIFIED
    AUTO
    ENABLED
    DISABLED
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. Controls text normalization before speech synthesis. Enum values: TEXT_NORMALIZATION_UNSPECIFIED: Unspecified text normalization mode. Defaults to AUTO.; AUTO: Automatically determines whether to apply text normalization based on the model and speech mode.; ENABLED: Enables text normalization for numbers, currencies, dates, and units.; DISABLED: Disables text normalization for pre-normalized or phonetic inputs.

    SpeechConfigTextNormalization::equal

    automatically derived

    SpeechConfigTextNormalization::not_equal

    automatically derived

    SpeechConfigTextNormalization::to_json

    Encodes this string enum as JSON.

    SpeechConfigTextNormalization::to_repr

    automatically derived

    SpeechMetadata

    pub(all) struct SpeechMetadata {
    style : String?
    speaker : String?
    } derive(Eq,
    Debug
    )

    Speech metadata for text parts.

    SpeechMetadata::equal

    automatically derived

    SpeechMetadata::new

    fn SpeechMetadata::new(style? : String, speaker? : String) -> SpeechMetadata

    Creates a SpeechMetadata with omitted optional fields absent.

    SpeechMetadata::not_equal

    fn SpeechMetadata::not_equal(x : SpeechMetadata, y : SpeechMetadata) -> Bool
    automatically derived

    SpeechMetadata::to_json

    Encodes this value as JSON.

    SpeechMetadata::to_repr

    automatically derived

    SpreadsheetMetadata

    pub(all) struct SpreadsheetMetadata {
    visible_cells : String?
    content_layers : Array[SpreadsheetMetadataContentLayersItem]?
    sheet_index : Int?
    } derive(Eq,
    Debug
    )

    Metadata describes the input spreadsheet content. Set this in Part.spreadsheet_metadata or FunctionResponsePart.spreadsheet_metadata when inline_data or file_data contains a spreadsheet to configure static spreadsheet preprocessing.

    SpreadsheetMetadata::equal

    automatically derived

    SpreadsheetMetadata::new

    fn SpreadsheetMetadata::new(visible_cells? : String, content_layers? : Array[SpreadsheetMetadataContentLayersItem], sheet_index? : Int) -> SpreadsheetMetadata

    Creates a SpreadsheetMetadata with omitted optional fields absent.

    SpreadsheetMetadata::not_equal

    automatically derived

    SpreadsheetMetadata::to_json

    Encodes this value as JSON.

    SpreadsheetMetadata::to_repr

    automatically derived

    SpreadsheetMetadataContentLayersItem

    pub(all) enum SpreadsheetMetadataContentLayersItem {
    CONTENTLAYERUNSPECIFIED
    DATA
    FORMULAS
    VISUAL
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Enum values: CONTENT_LAYER_UNSPECIFIED: Default value.; DATA: Cell values, merges, and formats.; FORMULAS: Formula expressions and their computed results.; VISUAL: A rendered image of the sheet.

    SpreadsheetMetadataContentLayersItem::equal

    automatically derived

    SpreadsheetMetadataContentLayersItem::not_equal

    automatically derived

    SpreadsheetMetadataContentLayersItem::to_json

    Encodes this string enum as JSON.

    SpreadsheetMetadataContentLayersItem::to_repr

    automatically derived

    Status

    pub(all) struct Status {
    message : String?
    details : Array[Map[String,
    Json
    ]]?
    code : Int?
    } derive(Eq,
    Debug
    )

    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.

    Status::equal

    fn Status::equal(Status, Status) -> Bool
    automatically derived

    Status::new

    fn Status::new(message? : String, details? : Array[Map[String,
    Json
    ]], code? : Int) -> Status

    Creates a Status with omitted optional fields absent.

    Status::not_equal

    fn Status::not_equal(x : Status, y : Status) -> Bool
    automatically derived

    Status::to_json

    Encodes this value as JSON.

    Status::to_repr

    automatically derived

    StreamableHttpTransport

    pub(all) struct StreamableHttpTransport {
    headers : Map[String, String]?
    url : String?
    terminate_on_close : Bool?
    sse_read_timeout : String?
    timeout : String?
    } derive(Eq,
    Debug
    )

    A transport that can stream HTTP requests and responses.

    StreamableHttpTransport::equal

    automatically derived

    StreamableHttpTransport::new

    fn StreamableHttpTransport::new(headers? : Map[String, String], url? : String, terminate_on_close? : Bool, sse_read_timeout? : String, timeout? : String) -> StreamableHttpTransport

    Creates a StreamableHttpTransport with omitted optional fields absent.

    StreamableHttpTransport::not_equal

    automatically derived

    StreamableHttpTransport::to_json

    Encodes this value as JSON.

    StreamableHttpTransport::to_repr

    automatically derived

    TextResponseFormat

    pub(all) struct TextResponseFormat {
    mime_type : TextResponseFormatMimeType?
    schema :
    Json
    ?
    } derive(Eq,
    Debug
    )

    Configuration for text output format.

    TextResponseFormat::equal

    automatically derived

    TextResponseFormat::new

    Creates a TextResponseFormat with omitted optional fields absent.

    TextResponseFormat::not_equal

    automatically derived

    TextResponseFormat::to_json

    Encodes this value as JSON.

    TextResponseFormat::to_repr

    automatically derived

    TextResponseFormatMimeType

    pub(all) enum TextResponseFormatMimeType {
    MIMETYPEUNSPECIFIED
    APPLICATIONJSON
    TEXTPLAIN
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. The MIME type of the text output. Enum values: MIME_TYPE_UNSPECIFIED: Default value. This value is unused.; APPLICATION_JSON: JSON output format.; TEXT_PLAIN: Plain text output format.

    TextResponseFormatMimeType::equal

    automatically derived

    TextResponseFormatMimeType::not_equal

    automatically derived

    TextResponseFormatMimeType::to_json

    Encodes this string enum as JSON.

    TextResponseFormatMimeType::to_repr

    automatically derived

    ThinkingConfig

    pub(all) struct ThinkingConfig {
    thinking_budget : Int?
    thinking_level : ThinkingConfigThinkingLevel?
    include_thoughts : Bool?
    } derive(Eq,
    Debug
    )

    Config for thinking features.

    ThinkingConfig::equal

    automatically derived

    ThinkingConfig::new

    fn ThinkingConfig::new(thinking_budget? : Int, thinking_level? : ThinkingConfigThinkingLevel, include_thoughts? : Bool) -> ThinkingConfig

    Creates a ThinkingConfig with omitted optional fields absent.

    ThinkingConfig::not_equal

    fn ThinkingConfig::not_equal(x : ThinkingConfig, y : ThinkingConfig) -> Bool
    automatically derived

    ThinkingConfig::to_json

    Encodes this value as JSON.

    ThinkingConfig::to_repr

    automatically derived

    ThinkingConfigThinkingLevel

    pub(all) enum ThinkingConfigThinkingLevel {
    THINKINGLEVELUNSPECIFIED
    MINIMAL
    LOW
    MEDIUM
    HIGH
    XHIGH
    Custom(String)
    } derive(Eq,
    Debug
    )

    Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the Thinking levels guide for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error. Enum values: THINKING_LEVEL_UNSPECIFIED: Default value.; MINIMAL: Little to no thinking.; LOW: Low thinking level.; MEDIUM: Medium thinking level.; HIGH: High thinking level.; XHIGH: XHigh thinking level.

    ThinkingConfigThinkingLevel::equal

    automatically derived

    ThinkingConfigThinkingLevel::not_equal

    automatically derived

    ThinkingConfigThinkingLevel::to_json

    Encodes this string enum as JSON.

    ThinkingConfigThinkingLevel::to_repr

    automatically derived

    Tool

    pub(all) struct Tool {
    url_context :
    Json
    ?
    google_maps : GoogleMaps?
    mcp_servers : Array[McpServer]?
    google_search_retrieval : GoogleSearchRetrieval?
    file_search : FileSearch?
    google_search : GoogleSearch?
    computer_use : ComputerUse?
    code_execution :
    Json
    ?
    function_declarations : Array[FunctionDeclaration]?
    } derive(Eq,
    Debug
    )

    Tool details that the model may use to generate response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

    Tool::equal

    fn Tool::equal(Tool, Tool) -> Bool
    automatically derived

    Tool::new

    fn Tool::new(url_context? :
    Json
    , google_maps? : GoogleMaps, mcp_servers? : Array[McpServer], google_search_retrieval? : GoogleSearchRetrieval, file_search? : FileSearch, google_search? : GoogleSearch, computer_use? : ComputerUse, code_execution? :
    Json
    , function_declarations? : Array[FunctionDeclaration]) -> Tool

    Creates a Tool with omitted optional fields absent.

    Tool::not_equal

    fn Tool::not_equal(x : Tool, y : Tool) -> Bool
    automatically derived

    Tool::to_json

    Encodes this value as JSON.

    Tool::to_repr

    automatically derived

    ToolCall

    pub(all) struct ToolCall {
    tool_name : String?
    tool_type : ToolCallToolType?
    id : String?
    args : Map[String,
    Json
    ]?
    } derive(Eq,
    Debug
    )

    A predicted server-side ToolCall returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this ToolCall. Instead, the client should pass this ToolCall back to the API in a subsequent turn within a Content message, along with the corresponding ToolResponse.

    ToolCall::equal

    fn ToolCall::equal(ToolCall, ToolCall) -> Bool
    automatically derived

    ToolCall::new

    fn ToolCall::new(tool_name? : String, tool_type? : ToolCallToolType, id? : String, args? : Map[String,
    Json
    ]) -> ToolCall

    Creates a ToolCall with omitted optional fields absent.

    ToolCall::not_equal

    fn ToolCall::not_equal(x : ToolCall, y : ToolCall) -> Bool
    automatically derived

    ToolCall::to_json

    Encodes this value as JSON.

    ToolCall::to_repr

    automatically derived

    ToolCallToolType

    pub(all) enum ToolCallToolType {
    TOOLTYPEUNSPECIFIED
    GOOGLESEARCHWEB
    GOOGLESEARCHIMAGE
    URLCONTEXT
    GOOGLEMAPS
    FILESEARCH
    MEDIAPROCESSING
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. The type of tool that was called. Enum values: TOOL_TYPE_UNSPECIFIED: Unspecified tool type.; GOOGLE_SEARCH_WEB: Google search tool, maps to Tool.google_search.search_types.web_search.; GOOGLE_SEARCH_IMAGE: Image search tool, maps to Tool.google_search.search_types.image_search.; URL_CONTEXT: URL context tool, maps to Tool.url_context.; GOOGLE_MAPS: Google maps tool, maps to Tool.google_maps.; FILE_SEARCH: File search tool, maps to Tool.file_search.; MEDIA_PROCESSING: Media processing tool types (e.g. video, audio, etc.), maps to invisible tools used for multimodal understanding like GOOGLE_UNDERSTANDING_VIDEO.

    ToolCallToolType::equal

    automatically derived

    ToolCallToolType::not_equal

    fn ToolCallToolType::not_equal(x : ToolCallToolType, y : ToolCallToolType) -> Bool
    automatically derived

    ToolCallToolType::to_json

    Encodes this string enum as JSON.

    ToolCallToolType::to_repr

    automatically derived

    ToolConfig

    pub(all) struct ToolConfig {
    function_calling_config : FunctionCallingConfig?
    retrieval_config : RetrievalConfig?
    include_server_side_tool_invocations : Bool?
    } derive(Eq,
    Debug
    )

    The Tool configuration containing parameters for specifying Tool use in the request.

    ToolConfig::equal

    fn ToolConfig::equal(ToolConfig, ToolConfig) -> Bool
    automatically derived

    ToolConfig::new

    fn ToolConfig::new(function_calling_config? : FunctionCallingConfig, retrieval_config? : RetrievalConfig, include_server_side_tool_invocations? : Bool) -> ToolConfig

    Creates a ToolConfig with omitted optional fields absent.

    ToolConfig::not_equal

    fn ToolConfig::not_equal(x : ToolConfig, y : ToolConfig) -> Bool
    automatically derived

    ToolConfig::to_json

    Encodes this value as JSON.

    ToolConfig::to_repr

    automatically derived

    ToolResponse

    pub(all) struct ToolResponse {
    id : String?
    response : Map[String,
    Json
    ]?
    tool_type : ToolResponseToolType?
    } derive(Eq,
    Debug
    )

    The output from a server-side ToolCall execution. This message contains the results of a tool invocation that was initiated by a ToolCall from the model. The client should pass this ToolResponse back to the API in a subsequent turn within a Content message, along with the corresponding ToolCall.

    ToolResponse::equal

    automatically derived

    ToolResponse::new

    fn ToolResponse::new(id? : String, response? : Map[String,
    Json
    ], tool_type? : ToolResponseToolType) -> ToolResponse

    Creates a ToolResponse with omitted optional fields absent.

    ToolResponse::not_equal

    fn ToolResponse::not_equal(x : ToolResponse, y : ToolResponse) -> Bool
    automatically derived

    ToolResponse::to_json

    Encodes this value as JSON.

    ToolResponse::to_repr

    automatically derived

    ToolResponseToolType

    pub(all) enum ToolResponseToolType {
    TOOLTYPEUNSPECIFIED
    GOOGLESEARCHWEB
    GOOGLESEARCHIMAGE
    URLCONTEXT
    GOOGLEMAPS
    FILESEARCH
    MEDIAPROCESSING
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Required. The type of tool that was called, matching the tool_type in the corresponding ToolCall. Enum values: TOOL_TYPE_UNSPECIFIED: Unspecified tool type.; GOOGLE_SEARCH_WEB: Google search tool, maps to Tool.google_search.search_types.web_search.; GOOGLE_SEARCH_IMAGE: Image search tool, maps to Tool.google_search.search_types.image_search.; URL_CONTEXT: URL context tool, maps to Tool.url_context.; GOOGLE_MAPS: Google maps tool, maps to Tool.google_maps.; FILE_SEARCH: File search tool, maps to Tool.file_search.; MEDIA_PROCESSING: Media processing tool types (e.g. video, audio, etc.), maps to invisible tools used for multimodal understanding like GOOGLE_UNDERSTANDING_VIDEO.

    ToolResponseToolType::equal

    automatically derived

    ToolResponseToolType::not_equal

    automatically derived

    ToolResponseToolType::to_json

    Encodes this string enum as JSON.

    ToolResponseToolType::to_repr

    automatically derived

    TopCandidates

    pub(all) struct TopCandidates {
    candidates : Array[LogprobsResultCandidate]?
    } derive(Eq,
    Debug
    )

    Candidates with top log probabilities at each decoding step.

    TopCandidates::equal

    automatically derived

    TopCandidates::new

    Creates a TopCandidates with omitted optional fields absent.

    TopCandidates::not_equal

    fn TopCandidates::not_equal(x : TopCandidates, y : TopCandidates) -> Bool
    automatically derived

    TopCandidates::to_json

    Encodes this value as JSON.

    TopCandidates::to_repr

    automatically derived

    TranslationConfig

    pub(all) struct TranslationConfig {
    target_language_code : String?
    echo_target_language : Bool?
    } derive(Eq,
    Debug
    )

    Config for translation features.

    TranslationConfig::equal

    automatically derived

    TranslationConfig::new

    fn TranslationConfig::new(target_language_code? : String, echo_target_language? : Bool) -> TranslationConfig

    Creates a TranslationConfig with omitted optional fields absent.

    TranslationConfig::not_equal

    fn TranslationConfig::not_equal(x : TranslationConfig, y : TranslationConfig) -> Bool
    automatically derived

    TranslationConfig::to_json

    Encodes this value as JSON.

    TranslationConfig::to_repr

    automatically derived

    UrlContextMetadata

    pub(all) struct UrlContextMetadata {
    url_metadata : Array[UrlMetadata]?
    } derive(Eq,
    Debug
    )

    Metadata related to url context retrieval tool.

    UrlContextMetadata::equal

    automatically derived

    UrlContextMetadata::new

    Creates a UrlContextMetadata with omitted optional fields absent.

    UrlContextMetadata::not_equal

    automatically derived

    UrlContextMetadata::to_json

    Encodes this value as JSON.

    UrlContextMetadata::to_repr

    automatically derived

    UrlMetadata

    pub(all) struct UrlMetadata {
    retrieved_url : String?
    url_retrieval_status : UrlMetadataUrlRetrievalStatus?
    } derive(Eq,
    Debug
    )

    Context of the a single url retrieval.

    UrlMetadata::equal

    fn UrlMetadata::equal(UrlMetadata, UrlMetadata) -> Bool
    automatically derived

    UrlMetadata::new

    fn UrlMetadata::new(retrieved_url? : String, url_retrieval_status? : UrlMetadataUrlRetrievalStatus) -> UrlMetadata

    Creates a UrlMetadata with omitted optional fields absent.

    UrlMetadata::not_equal

    fn UrlMetadata::not_equal(x : UrlMetadata, y : UrlMetadata) -> Bool
    automatically derived

    UrlMetadata::to_json

    Encodes this value as JSON.

    UrlMetadata::to_repr

    automatically derived

    UrlMetadataUrlRetrievalStatus

    pub(all) enum UrlMetadataUrlRetrievalStatus {
    URLRETRIEVALSTATUSUNSPECIFIED
    URLRETRIEVALSTATUSSUCCESS
    URLRETRIEVALSTATUSERROR
    URLRETRIEVALSTATUSPAYWALL
    URLRETRIEVALSTATUSUNSAFE
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Status of the url retrieval. Enum values: URL_RETRIEVAL_STATUS_UNSPECIFIED: Default value. This value is unused.; URL_RETRIEVAL_STATUS_SUCCESS: Url retrieval is successful.; URL_RETRIEVAL_STATUS_ERROR: Url retrieval is failed due to error.; URL_RETRIEVAL_STATUS_PAYWALL: Url retrieval is failed because the content is behind paywall.; URL_RETRIEVAL_STATUS_UNSAFE: Url retrieval is failed because the content is unsafe.

    UrlMetadataUrlRetrievalStatus::equal

    automatically derived

    UrlMetadataUrlRetrievalStatus::not_equal

    automatically derived

    UrlMetadataUrlRetrievalStatus::to_json

    Encodes this string enum as JSON.

    UrlMetadataUrlRetrievalStatus::to_repr

    automatically derived

    UsageMetadata

    pub(all) struct UsageMetadata {
    candidates_tokens_details : Array[ModalityTokenCount]?
    thoughts_token_count : Int?
    total_token_count : Int?
    tool_use_prompt_token_count : Int?
    prompt_tokens_details : Array[ModalityTokenCount]?
    tool_use_prompt_tokens_details : Array[ModalityTokenCount]?
    prompt_token_count : Int?
    candidates_token_count : Int?
    cached_content_token_count : Int?
    cache_tokens_details : Array[ModalityTokenCount]?
    service_tier : UsageMetadataServiceTier?
    } derive(Eq,
    Debug
    )

    Metadata on the generation request's token usage.

    UsageMetadata::equal

    automatically derived

    UsageMetadata::new

    fn UsageMetadata::new(candidates_tokens_details? : Array[ModalityTokenCount], thoughts_token_count? : Int, total_token_count? : Int, tool_use_prompt_token_count? : Int, prompt_tokens_details? : Array[ModalityTokenCount], tool_use_prompt_tokens_details? : Array[ModalityTokenCount], prompt_token_count? : Int, candidates_token_count? : Int, cached_content_token_count? : Int, cache_tokens_details? : Array[ModalityTokenCount], service_tier? : UsageMetadataServiceTier) -> UsageMetadata

    Creates a UsageMetadata with omitted optional fields absent.

    UsageMetadata::not_equal

    fn UsageMetadata::not_equal(x : UsageMetadata, y : UsageMetadata) -> Bool
    automatically derived

    UsageMetadata::to_json

    Encodes this value as JSON.

    UsageMetadata::to_repr

    automatically derived

    UsageMetadataServiceTier

    pub(all) enum UsageMetadataServiceTier {
    Unspecified
    Standard
    Flex
    Priority
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Output only. Service tier of the request. Enum values: unspecified: Default service tier, which is standard.; standard: Standard service tier.; flex: Flex service tier.; priority: Priority service tier.

    UsageMetadataServiceTier::equal

    automatically derived

    UsageMetadataServiceTier::not_equal

    automatically derived

    UsageMetadataServiceTier::to_json

    Encodes this string enum as JSON.

    UsageMetadataServiceTier::to_repr

    automatically derived

    V1mainMediaResolution

    pub(all) struct V1mainMediaResolution {
    level : V1mainMediaResolutionLevel?
    } derive(Eq,
    Debug
    )

    Media resolution for tokenization.

    V1mainMediaResolution::equal

    automatically derived

    V1mainMediaResolution::new

    Creates a V1mainMediaResolution with omitted optional fields absent.

    V1mainMediaResolution::not_equal

    automatically derived

    V1mainMediaResolution::to_json

    Encodes this value as JSON.

    V1mainMediaResolution::to_repr

    automatically derived

    V1mainMediaResolutionLevel

    pub(all) enum V1mainMediaResolutionLevel {
    MEDIARESOLUTIONUNSPECIFIED
    MEDIARESOLUTIONLOW
    MEDIARESOLUTIONMEDIUM
    MEDIARESOLUTIONHIGH
    MEDIARESOLUTIONULTRAHIGH
    Unknown(String)
    } derive(Eq,
    Debug
    )

    The tokenization quality used for given media. for Gemini API support . Enum values: MEDIA_RESOLUTION_UNSPECIFIED: Media resolution has not been set.; MEDIA_RESOLUTION_LOW: Media resolution set to low.; MEDIA_RESOLUTION_MEDIUM: Media resolution set to medium.; MEDIA_RESOLUTION_HIGH: Media resolution set to high.; MEDIA_RESOLUTION_ULTRA_HIGH: Media resolution set to ultra high.

    V1mainMediaResolutionLevel::equal

    automatically derived

    V1mainMediaResolutionLevel::not_equal

    automatically derived

    V1mainMediaResolutionLevel::to_json

    Encodes this string enum as JSON.

    V1mainMediaResolutionLevel::to_repr

    automatically derived

    VideoFileMetadata

    pub(all) struct VideoFileMetadata {
    video_duration : String?
    } derive(Eq,
    Debug
    )

    Metadata for a video File.

    VideoFileMetadata::equal

    automatically derived

    VideoFileMetadata::new

    fn VideoFileMetadata::new(video_duration? : String) -> VideoFileMetadata

    Creates a VideoFileMetadata with omitted optional fields absent.

    VideoFileMetadata::not_equal

    fn VideoFileMetadata::not_equal(x : VideoFileMetadata, y : VideoFileMetadata) -> Bool
    automatically derived

    VideoFileMetadata::to_json

    Encodes this value as JSON.

    VideoFileMetadata::to_repr

    automatically derived

    VideoMetadata

    pub(all) struct VideoMetadata {
    content_layers : Array[VideoMetadataContentLayersItem]?
    end_offset : String?
    start_offset : String?
    fps : Double?
    } derive(Eq,
    Debug
    )

    Metadata describes the input video content. Set this in Part.video_metadata or FunctionResponsePart.video_metadata when inline_data or file_data contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers).

    VideoMetadata::equal

    automatically derived

    VideoMetadata::new

    fn VideoMetadata::new(content_layers? : Array[VideoMetadataContentLayersItem], end_offset? : String, start_offset? : String, fps? : Double) -> VideoMetadata

    Creates a VideoMetadata with omitted optional fields absent.

    VideoMetadata::not_equal

    fn VideoMetadata::not_equal(x : VideoMetadata, y : VideoMetadata) -> Bool
    automatically derived

    VideoMetadata::to_json

    Encodes this value as JSON.

    VideoMetadata::to_repr

    automatically derived

    VideoMetadataContentLayersItem

    pub(all) enum VideoMetadataContentLayersItem {
    CONTENTLAYERUNSPECIFIED
    FRAMES
    AUDIO
    TRANSCRIPT
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Enum values: CONTENT_LAYER_UNSPECIFIED: Default value.; FRAMES: Extract video frames.; AUDIO: Extract audio track.; TRANSCRIPT: Extract audio transcript.

    VideoMetadataContentLayersItem::equal

    automatically derived

    VideoMetadataContentLayersItem::not_equal

    automatically derived

    VideoMetadataContentLayersItem::to_json

    Encodes this string enum as JSON.

    VideoMetadataContentLayersItem::to_repr

    automatically derived

    VoiceConfig

    pub(all) struct VoiceConfig {
    voice : String?
    prebuilt_voice_config : PrebuiltVoiceConfig?
    } derive(Eq,
    Debug
    )

    The configuration for the voice to use.

    VoiceConfig::equal

    fn VoiceConfig::equal(VoiceConfig, VoiceConfig) -> Bool
    automatically derived

    VoiceConfig::new

    fn VoiceConfig::new(voice? : String, prebuilt_voice_config? : PrebuiltVoiceConfig) -> VoiceConfig

    Creates a VoiceConfig with omitted optional fields absent.

    VoiceConfig::not_equal

    fn VoiceConfig::not_equal(x : VoiceConfig, y : VoiceConfig) -> Bool
    automatically derived

    VoiceConfig::to_json

    Encodes this value as JSON.

    VoiceConfig::to_repr

    automatically derived

    Web

    pub(all) struct Web {
    uri : String?
    title : String?
    } derive(Eq,
    Debug
    )

    Chunk from the web.
    impl ToJson for Web

    Web::equal

    fn Web::equal(Web, Web) -> Bool
    automatically derived

    Web::new

    fn Web::new(uri? : String, title? : String) -> Web

    Creates a Web with omitted optional fields absent.

    Web::not_equal

    fn Web::not_equal(x : Web, y : Web) -> Bool
    automatically derived

    Web::to_json

    fn Web::to_json(self : Web) ->
    Json

    Encodes this value as JSON.

    Web::to_repr

    automatically derived

    WordInfo

    pub(all) struct WordInfo {
    start_offset : String?
    end_offset : String?
    word : String?
    } derive(Eq,
    Debug
    )

    Information about a single recognized word.

    WordInfo::equal

    fn WordInfo::equal(WordInfo, WordInfo) -> Bool
    automatically derived

    WordInfo::new

    fn WordInfo::new(start_offset? : String, end_offset? : String, word? : String) -> WordInfo

    Creates a WordInfo with omitted optional fields absent.

    WordInfo::not_equal

    fn WordInfo::not_equal(x : WordInfo, y : WordInfo) -> Bool
    automatically derived

    WordInfo::to_json

    Encodes this value as JSON.

    WordInfo::to_repr

    automatically derived

    cached_contents_create_decode

    Decodes a successful cached_contents_create response.

    cached_contents_create_decode_json

    Decodes a parsed successful cached_contents_create response.

    cached_contents_create_request

    fn cached_contents_create_request(body : CachedContent) ->
    Request

    Creates CachedContent resource. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    cached_contents_delete_request

    fn cached_contents_delete_request(name : String) ->
    Request
    raise ValidationError

    Deletes CachedContent resource. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage The caller handles the response as @http.Response.

    cached_contents_get_decode

    Decodes a successful cached_contents_get response.

    cached_contents_get_decode_json

    Decodes a parsed successful cached_contents_get response.

    cached_contents_get_request

    fn cached_contents_get_request(name : String) ->
    Request
    raise ValidationError

    Reads CachedContent resource. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    cached_contents_list_decode

    Decodes a successful cached_contents_list response.

    cached_contents_list_decode_json

    Decodes a parsed successful cached_contents_list response.

    cached_contents_list_request

    fn cached_contents_list_request(page_token? : String, page_size? : Int) ->
    Request

    Lists CachedContents. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    cached_contents_patch_decode

    Decodes a successful cached_contents_patch response.

    cached_contents_patch_decode_json

    Decodes a parsed successful cached_contents_patch response.

    cached_contents_patch_request

    fn cached_contents_patch_request(name : String, body : CachedContent, update_mask? : String) ->
    Request
    raise ValidationError

    Updates CachedContent resource (only expiration is updatable). OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    files_delete_request

    fn files_delete_request(name : String) ->
    Request
    raise ValidationError

    Deletes the File. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage The caller handles the response as @http.Response.

    files_get_decode

    Decodes a successful files_get response.

    files_get_decode_json

    Decodes a parsed successful files_get response.

    files_get_request

    fn files_get_request(name : String) ->
    Request
    raise ValidationError

    Gets the metadata for the given File. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    files_list_decode

    Decodes a successful files_list response.

    files_list_decode_json

    Decodes a parsed successful files_list response.

    files_list_request

    fn files_list_request(page_token? : String, page_size? : Int) ->
    Request

    Lists the metadata for Files owned by the requesting project. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    media_upload_decode

    Decodes a successful media_upload response.

    media_upload_decode_json

    Decodes a parsed successful media_upload response.

    media_upload_request

    fn media_upload_request(body : CreateFileRequest) ->
    Request

    Creates a File. OAuth scope https://www.googleapis.com/auth/devstorage.read_only: View your data in Google Cloud Storage

    models_batch_embed_contents_decode

    Decodes a successful models_batch_embed_contents response.

    models_batch_embed_contents_decode_json

    Decodes a parsed successful models_batch_embed_contents response.

    models_batch_embed_contents_request

    fn models_batch_embed_contents_request(model : String, body : BatchEmbedContentsRequest) ->
    Request
    raise ValidationError

    Generates multiple embedding vectors from the input Content which consists of a batch of strings represented as EmbedContentRequest objects.

    models_count_tokens_decode

    Decodes a successful models_count_tokens response.

    models_count_tokens_decode_json

    Decodes a parsed successful models_count_tokens response.

    models_count_tokens_request

    fn models_count_tokens_request(model : String, body : CountTokensRequest) ->
    Request
    raise ValidationError

    Runs a model's tokenizer on input Content and returns the token count. Refer to the tokens guide to learn more about tokens.

    models_embed_content_decode

    Decodes a successful models_embed_content response.

    models_embed_content_decode_json

    Decodes a parsed successful models_embed_content response.

    models_embed_content_request

    fn models_embed_content_request(model : String, body : EmbedContentRequest) ->
    Request
    raise ValidationError

    Generates a text embedding vector from the input Content using the specified Gemini Embedding model.

    models_generate_content_decode

    Decodes a successful models_generate_content response.

    models_generate_content_decode_json

    Decodes a parsed successful models_generate_content response.

    models_generate_content_request

    fn models_generate_content_request(model : String, body : GenerateContentRequest) ->
    Request
    raise ValidationError

    Generates a model response given an input GenerateContentRequest. Refer to the text generation guide for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the model guide and tuning guide for details.

    models_get_decode

    Decodes a successful models_get response.

    models_get_decode_json

    Decodes a parsed successful models_get response.

    models_get_request

    fn models_get_request(name : String) ->
    Request
    raise ValidationError

    Gets information about a specific Model such as its version number, token limits, parameters and other metadata. Refer to the Gemini models guide for detailed model information.

    models_list_decode

    Decodes a successful models_list response.

    models_list_decode_json

    Decodes a parsed successful models_list response.

    models_list_request

    fn models_list_request(page_size? : Int, page_token? : String) ->
    Request

    Lists the Models available through the Gemini API.

    models_stream_generate_content_decode

    Decodes a successful models_stream_generate_content response.

    models_stream_generate_content_decode_json

    Decodes a parsed successful models_stream_generate_content response.

    models_stream_generate_content_request

    fn models_stream_generate_content_request(model : String, body : GenerateContentRequest) ->
    Request
    raise ValidationError

    Generates a streamed response from the model given an input GenerateContentRequest.