@Test public void testSchema() { ProtobufSchema<org.apache.pulsar.client.schema.proto.Test.TestMessage> protobufSchema = ProtobufSchema.of(org.apache.pulsar.client.schema.proto.Test.TestMessage.class); Assert.assertEquals(protobufSchema.getSchemaInfo().getType(), SchemaType.PROTOBUF); String schemaJson = new String(protobufSchema.getSchemaInfo().getSchema()); Schema.Parser parser = new Schema.Parser(); Schema schema = parser.parse(schemaJson); Assert.assertEquals(schema.toString(), EXPECTED_SCHEMA_JSON); }
public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(Class<T> pojo) { return of(pojo, new HashMap<>()); }
ProtobufSchema extends StructSchema<T> { public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(Class<T> pojo) { return of(pojo, new HashMap<>()); } }
ProtobufSchema extends StructSchema<T> { public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(Class<T> pojo) { return of(pojo, new HashMap<>()); } private  ProtobufSchema(SchemaInfo schemaInfo, T protoMessageInstance); }
ProtobufSchema extends StructSchema<T> { public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(Class<T> pojo) { return of(pojo, new HashMap<>()); } private  ProtobufSchema(SchemaInfo schemaInfo, T protoMessageInstance); static ProtobufSchema<T> of(Class<T> pojo); static ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties); static ProtobufSchema of(SchemaDefinition<T> schemaDefinition); static ProtobufSchema<T> of(
            Class pojo, Map<String, String> properties); }
ProtobufSchema extends StructSchema<T> { public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(Class<T> pojo) { return of(pojo, new HashMap<>()); } private  ProtobufSchema(SchemaInfo schemaInfo, T protoMessageInstance); static ProtobufSchema<T> of(Class<T> pojo); static ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties); static ProtobufSchema of(SchemaDefinition<T> schemaDefinition); static ProtobufSchema<T> of(
            Class pojo, Map<String, String> properties); static final String PARSING_INFO_PROPERTY; }