canton_api_client/models/vet1.rs
1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * 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
5 *
6 * The version of the OpenAPI document: 3.6.0-SNAPSHOT
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Vet1 : Set vetting bounds of a list of packages. Packages that were not previously vetted have their bounds added, previous vetting bounds are overwritten.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Vet1 {
17 /// Packages to be vetted. If a reference in this list matches more than one package, the change is considered ambiguous and the entire update request is rejected. In other words, every reference must match exactly one package. Required: must be non-empty
18 #[serde(rename = "packages")]
19 pub packages: Vec<models::VettedPackagesRef>,
20 /// The time from which these packages should be vetted, prior lower bounds are overwritten. Optional
21 #[serde(rename = "newValidFromInclusive", skip_serializing_if = "Option::is_none")]
22 pub new_valid_from_inclusive: Option<String>,
23 /// The time until which these packages should be vetted, prior upper bounds are overwritten. Optional
24 #[serde(rename = "newValidUntilExclusive", skip_serializing_if = "Option::is_none")]
25 pub new_valid_until_exclusive: Option<String>,
26}
27
28impl Vet1 {
29 /// Set vetting bounds of a list of packages. Packages that were not previously vetted have their bounds added, previous vetting bounds are overwritten.
30 pub fn new(packages: Vec<models::VettedPackagesRef>) -> Vet1 {
31 Vet1 {
32 packages,
33 new_valid_from_inclusive: None,
34 new_valid_until_exclusive: None,
35 }
36 }
37}
38