penumbra_sdk_proto/gen/cosmos.base.query.v1beta1.rs
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)]
10pub 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}
37impl ::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(Clone, PartialEq, ::prost::Message)]
55pub struct PageResponse {
56 /// next_key is the key to be passed to PageRequest.key to
57 /// query the next page most efficiently. It will be empty if
58 /// there are no more results.
59 #[prost(bytes = "vec", tag = "1")]
60 pub next_key: ::prost::alloc::vec::Vec<u8>,
61 /// total is total number of results available if PageRequest.count_total
62 /// was set, its value is undefined otherwise
63 #[prost(uint64, tag = "2")]
64 pub total: u64,
65}
66impl ::prost::Name for PageResponse {
67 const NAME: &'static str = "PageResponse";
68 const PACKAGE: &'static str = "cosmos.base.query.v1beta1";
69 fn full_name() -> ::prost::alloc::string::String {
70 "cosmos.base.query.v1beta1.PageResponse".into()
71 }
72 fn type_url() -> ::prost::alloc::string::String {
73 "/cosmos.base.query.v1beta1.PageResponse".into()
74 }
75}