1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* 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};
/// JsAssignedEvent : Records that a contract has been assigned, and it can be used on the target synchronizer.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JsAssignedEvent {
/// The ID of the source synchronizer. Must be a valid synchronizer id. Required
#[serde(rename = "source")]
pub source: String,
/// The ID of the target synchronizer. Must be a valid synchronizer id. Required
#[serde(rename = "target")]
pub target: String,
/// The ID from the unassigned event. For correlation capabilities. Must be a valid LedgerString (as described in ``value.proto``). Required
#[serde(rename = "reassignmentId")]
pub reassignment_id: String,
/// Party on whose behalf the assign command was executed. Empty if the assignment happened offline via the repair service. Must be a valid PartyIdString (as described in ``value.proto``). Optional
#[serde(rename = "submitter", skip_serializing_if = "Option::is_none")]
pub submitter: Option<String>,
/// Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases with each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter equals zero. Required
#[serde(rename = "reassignmentCounter")]
pub reassignment_counter: i64,
#[serde(rename = "createdEvent")]
pub created_event: Box<models::CreatedEvent>,
}
impl JsAssignedEvent {
/// Records that a contract has been assigned, and it can be used on the target synchronizer.
pub fn new(source: String, target: String, reassignment_id: String, reassignment_counter: i64, created_event: models::CreatedEvent) -> JsAssignedEvent {
JsAssignedEvent {
source,
target,
reassignment_id,
submitter: None,
reassignment_counter,
created_event: Box::new(created_event),
}
}
}