All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cosmos.base.query.v1beta1.Pagination Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: cosmos/base/query/v1beta1/pagination.proto

package cosmos.base.query.v1beta1;

public final class Pagination {
  private Pagination() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface PageRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:cosmos.base.query.v1beta1.PageRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * key is a value returned in PageResponse.next_key to begin
     * querying the next page most efficiently. Only one of offset or key
     * should be set.
     * 
* * bytes key = 1; */ com.google.protobuf.ByteString getKey(); /** *
     * offset is a numeric offset that can be used when key is unavailable.
     * It is less efficient than using key. Only one of offset or key should
     * be set.
     * 
* * uint64 offset = 2; */ long getOffset(); /** *
     * limit is the total number of results to be returned in the result page.
     * If left empty it will default to a value to be set by each app.
     * 
* * uint64 limit = 3; */ long getLimit(); /** *
     * count_total is set to true  to indicate that the result set should include
     * a count of the total number of items available for pagination in UIs.
     * count_total is only respected when offset is used. It is ignored when key
     * is set.
     * 
* * bool count_total = 4; */ boolean getCountTotal(); } /** *
   * PageRequest is to be embedded in gRPC request messages for efficient
   * pagination. Ex:
   *  message SomeRequest {
   *          Foo some_parameter = 1;
   *          PageRequest pagination = 2;
   *  }
   * 
* * Protobuf type {@code cosmos.base.query.v1beta1.PageRequest} */ public static final class PageRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cosmos.base.query.v1beta1.PageRequest) PageRequestOrBuilder { private static final long serialVersionUID = 0L; // Use PageRequest.newBuilder() to construct. private PageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PageRequest() { key_ = com.google.protobuf.ByteString.EMPTY; offset_ = 0L; limit_ = 0L; countTotal_ = false; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PageRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { key_ = input.readBytes(); break; } case 16: { offset_ = input.readUInt64(); break; } case 24: { limit_ = input.readUInt64(); break; } case 32: { countTotal_ = input.readBool(); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.base.query.v1beta1.Pagination.PageRequest.class, cosmos.base.query.v1beta1.Pagination.PageRequest.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString key_; /** *
     * key is a value returned in PageResponse.next_key to begin
     * querying the next page most efficiently. Only one of offset or key
     * should be set.
     * 
* * bytes key = 1; */ public com.google.protobuf.ByteString getKey() { return key_; } public static final int OFFSET_FIELD_NUMBER = 2; private long offset_; /** *
     * offset is a numeric offset that can be used when key is unavailable.
     * It is less efficient than using key. Only one of offset or key should
     * be set.
     * 
* * uint64 offset = 2; */ public long getOffset() { return offset_; } public static final int LIMIT_FIELD_NUMBER = 3; private long limit_; /** *
     * limit is the total number of results to be returned in the result page.
     * If left empty it will default to a value to be set by each app.
     * 
* * uint64 limit = 3; */ public long getLimit() { return limit_; } public static final int COUNT_TOTAL_FIELD_NUMBER = 4; private boolean countTotal_; /** *
     * count_total is set to true  to indicate that the result set should include
     * a count of the total number of items available for pagination in UIs.
     * count_total is only respected when offset is used. It is ignored when key
     * is set.
     * 
* * bool count_total = 4; */ public boolean getCountTotal() { return countTotal_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!key_.isEmpty()) { output.writeBytes(1, key_); } if (offset_ != 0L) { output.writeUInt64(2, offset_); } if (limit_ != 0L) { output.writeUInt64(3, limit_); } if (countTotal_ != false) { output.writeBool(4, countTotal_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!key_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, key_); } if (offset_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, offset_); } if (limit_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, limit_); } if (countTotal_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, countTotal_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof cosmos.base.query.v1beta1.Pagination.PageRequest)) { return super.equals(obj); } cosmos.base.query.v1beta1.Pagination.PageRequest other = (cosmos.base.query.v1beta1.Pagination.PageRequest) obj; boolean result = true; result = result && getKey() .equals(other.getKey()); result = result && (getOffset() == other.getOffset()); result = result && (getLimit() == other.getLimit()); result = result && (getCountTotal() == other.getCountTotal()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getOffset()); hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLimit()); hash = (37 * hash) + COUNT_TOTAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getCountTotal()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.base.query.v1beta1.Pagination.PageRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(cosmos.base.query.v1beta1.Pagination.PageRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * PageRequest is to be embedded in gRPC request messages for efficient
     * pagination. Ex:
     *  message SomeRequest {
     *          Foo some_parameter = 1;
     *          PageRequest pagination = 2;
     *  }
     * 
* * Protobuf type {@code cosmos.base.query.v1beta1.PageRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cosmos.base.query.v1beta1.PageRequest) cosmos.base.query.v1beta1.Pagination.PageRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.base.query.v1beta1.Pagination.PageRequest.class, cosmos.base.query.v1beta1.Pagination.PageRequest.Builder.class); } // Construct using cosmos.base.query.v1beta1.Pagination.PageRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); key_ = com.google.protobuf.ByteString.EMPTY; offset_ = 0L; limit_ = 0L; countTotal_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageRequest_descriptor; } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageRequest getDefaultInstanceForType() { return cosmos.base.query.v1beta1.Pagination.PageRequest.getDefaultInstance(); } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageRequest build() { cosmos.base.query.v1beta1.Pagination.PageRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageRequest buildPartial() { cosmos.base.query.v1beta1.Pagination.PageRequest result = new cosmos.base.query.v1beta1.Pagination.PageRequest(this); result.key_ = key_; result.offset_ = offset_; result.limit_ = limit_; result.countTotal_ = countTotal_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof cosmos.base.query.v1beta1.Pagination.PageRequest) { return mergeFrom((cosmos.base.query.v1beta1.Pagination.PageRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(cosmos.base.query.v1beta1.Pagination.PageRequest other) { if (other == cosmos.base.query.v1beta1.Pagination.PageRequest.getDefaultInstance()) return this; if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { setKey(other.getKey()); } if (other.getOffset() != 0L) { setOffset(other.getOffset()); } if (other.getLimit() != 0L) { setLimit(other.getLimit()); } if (other.getCountTotal() != false) { setCountTotal(other.getCountTotal()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { cosmos.base.query.v1beta1.Pagination.PageRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (cosmos.base.query.v1beta1.Pagination.PageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; /** *
       * key is a value returned in PageResponse.next_key to begin
       * querying the next page most efficiently. Only one of offset or key
       * should be set.
       * 
