Table of Contents

Constructor EnumSchema

Namespace
AvroSharp.Schemas
Assembly
AvroSharp.dll

EnumSchema(SchemaName, IEnumerable<string>, string?, string?, IEnumerable<SchemaName>?, IReadOnlyDictionary<string, JsonElement>?)

Initializes an enum schema.

public EnumSchema(SchemaName name, IEnumerable<string> symbols, string? defaultSymbol = null, string? doc = null, IEnumerable<SchemaName>? aliases = null, IReadOnlyDictionary<string, JsonElement>? properties = null)

Parameters

name SchemaName

The enum name.

symbols IEnumerable<string>

The symbols; each must be a valid Avro name and appear once.

defaultSymbol string

The symbol used during resolution for unknown writer symbols, or null.

doc string

Optional documentation.

aliases IEnumerable<SchemaName>

Optional alternative names.

properties IReadOnlyDictionary<string, JsonElement>

Optional custom properties.

Exceptions

AvroSchemaException

A symbol is invalid or duplicated, or the default is not a symbol.