|
| 1 | +// This file is @generated by prost-build. |
| 2 | +/// PageRequest is to be embedded in gRPC request messages for efficient |
| 3 | +/// pagination. Ex: |
| 4 | +/// |
| 5 | +/// message SomeRequest { |
| 6 | +/// Foo some_parameter = 1; |
| 7 | +/// PageRequest pagination = 2; |
| 8 | +/// } |
| 9 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 10 | +pub struct PageRequest { |
| 11 | + /// key is a value returned in PageResponse.next_key to begin |
| 12 | + /// querying the next page most efficiently. Only one of offset or key |
| 13 | + /// should be set. |
| 14 | + #[prost(bytes = "vec", tag = "1")] |
| 15 | + pub key: ::prost::alloc::vec::Vec<u8>, |
| 16 | + /// offset is a numeric offset that can be used when key is unavailable. |
| 17 | + /// It is less efficient than using key. Only one of offset or key should |
| 18 | + /// be set. |
| 19 | + #[prost(uint64, tag = "2")] |
| 20 | + pub offset: u64, |
| 21 | + /// limit is the total number of results to be returned in the result page. |
| 22 | + /// If left empty it will default to a value to be set by each app. |
| 23 | + #[prost(uint64, tag = "3")] |
| 24 | + pub limit: u64, |
| 25 | + /// count_total is set to true to indicate that the result set should include |
| 26 | + /// a count of the total number of items available for pagination in UIs. |
| 27 | + /// count_total is only respected when offset is used. It is ignored when key |
| 28 | + /// is set. |
| 29 | + #[prost(bool, tag = "4")] |
| 30 | + pub count_total: bool, |
| 31 | + /// reverse is set to true if results are to be returned in the descending order. |
| 32 | + /// |
| 33 | + /// Since: cosmos-sdk 0.43 |
| 34 | + #[prost(bool, tag = "5")] |
| 35 | + pub reverse: bool, |
| 36 | +} |
| 37 | +impl ::prost::Name for PageRequest { |
| 38 | + const NAME: &'static str = "PageRequest"; |
| 39 | + const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; |
| 40 | + fn full_name() -> ::prost::alloc::string::String { |
| 41 | + "cosmos.base.query.v1beta1.PageRequest".into() |
| 42 | + } |
| 43 | + fn type_url() -> ::prost::alloc::string::String { |
| 44 | + "/cosmos.base.query.v1beta1.PageRequest".into() |
| 45 | + } |
| 46 | +} |
| 47 | +/// PageResponse is to be embedded in gRPC response messages where the |
| 48 | +/// corresponding request message has used PageRequest. |
| 49 | +/// |
| 50 | +/// message SomeResponse { |
| 51 | +/// repeated Bar results = 1; |
| 52 | +/// PageResponse page = 2; |
| 53 | +/// } |
| 54 | +#[derive(::serde::Deserialize, ::serde::Serialize)] |
| 55 | +#[serde(default)] |
| 56 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 57 | +pub struct PageResponse { |
| 58 | + /// next_key is the key to be passed to PageRequest.key to |
| 59 | + /// query the next page most efficiently. It will be empty if |
| 60 | + /// there are no more results. |
| 61 | + #[prost(bytes = "vec", tag = "1")] |
| 62 | + pub next_key: ::prost::alloc::vec::Vec<u8>, |
| 63 | + /// total is total number of results available if PageRequest.count_total |
| 64 | + /// was set, its value is undefined otherwise |
| 65 | + #[prost(uint64, tag = "2")] |
| 66 | + pub total: u64, |
| 67 | +} |
| 68 | +impl ::prost::Name for PageResponse { |
| 69 | + const NAME: &'static str = "PageResponse"; |
| 70 | + const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; |
| 71 | + fn full_name() -> ::prost::alloc::string::String { |
| 72 | + "cosmos.base.query.v1beta1.PageResponse".into() |
| 73 | + } |
| 74 | + fn type_url() -> ::prost::alloc::string::String { |
| 75 | + "/cosmos.base.query.v1beta1.PageResponse".into() |
| 76 | + } |
| 77 | +} |
0 commit comments