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
optionsJsonSerializerOptionsThe 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
ChunkingConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ChunkingConfig> ChunkingConfig { get; }
Property Value
CustomMetadata
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CustomMetadata> CustomMetadata { get; }
Property Value
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static FileSearchSerializerContext Default { get; }
Property Value
Double
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<double> Double { get; }
Property Value
FileSearchDocument
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<FileSearchDocument> FileSearchDocument { get; }
Property Value
FileSearchDocumentState
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<FileSearchDocumentState> FileSearchDocumentState { get; }
Property Value
FileSearchOperation
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<FileSearchOperation> FileSearchOperation { get; }
Property Value
FileSearchOperationResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<FileSearchOperationResponse> FileSearchOperationResponse { get; }
Property Value
FileSearchStore
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<FileSearchStore> FileSearchStore { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
GoogleRpcStatus
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<GoogleRpcStatus> GoogleRpcStatus { get; }
Property Value
ICollectionIDictionaryStringJsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ICollection<IDictionary<string, JsonElement>>> ICollectionIDictionaryStringJsonElement { get; }
Property Value
IDictionaryStringJsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<IDictionary<string, JsonElement>> IDictionaryStringJsonElement { get; }
Property Value
ImportFileConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ImportFileConfig> ImportFileConfig { get; }
Property Value
ImportFileRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ImportFileRequest> ImportFileRequest { get; }
Property Value
Int32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int> Int32 { get; }
Property Value
Int64
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<long> Int64 { get; }
Property Value
JsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonElement> JsonElement { get; }
Property Value
ListCustomMetadata
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<CustomMetadata>> ListCustomMetadata { get; }
Property Value
ListFileSearchDocument
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<FileSearchDocument>> ListFileSearchDocument { get; }
Property Value
ListFileSearchDocumentsResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListFileSearchDocumentsResponse> ListFileSearchDocumentsResponse { get; }
Property Value
ListFileSearchStore
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<FileSearchStore>> ListFileSearchStore { get; }
Property Value
ListFileSearchStoresResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListFileSearchStoresResponse> ListFileSearchStoresResponse { get; }
Property Value
NullableBoolean
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<bool?> NullableBoolean { get; }
Property Value
NullableDouble
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<double?> NullableDouble { get; }
Property Value
NullableFileSearchDocumentState
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<FileSearchDocumentState?> NullableFileSearchDocumentState { get; }
Property Value
NullableInt32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int?> NullableInt32 { get; }
Property Value
NullableInt64
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<long?> NullableInt64 { get; }
Property Value
NullableJsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonElement?> NullableJsonElement { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
StringArray
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string[]> StringArray { get; }
Property Value
StringList
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<StringList> StringList { get; }
Property Value
Timestamp
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Timestamp> Timestamp { get; }
Property Value
UploadToFileSearchStoreConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<UploadToFileSearchStoreConfig> UploadToFileSearchStoreConfig { get; }
Property Value
WhiteSpaceConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WhiteSpaceConfig> WhiteSpaceConfig { get; }
Property Value
Methods
GetTypeInfo(Type)
Gets metadata for the specified type.
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
typeTypeThe type to fetch metadata for.
Returns
- JsonTypeInfo
The metadata for the specified type, or null if the context has no metadata for the type.