/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetPreferredPackagesRequest {
/// The package-name vetting requirements for which the preferred packages should be resolved. Generally it is enough to provide the requirements for the intended command's root package-names. Additional package-name requirements can be provided when additional Daml transaction informees need to use package dependencies of the command's root packages. Required: must be non-empty
#[serde(rename = "packageVettingRequirements")]
pub package_vetting_requirements: Vec<models::PackageVettingRequirement>,
/// The synchronizer whose vetting state should be used for resolving this query. If not specified, the vetting states of all synchronizers to which the participant is connected are used. Optional
#[serde(rename = "synchronizerId", skip_serializing_if = "Option::is_none")]
pub synchronizer_id: Option<String>,
/// The timestamp at which the package vetting validity should be computed on the latest topology snapshot as seen by the participant. If not provided, the participant's current clock time is used. Optional
#[serde(rename = "vettingValidAt", skip_serializing_if = "Option::is_none")]
pub vetting_valid_at: Option<String>,
}
impl GetPreferredPackagesRequest {
pub fn new(package_vetting_requirements: Vec<models::PackageVettingRequirement>) -> GetPreferredPackagesRequest {
GetPreferredPackagesRequest {
package_vetting_requirements,
synchronizer_id: None,
vetting_valid_at: None,
}
}
}