Skip to content

Instantly share code, notes, and snippets.

@jklukas
Last active August 24, 2020 13:27
Show Gist options
  • Save jklukas/a76968ecf07bb699bb6fd1cf0565b2ca to your computer and use it in GitHub Desktop.
Save jklukas/a76968ecf07bb699bb6fd1cf0565b2ca to your computer and use it in GitHub Desktop.
/* Example of a custom class with automatically generated Coder */
@DefaultSchema(AutoValueSchema.class)
@AutoValue
abstract static class MyMessage {
public static MyMessage of(byte[] payload, Map<String, String> attributes) {
return new AutoValue_MyMessage(paylod, attributes);
}
public abstract byte[] getPayload();
public abstract Map<String, String> getAttributes();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment