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
48
49
/*
* JSON Ledger API HTTP endpoints
*
* 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 for the latest Canton 3.4 patch release. MINIMUM_CANTON_VERSION=3.6.0
*
* The version of the OpenAPI document: 3.6.0-SNAPSHOT
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// TransactionFormat : A format that specifies what events to include in Daml transactions and what data to compute and include for them.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionFormat {
#[serde(rename = "eventFormat")]
pub event_format: Box<models::EventFormat>,
/// What transaction shape to use for interpreting the filters of the event format. Required
#[serde(rename = "transactionShape")]
pub transaction_shape: TransactionShape,
}
impl TransactionFormat {
/// A format that specifies what events to include in Daml transactions and what data to compute and include for them.
pub fn new(event_format: models::EventFormat, transaction_shape: TransactionShape) -> TransactionFormat {
TransactionFormat {
event_format: Box::new(event_format),
transaction_shape,
}
}
}
/// What transaction shape to use for interpreting the filters of the event format. Required
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TransactionShape {
#[serde(rename = "TRANSACTION_SHAPE_UNSPECIFIED")]
TransactionShapeUnspecified,
#[serde(rename = "TRANSACTION_SHAPE_ACS_DELTA")]
TransactionShapeAcsDelta,
#[serde(rename = "TRANSACTION_SHAPE_LEDGER_EFFECTS")]
TransactionShapeLedgerEffects,
}
impl Default for TransactionShape {
fn default() -> TransactionShape {
Self::TransactionShapeUnspecified
}
}