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
/*
* 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};
/// VettedPackage : A package that is vetting on a given participant and synchronizer, modelled after ``VettedPackage`` in `topology.proto <https://github.com/digital-asset/canton/blob/main/community/base/src/main/protobuf/com/digitalasset/canton/protocol/v30/topology.proto#L206>`_, enriched with the package name and version.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VettedPackage {
/// Package ID of this package Required
#[serde(rename = "packageId")]
pub package_id: String,
/// The time from which this package is vetted. Empty if vetting time has no lower bound. Optional
#[serde(rename = "validFromInclusive", skip_serializing_if = "Option::is_none")]
pub valid_from_inclusive: Option<String>,
/// The time until which this package is vetted. Empty if vetting time has no upper bound. Optional
#[serde(rename = "validUntilExclusive", skip_serializing_if = "Option::is_none")]
pub valid_until_exclusive: Option<String>,
/// Name of this package. Only available if the package has been uploaded to the current participant. Optional
#[serde(rename = "packageName", skip_serializing_if = "Option::is_none")]
pub package_name: Option<String>,
/// Version of this package. Only available if the package has been uploaded to the current participant. Optional
#[serde(rename = "packageVersion", skip_serializing_if = "Option::is_none")]
pub package_version: Option<String>,
}
impl VettedPackage {
/// A package that is vetting on a given participant and synchronizer, modelled after ``VettedPackage`` in `topology.proto <https://github.com/digital-asset/canton/blob/main/community/base/src/main/protobuf/com/digitalasset/canton/protocol/v30/topology.proto#L206>`_, enriched with the package name and version.
pub fn new(package_id: String) -> VettedPackage {
VettedPackage {
package_id,
valid_from_inclusive: None,
valid_until_exclusive: None,
package_name: None,
package_version: None,
}
}
}