* * bytes key = 1; */ public com.google.protobuf.ByteString getKey() { return key_; } /** *
       * key is a value returned in PageResponse.next_key to begin
       * querying the next page most efficiently. Only one of offset or key
       * should be set.
       * 
* * bytes key = 1; */ public Builder setKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** *
       * key is a value returned in PageResponse.next_key to begin
       * querying the next page most efficiently. Only one of offset or key
       * should be set.
       * 
* * bytes key = 1; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } private long offset_ ; /** *
       * offset is a numeric offset that can be used when key is unavailable.
       * It is less efficient than using key. Only one of offset or key should
       * be set.
       * 
* * uint64 offset = 2; */ public long getOffset() { return offset_; } /** *
       * offset is a numeric offset that can be used when key is unavailable.
       * It is less efficient than using key. Only one of offset or key should
       * be set.
       * 
* * uint64 offset = 2; */ public Builder setOffset(long value) { offset_ = value; onChanged(); return this; } /** *
       * offset is a numeric offset that can be used when key is unavailable.
       * It is less efficient than using key. Only one of offset or key should
       * be set.
       * 
* * uint64 offset = 2; */ public Builder clearOffset() { offset_ = 0L; onChanged(); return this; } private long limit_ ; /** *
       * limit is the total number of results to be returned in the result page.
       * If left empty it will default to a value to be set by each app.
       * 
* * uint64 limit = 3; */ public long getLimit() { return limit_; } /** *
       * limit is the total number of results to be returned in the result page.
       * If left empty it will default to a value to be set by each app.
       * 
* * uint64 limit = 3; */ public Builder setLimit(long value) { limit_ = value; onChanged(); return this; } /** *
       * limit is the total number of results to be returned in the result page.
       * If left empty it will default to a value to be set by each app.
       * 
* * uint64 limit = 3; */ public Builder clearLimit() { limit_ = 0L; onChanged(); return this; } private boolean countTotal_ ; /** *
       * count_total is set to true  to indicate that the result set should include
       * a count of the total number of items available for pagination in UIs.
       * count_total is only respected when offset is used. It is ignored when key
       * is set.
       * 
* * bool count_total = 4; */ public boolean getCountTotal() { return countTotal_; } /** *
       * count_total is set to true  to indicate that the result set should include
       * a count of the total number of items available for pagination in UIs.
       * count_total is only respected when offset is used. It is ignored when key
       * is set.
       * 
* * bool count_total = 4; */ public Builder setCountTotal(boolean value) { countTotal_ = value; onChanged(); return this; } /** *
       * count_total is set to true  to indicate that the result set should include
       * a count of the total number of items available for pagination in UIs.
       * count_total is only respected when offset is used. It is ignored when key
       * is set.
       * 
* * bool count_total = 4; */ public Builder clearCountTotal() { countTotal_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:cosmos.base.query.v1beta1.PageRequest) } // @@protoc_insertion_point(class_scope:cosmos.base.query.v1beta1.PageRequest) private static final cosmos.base.query.v1beta1.Pagination.PageRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new cosmos.base.query.v1beta1.Pagination.PageRequest(); } public static cosmos.base.query.v1beta1.Pagination.PageRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PageRequest(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PageResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:cosmos.base.query.v1beta1.PageResponse) com.google.protobuf.MessageOrBuilder { /** *
     * next_key is the key to be passed to PageRequest.key to
     * query the next page most efficiently
     * 
