confluent-kafka-dotnet
Show / Hide Table of Contents

Class RegisteredSchema

Represents a Schema stored in Schema Registry.

Inheritance
object
Schema
RegisteredSchema
Implements
IComparable<Schema>
IEquatable<Schema>
IComparable<RegisteredSchema>
IEquatable<RegisteredSchema>
Inherited Members
Schema.SchemaString
Schema.References
Schema.Metadata
Schema.RuleSet
Schema.SchemaType
Schema.Equals(Schema)
Schema.CompareTo(Schema)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Confluent.SchemaRegistry
Assembly: Confluent.SchemaRegistry.dll
Syntax
[DataContract]
public class RegisteredSchema : Schema, IComparable<Schema>, IEquatable<Schema>, IComparable<RegisteredSchema>, IEquatable<RegisteredSchema>
Remarks

Inherits from Schema to enable API backwards compatibility only. In the future, this relationship will be removed.

Constructors

RegisteredSchema()

Included to enable API backwards compatibility only, do not use.

Declaration
[Obsolete("Included to enable API backwards compatibility. This will be removed in a future release.")]
protected RegisteredSchema()

RegisteredSchema(string, int, int, string, SchemaType, List<SchemaReference>)

Initializes a new instance of this class.

Declaration
public RegisteredSchema(string subject, int version, int id, string schemaString, SchemaType schemaType, List<SchemaReference> references)
Parameters
Type Name Description
string subject

The subject the schema is registered against.

int version

The schema version, >= 0

int id

The globally unique identifier of the schema, >= 0

string schemaString

String representation of the schema.

SchemaType schemaType

The schema type: AVRO, PROTOBUF, JSON

List<SchemaReference> references

A list of schemas referenced by this schema.

Properties

Id

Unique identifier of the schema.

Declaration
[DataMember(Name = "id")]
public int Id { get; set; }
Property Value
Type Description
int

Schema

The unregistered schema corresponding to this schema.

Declaration
public Schema Schema { get; }
Property Value
Type Description
Schema

Subject

The subject the schema is registered against.

Declaration
[DataMember(Name = "subject")]
public string Subject { get; set; }
Property Value
Type Description
string

Version

The schema version.

Declaration
[DataMember(Name = "version")]
public int Version { get; set; }
Property Value
Type Description
int

Methods

CompareTo(RegisteredSchema)

Compares this instance with a specified RegisteredSchema object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified schema.

Declaration
public int CompareTo(RegisteredSchema other)
Parameters
Type Name Description
RegisteredSchema other

The schema to compare with this instance.

Returns
Type Description
int

A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the other parameter. Less than zero: this instance precedes other. Zero: this instance has the same position in the sort order as other. Greater than zero: This instance follows other OR other is null.

Equals(RegisteredSchema)

Determines whether this instance and another specified Schema object are the same.

Declaration
public bool Equals(RegisteredSchema other)
Parameters
Type Name Description
RegisteredSchema other

The schema to compare to this instance.

Returns
Type Description
bool

true if the value of the other parameter is the same as the value of this instance; otherwise, false. If other is null, the method returns false.

Equals(object)

Determines whether this instance and a specified object, which must also be a Schema object, have the same value (Overrides Object.Equals(Object))

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The Schema to compare to this instance.

Returns
Type Description
bool

true if obj is a Schema and its value is the same as this instance; otherwise, false. If obj is null, the method returns false.

Overrides
Schema.Equals(object)

GetHashCode()

Returns a hash code for this Schema.

Declaration
public override int GetHashCode()
Returns
Type Description
int

An integer that specifies a hash value for this Schema.

Overrides
Schema.GetHashCode()

ToString()

Returns a summary string representation of the object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the object.

Overrides
Schema.ToString()

Implements

IComparable<T>
IEquatable<T>
IComparable<T>
IEquatable<T>
In this article