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};

/// VettedPackagesRef : A reference to identify one or more packages.  A reference matches a package if its ``package_id`` matches the package's ID, its ``package_name`` matches the package's name, and its ``package_version`` matches the package's version. If an attribute in the reference is left unspecified (i.e. as an empty string), that attribute is treated as a wildcard. At a minimum, ``package_id`` or the ``package_name`` must be specified.  If a reference does not match any package, the reference is considered unresolved and the entire update request is rejected.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VettedPackagesRef {
    /// Package's package id must be the same as this field.  Optional
    #[serde(rename = "packageId", skip_serializing_if = "Option::is_none")]
    pub package_id: Option<String>,
    /// Package's name must be the same as this field.  Optional
    #[serde(rename = "packageName", skip_serializing_if = "Option::is_none")]
    pub package_name: Option<String>,
    /// Package's version must be the same as this field.  Optional
    #[serde(rename = "packageVersion", skip_serializing_if = "Option::is_none")]
    pub package_version: Option<String>,
}

impl VettedPackagesRef {
    /// A reference to identify one or more packages.  A reference matches a package if its ``package_id`` matches the package's ID, its ``package_name`` matches the package's name, and its ``package_version`` matches the package's version. If an attribute in the reference is left unspecified (i.e. as an empty string), that attribute is treated as a wildcard. At a minimum, ``package_id`` or the ``package_name`` must be specified.  If a reference does not match any package, the reference is considered unresolved and the entire update request is rejected.
    pub fn new() -> VettedPackagesRef {
        VettedPackagesRef {
            package_id: None,
            package_name: None,
            package_version: None,
        }
    }
}