* * bytes next_key = 1; */ com.google.protobuf.ByteString getNextKey(); /** *
     * total is total number of results available if PageRequest.count_total
     * was set, its value is undefined otherwise
     * 
* * uint64 total = 2; */ long getTotal(); } /** *
   * PageResponse is to be embedded in gRPC response messages where the
   * corresponding request message has used PageRequest.
   *  message SomeResponse {
   *          repeated Bar results = 1;
   *          PageResponse page = 2;
   *  }
   * 
* * Protobuf type {@code cosmos.base.query.v1beta1.PageResponse} */ public static final class PageResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cosmos.base.query.v1beta1.PageResponse) PageResponseOrBuilder { private static final long serialVersionUID = 0L; // Use PageResponse.newBuilder() to construct. private PageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PageResponse() { nextKey_ = com.google.protobuf.ByteString.EMPTY; total_ = 0L; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PageResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { nextKey_ = input.readBytes(); break; } case 16: { total_ = input.readUInt64(); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.base.query.v1beta1.Pagination.PageResponse.class, cosmos.base.query.v1beta1.Pagination.PageResponse.Builder.class); } public static final int NEXT_KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString nextKey_; /** *
     * next_key is the key to be passed to PageRequest.key to
     * query the next page most efficiently
     * 
* * bytes next_key = 1; */ public com.google.protobuf.ByteString getNextKey() { return nextKey_; } public static final int TOTAL_FIELD_NUMBER = 2; private long total_; /** *
     * total is total number of results available if PageRequest.count_total
     * was set, its value is undefined otherwise
     * 
* * uint64 total = 2; */ public long getTotal() { return total_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!nextKey_.isEmpty()) { output.writeBytes(1, nextKey_); } if (total_ != 0L) { output.writeUInt64(2, total_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!nextKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, nextKey_); } if (total_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, total_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof cosmos.base.query.v1beta1.Pagination.PageResponse)) { return super.equals(obj); } cosmos.base.query.v1beta1.Pagination.PageResponse other = (cosmos.base.query.v1beta1.Pagination.PageResponse) obj; boolean result = true; result = result && getNextKey() .equals(other.getNextKey()); result = result && (getTotal() == other.getTotal()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NEXT_KEY_FIELD_NUMBER; hash = (53 * hash) + getNextKey().hashCode(); hash = (37 * hash) + TOTAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTotal()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.base.query.v1beta1.Pagination.PageResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(cosmos.base.query.v1beta1.Pagination.PageResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * PageResponse is to be embedded in gRPC response messages where the
     * corresponding request message has used PageRequest.
     *  message SomeResponse {
     *          repeated Bar results = 1;
     *          PageResponse page = 2;
     *  }
     * 
* * Protobuf type {@code cosmos.base.query.v1beta1.PageResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cosmos.base.query.v1beta1.PageResponse) cosmos.base.query.v1beta1.Pagination.PageResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.base.query.v1beta1.Pagination.PageResponse.class, cosmos.base.query.v1beta1.Pagination.PageResponse.Builder.class); } // Construct using cosmos.base.query.v1beta1.Pagination.PageResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); nextKey_ = com.google.protobuf.ByteString.EMPTY; total_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return cosmos.base.query.v1beta1.Pagination.internal_static_cosmos_base_query_v1beta1_PageResponse_descriptor; } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageResponse getDefaultInstanceForType() { return cosmos.base.query.v1beta1.Pagination.PageResponse.getDefaultInstance(); } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageResponse build() { cosmos.base.query.v1beta1.Pagination.PageResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageResponse buildPartial() { cosmos.base.query.v1beta1.Pagination.PageResponse result = new cosmos.base.query.v1beta1.Pagination.PageResponse(this); result.nextKey_ = nextKey_; result.total_ = total_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof cosmos.base.query.v1beta1.Pagination.PageResponse) { return mergeFrom((cosmos.base.query.v1beta1.Pagination.PageResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(cosmos.base.query.v1beta1.Pagination.PageResponse other) { if (other == cosmos.base.query.v1beta1.Pagination.PageResponse.getDefaultInstance()) return this; if (other.getNextKey() != com.google.protobuf.ByteString.EMPTY) { setNextKey(other.getNextKey()); } if (other.getTotal() != 0L) { setTotal(other.getTotal()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { cosmos.base.query.v1beta1.Pagination.PageResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (cosmos.base.query.v1beta1.Pagination.PageResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString nextKey_ = com.google.protobuf.ByteString.EMPTY; /** *
       * next_key is the key to be passed to PageRequest.key to
       * query the next page most efficiently
       * 
