@Test public void testEncodeAndDecode() { Function.FunctionDetails functionDetails = Function.FunctionDetails.newBuilder().setName(NAME).build(); ProtobufSchema<Function.FunctionDetails> protobufSchema = ProtobufSchema.of(Function.FunctionDetails.class); byte[] bytes = protobufSchema.encode(functionDetails); Function.FunctionDetails message = protobufSchema.decode(bytes); Assert.assertEquals(message.getName(), NAME); }
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; }