canton-api-client 3.6.0-0.1.0

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

/// TemplateFilter1 : This filter matches contracts of a specific template.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TemplateFilter1 {
    /// A template for which the payload should be included in the response. The ``template_id`` needs to be valid: corresponding template should be defined in one of the available packages at the time of the query. Both package-name and package-id reference formats for the identifier are supported. Note: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.  Required
    #[serde(rename = "templateId")]
    pub template_id: String,
    /// Whether to include a ``created_event_blob`` in the returned ``CreatedEvent``. Use this to access the contract event payload in your API client for submitting it as a disclosed contract with future commands.  Optional
    #[serde(rename = "includeCreatedEventBlob", skip_serializing_if = "Option::is_none")]
    pub include_created_event_blob: Option<bool>,
}

impl TemplateFilter1 {
    /// This filter matches contracts of a specific template.
    pub fn new(template_id: String) -> TemplateFilter1 {
        TemplateFilter1 {
            template_id,
            include_created_event_blob: None,
        }
    }
}