Class FunctionResponseFileData
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
FileUri
URI.
[JsonPropertyName("fileUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? FileUri { get; set; }
Property Value
MimeType
The IANA standard MIME type of the source data.
[JsonPropertyName("mimeType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? MimeType { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a FunctionResponseFileData object.
public static FunctionResponseFileData? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- FunctionResponseFileData
The deserialized FunctionResponseFileData object, or null if deserialization fails.