Class RegisteredSchema
Represents a Schema stored in Schema Registry.
Implements
Inherited Members
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 override int Id { get; set; }
Property Value
Type | Description |
---|---|
int |
Overrides
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 override string Subject { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
Version
The schema version.
Declaration
[DataMember(Name = "version")]
public override int Version { get; set; }
Property Value
Type | Description |
---|---|
int |
Overrides
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
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
ToString()
Returns a summary string representation of the object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the object. |