@ProtoMessage public class Message {
@ProtoMessage public class Message {
@ProtoMessage public class Schema {
@ProtoMessage public class Schema {
@ProtoMessage public class Field {
@ProtoMessage public class Field {
@ProtoMessage(name = "Address") public static class AnnotatedAddress { private String street; private String postCode; @ProtoField(number = 10) public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } @ProtoField(number = 20) public String getPostCode() { return postCode; } public void setPostCode(String postCode) { this.postCode = postCode; } @Override public String toString() { return "AnnotatedAddress{street='" + street + '\'' + ", postCode='" + postCode + '\'' + '}'; } }
@ProtoDoc("@Indexed") @ProtoMessage(name = "User") public static class AnnotatedUser {
@ProtoMessage(name = "Transaction") @ProtoDoc("@Indexed") public class Transaction implements Serializable { @ProtoDoc("@Field") @ProtoField(number = 1, name = "size", required = true) int size; @ProtoDoc("@Field") @ProtoField(number = 2, name = "script", required = true) String script; public Transaction(int size, String script) { this.size = size; this.script = script; } public Transaction() { } @Override public String toString() { return "Transaction{" + "size=" + size + ", script='" + script + '\'' + '}'; } }
@ProtoMessage(name = "CryptoCurrency") @ProtoDoc("@Indexed") public class CryptoCurrency implements Serializable {