canton_api_client/models/
transaction_format.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/// TransactionFormat : A format that specifies what events to include in Daml transactions and what data to compute and include for them.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TransactionFormat {
17    #[serde(rename = "eventFormat", skip_serializing_if = "Option::is_none")]
18    pub event_format: Option<Box<models::EventFormat>>,
19    #[serde(rename = "transactionShape")]
20    pub transaction_shape: Box<models::TransactionShape>,
21}
22
23impl TransactionFormat {
24    /// A format that specifies what events to include in Daml transactions and what data to compute and include for them.
25    pub fn new(transaction_shape: models::TransactionShape) -> TransactionFormat {
26        TransactionFormat {
27            event_format: None,
28            transaction_shape: Box::new(transaction_shape),
29        }
30    }
31}
32