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
/*
* 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};
/// DisclosedContract : An additional contract that is used to resolve contract & contract key lookups.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DisclosedContract {
/// The template id of the contract. The identifier uses the package-id reference format. If provided, used to validate the template id of the contract serialized in the created_event_blob. Optional
#[serde(rename = "templateId", skip_serializing_if = "Option::is_none")]
pub template_id: Option<String>,
/// The contract id If provided, used to validate the contract id of the contract serialized in the created_event_blob. Optional
#[serde(rename = "contractId", skip_serializing_if = "Option::is_none")]
pub contract_id: Option<String>,
/// Opaque byte string containing the complete payload required by the Daml engine to reconstruct a contract not known to the receiving participant. Required: must be non-empty
#[serde(rename = "createdEventBlob")]
pub created_event_blob: String,
/// The ID of the synchronizer where the contract is currently assigned Optional
#[serde(rename = "synchronizerId", skip_serializing_if = "Option::is_none")]
pub synchronizer_id: Option<String>,
}
impl DisclosedContract {
/// An additional contract that is used to resolve contract & contract key lookups.
pub fn new(created_event_blob: String) -> DisclosedContract {
DisclosedContract {
template_id: None,
contract_id: None,
created_event_blob,
synchronizer_id: None,
}
}
}