diff --git a/src/main/java/bdledger/api/grpc/query/BlocksRequest.java b/src/main/java/bdledger/api/grpc/query/BlocksRequest.java index 2a8498d..f24a5dd 100644 --- a/src/main/java/bdledger/api/grpc/query/BlocksRequest.java +++ b/src/main/java/bdledger/api/grpc/query/BlocksRequest.java @@ -57,7 +57,17 @@ private static final long serialVersionUID = 0L; ledger_ = s; break; } - case 18: { + case 16: { + + startTimestamp_ = input.readInt64(); + break; + } + case 24: { + + endTimestamp_ = input.readInt64(); + break; + } + case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { filters_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -66,16 +76,6 @@ private static final long serialVersionUID = 0L; input.readMessage(bdledger.api.grpc.query.BlockFilter.parser(), extensionRegistry)); break; } - case 24: { - - startTimestamp_ = input.readInt64(); - break; - } - case 32: { - - endTimestamp_ = input.readInt64(); - break; - } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -147,65 +147,65 @@ private static final long serialVersionUID = 0L; } } - public static final int FILTERS_FIELD_NUMBER = 2; - private java.util.List filters_; - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - public java.util.List getFiltersList() { - return filters_; - } - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - public java.util.List - getFiltersOrBuilderList() { - return filters_; - } - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - public int getFiltersCount() { - return filters_.size(); - } - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - public bdledger.api.grpc.query.BlockFilter getFilters(int index) { - return filters_.get(index); - } - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - public bdledger.api.grpc.query.BlockFilterOrBuilder getFiltersOrBuilder( - int index) { - return filters_.get(index); - } - - public static final int START_TIMESTAMP_FIELD_NUMBER = 3; + public static final int START_TIMESTAMP_FIELD_NUMBER = 2; private long startTimestamp_; /** *
    * required
    * 
* - * int64 start_timestamp = 3; + * int64 start_timestamp = 2; * @return The startTimestamp. */ public long getStartTimestamp() { return startTimestamp_; } - public static final int END_TIMESTAMP_FIELD_NUMBER = 4; + public static final int END_TIMESTAMP_FIELD_NUMBER = 3; private long endTimestamp_; /** - * int64 end_timestamp = 4; + * int64 end_timestamp = 3; * @return The endTimestamp. */ public long getEndTimestamp() { return endTimestamp_; } + public static final int FILTERS_FIELD_NUMBER = 4; + private java.util.List filters_; + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + public java.util.List getFiltersList() { + return filters_; + } + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + public java.util.List + getFiltersOrBuilderList() { + return filters_; + } + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + public int getFiltersCount() { + return filters_.size(); + } + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + public bdledger.api.grpc.query.BlockFilter getFilters(int index) { + return filters_.get(index); + } + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + public bdledger.api.grpc.query.BlockFilterOrBuilder getFiltersOrBuilder( + int index) { + return filters_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -223,14 +223,14 @@ private static final long serialVersionUID = 0L; if (!getLedgerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_); } - for (int i = 0; i < filters_.size(); i++) { - output.writeMessage(2, filters_.get(i)); - } if (startTimestamp_ != 0L) { - output.writeInt64(3, startTimestamp_); + output.writeInt64(2, startTimestamp_); } if (endTimestamp_ != 0L) { - output.writeInt64(4, endTimestamp_); + output.writeInt64(3, endTimestamp_); + } + for (int i = 0; i < filters_.size(); i++) { + output.writeMessage(4, filters_.get(i)); } unknownFields.writeTo(output); } @@ -244,17 +244,17 @@ private static final long serialVersionUID = 0L; if (!getLedgerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_); } - for (int i = 0; i < filters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, filters_.get(i)); - } if (startTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, startTimestamp_); + .computeInt64Size(2, startTimestamp_); } if (endTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, endTimestamp_); + .computeInt64Size(3, endTimestamp_); + } + for (int i = 0; i < filters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, filters_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -273,12 +273,12 @@ private static final long serialVersionUID = 0L; if (!getLedger() .equals(other.getLedger())) return false; - if (!getFiltersList() - .equals(other.getFiltersList())) return false; if (getStartTimestamp() != other.getStartTimestamp()) return false; if (getEndTimestamp() != other.getEndTimestamp()) return false; + if (!getFiltersList() + .equals(other.getFiltersList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -292,16 +292,16 @@ private static final long serialVersionUID = 0L; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LEDGER_FIELD_NUMBER; hash = (53 * hash) + getLedger().hashCode(); - if (getFiltersCount() > 0) { - hash = (37 * hash) + FILTERS_FIELD_NUMBER; - hash = (53 * hash) + getFiltersList().hashCode(); - } hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStartTimestamp()); hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getEndTimestamp()); + if (getFiltersCount() > 0) { + hash = (37 * hash) + FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getFiltersList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -438,16 +438,16 @@ private static final long serialVersionUID = 0L; super.clear(); ledger_ = ""; + startTimestamp_ = 0L; + + endTimestamp_ = 0L; + if (filtersBuilder_ == null) { filters_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { filtersBuilder_.clear(); } - startTimestamp_ = 0L; - - endTimestamp_ = 0L; - return this; } @@ -476,6 +476,8 @@ private static final long serialVersionUID = 0L; bdledger.api.grpc.query.BlocksRequest result = new bdledger.api.grpc.query.BlocksRequest(this); int from_bitField0_ = bitField0_; result.ledger_ = ledger_; + result.startTimestamp_ = startTimestamp_; + result.endTimestamp_ = endTimestamp_; if (filtersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { filters_ = java.util.Collections.unmodifiableList(filters_); @@ -485,8 +487,6 @@ private static final long serialVersionUID = 0L; } else { result.filters_ = filtersBuilder_.build(); } - result.startTimestamp_ = startTimestamp_; - result.endTimestamp_ = endTimestamp_; onBuilt(); return result; } @@ -539,6 +539,12 @@ private static final long serialVersionUID = 0L; ledger_ = other.ledger_; onChanged(); } + if (other.getStartTimestamp() != 0L) { + setStartTimestamp(other.getStartTimestamp()); + } + if (other.getEndTimestamp() != 0L) { + setEndTimestamp(other.getEndTimestamp()); + } if (filtersBuilder_ == null) { if (!other.filters_.isEmpty()) { if (filters_.isEmpty()) { @@ -565,12 +571,6 @@ private static final long serialVersionUID = 0L; } } } - if (other.getStartTimestamp() != 0L) { - setStartTimestamp(other.getStartTimestamp()); - } - if (other.getEndTimestamp() != 0L) { - setEndTimestamp(other.getEndTimestamp()); - } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -677,6 +677,78 @@ private static final long serialVersionUID = 0L; return this; } + private long startTimestamp_ ; + /** + *
+     * required
+     * 
+ * + * int64 start_timestamp = 2; + * @return The startTimestamp. + */ + public long getStartTimestamp() { + return startTimestamp_; + } + /** + *
+     * required
+     * 
+ * + * int64 start_timestamp = 2; + * @param value The startTimestamp to set. + * @return This builder for chaining. + */ + public Builder setStartTimestamp(long value) { + + startTimestamp_ = value; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * int64 start_timestamp = 2; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + + startTimestamp_ = 0L; + onChanged(); + return this; + } + + private long endTimestamp_ ; + /** + * int64 end_timestamp = 3; + * @return The endTimestamp. + */ + public long getEndTimestamp() { + return endTimestamp_; + } + /** + * int64 end_timestamp = 3; + * @param value The endTimestamp to set. + * @return This builder for chaining. + */ + public Builder setEndTimestamp(long value) { + + endTimestamp_ = value; + onChanged(); + return this; + } + /** + * int64 end_timestamp = 3; + * @return This builder for chaining. + */ + public Builder clearEndTimestamp() { + + endTimestamp_ = 0L; + onChanged(); + return this; + } + private java.util.List filters_ = java.util.Collections.emptyList(); private void ensureFiltersIsMutable() { @@ -690,7 +762,7 @@ private static final long serialVersionUID = 0L; bdledger.api.grpc.query.BlockFilter, bdledger.api.grpc.query.BlockFilter.Builder, bdledger.api.grpc.query.BlockFilterOrBuilder> filtersBuilder_; /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public java.util.List getFiltersList() { if (filtersBuilder_ == null) { @@ -700,7 +772,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public int getFiltersCount() { if (filtersBuilder_ == null) { @@ -710,7 +782,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public bdledger.api.grpc.query.BlockFilter getFilters(int index) { if (filtersBuilder_ == null) { @@ -720,7 +792,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder setFilters( int index, bdledger.api.grpc.query.BlockFilter value) { @@ -737,7 +809,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder setFilters( int index, bdledger.api.grpc.query.BlockFilter.Builder builderForValue) { @@ -751,7 +823,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder addFilters(bdledger.api.grpc.query.BlockFilter value) { if (filtersBuilder_ == null) { @@ -767,7 +839,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder addFilters( int index, bdledger.api.grpc.query.BlockFilter value) { @@ -784,7 +856,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder addFilters( bdledger.api.grpc.query.BlockFilter.Builder builderForValue) { @@ -798,7 +870,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder addFilters( int index, bdledger.api.grpc.query.BlockFilter.Builder builderForValue) { @@ -812,7 +884,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder addAllFilters( java.lang.Iterable values) { @@ -827,7 +899,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder clearFilters() { if (filtersBuilder_ == null) { @@ -840,7 +912,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public Builder removeFilters(int index) { if (filtersBuilder_ == null) { @@ -853,14 +925,14 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public bdledger.api.grpc.query.BlockFilter.Builder getFiltersBuilder( int index) { return getFiltersFieldBuilder().getBuilder(index); } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public bdledger.api.grpc.query.BlockFilterOrBuilder getFiltersOrBuilder( int index) { @@ -870,7 +942,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public java.util.List getFiltersOrBuilderList() { @@ -881,14 +953,14 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public bdledger.api.grpc.query.BlockFilter.Builder addFiltersBuilder() { return getFiltersFieldBuilder().addBuilder( bdledger.api.grpc.query.BlockFilter.getDefaultInstance()); } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public bdledger.api.grpc.query.BlockFilter.Builder addFiltersBuilder( int index) { @@ -896,7 +968,7 @@ private static final long serialVersionUID = 0L; index, bdledger.api.grpc.query.BlockFilter.getDefaultInstance()); } /** - * repeated .bdledger.api.BlockFilter filters = 2; + * repeated .bdledger.api.BlockFilter filters = 4; */ public java.util.List getFiltersBuilderList() { @@ -916,78 +988,6 @@ private static final long serialVersionUID = 0L; } return filtersBuilder_; } - - private long startTimestamp_ ; - /** - *
-     * required
-     * 
- * - * int64 start_timestamp = 3; - * @return The startTimestamp. - */ - public long getStartTimestamp() { - return startTimestamp_; - } - /** - *
-     * required
-     * 
- * - * int64 start_timestamp = 3; - * @param value The startTimestamp to set. - * @return This builder for chaining. - */ - public Builder setStartTimestamp(long value) { - - startTimestamp_ = value; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * int64 start_timestamp = 3; - * @return This builder for chaining. - */ - public Builder clearStartTimestamp() { - - startTimestamp_ = 0L; - onChanged(); - return this; - } - - private long endTimestamp_ ; - /** - * int64 end_timestamp = 4; - * @return The endTimestamp. - */ - public long getEndTimestamp() { - return endTimestamp_; - } - /** - * int64 end_timestamp = 4; - * @param value The endTimestamp to set. - * @return This builder for chaining. - */ - public Builder setEndTimestamp(long value) { - - endTimestamp_ = value; - onChanged(); - return this; - } - /** - * int64 end_timestamp = 4; - * @return This builder for chaining. - */ - public Builder clearEndTimestamp() { - - endTimestamp_ = 0L; - onChanged(); - return this; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/src/main/java/bdledger/api/grpc/query/BlocksRequestOrBuilder.java b/src/main/java/bdledger/api/grpc/query/BlocksRequestOrBuilder.java index 79911a7..77ecc59 100644 --- a/src/main/java/bdledger/api/grpc/query/BlocksRequestOrBuilder.java +++ b/src/main/java/bdledger/api/grpc/query/BlocksRequestOrBuilder.java @@ -19,43 +19,43 @@ public interface BlocksRequestOrBuilder extends com.google.protobuf.ByteString getLedgerBytes(); - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - java.util.List - getFiltersList(); - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - bdledger.api.grpc.query.BlockFilter getFilters(int index); - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - int getFiltersCount(); - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - java.util.List - getFiltersOrBuilderList(); - /** - * repeated .bdledger.api.BlockFilter filters = 2; - */ - bdledger.api.grpc.query.BlockFilterOrBuilder getFiltersOrBuilder( - int index); - /** *
    * required
    * 
* - * int64 start_timestamp = 3; + * int64 start_timestamp = 2; * @return The startTimestamp. */ long getStartTimestamp(); /** - * int64 end_timestamp = 4; + * int64 end_timestamp = 3; * @return The endTimestamp. */ long getEndTimestamp(); + + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + java.util.List + getFiltersList(); + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + bdledger.api.grpc.query.BlockFilter getFilters(int index); + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + int getFiltersCount(); + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + java.util.List + getFiltersOrBuilderList(); + /** + * repeated .bdledger.api.BlockFilter filters = 4; + */ + bdledger.api.grpc.query.BlockFilterOrBuilder getFiltersOrBuilder( + int index); } diff --git a/src/main/java/bdledger/api/grpc/query/QueryProto.java b/src/main/java/bdledger/api/grpc/query/QueryProto.java index c689d2a..51901cf 100644 --- a/src/main/java/bdledger/api/grpc/query/QueryProto.java +++ b/src/main/java/bdledger/api/grpc/query/QueryProto.java @@ -102,9 +102,9 @@ public final class QueryProto { "hash\030\002 \001(\014\022\031\n\021full_transactions\030\003 \001(\010\"<\n" + "\026GetBlockByHashResponse\022\"\n\005block\030\001 \001(\0132\023" + ".bdledger.api.Block\"{\n\rBlocksRequest\022\016\n\006" + - "ledger\030\001 \001(\t\022*\n\007filters\030\002 \003(\0132\031.bdledger" + - ".api.BlockFilter\022\027\n\017start_timestamp\030\003 \001(" + - "\003\022\025\n\rend_timestamp\030\004 \001(\003\"h\n\021GetBlocksRes" + + "ledger\030\001 \001(\t\022\027\n\017start_timestamp\030\002 \001(\003\022\025\n" + + "\rend_timestamp\030\003 \001(\003\022*\n\007filters\030\004 \003(\0132\031." + + "bdledger.api.BlockFilter\"h\n\021GetBlocksRes" + "ponse\022#\n\006blocks\030\001 \003(\0132\023.bdledger.api.Blo" + "ck\022\027\n\017start_timestamp\030\002 \001(\003\022\025\n\rend_times" + "tamp\030\003 \001(\003\"$\n\023CountBlocksResponse\022\r\n\005cou" + @@ -117,9 +117,9 @@ public final class QueryProto { " \001(\r\"[\n)GetTransactionByBlockHashAndInde" + "xResponse\022.\n\013transaction\030\001 \001(\0132\031.bdledge" + "r.api.Transaction\"\207\001\n\023TransactionsReques" + - "t\022\016\n\006ledger\030\001 \001(\t\0220\n\007filters\030\002 \003(\0132\037.bdl" + - "edger.api.TransactionFilter\022\027\n\017start_tim" + - "estamp\030\003 \001(\003\022\025\n\rend_timestamp\030\004 \001(\003\"z\n\027G" + + "t\022\016\n\006ledger\030\001 \001(\t\022\027\n\017start_timestamp\030\002 \001" + + "(\003\022\025\n\rend_timestamp\030\003 \001(\003\0220\n\007filters\030\004 \003" + + "(\0132\037.bdledger.api.TransactionFilter\"z\n\027G" + "etTransactionsResponse\022/\n\014transactions\030\001" + " \003(\0132\031.bdledger.api.Transaction\022\027\n\017start" + "_timestamp\030\002 \001(\003\022\025\n\rend_timestamp\030\003 \001(\003\"" + @@ -180,7 +180,7 @@ public final class QueryProto { internal_static_bdledger_api_BlocksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_bdledger_api_BlocksRequest_descriptor, - new java.lang.String[] { "Ledger", "Filters", "StartTimestamp", "EndTimestamp", }); + new java.lang.String[] { "Ledger", "StartTimestamp", "EndTimestamp", "Filters", }); internal_static_bdledger_api_GetBlocksResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_bdledger_api_GetBlocksResponse_fieldAccessorTable = new @@ -222,7 +222,7 @@ public final class QueryProto { internal_static_bdledger_api_TransactionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_bdledger_api_TransactionsRequest_descriptor, - new java.lang.String[] { "Ledger", "Filters", "StartTimestamp", "EndTimestamp", }); + new java.lang.String[] { "Ledger", "StartTimestamp", "EndTimestamp", "Filters", }); internal_static_bdledger_api_GetTransactionsResponse_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_bdledger_api_GetTransactionsResponse_fieldAccessorTable = new diff --git a/src/main/java/bdledger/api/grpc/query/TransactionsRequest.java b/src/main/java/bdledger/api/grpc/query/TransactionsRequest.java index 0968b57..223266e 100644 --- a/src/main/java/bdledger/api/grpc/query/TransactionsRequest.java +++ b/src/main/java/bdledger/api/grpc/query/TransactionsRequest.java @@ -57,7 +57,17 @@ private static final long serialVersionUID = 0L; ledger_ = s; break; } - case 18: { + case 16: { + + startTimestamp_ = input.readInt64(); + break; + } + case 24: { + + endTimestamp_ = input.readInt64(); + break; + } + case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { filters_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -66,16 +76,6 @@ private static final long serialVersionUID = 0L; input.readMessage(bdledger.api.grpc.query.TransactionFilter.parser(), extensionRegistry)); break; } - case 24: { - - startTimestamp_ = input.readInt64(); - break; - } - case 32: { - - endTimestamp_ = input.readInt64(); - break; - } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -147,65 +147,65 @@ private static final long serialVersionUID = 0L; } } - public static final int FILTERS_FIELD_NUMBER = 2; - private java.util.List filters_; - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - public java.util.List getFiltersList() { - return filters_; - } - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - public java.util.List - getFiltersOrBuilderList() { - return filters_; - } - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - public int getFiltersCount() { - return filters_.size(); - } - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - public bdledger.api.grpc.query.TransactionFilter getFilters(int index) { - return filters_.get(index); - } - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - public bdledger.api.grpc.query.TransactionFilterOrBuilder getFiltersOrBuilder( - int index) { - return filters_.get(index); - } - - public static final int START_TIMESTAMP_FIELD_NUMBER = 3; + public static final int START_TIMESTAMP_FIELD_NUMBER = 2; private long startTimestamp_; /** *
    * required
    * 
* - * int64 start_timestamp = 3; + * int64 start_timestamp = 2; * @return The startTimestamp. */ public long getStartTimestamp() { return startTimestamp_; } - public static final int END_TIMESTAMP_FIELD_NUMBER = 4; + public static final int END_TIMESTAMP_FIELD_NUMBER = 3; private long endTimestamp_; /** - * int64 end_timestamp = 4; + * int64 end_timestamp = 3; * @return The endTimestamp. */ public long getEndTimestamp() { return endTimestamp_; } + public static final int FILTERS_FIELD_NUMBER = 4; + private java.util.List filters_; + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + public java.util.List getFiltersList() { + return filters_; + } + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + public java.util.List + getFiltersOrBuilderList() { + return filters_; + } + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + public int getFiltersCount() { + return filters_.size(); + } + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + public bdledger.api.grpc.query.TransactionFilter getFilters(int index) { + return filters_.get(index); + } + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + public bdledger.api.grpc.query.TransactionFilterOrBuilder getFiltersOrBuilder( + int index) { + return filters_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -223,14 +223,14 @@ private static final long serialVersionUID = 0L; if (!getLedgerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_); } - for (int i = 0; i < filters_.size(); i++) { - output.writeMessage(2, filters_.get(i)); - } if (startTimestamp_ != 0L) { - output.writeInt64(3, startTimestamp_); + output.writeInt64(2, startTimestamp_); } if (endTimestamp_ != 0L) { - output.writeInt64(4, endTimestamp_); + output.writeInt64(3, endTimestamp_); + } + for (int i = 0; i < filters_.size(); i++) { + output.writeMessage(4, filters_.get(i)); } unknownFields.writeTo(output); } @@ -244,17 +244,17 @@ private static final long serialVersionUID = 0L; if (!getLedgerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_); } - for (int i = 0; i < filters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, filters_.get(i)); - } if (startTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, startTimestamp_); + .computeInt64Size(2, startTimestamp_); } if (endTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, endTimestamp_); + .computeInt64Size(3, endTimestamp_); + } + for (int i = 0; i < filters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, filters_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -273,12 +273,12 @@ private static final long serialVersionUID = 0L; if (!getLedger() .equals(other.getLedger())) return false; - if (!getFiltersList() - .equals(other.getFiltersList())) return false; if (getStartTimestamp() != other.getStartTimestamp()) return false; if (getEndTimestamp() != other.getEndTimestamp()) return false; + if (!getFiltersList() + .equals(other.getFiltersList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -292,16 +292,16 @@ private static final long serialVersionUID = 0L; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LEDGER_FIELD_NUMBER; hash = (53 * hash) + getLedger().hashCode(); - if (getFiltersCount() > 0) { - hash = (37 * hash) + FILTERS_FIELD_NUMBER; - hash = (53 * hash) + getFiltersList().hashCode(); - } hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStartTimestamp()); hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getEndTimestamp()); + if (getFiltersCount() > 0) { + hash = (37 * hash) + FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getFiltersList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -438,16 +438,16 @@ private static final long serialVersionUID = 0L; super.clear(); ledger_ = ""; + startTimestamp_ = 0L; + + endTimestamp_ = 0L; + if (filtersBuilder_ == null) { filters_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { filtersBuilder_.clear(); } - startTimestamp_ = 0L; - - endTimestamp_ = 0L; - return this; } @@ -476,6 +476,8 @@ private static final long serialVersionUID = 0L; bdledger.api.grpc.query.TransactionsRequest result = new bdledger.api.grpc.query.TransactionsRequest(this); int from_bitField0_ = bitField0_; result.ledger_ = ledger_; + result.startTimestamp_ = startTimestamp_; + result.endTimestamp_ = endTimestamp_; if (filtersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { filters_ = java.util.Collections.unmodifiableList(filters_); @@ -485,8 +487,6 @@ private static final long serialVersionUID = 0L; } else { result.filters_ = filtersBuilder_.build(); } - result.startTimestamp_ = startTimestamp_; - result.endTimestamp_ = endTimestamp_; onBuilt(); return result; } @@ -539,6 +539,12 @@ private static final long serialVersionUID = 0L; ledger_ = other.ledger_; onChanged(); } + if (other.getStartTimestamp() != 0L) { + setStartTimestamp(other.getStartTimestamp()); + } + if (other.getEndTimestamp() != 0L) { + setEndTimestamp(other.getEndTimestamp()); + } if (filtersBuilder_ == null) { if (!other.filters_.isEmpty()) { if (filters_.isEmpty()) { @@ -565,12 +571,6 @@ private static final long serialVersionUID = 0L; } } } - if (other.getStartTimestamp() != 0L) { - setStartTimestamp(other.getStartTimestamp()); - } - if (other.getEndTimestamp() != 0L) { - setEndTimestamp(other.getEndTimestamp()); - } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -677,6 +677,78 @@ private static final long serialVersionUID = 0L; return this; } + private long startTimestamp_ ; + /** + *
+     * required
+     * 
+ * + * int64 start_timestamp = 2; + * @return The startTimestamp. + */ + public long getStartTimestamp() { + return startTimestamp_; + } + /** + *
+     * required
+     * 
+ * + * int64 start_timestamp = 2; + * @param value The startTimestamp to set. + * @return This builder for chaining. + */ + public Builder setStartTimestamp(long value) { + + startTimestamp_ = value; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * int64 start_timestamp = 2; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + + startTimestamp_ = 0L; + onChanged(); + return this; + } + + private long endTimestamp_ ; + /** + * int64 end_timestamp = 3; + * @return The endTimestamp. + */ + public long getEndTimestamp() { + return endTimestamp_; + } + /** + * int64 end_timestamp = 3; + * @param value The endTimestamp to set. + * @return This builder for chaining. + */ + public Builder setEndTimestamp(long value) { + + endTimestamp_ = value; + onChanged(); + return this; + } + /** + * int64 end_timestamp = 3; + * @return This builder for chaining. + */ + public Builder clearEndTimestamp() { + + endTimestamp_ = 0L; + onChanged(); + return this; + } + private java.util.List filters_ = java.util.Collections.emptyList(); private void ensureFiltersIsMutable() { @@ -690,7 +762,7 @@ private static final long serialVersionUID = 0L; bdledger.api.grpc.query.TransactionFilter, bdledger.api.grpc.query.TransactionFilter.Builder, bdledger.api.grpc.query.TransactionFilterOrBuilder> filtersBuilder_; /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public java.util.List getFiltersList() { if (filtersBuilder_ == null) { @@ -700,7 +772,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public int getFiltersCount() { if (filtersBuilder_ == null) { @@ -710,7 +782,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public bdledger.api.grpc.query.TransactionFilter getFilters(int index) { if (filtersBuilder_ == null) { @@ -720,7 +792,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder setFilters( int index, bdledger.api.grpc.query.TransactionFilter value) { @@ -737,7 +809,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder setFilters( int index, bdledger.api.grpc.query.TransactionFilter.Builder builderForValue) { @@ -751,7 +823,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder addFilters(bdledger.api.grpc.query.TransactionFilter value) { if (filtersBuilder_ == null) { @@ -767,7 +839,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder addFilters( int index, bdledger.api.grpc.query.TransactionFilter value) { @@ -784,7 +856,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder addFilters( bdledger.api.grpc.query.TransactionFilter.Builder builderForValue) { @@ -798,7 +870,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder addFilters( int index, bdledger.api.grpc.query.TransactionFilter.Builder builderForValue) { @@ -812,7 +884,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder addAllFilters( java.lang.Iterable values) { @@ -827,7 +899,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder clearFilters() { if (filtersBuilder_ == null) { @@ -840,7 +912,7 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public Builder removeFilters(int index) { if (filtersBuilder_ == null) { @@ -853,14 +925,14 @@ private static final long serialVersionUID = 0L; return this; } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public bdledger.api.grpc.query.TransactionFilter.Builder getFiltersBuilder( int index) { return getFiltersFieldBuilder().getBuilder(index); } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public bdledger.api.grpc.query.TransactionFilterOrBuilder getFiltersOrBuilder( int index) { @@ -870,7 +942,7 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public java.util.List getFiltersOrBuilderList() { @@ -881,14 +953,14 @@ private static final long serialVersionUID = 0L; } } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public bdledger.api.grpc.query.TransactionFilter.Builder addFiltersBuilder() { return getFiltersFieldBuilder().addBuilder( bdledger.api.grpc.query.TransactionFilter.getDefaultInstance()); } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public bdledger.api.grpc.query.TransactionFilter.Builder addFiltersBuilder( int index) { @@ -896,7 +968,7 @@ private static final long serialVersionUID = 0L; index, bdledger.api.grpc.query.TransactionFilter.getDefaultInstance()); } /** - * repeated .bdledger.api.TransactionFilter filters = 2; + * repeated .bdledger.api.TransactionFilter filters = 4; */ public java.util.List getFiltersBuilderList() { @@ -916,78 +988,6 @@ private static final long serialVersionUID = 0L; } return filtersBuilder_; } - - private long startTimestamp_ ; - /** - *
-     * required
-     * 
- * - * int64 start_timestamp = 3; - * @return The startTimestamp. - */ - public long getStartTimestamp() { - return startTimestamp_; - } - /** - *
-     * required
-     * 
- * - * int64 start_timestamp = 3; - * @param value The startTimestamp to set. - * @return This builder for chaining. - */ - public Builder setStartTimestamp(long value) { - - startTimestamp_ = value; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * int64 start_timestamp = 3; - * @return This builder for chaining. - */ - public Builder clearStartTimestamp() { - - startTimestamp_ = 0L; - onChanged(); - return this; - } - - private long endTimestamp_ ; - /** - * int64 end_timestamp = 4; - * @return The endTimestamp. - */ - public long getEndTimestamp() { - return endTimestamp_; - } - /** - * int64 end_timestamp = 4; - * @param value The endTimestamp to set. - * @return This builder for chaining. - */ - public Builder setEndTimestamp(long value) { - - endTimestamp_ = value; - onChanged(); - return this; - } - /** - * int64 end_timestamp = 4; - * @return This builder for chaining. - */ - public Builder clearEndTimestamp() { - - endTimestamp_ = 0L; - onChanged(); - return this; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/src/main/java/bdledger/api/grpc/query/TransactionsRequestOrBuilder.java b/src/main/java/bdledger/api/grpc/query/TransactionsRequestOrBuilder.java index 146f5ab..8230022 100644 --- a/src/main/java/bdledger/api/grpc/query/TransactionsRequestOrBuilder.java +++ b/src/main/java/bdledger/api/grpc/query/TransactionsRequestOrBuilder.java @@ -19,43 +19,43 @@ public interface TransactionsRequestOrBuilder extends com.google.protobuf.ByteString getLedgerBytes(); - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - java.util.List - getFiltersList(); - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - bdledger.api.grpc.query.TransactionFilter getFilters(int index); - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - int getFiltersCount(); - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - java.util.List - getFiltersOrBuilderList(); - /** - * repeated .bdledger.api.TransactionFilter filters = 2; - */ - bdledger.api.grpc.query.TransactionFilterOrBuilder getFiltersOrBuilder( - int index); - /** *
    * required
    * 
* - * int64 start_timestamp = 3; + * int64 start_timestamp = 2; * @return The startTimestamp. */ long getStartTimestamp(); /** - * int64 end_timestamp = 4; + * int64 end_timestamp = 3; * @return The endTimestamp. */ long getEndTimestamp(); + + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + java.util.List + getFiltersList(); + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + bdledger.api.grpc.query.TransactionFilter getFilters(int index); + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + int getFiltersCount(); + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + java.util.List + getFiltersOrBuilderList(); + /** + * repeated .bdledger.api.TransactionFilter filters = 4; + */ + bdledger.api.grpc.query.TransactionFilterOrBuilder getFiltersOrBuilder( + int index); }