Constructor RecordSchema
RecordSchema(SchemaName, IEnumerable<RecordField>, string?, IEnumerable<SchemaName>?, bool, IReadOnlyDictionary<string, JsonElement>?)
Initializes a record schema.
public RecordSchema(SchemaName name, IEnumerable<RecordField> fields, string? doc = null, IEnumerable<SchemaName>? aliases = null, bool isError = false, IReadOnlyDictionary<string, JsonElement>? properties = null)
Parameters
nameSchemaNameThe record name.
fieldsIEnumerable<RecordField>The fields; each instance may belong to only one record.
docstringOptional documentation.
aliasesIEnumerable<SchemaName>Optional alternative names.
isErrorbooltrue for a protocol
errortype.propertiesIReadOnlyDictionary<string, JsonElement>Optional custom properties.
Exceptions
- AvroSchemaException
Two fields have the same name, or a field already belongs to another record.