Class SchemaReference
Represents a reference to a Schema stored in Schema Registry.
Inherited Members
Namespace: Confluent.SchemaRegistry
Assembly: Confluent.SchemaRegistry.dll
Syntax
[DataContract]
public class SchemaReference : IComparable<SchemaReference>, IEquatable<SchemaReference>
Constructors
SchemaReference(string, string, int)
Initializes a new instance of the SchemaReference class.
Declaration
public SchemaReference(string name, string subject, int version)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name the schema is registered against. |
string | subject | The subject the schema is registered against. |
int | version | The schema version, >= 0 |
Properties
Name
The schema name.
Declaration
[DataMember(Name = "name")]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
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(SchemaReference)
Compares this instance with a specified SchemaReference object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified schema reference.
Declaration
public int CompareTo(SchemaReference other)
Parameters
Type | Name | Description |
---|---|---|
SchemaReference | other | The schema reference 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(SchemaReference)
Determines whether this instance and another specified SchemaReference object are the same.
Declaration
public bool Equals(SchemaReference other)
Parameters
Type | Name | Description |
---|---|---|
SchemaReference | other | The schema reference 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 SchemaReference object, have the same value (Overrides Object.Equals(Object))
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The SchemaReference to compare to this instance. |
Returns
Type | Description |
---|---|
bool | true if obj is a SchemaReference 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 SchemaReference.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | An integer that specifies a hash value for this SchemaReference. |
Overrides
ToString()
Returns a string representation of the Schema object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the schema object. |