canton_api_client/models/
js_transaction_tree.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/// JsTransactionTree : Provided for backwards compatibility, it will be removed in the Canton version 3.4.0. Complete view of an on-ledger transaction.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct JsTransactionTree {
17    /// Assigned by the server. Useful for correlating logs. Must be a valid LedgerString (as described in ``value.proto``). Required
18    #[serde(rename = "updateId")]
19    pub update_id: String,
20    /// The ID of the command which resulted in this transaction. Missing for everyone except the submitting party. Must be a valid LedgerString (as described in ``value.proto``). Optional
21    #[serde(rename = "commandId")]
22    pub command_id: String,
23    /// The workflow ID used in command submission. Only set if the ``workflow_id`` for the command was set. Must be a valid LedgerString (as described in ``value.proto``). Optional
24    #[serde(rename = "workflowId")]
25    pub workflow_id: String,
26    /// Ledger effective time. Required
27    #[serde(rename = "effectiveAt", skip_serializing_if = "Option::is_none")]
28    pub effective_at: Option<String>,
29    /// 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).
30    #[serde(rename = "offset")]
31    pub offset: i64,
32    #[serde(rename = "eventsById")]
33    pub events_by_id: std::collections::HashMap<String, models::Filters>,
34    /// A valid synchronizer id. Identifies the synchronizer that synchronized the transaction. Required
35    #[serde(rename = "synchronizerId")]
36    pub synchronizer_id: String,
37    #[serde(rename = "traceContext", skip_serializing_if = "Option::is_none")]
38    pub trace_context: Option<Box<models::TraceContext>>,
39    /// The time at which the transaction was recorded. The record time refers to the synchronizer which synchronized the transaction. Required
40    #[serde(rename = "recordTime")]
41    pub record_time: String,
42}
43
44impl JsTransactionTree {
45    /// Provided for backwards compatibility, it will be removed in the Canton version 3.4.0. Complete view of an on-ledger transaction.
46    pub fn new(update_id: String, command_id: String, workflow_id: String, offset: i64, events_by_id: std::collections::HashMap<String, models::Filters>, synchronizer_id: String, record_time: String) -> JsTransactionTree {
47        JsTransactionTree {
48            update_id,
49            command_id,
50            workflow_id,
51            effective_at: None,
52            offset,
53            events_by_id,
54            synchronizer_id,
55            trace_context: None,
56            record_time,
57        }
58    }
59}
60