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
41
42
43
44
45
46
47
/*
* 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 GetUpdatesPageRequest {
/// Exclusive lower bound offset of the requested ledger section (non-negative integer). The response page will only contain updates whose offset is strictly greater than this. If set to zero or not defined, the lower bound is set to the actual pruning offset or to the beginning of the ledger if the participant was not pruned yet. If set to positive and the ledger has been pruned, this parameter must be greater or equal than the pruning offset. Optional
#[serde(rename = "beginOffsetExclusive", skip_serializing_if = "Option::is_none")]
pub begin_offset_exclusive: Option<i64>,
/// Inclusive upper bound offset of the requested ledger section. If specified the response will only contain updates whose offset is less than or equal to this. If not specified response will only contain updates whose offset is less than the current ledger-end. Optional
#[serde(rename = "endOffsetInclusive", skip_serializing_if = "Option::is_none")]
pub end_offset_inclusive: Option<i64>,
/// The result page will contain the first max_page_size Updates of all matching updates. The server may reject queries with max_page_size above server specified limits. If not specified, the default max_page_size is determined by the server. Optional
#[serde(rename = "maxPageSize", skip_serializing_if = "Option::is_none")]
pub max_page_size: Option<i32>,
#[serde(rename = "updateFormat")]
pub update_format: Box<models::UpdateFormat>,
/// If set, the page will populate the elements in descending order starting from the end_offset_inclusive. Optional
#[serde(rename = "descendingOrder", skip_serializing_if = "Option::is_none")]
pub descending_order: Option<bool>,
/// To get the next page of updates, the ``page_token`` should be set to the ``next_page_token`` of the last ``GetUpdatesPageResponse``. To achieve correct paging: subsequent requests must - be executed on the same participant with the same version of canton, - have the same begin_offset_exclusive, - have the same end_offset_inclusive, - have the same update_format and - have the same descending_order. If not specified, the first page of updates will be returned. Optional: can be empty
#[serde(rename = "pageToken", skip_serializing_if = "Option::is_none")]
pub page_token: Option<String>,
}
impl GetUpdatesPageRequest {
pub fn new(update_format: models::UpdateFormat) -> GetUpdatesPageRequest {
GetUpdatesPageRequest {
begin_offset_exclusive: None,
end_offset_inclusive: None,
max_page_size: None,
update_format: Box::new(update_format),
descending_order: None,
page_token: None,
}
}
}