Table of Contents

Class FileSearchSerializerContext

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Source-generated serialization metadata for the File Search stores and documents types.

[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, UseStringEnumConverter = true)]
[JsonSerializable(typeof(FileSearchStore))]
[JsonSerializable(typeof(FileSearchDocument))]
[JsonSerializable(typeof(FileSearchDocumentState))]
[JsonSerializable(typeof(ChunkingConfig))]
[JsonSerializable(typeof(WhiteSpaceConfig))]
[JsonSerializable(typeof(UploadToFileSearchStoreConfig))]
[JsonSerializable(typeof(ImportFileConfig))]
[JsonSerializable(typeof(ImportFileRequest))]
[JsonSerializable(typeof(ListFileSearchStoresResponse))]
[JsonSerializable(typeof(ListFileSearchDocumentsResponse))]
[JsonSerializable(typeof(FileSearchOperation))]
[JsonSerializable(typeof(FileSearchOperationResponse))]
public class FileSearchSerializerContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
FileSearchSerializerContext
Implements
Inherited Members
Extension Methods

Remarks

This is a separate context rather than a partial of TypesSerializerContext because the System.Text.Json source generator shipped for net6.0-net10.0/netstandard2.0 fails when [JsonSerializable] attributes are split across partial declarations (duplicate hint names). FileSearchStoresClient appends it to its serializer resolver chain. Options mirror those of TypesSerializerContext.

Constructors

FileSearchSerializerContext()

public FileSearchSerializerContext()

FileSearchSerializerContext(JsonSerializerOptions)

Creates an instance of JsonSerializerContext and binds it with the indicated JsonSerializerOptions.

public FileSearchSerializerContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

Boolean

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<bool> Boolean { get; }

Property Value

JsonTypeInfo<bool>

ChunkingConfig

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<ChunkingConfig> ChunkingConfig { get; }

Property Value

JsonTypeInfo<ChunkingConfig>

CustomMetadata

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<CustomMetadata> CustomMetadata { get; }

Property Value

JsonTypeInfo<CustomMetadata>

Default

The default JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static FileSearchSerializerContext Default { get; }

Property Value

FileSearchSerializerContext

Double

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<double> Double { get; }

Property Value

JsonTypeInfo<double>

FileSearchDocument

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<FileSearchDocument> FileSearchDocument { get; }

Property Value

JsonTypeInfo<FileSearchDocument>

FileSearchDocumentState

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<FileSearchDocumentState> FileSearchDocumentState { get; }

Property Value

JsonTypeInfo<FileSearchDocumentState>

FileSearchOperation

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<FileSearchOperation> FileSearchOperation { get; }

Property Value

JsonTypeInfo<FileSearchOperation>

FileSearchOperationResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<FileSearchOperationResponse> FileSearchOperationResponse { get; }

Property Value

JsonTypeInfo<FileSearchOperationResponse>

FileSearchStore

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<FileSearchStore> FileSearchStore { get; }

Property Value

JsonTypeInfo<FileSearchStore>

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

GoogleRpcStatus

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<GoogleRpcStatus> GoogleRpcStatus { get; }

Property Value

JsonTypeInfo<GoogleRpcStatus>

ICollectionIDictionaryStringJsonElement

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<ICollection<IDictionary<string, JsonElement>>> ICollectionIDictionaryStringJsonElement { get; }

Property Value

JsonTypeInfo<ICollection<IDictionary<string, JsonElement>>>

IDictionaryStringJsonElement

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<IDictionary<string, JsonElement>> IDictionaryStringJsonElement { get; }

Property Value

JsonTypeInfo<IDictionary<string, JsonElement>>

ImportFileConfig

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<ImportFileConfig> ImportFileConfig { get; }

Property Value

JsonTypeInfo<ImportFileConfig>

ImportFileRequest

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<ImportFileRequest> ImportFileRequest { get; }

Property Value

JsonTypeInfo<ImportFileRequest>

Int32

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<int> Int32 { get; }

Property Value

JsonTypeInfo<int>

Int64

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<long> Int64 { get; }

Property Value

JsonTypeInfo<long>

JsonElement

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<JsonElement> JsonElement { get; }

Property Value

JsonTypeInfo<JsonElement>

ListCustomMetadata

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<List<CustomMetadata>> ListCustomMetadata { get; }

Property Value

JsonTypeInfo<List<CustomMetadata>>

ListFileSearchDocument

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<List<FileSearchDocument>> ListFileSearchDocument { get; }

Property Value

JsonTypeInfo<List<FileSearchDocument>>

ListFileSearchDocumentsResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<ListFileSearchDocumentsResponse> ListFileSearchDocumentsResponse { get; }

Property Value

JsonTypeInfo<ListFileSearchDocumentsResponse>

ListFileSearchStore

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<List<FileSearchStore>> ListFileSearchStore { get; }

Property Value

JsonTypeInfo<List<FileSearchStore>>

ListFileSearchStoresResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<ListFileSearchStoresResponse> ListFileSearchStoresResponse { get; }

Property Value

JsonTypeInfo<ListFileSearchStoresResponse>

NullableBoolean

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<bool?> NullableBoolean { get; }

Property Value

JsonTypeInfo<bool?>

NullableDouble

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<double?> NullableDouble { get; }

Property Value

JsonTypeInfo<double?>

NullableFileSearchDocumentState

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<FileSearchDocumentState?> NullableFileSearchDocumentState { get; }

Property Value

JsonTypeInfo<FileSearchDocumentState?>

NullableInt32

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<int?> NullableInt32 { get; }

Property Value

JsonTypeInfo<int?>

NullableInt64

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<long?> NullableInt64 { get; }

Property Value

JsonTypeInfo<long?>

NullableJsonElement

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<JsonElement?> NullableJsonElement { get; }

Property Value

JsonTypeInfo<JsonElement?>

String

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<string> String { get; }

Property Value

JsonTypeInfo<string>

StringArray

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<string[]> StringArray { get; }

Property Value

JsonTypeInfo<string[]>

StringList

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<StringList> StringList { get; }

Property Value

JsonTypeInfo<StringList>

Timestamp

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<Timestamp> Timestamp { get; }

Property Value

JsonTypeInfo<Timestamp>

UploadToFileSearchStoreConfig

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<UploadToFileSearchStoreConfig> UploadToFileSearchStoreConfig { get; }

Property Value

JsonTypeInfo<UploadToFileSearchStoreConfig>

WhiteSpaceConfig

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<WhiteSpaceConfig> WhiteSpaceConfig { get; }

Property Value

JsonTypeInfo<WhiteSpaceConfig>

Methods

GetTypeInfo(Type)

Gets metadata for the specified type.

public override JsonTypeInfo? GetTypeInfo(Type type)

Parameters

type Type

The type to fetch metadata for.

Returns

JsonTypeInfo

The metadata for the specified type, or null if the context has no metadata for the type.