Skip to main content

canton_api_client/models/
assign_command1.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/// AssignCommand1 : Assign a contract
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AssignCommand1 {
17    /// The ID from the unassigned event to be completed by this assignment. Must be a valid LedgerString (as described in ``value.proto``).  Required
18    #[serde(rename = "reassignmentId")]
19    pub reassignment_id: String,
20    /// The ID of the source synchronizer Must be a valid synchronizer id  Required
21    #[serde(rename = "source")]
22    pub source: String,
23    /// The ID of the target synchronizer Must be a valid synchronizer id  Required
24    #[serde(rename = "target")]
25    pub target: String,
26}
27
28impl AssignCommand1 {
29    /// Assign a contract
30    pub fn new(reassignment_id: String, source: String, target: String) -> AssignCommand1 {
31        AssignCommand1 {
32            reassignment_id,
33            source,
34            target,
35        }
36    }
37}
38