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
/*
* 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 GetActiveContractsPageRequest {
/// The offset at which the snapshot of the active contracts will be computed. Must be no greater than the current ledger end offset. Must be greater than or equal to the last pruning offset. Optional, if defined, it must be a valid absolute offset (positive integer) or ledger begin offset (zero). If zero, the empty set will be returned. If not defined, the current ledger end will be used and it will be populated in the response. Optional
#[serde(rename = "activeAtOffset", skip_serializing_if = "Option::is_none")]
pub active_at_offset: Option<i64>,
#[serde(rename = "eventFormat")]
pub event_format: Box<models::EventFormat>,
/// The result page will contain at most max_page_size entries of the respective active contract snapshot. The server might reject max_page_size breaching the server-specified limit. Optional, if not defined, the default will be determined by the server. Optional
#[serde(rename = "maxPageSize", skip_serializing_if = "Option::is_none")]
pub max_page_size: Option<i32>,
/// To get the next page of the active contracts snapshot, the ``page_token`` should be set to the ``next_page_token`` of the last ``GetActiveContractsPageResponse``. The page token only works if subsequent requests: - are executed on the same participant, - use the same active_at_offset and event_format, - and the participant's store was not pruned to after the active_at_offset. If not specified, the first page of the active contracts snapshot will be returned. Optional: can be empty
#[serde(rename = "pageToken", skip_serializing_if = "Option::is_none")]
pub page_token: Option<String>,
}
impl GetActiveContractsPageRequest {
pub fn new(event_format: models::EventFormat) -> GetActiveContractsPageRequest {
GetActiveContractsPageRequest {
active_at_offset: None,
event_format: Box::new(event_format),
max_page_size: None,
page_token: None,
}
}
}