/*
* 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 GetPreferredPackagesResponse {
/// The package references of the preferred packages. Must contain one package reference for each requested package-name. If you build command submissions whose content depends on the returned preferred packages, then we recommend submitting the preferred package-ids in the ``package_id_selection_preference`` of the command submission to avoid race conditions with concurrent changes of the on-ledger package vetting state. Required: must be non-empty
#[serde(rename = "packageReferences")]
pub package_references: Vec<models::PackageReference>,
/// The synchronizer for which the package preferences are computed. If the synchronizer_id was specified in the request, then it matches the request synchronizer_id. Required
#[serde(rename = "synchronizerId")]
pub synchronizer_id: String,
}
impl GetPreferredPackagesResponse {
pub fn new(package_references: Vec<models::PackageReference>, synchronizer_id: String) -> GetPreferredPackagesResponse {
GetPreferredPackagesResponse {
package_references,
synchronizer_id,
}
}
}