Skip to main content

canton_api_client/models/
user_management_feature.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 UserManagementFeature {
16    /// Whether the Ledger API server provides the user management service.  Required
17    #[serde(rename = "supported")]
18    pub supported: bool,
19    /// The maximum number of rights that can be assigned to a single user. Servers MUST support at least 100 rights per user. A value of 0 means that the server enforces no rights per user limit.  Required
20    #[serde(rename = "maxRightsPerUser")]
21    pub max_rights_per_user: i32,
22    /// The maximum number of users the server can return in a single response (page). Servers MUST support at least a 100 users per page. A value of 0 means that the server enforces no page size limit.  Required
23    #[serde(rename = "maxUsersPageSize")]
24    pub max_users_page_size: i32,
25}
26
27impl UserManagementFeature {
28    pub fn new(supported: bool, max_rights_per_user: i32, max_users_page_size: i32) -> UserManagementFeature {
29        UserManagementFeature {
30            supported,
31            max_rights_per_user,
32            max_users_page_size,
33        }
34    }
35}
36