Skip to main content

canton_api_client/models/
participant_authorization_changed1.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ParticipantAuthorizationChanged1 {
16    /// Required
17    #[serde(rename = "partyId")]
18    pub party_id: String,
19    /// Required
20    #[serde(rename = "participantId")]
21    pub participant_id: String,
22    /// Required
23    #[serde(rename = "participantPermission")]
24    pub participant_permission: ParticipantPermission,
25}
26
27impl ParticipantAuthorizationChanged1 {
28    pub fn new(party_id: String, participant_id: String, participant_permission: ParticipantPermission) -> ParticipantAuthorizationChanged1 {
29        ParticipantAuthorizationChanged1 {
30            party_id,
31            participant_id,
32            participant_permission,
33        }
34    }
35}
36/// Required
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum ParticipantPermission {
39    #[serde(rename = "PARTICIPANT_PERMISSION_UNSPECIFIED")]
40    ParticipantPermissionUnspecified,
41    #[serde(rename = "PARTICIPANT_PERMISSION_SUBMISSION")]
42    ParticipantPermissionSubmission,
43    #[serde(rename = "PARTICIPANT_PERMISSION_CONFIRMATION")]
44    ParticipantPermissionConfirmation,
45    #[serde(rename = "PARTICIPANT_PERMISSION_OBSERVATION")]
46    ParticipantPermissionObservation,
47}
48
49impl Default for ParticipantPermission {
50    fn default() -> ParticipantPermission {
51        Self::ParticipantPermissionUnspecified
52    }
53}
54