Table of Contents

Class FunctionResponseFileData

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

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

public record FunctionResponseFileData : IEquatable<FunctionResponseFileData>
Inheritance
FunctionResponseFileData
Implements
Inherited Members

Properties

DisplayName

Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.

[JsonPropertyName("displayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DisplayName { get; set; }

Property Value

string

FileUri

URI.

[JsonPropertyName("fileUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? FileUri { get; set; }

Property Value

string

MimeType

The IANA standard MIME type of the source data.

[JsonPropertyName("mimeType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? MimeType { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a FunctionResponseFileData object.

public static FunctionResponseFileData? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

FunctionResponseFileData

The deserialized FunctionResponseFileData object, or null if deserialization fails.