canton_api_client/models/offset_checkpoint1.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/// OffsetCheckpoint1 : OffsetCheckpoints may be used to: - detect time out of commands. - provide an offset which can be used to restart consumption.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OffsetCheckpoint1 {
17 /// The participant's offset, the details of the offset field are described in ``community/ledger-api/README.md``. Must be a valid absolute offset (positive integer). Required
18 #[serde(rename = "offset")]
19 pub offset: i64,
20 /// The times associated with each synchronizer at this offset. Optional: can be empty
21 #[serde(rename = "synchronizerTimes", skip_serializing_if = "Option::is_none")]
22 pub synchronizer_times: Option<Vec<models::SynchronizerTime>>,
23}
24
25impl OffsetCheckpoint1 {
26 /// OffsetCheckpoints may be used to: - detect time out of commands. - provide an offset which can be used to restart consumption.
27 pub fn new(offset: i64) -> OffsetCheckpoint1 {
28 OffsetCheckpoint1 {
29 offset,
30 synchronizer_times: None,
31 }
32 }
33}
34