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
/*
* 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};
/// AllocatePartyRequest : Required authorization: ``HasRight(ParticipantAdmin) OR IsAuthenticatedIdentityProviderAdmin(identity_provider_id) OR IsAuthenticatedUser(user_id)``
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AllocatePartyRequest {
/// A hint to the participant which party ID to allocate. It can be ignored. Must be a valid PartyIdString (as described in ``value.proto``). Optional
#[serde(rename = "partyIdHint", skip_serializing_if = "Option::is_none")]
pub party_id_hint: Option<String>,
#[serde(rename = "localMetadata", skip_serializing_if = "Option::is_none")]
pub local_metadata: Option<Box<models::ObjectMeta>>,
/// The id of the ``Identity Provider`` If not set, assume the party is managed by the default identity provider or party is not hosted by the participant. Optional
#[serde(rename = "identityProviderId", skip_serializing_if = "Option::is_none")]
pub identity_provider_id: Option<String>,
/// The synchronizer, on which the party should be allocated. For backwards compatibility, this field may be omitted, if the participant is connected to only one synchronizer. Otherwise a synchronizer must be specified. Optional
#[serde(rename = "synchronizerId", skip_serializing_if = "Option::is_none")]
pub synchronizer_id: Option<String>,
/// The user who will get the act_as rights to the newly allocated party. If set to an empty string (the default), no user will get rights to the party. Optional
#[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
impl AllocatePartyRequest {
/// Required authorization: ``HasRight(ParticipantAdmin) OR IsAuthenticatedIdentityProviderAdmin(identity_provider_id) OR IsAuthenticatedUser(user_id)``
pub fn new() -> AllocatePartyRequest {
AllocatePartyRequest {
party_id_hint: None,
local_metadata: None,
identity_provider_id: None,
synchronizer_id: None,
user_id: None,
}
}
}