Constructor EnumSchema
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
nameSchemaNameThe enum name.
symbolsIEnumerable<string>The symbols; each must be a valid Avro name and appear once.
defaultSymbolstringThe symbol used during resolution for unknown writer symbols, or null.
docstringOptional documentation.
aliasesIEnumerable<SchemaName>Optional alternative names.
propertiesIReadOnlyDictionary<string, JsonElement>Optional custom properties.
Exceptions
- AvroSchemaException
A symbol is invalid or duplicated, or the default is not a symbol.