1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* JSON Ledger API HTTP endpoints
*
* This specification version fixes the API inconsistencies where certain fields marked as required in the spec are in fact optional. If you use code generation tool based on this file, you might need to adjust the existing application code to handle those fields as optional. If you do not want to change your client code, continue using the OpenAPI specification for the latest Canton 3.4 patch release. MINIMUM_CANTON_VERSION=3.6.0
*
* The version of the OpenAPI document: 3.6.0-SNAPSHOT
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JsGetUpdatesPageResponse {
/// The first max_page_size updates that match the filter in the request. In case descending_order was selected, the order of the updates is in reversed offset order. Optional: can be empty
#[serde(rename = "updates", skip_serializing_if = "Option::is_none")]
pub updates: Option<Vec<models::JsGetUpdateResponse>>,
/// Represents the lower bound of this page. Required
#[serde(rename = "lowestPageOffsetExclusive")]
pub lowest_page_offset_exclusive: i64,
/// Represents the upper bound of the page. Required
#[serde(rename = "highestPageOffsetInclusive")]
pub highest_page_offset_inclusive: i64,
/// If the value is not populated, this is the last page. If the value is populated, this token can be used to get the next page. If the original ``GetFirstUpdatePageRequest`` end_offset_inclusive was not specified and the request uses ascending order, then this token will always be populated, so you can use it to \"tail\" the ledger by repeatedly polling with the new page token returned. Optional: can be empty
#[serde(rename = "nextPageToken", skip_serializing_if = "Option::is_none")]
pub next_page_token: Option<String>,
}
impl JsGetUpdatesPageResponse {
pub fn new(lowest_page_offset_exclusive: i64, highest_page_offset_inclusive: i64) -> JsGetUpdatesPageResponse {
JsGetUpdatesPageResponse {
updates: None,
lowest_page_offset_exclusive,
highest_page_offset_inclusive,
next_page_token: None,
}
}
}