canton_api_client/models/
reassignment_commands.rs

1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.3.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 ReassignmentCommands {
16    /// Identifier of the on-ledger workflow that this command is a part of. Must be a valid LedgerString (as described in ``value.proto``). Optional
17    #[serde(rename = "workflowId")]
18    pub workflow_id: String,
19    /// Uniquely identifies the participant user that issued the command. Must be a valid UserIdString (as described in ``value.proto``). Required unless authentication is used with a user token. In that case, the token's user-id will be used for the request's user_id.
20    #[serde(rename = "userId")]
21    pub user_id: String,
22    /// Uniquely identifies the command. The triple (user_id, submitter, command_id) constitutes the change ID for the intended ledger change. The change ID can be used for matching the intended ledger changes with all their completions. Must be a valid LedgerString (as described in ``value.proto``). Required
23    #[serde(rename = "commandId")]
24    pub command_id: String,
25    /// Party on whose behalf the command should be executed. If ledger API authorization is enabled, then the authorization metadata must authorize the sender of the request to act on behalf of the given party. Must be a valid PartyIdString (as described in ``value.proto``). Required
26    #[serde(rename = "submitter")]
27    pub submitter: String,
28    /// A unique identifier to distinguish completions for different submissions with the same change ID. Typically a random UUID. Applications are expected to use a different UUID for each retry of a submission with the same change ID. Must be a valid LedgerString (as described in ``value.proto``).  If omitted, the participant or the committer may set a value of their choice. Optional
29    #[serde(rename = "submissionId")]
30    pub submission_id: String,
31    /// Individual elements of this reassignment. Must be non-empty.
32    #[serde(rename = "commands", skip_serializing_if = "Option::is_none")]
33    pub commands: Option<Vec<models::ReassignmentCommand>>,
34}
35
36impl ReassignmentCommands {
37    pub fn new(workflow_id: String, user_id: String, command_id: String, submitter: String, submission_id: String) -> ReassignmentCommands {
38        ReassignmentCommands {
39            workflow_id,
40            user_id,
41            command_id,
42            submitter,
43            submission_id,
44            commands: None,
45        }
46    }
47}
48