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
50
51
52
53
/*
* JSON Ledger API HTTP endpoints
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 3.3.0-SNAPSHOT
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// JsReassignment : Complete view of an on-ledger reassignment.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JsReassignment {
/// Assigned by the server. Useful for correlating logs. Must be a valid LedgerString (as described in ``value.proto``). Required
#[serde(rename = "updateId")]
pub update_id: String,
/// The ID of the command which resulted in this reassignment. Missing for everyone except the submitting party on the submitting participant. Must be a valid LedgerString (as described in ``value.proto``). Optional
#[serde(rename = "commandId")]
pub command_id: String,
/// The workflow ID used in reassignment command submission. Only set if the ``workflow_id`` for the command was set. Must be a valid LedgerString (as described in ``value.proto``). Optional
#[serde(rename = "workflowId")]
pub workflow_id: String,
/// The participant's offset. The details of this field are described in ``community/ledger-api/README.md``. Required, must be a valid absolute offset (positive integer).
#[serde(rename = "offset")]
pub offset: i64,
/// The collection of reassignment events. Required.
#[serde(rename = "events", skip_serializing_if = "Option::is_none")]
pub events: Option<Vec<models::JsReassignmentEvent>>,
#[serde(rename = "traceContext", skip_serializing_if = "Option::is_none")]
pub trace_context: Option<Box<models::TraceContext>>,
/// The time at which the reassignment was recorded. The record time refers to the source/target synchronizer for an unassign/assign event respectively. Required
#[serde(rename = "recordTime")]
pub record_time: String,
}
impl JsReassignment {
/// Complete view of an on-ledger reassignment.
pub fn new(update_id: String, command_id: String, workflow_id: String, offset: i64, record_time: String) -> JsReassignment {
JsReassignment {
update_id,
command_id,
workflow_id,
offset,
events: None,
trace_context: None,
record_time,
}
}
}