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
54
/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConnectedSynchronizer {
/// The alias of the synchronizer Required
#[serde(rename = "synchronizerAlias")]
pub synchronizer_alias: String,
/// The ID of the synchronizer Required
#[serde(rename = "synchronizerId")]
pub synchronizer_id: String,
/// The permission on the synchronizer Set if a party was used in the request, otherwise unspecified. Optional
#[serde(rename = "permission", skip_serializing_if = "Option::is_none")]
pub permission: Option<Permission>,
}
impl ConnectedSynchronizer {
pub fn new(synchronizer_alias: String, synchronizer_id: String) -> ConnectedSynchronizer {
ConnectedSynchronizer {
synchronizer_alias,
synchronizer_id,
permission: None,
}
}
}
/// The permission on the synchronizer Set if a party was used in the request, otherwise unspecified. Optional
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Permission {
#[serde(rename = "PARTICIPANT_PERMISSION_UNSPECIFIED")]
ParticipantPermissionUnspecified,
#[serde(rename = "PARTICIPANT_PERMISSION_SUBMISSION")]
ParticipantPermissionSubmission,
#[serde(rename = "PARTICIPANT_PERMISSION_CONFIRMATION")]
ParticipantPermissionConfirmation,
#[serde(rename = "PARTICIPANT_PERMISSION_OBSERVATION")]
ParticipantPermissionObservation,
}
impl Default for Permission {
fn default() -> Permission {
Self::ParticipantPermissionUnspecified
}
}