canton_api_client/models/get_updates_request.rs
1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * 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 from the previous Canton 3.4 patch release. MINIMUM_CANTON_VERSION=3.4.12
5 *
6 * The version of the OpenAPI document: 3.4.12-SNAPSHOT
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GetUpdatesRequest {
16 /// Beginning of the requested ledger section (non-negative integer). The response will only contain transactions whose offset is strictly greater than this. If not populated or set to zero, the stream will start from the beginning of the ledger. If positive, the streaming will start after this absolute offset. If the ledger has been pruned, this parameter must be specified and be greater than the pruning offset. Optional
17 #[serde(rename = "beginExclusive", skip_serializing_if = "Option::is_none")]
18 pub begin_exclusive: Option<i64>,
19 /// End of the requested ledger section. The response will only contain transactions whose offset is less than or equal to this. If empty, the stream will not terminate. If specified, the stream will terminate after this absolute offset (positive integer) is reached. Optional
20 #[serde(rename = "endInclusive", skip_serializing_if = "Option::is_none")]
21 pub end_inclusive: Option<i64>,
22 #[serde(rename = "filter", skip_serializing_if = "Option::is_none")]
23 pub filter: Option<Box<models::TransactionFilter>>,
24 /// Provided for backwards compatibility, it will be removed in the Canton version 3.5.0. If enabled, values served over the API will contain more information than strictly necessary to interpret the data. In particular, setting the verbose flag to true triggers the ledger to include labels, record and variant type ids for record fields. Optional for backwards compatibility, if defined update_format must be unset
25 #[serde(rename = "verbose", skip_serializing_if = "Option::is_none")]
26 pub verbose: Option<bool>,
27 #[serde(rename = "updateFormat")]
28 pub update_format: Box<models::UpdateFormat>,
29}
30
31impl GetUpdatesRequest {
32 pub fn new(update_format: models::UpdateFormat) -> GetUpdatesRequest {
33 GetUpdatesRequest {
34 begin_exclusive: None,
35 end_inclusive: None,
36 filter: None,
37 verbose: None,
38 update_format: Box::new(update_format),
39 }
40 }
41}
42