canton-api-client 3.3.0-0.1.1

Canton Ledger API rust client
Documentation
/*
 * 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};

/// 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.  Required
    #[serde(rename = "templateId", skip_serializing_if = "Option::is_none")]
    pub template_id: Option<String>,
    /// The contract id Required
    #[serde(rename = "contractId")]
    pub contract_id: String,
    /// Opaque byte string containing the complete payload required by the Daml engine to reconstruct a contract not known to the receiving participant. Required
    #[serde(rename = "createdEventBlob")]
    pub created_event_blob: String,
    /// The ID of the synchronizer where the contract is currently assigned Optional
    #[serde(rename = "synchronizerId")]
    pub synchronizer_id: String,
}

impl DisclosedContract {
    /// An additional contract that is used to resolve contract & contract key lookups.
    pub fn new(contract_id: String, created_event_blob: String, synchronizer_id: String) -> DisclosedContract {
        DisclosedContract {
            template_id: None,
            contract_id,
            created_event_blob,
            synchronizer_id,
        }
    }
}