canton_api_client/models/offset_checkpoint1.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/// 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``. Required, must be a valid absolute offset (positive integer).
18 #[serde(rename = "offset")]
19 pub offset: i64,
20 ///
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