cosmos_sdk_proto/prost/cosmos-sdk/
cosmos.base.query.v1beta1.rs

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