canton_api_client/models/
package_preference.rs

1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.3.0-SNAPSHOT
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PackagePreference {
16    #[serde(rename = "packageReference", skip_serializing_if = "Option::is_none")]
17    pub package_reference: Option<Box<models::PackageReference>>,
18    /// The synchronizer for which the preferred package was computed. If the synchronizer_id was specified in the request, then it matches the request synchronizer_id. Required
19    #[serde(rename = "synchronizerId")]
20    pub synchronizer_id: String,
21}
22
23impl PackagePreference {
24    pub fn new(synchronizer_id: String) -> PackagePreference {
25        PackagePreference {
26            package_reference: None,
27            synchronizer_id,
28        }
29    }
30}
31