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
40
41
42
43
44
45
46
47
/*
* JSON Ledger API HTTP endpoints
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 3.3.0-SNAPSHOT
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JsTopologyTransaction {
/// Assigned by the server. Useful for correlating logs. Must be a valid LedgerString (as described in ``value.proto``). Required
#[serde(rename = "updateId")]
pub update_id: String,
/// A non-empty list of topology events. Required
#[serde(rename = "events", skip_serializing_if = "Option::is_none")]
pub events: Option<Vec<models::Event1>>,
/// The absolute offset. The details of this field are described in ``community/ledger-api/README.md``. Required, it is a valid absolute offset (positive integer).
#[serde(rename = "offset")]
pub offset: i64,
/// A valid synchronizer id. Identifies the synchronizer that synchronized the topology transaction. Required
#[serde(rename = "synchronizerId")]
pub synchronizer_id: String,
#[serde(rename = "traceContext", skip_serializing_if = "Option::is_none")]
pub trace_context: Option<Box<models::TraceContext>>,
/// The time at which the changes in the topology transaction become effective. There is a small delay between a topology transaction being sequenced and the changes it contains becoming effective. Topology transactions appear in order relative to a synchronizer based on their effective time rather than their sequencing time. Required
#[serde(rename = "recordTime")]
pub record_time: String,
}
impl JsTopologyTransaction {
pub fn new(update_id: String, offset: i64, synchronizer_id: String, record_time: String) -> JsTopologyTransaction {
JsTopologyTransaction {
update_id,
events: None,
offset,
synchronizer_id,
trace_context: None,
record_time,
}
}
}