Package com.aim2be.platform.schema
Record Class SchemaRegistryClient.Schema
java.lang.Object
java.lang.Record
com.aim2be.platform.schema.SchemaRegistryClient.Schema
- Record Components:
globalId- Apicurio-assigned global ID (or Confluent schemaId whenSchemaRegistryClient.wireFormat()isWireFormat.CONFLUENT_4_BYTE)subject- the subject (artifact ID in Apicurio v2 API terms)bytes- the raw schema body; UTF-8 JSON for AVRO/JSON, protobuf text for PROTOBUFtype- the schema typeversion- the artifact version number assigned by the registry
- Enclosing interface:
- SchemaRegistryClient
public static record SchemaRegistryClient.Schema(long globalId, String subject, byte[] bytes, SchemaRegistryClient.SchemaType type, int version)
extends Record
Immutable schema record returned by fetch operations.
-
Constructor Summary
ConstructorsConstructorDescriptionSchema(long globalId, String subject, byte[] bytes, SchemaRegistryClient.SchemaType type, int version) Creates an instance of aSchemarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.final booleanIndicates whether some other object is "equal to" this one.longglobalId()Returns the value of theglobalIdrecord component.final inthashCode()Returns a hash code value for this object.subject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intversion()Returns the value of theversionrecord component.
-
Constructor Details
-
Schema
public Schema(long globalId, String subject, byte[] bytes, SchemaRegistryClient.SchemaType type, int version) Creates an instance of aSchemarecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
globalId
public long globalId()Returns the value of theglobalIdrecord component.- Returns:
- the value of the
globalIdrecord component
-
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-