-
Notifications
You must be signed in to change notification settings - Fork 1
/
operation-manage-external-system-id-pool-entry.x
123 lines (104 loc) · 3.32 KB
/
operation-manage-external-system-id-pool-entry.x
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
%#include "xdr/ledger-entries.h"
namespace stellar
{
/*ManageExternalSystemAccountIdPoolEntry
Threshold: high
Result: ManageExternalSystemAccountIdPoolEntryResult
*/
//: Actions that can be performed with an external system account ID in the external system ID pool
enum ManageExternalSystemAccountIdPoolEntryAction
{
CREATE = 0,
REMOVE = 1
};
//: CreateExternalSystemAccountIdPoolEntryActionInput is used to
//: pass necessary params to create a new external system account ID in the external system ID pool
struct CreateExternalSystemAccountIdPoolEntryActionInput
{
//: Type of external system, selected arbitrarily
int32 externalSystemType;
//: Data for external system binding
longstring data;
//: External system ID of the creator
uint64 parent;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: DeleteExternalSystemAccountIdPoolEntryActionInput is used to
//: pass necessary params to remove an existing external system account ID in the external system ID pool
struct DeleteExternalSystemAccountIdPoolEntryActionInput
{
//: ID of an existing external system account ID pool
uint64 poolEntryID;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: ManageExternalSystemAccountIdPoolEntryOp is used to create or remove
//: an external system account ID from the external system ID pool
struct ManageExternalSystemAccountIdPoolEntryOp
{
//: `actionInput` is used to pass one of
//: `ManageExternalSystemAccountIdPoolEntryAction` with required params
union switch (ManageExternalSystemAccountIdPoolEntryAction action)
{
case CREATE:
CreateExternalSystemAccountIdPoolEntryActionInput createExternalSystemAccountIdPoolEntryActionInput;
case REMOVE:
DeleteExternalSystemAccountIdPoolEntryActionInput deleteExternalSystemAccountIdPoolEntryActionInput;
} actionInput;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
/******* ManageExternalSystemAccountIdPoolEntry Result ********/
//: Result codes of ManageExternalSystemAccountIdPoolEntryOp
enum ManageExternalSystemAccountIdPoolEntryResultCode
{
//: Specified action in `actionInput` of ManageExternalSystemAccountIdPoolEntryOp
//: was performed successfully
SUCCESS = 0,
// codes considered as "failure" for the operation
//: It is not allowed to pass empty `data`
MALFORMED = -1,
//: It is not allowed to create external system account ID pool with duplicated
//: data and external system type
ALREADY_EXISTS = -2,
//: There is no external system account ID pool with passed ID
NOT_FOUND = -3
};
//: Success result of operation application
struct ManageExternalSystemAccountIdPoolEntrySuccess
{
//: ID of the created external system account ID pool
uint64 poolEntryID;
//: reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: Result of operation application
union ManageExternalSystemAccountIdPoolEntryResult switch (ManageExternalSystemAccountIdPoolEntryResultCode code)
{
case SUCCESS:
ManageExternalSystemAccountIdPoolEntrySuccess success;
default:
void;
};
}