Skip to main content

canton_api_client/models/
js_assignment_event.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 from the previous Canton 3.4 patch release. MINIMUM_CANTON_VERSION=3.4.12
5 *
6 * The version of the OpenAPI document: 3.4.12-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 JsAssignmentEvent {
16    #[serde(rename = "source")]
17    pub source: String,
18    #[serde(rename = "target")]
19    pub target: String,
20    #[serde(rename = "reassignmentId")]
21    pub reassignment_id: String,
22    #[serde(rename = "submitter")]
23    pub submitter: String,
24    #[serde(rename = "reassignmentCounter")]
25    pub reassignment_counter: i64,
26    #[serde(rename = "createdEvent")]
27    pub created_event: Box<models::CreatedEvent>,
28}
29
30impl JsAssignmentEvent {
31    pub fn new(source: String, target: String, reassignment_id: String, submitter: String, reassignment_counter: i64, created_event: models::CreatedEvent) -> JsAssignmentEvent {
32        JsAssignmentEvent {
33            source,
34            target,
35            reassignment_id,
36            submitter,
37            reassignment_counter,
38            created_event: Box::new(created_event),
39        }
40    }
41}
42