canton_api_client/models/get_updates_request.rs
1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.3.0-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 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.
17 #[serde(rename = "beginExclusive")]
18 pub begin_exclusive: i64,
19 /// End of the requested ledger section. The response will only contain transactions whose offset is less than or equal to this. Optional, if empty, the stream will not terminate. If specified, the stream will terminate after this absolute offset (positive integer) is reached.
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.4.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")]
26 pub verbose: bool,
27 #[serde(rename = "updateFormat", skip_serializing_if = "Option::is_none")]
28 pub update_format: Option<Box<models::UpdateFormat>>,
29}
30
31impl GetUpdatesRequest {
32 pub fn new(begin_exclusive: i64, verbose: bool) -> GetUpdatesRequest {
33 GetUpdatesRequest {
34 begin_exclusive,
35 end_inclusive: None,
36 filter: None,
37 verbose,
38 update_format: None,
39 }
40 }
41}
42