* * bytes next_key = 1; */ public com.google.protobuf.ByteString getNextKey() { return nextKey_; } /** *
       * next_key is the key to be passed to PageRequest.key to
       * query the next page most efficiently
       * 
* * bytes next_key = 1; */ public Builder setNextKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } nextKey_ = value; onChanged(); return this; } /** *
       * next_key is the key to be passed to PageRequest.key to
       * query the next page most efficiently
       * 
* * bytes next_key = 1; */ public Builder clearNextKey() { nextKey_ = getDefaultInstance().getNextKey(); onChanged(); return this; } private long total_ ; /** *
       * total is total number of results available if PageRequest.count_total
       * was set, its value is undefined otherwise
       * 
* * uint64 total = 2; */ public long getTotal() { return total_; } /** *
       * total is total number of results available if PageRequest.count_total
       * was set, its value is undefined otherwise
       * 
* * uint64 total = 2; */ public Builder setTotal(long value) { total_ = value; onChanged(); return this; } /** *
       * total is total number of results available if PageRequest.count_total
       * was set, its value is undefined otherwise
       * 
* * uint64 total = 2; */ public Builder clearTotal() { total_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:cosmos.base.query.v1beta1.PageResponse) } // @@protoc_insertion_point(class_scope:cosmos.base.query.v1beta1.PageResponse) private static final cosmos.base.query.v1beta1.Pagination.PageResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new cosmos.base.query.v1beta1.Pagination.PageResponse(); } public static cosmos.base.query.v1beta1.Pagination.PageResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PageResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PageResponse(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public cosmos.base.query.v1beta1.Pagination.PageResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_cosmos_base_query_v1beta1_PageRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_cosmos_base_query_v1beta1_PageRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_cosmos_base_query_v1beta1_PageResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_cosmos_base_query_v1beta1_PageResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n*cosmos/base/query/v1beta1/pagination.p" + "roto\022\031cosmos.base.query.v1beta1\"N\n\013PageR" + "equest\022\013\n\003key\030\001 \001(\014\022\016\n\006offset\030\002 \001(\004\022\r\n\005l" + "imit\030\003 \001(\004\022\023\n\013count_total\030\004 \001(\010\"/\n\014PageR" + "esponse\022\020\n\010next_key\030\001 \001(\014\022\r\n\005total\030\002 \001(\004" + "B*Z(github.com/cosmos/cosmos-sdk/types/q" + "ueryb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); internal_static_cosmos_base_query_v1beta1_PageRequest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_cosmos_base_query_v1beta1_PageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cosmos_base_query_v1beta1_PageRequest_descriptor, new java.lang.String[] { "Key", "Offset", "Limit", "CountTotal", }); internal_static_cosmos_base_query_v1beta1_PageResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_cosmos_base_query_v1beta1_PageResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cosmos_base_query_v1beta1_PageResponse_descriptor, new java.lang.String[] { "NextKey", "Total", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy