canton-splice-api-token-allocation-v2 0.3.1

Pre-built typed Rust bindings for the Splice `splice-api-token-allocation-v2` package (CIP-0112).
Documentation
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
#![forbid(unsafe_code)]
#![allow(non_camel_case_types, non_snake_case, unused_imports, clippy::all)]
//! Typed Rust bindings generated from a Daml archive (DAR).
//!
//! **Generated file — do not edit by hand.** Regenerate with
//! `dpm-codegen-rust` from the source this crate's `Cargo.toml` records
//! (a DAR, or a participant's package payloads); edits are lost.
//!
//! Each Daml package in the DAR's dependency closure is one top-level
//! module, and each Daml module a submodule under it, so cross-package
//! references resolve and names never collide. Templates carry typed
//! choices; the runtime traits they implement (`Template`, `Choice`,
//! `Contract`) and the command builders live in `canton-daml`, which the
//! generated code imports as `rt`.
//!
//! # Packages in this crate
//!
//! - [`splice_api_token_allocation_v2`] — 1 Daml module

pub mod splice_api_token_allocation_v2 {
    pub mod Splice_Api_Token_AllocationV2 {
        use canton_daml as rt;
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct SettlementFactory_SettleBatchResult {
            ///Daml field `allocationSettleResults`.
            #[serde(rename = "allocationSettleResults")]
            pub allocation_settle_results: ::std::vec::Vec<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult,
            >,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for SettlementFactory_SettleBatchResult {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    (
                        "allocationSettleResults",
                        rt::ToValue::to_value(&self.allocation_settle_results)
                    ),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for SettlementFactory_SettleBatchResult {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    allocation_settle_results: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "allocationSettleResults",
                    )?)
                    .map_err(|e| e.at("allocationSettleResults"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 1usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct SettlementFactory_PublicFetch {
            #[serde(rename = "actors")]
            pub actors: ::std::vec::Vec<rt::Party>,
        }
        impl rt::ToValue for SettlementFactory_PublicFetch {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![("actors", rt::ToValue::to_value(&self.actors)),])
            }
        }
        impl rt::FromValue for SettlementFactory_PublicFetch {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    actors: rt::FromValue::from_value(rt::required_field(value, 0usize, "actors")?)
                        .map_err(|e| e.at("actors"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct SettlementFactory_SettleBatch {
            #[serde(rename = "settlement")]
            pub settlement: crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementInfo,
            ///Daml field `transferLegs`.
            #[serde(rename = "transferLegs")]
            pub transfer_legs: ::std::vec::Vec<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::TransferLeg,
            >,
            #[serde(rename = "allocations")]
            pub allocations: ::std::vec::Vec<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::FinalizedAllocation,
            >,
            #[serde(rename = "actors")]
            pub actors: ::std::vec::Vec<rt::Party>,
            ///Daml field `extraArgs`.
            #[serde(rename = "extraArgs")]
            pub extra_args: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::ExtraArgs,
        }
        impl rt::ToValue for SettlementFactory_SettleBatch {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("settlement", rt::ToValue::to_value(&self.settlement)),
                    ("transferLegs", rt::ToValue::to_value(&self.transfer_legs)),
                    ("allocations", rt::ToValue::to_value(&self.allocations)),
                    ("actors", rt::ToValue::to_value(&self.actors)),
                    ("extraArgs", rt::ToValue::to_value(&self.extra_args)),
                ])
            }
        }
        impl rt::FromValue for SettlementFactory_SettleBatch {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    settlement: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "settlement",
                    )?)
                    .map_err(|e| e.at("settlement"))?,
                    transfer_legs: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "transferLegs",
                    )?)
                    .map_err(|e| e.at("transferLegs"))?,
                    allocations: rt::FromValue::from_value(rt::required_field(
                        value,
                        2usize,
                        "allocations",
                    )?)
                    .map_err(|e| e.at("allocations"))?,
                    actors: rt::FromValue::from_value(rt::required_field(value, 3usize, "actors")?)
                        .map_err(|e| e.at("actors"))?,
                    extra_args: rt::FromValue::from_value(rt::required_field(
                        value,
                        4usize,
                        "extraArgs",
                    )?)
                    .map_err(|e| e.at("extraArgs"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct SettlementFactoryView {
            #[serde(rename = "admin")]
            pub admin: rt::Party,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for SettlementFactoryView {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("admin", rt::ToValue::to_value(&self.admin)),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for SettlementFactoryView {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    admin: rt::FromValue::from_value(rt::required_field(value, 0usize, "admin")?)
                        .map_err(|e| e.at("admin"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 1usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde", tag = "tag", content = "value")]
        pub enum AllocationResult_Output {
            #[serde(rename = "AllocationResult_Pending")]
            AllocationResult_Pending(
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult_Output_AllocationResult_Pending,
            ),
            #[serde(rename = "AllocationResult_Settled")]
            AllocationResult_Settled(
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult_Output_AllocationResult_Settled,
            ),
            #[serde(rename = "AllocationResult_Cancelled")]
            AllocationResult_Cancelled(rt::Unit),
            #[serde(rename = "AllocationResult_Withdrawn")]
            AllocationResult_Withdrawn(rt::Unit),
        }
        impl rt::ToValue for AllocationResult_Output {
            fn to_value(&self) -> rt::Value {
                match self {
                    AllocationResult_Output::AllocationResult_Pending(inner) => {
                        rt::variant_value("AllocationResult_Pending", rt::ToValue::to_value(inner))
                    }
                    AllocationResult_Output::AllocationResult_Settled(inner) => {
                        rt::variant_value("AllocationResult_Settled", rt::ToValue::to_value(inner))
                    }
                    AllocationResult_Output::AllocationResult_Cancelled(inner) => {
                        rt::variant_value(
                            "AllocationResult_Cancelled",
                            rt::ToValue::to_value(inner),
                        )
                    }
                    AllocationResult_Output::AllocationResult_Withdrawn(inner) => {
                        rt::variant_value(
                            "AllocationResult_Withdrawn",
                            rt::ToValue::to_value(inner),
                        )
                    }
                }
            }
        }
        impl rt::FromValue for AllocationResult_Output {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                let (constructor, payload) = rt::variant_parts(value)?;
                match constructor {
                    "AllocationResult_Pending" => ::core::result::Result::Ok(
                        AllocationResult_Output::AllocationResult_Pending(
                            rt::FromValue::from_value(payload)
                                .map_err(|e| e.at("AllocationResult_Pending"))?,
                        ),
                    ),
                    "AllocationResult_Settled" => ::core::result::Result::Ok(
                        AllocationResult_Output::AllocationResult_Settled(
                            rt::FromValue::from_value(payload)
                                .map_err(|e| e.at("AllocationResult_Settled"))?,
                        ),
                    ),
                    "AllocationResult_Cancelled" => ::core::result::Result::Ok(
                        AllocationResult_Output::AllocationResult_Cancelled(
                            rt::FromValue::from_value(payload)
                                .map_err(|e| e.at("AllocationResult_Cancelled"))?,
                        ),
                    ),
                    "AllocationResult_Withdrawn" => ::core::result::Result::Ok(
                        AllocationResult_Output::AllocationResult_Withdrawn(
                            rt::FromValue::from_value(payload)
                                .map_err(|e| e.at("AllocationResult_Withdrawn"))?,
                        ),
                    ),
                    other => ::core::result::Result::Err(rt::unexpected_constructor(
                        "AllocationResult_Output",
                        other,
                    )),
                }
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct AllocationResult_Output_AllocationResult_Pending {
            ///Daml field `allocationCid`.
            #[serde(rename = "allocationCid")]
            pub allocation_cid: rt::ContractId<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation,
            >,
        }
        impl rt::ToValue for AllocationResult_Output_AllocationResult_Pending {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![(
                    "allocationCid",
                    rt::ToValue::to_value(&self.allocation_cid)
                ),])
            }
        }
        impl rt::FromValue for AllocationResult_Output_AllocationResult_Pending {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    allocation_cid: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "allocationCid",
                    )?)
                    .map_err(|e| e.at("allocationCid"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct AllocationResult_Output_AllocationResult_Settled {
            ///Daml field `nextIterationAllocationCid`.
            #[serde(rename = "nextIterationAllocationCid")]
            pub next_iteration_allocation_cid: ::core::option::Option<
                rt::ContractId<
                    crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation,
                >,
            >,
        }
        impl rt::ToValue for AllocationResult_Output_AllocationResult_Settled {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![(
                    "nextIterationAllocationCid",
                    rt::ToValue::to_value(&self.next_iteration_allocation_cid)
                ),])
            }
        }
        impl rt::FromValue for AllocationResult_Output_AllocationResult_Settled {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    next_iteration_allocation_cid: rt::optional_field(
                        value,
                        0usize,
                        "nextIterationAllocationCid",
                    )
                    .map_err(|e| e.at("nextIterationAllocationCid"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct AllocationResult {
            #[serde(rename = "output")]
            pub output: crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult_Output,
            ///Daml field `authorizerHoldingCids`.
            #[serde(rename = "authorizerHoldingCids")]
            pub authorizer_holding_cids: rt::TextMap<
                ::std::vec::Vec<
                    rt::ContractId<
                        ::canton_splice_api_token_holding_v2::splice_api_token_holding_v2::Splice_Api_Token_HoldingV2::Holding,
                    >,
                >,
            >,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for AllocationResult {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("output", rt::ToValue::to_value(&self.output)),
                    (
                        "authorizerHoldingCids",
                        rt::ToValue::to_value(&self.authorizer_holding_cids)
                    ),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for AllocationResult {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    output: rt::FromValue::from_value(rt::required_field(value, 0usize, "output")?)
                        .map_err(|e| e.at("output"))?,
                    authorizer_holding_cids: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "authorizerHoldingCids",
                    )?)
                    .map_err(|e| e.at("authorizerHoldingCids"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 2usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct Allocation_Withdraw {
            #[serde(rename = "actors")]
            pub actors: ::std::vec::Vec<rt::Party>,
            ///Daml field `extraArgs`.
            #[serde(rename = "extraArgs")]
            pub extra_args: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::ExtraArgs,
        }
        impl rt::ToValue for Allocation_Withdraw {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("actors", rt::ToValue::to_value(&self.actors)),
                    ("extraArgs", rt::ToValue::to_value(&self.extra_args)),
                ])
            }
        }
        impl rt::FromValue for Allocation_Withdraw {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    actors: rt::FromValue::from_value(rt::required_field(value, 0usize, "actors")?)
                        .map_err(|e| e.at("actors"))?,
                    extra_args: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "extraArgs",
                    )?)
                    .map_err(|e| e.at("extraArgs"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct Allocation_Cancel {
            #[serde(rename = "actors")]
            pub actors: ::std::vec::Vec<rt::Party>,
            ///Daml field `extraArgs`.
            #[serde(rename = "extraArgs")]
            pub extra_args: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::ExtraArgs,
        }
        impl rt::ToValue for Allocation_Cancel {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("actors", rt::ToValue::to_value(&self.actors)),
                    ("extraArgs", rt::ToValue::to_value(&self.extra_args)),
                ])
            }
        }
        impl rt::FromValue for Allocation_Cancel {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    actors: rt::FromValue::from_value(rt::required_field(value, 0usize, "actors")?)
                        .map_err(|e| e.at("actors"))?,
                    extra_args: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "extraArgs",
                    )?)
                    .map_err(|e| e.at("extraArgs"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct Allocation_Settle {
            #[serde(rename = "actors")]
            pub actors: ::std::vec::Vec<rt::Party>,
            ///Daml field `extraTransferLegSides`.
            #[serde(rename = "extraTransferLegSides")]
            pub extra_transfer_leg_sides: ::std::vec::Vec<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::TransferLegSide,
            >,
            ///Daml field `nextIterationFunding`.
            #[serde(rename = "nextIterationFunding")]
            pub next_iteration_funding: ::core::option::Option<rt::TextMap<rt::Numeric>>,
            ///Daml field `extraArgs`.
            #[serde(rename = "extraArgs")]
            pub extra_args: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::ExtraArgs,
        }
        impl rt::ToValue for Allocation_Settle {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("actors", rt::ToValue::to_value(&self.actors)),
                    (
                        "extraTransferLegSides",
                        rt::ToValue::to_value(&self.extra_transfer_leg_sides)
                    ),
                    (
                        "nextIterationFunding",
                        rt::ToValue::to_value(&self.next_iteration_funding)
                    ),
                    ("extraArgs", rt::ToValue::to_value(&self.extra_args)),
                ])
            }
        }
        impl rt::FromValue for Allocation_Settle {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    actors: rt::FromValue::from_value(rt::required_field(value, 0usize, "actors")?)
                        .map_err(|e| e.at("actors"))?,
                    extra_transfer_leg_sides: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "extraTransferLegSides",
                    )?)
                    .map_err(|e| e.at("extraTransferLegSides"))?,
                    next_iteration_funding: rt::optional_field(
                        value,
                        2usize,
                        "nextIterationFunding",
                    )
                    .map_err(|e| e.at("nextIterationFunding"))?,
                    extra_args: rt::FromValue::from_value(rt::required_field(
                        value,
                        3usize,
                        "extraArgs",
                    )?)
                    .map_err(|e| e.at("extraArgs"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct FinalizedAllocation {
            ///Daml field `allocationCid`.
            #[serde(rename = "allocationCid")]
            pub allocation_cid: rt::ContractId<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation,
            >,
            ///Daml field `extraTransferLegSides`.
            #[serde(rename = "extraTransferLegSides")]
            pub extra_transfer_leg_sides: ::std::vec::Vec<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::TransferLegSide,
            >,
            ///Daml field `nextIterationFunding`.
            #[serde(rename = "nextIterationFunding")]
            pub next_iteration_funding: ::core::option::Option<rt::TextMap<rt::Numeric>>,
        }
        impl rt::ToValue for FinalizedAllocation {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("allocationCid", rt::ToValue::to_value(&self.allocation_cid)),
                    (
                        "extraTransferLegSides",
                        rt::ToValue::to_value(&self.extra_transfer_leg_sides)
                    ),
                    (
                        "nextIterationFunding",
                        rt::ToValue::to_value(&self.next_iteration_funding)
                    ),
                ])
            }
        }
        impl rt::FromValue for FinalizedAllocation {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    allocation_cid: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "allocationCid",
                    )?)
                    .map_err(|e| e.at("allocationCid"))?,
                    extra_transfer_leg_sides: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "extraTransferLegSides",
                    )?)
                    .map_err(|e| e.at("extraTransferLegSides"))?,
                    next_iteration_funding: rt::optional_field(
                        value,
                        2usize,
                        "nextIterationFunding",
                    )
                    .map_err(|e| e.at("nextIterationFunding"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct AllocationView {
            ///Daml field `originalAllocationCid`.
            #[serde(rename = "originalAllocationCid")]
            pub original_allocation_cid: ::core::option::Option<
                rt::ContractId<
                    crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation,
                >,
            >,
            #[serde(rename = "settlement")]
            pub settlement: crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementInfo,
            #[serde(rename = "allocation")]
            pub allocation: crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationSpecification,
            ///Daml field `holdingCids`.
            #[serde(rename = "holdingCids")]
            pub holding_cids: ::std::vec::Vec<
                rt::ContractId<
                    ::canton_splice_api_token_holding_v2::splice_api_token_holding_v2::Splice_Api_Token_HoldingV2::Holding,
                >,
            >,
            ///Daml field `createdAt`.
            #[serde(rename = "createdAt")]
            pub created_at: rt::Timestamp,
            ///Daml field `numIterations`.
            #[serde(rename = "numIterations")]
            pub num_iterations: rt::Int64,
            ///Daml field `expiresAt`.
            #[serde(rename = "expiresAt")]
            pub expires_at: ::core::option::Option<rt::Timestamp>,
            ///Daml field `availableActions`.
            #[serde(rename = "availableActions")]
            pub available_actions: rt::GenMap<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationAction,
                ::std::vec::Vec<::std::vec::Vec<rt::Party>>,
            >,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for AllocationView {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    (
                        "originalAllocationCid",
                        rt::ToValue::to_value(&self.original_allocation_cid)
                    ),
                    ("settlement", rt::ToValue::to_value(&self.settlement)),
                    ("allocation", rt::ToValue::to_value(&self.allocation)),
                    ("holdingCids", rt::ToValue::to_value(&self.holding_cids)),
                    ("createdAt", rt::ToValue::to_value(&self.created_at)),
                    ("numIterations", rt::ToValue::to_value(&self.num_iterations)),
                    ("expiresAt", rt::ToValue::to_value(&self.expires_at)),
                    (
                        "availableActions",
                        rt::ToValue::to_value(&self.available_actions)
                    ),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for AllocationView {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    original_allocation_cid: rt::optional_field(
                        value,
                        0usize,
                        "originalAllocationCid",
                    )
                    .map_err(|e| e.at("originalAllocationCid"))?,
                    settlement: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "settlement",
                    )?)
                    .map_err(|e| e.at("settlement"))?,
                    allocation: rt::FromValue::from_value(rt::required_field(
                        value,
                        2usize,
                        "allocation",
                    )?)
                    .map_err(|e| e.at("allocation"))?,
                    holding_cids: rt::FromValue::from_value(rt::required_field(
                        value,
                        3usize,
                        "holdingCids",
                    )?)
                    .map_err(|e| e.at("holdingCids"))?,
                    created_at: rt::FromValue::from_value(rt::required_field(
                        value,
                        4usize,
                        "createdAt",
                    )?)
                    .map_err(|e| e.at("createdAt"))?,
                    num_iterations: rt::FromValue::from_value(rt::required_field(
                        value,
                        5usize,
                        "numIterations",
                    )?)
                    .map_err(|e| e.at("numIterations"))?,
                    expires_at: rt::optional_field(value, 6usize, "expiresAt")
                        .map_err(|e| e.at("expiresAt"))?,
                    available_actions: rt::FromValue::from_value(rt::required_field(
                        value,
                        7usize,
                        "availableActions",
                    )?)
                    .map_err(|e| e.at("availableActions"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 8usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde", tag = "tag", content = "value")]
        pub enum AllocationAction {
            #[serde(rename = "AA_Settle")]
            AA_Settle(rt::Unit),
            #[serde(rename = "AA_Cancel")]
            AA_Cancel(rt::Unit),
            #[serde(rename = "AA_Withdraw")]
            AA_Withdraw(rt::Unit),
            #[serde(rename = "AA_Custom")]
            AA_Custom(
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationAction_AA_Custom,
            ),
        }
        impl rt::ToValue for AllocationAction {
            fn to_value(&self) -> rt::Value {
                match self {
                    AllocationAction::AA_Settle(inner) => {
                        rt::variant_value("AA_Settle", rt::ToValue::to_value(inner))
                    }
                    AllocationAction::AA_Cancel(inner) => {
                        rt::variant_value("AA_Cancel", rt::ToValue::to_value(inner))
                    }
                    AllocationAction::AA_Withdraw(inner) => {
                        rt::variant_value("AA_Withdraw", rt::ToValue::to_value(inner))
                    }
                    AllocationAction::AA_Custom(inner) => {
                        rt::variant_value("AA_Custom", rt::ToValue::to_value(inner))
                    }
                }
            }
        }
        impl rt::FromValue for AllocationAction {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                let (constructor, payload) = rt::variant_parts(value)?;
                match constructor {
                    "AA_Settle" => ::core::result::Result::Ok(AllocationAction::AA_Settle(
                        rt::FromValue::from_value(payload).map_err(|e| e.at("AA_Settle"))?,
                    )),
                    "AA_Cancel" => ::core::result::Result::Ok(AllocationAction::AA_Cancel(
                        rt::FromValue::from_value(payload).map_err(|e| e.at("AA_Cancel"))?,
                    )),
                    "AA_Withdraw" => ::core::result::Result::Ok(AllocationAction::AA_Withdraw(
                        rt::FromValue::from_value(payload).map_err(|e| e.at("AA_Withdraw"))?,
                    )),
                    "AA_Custom" => ::core::result::Result::Ok(AllocationAction::AA_Custom(
                        rt::FromValue::from_value(payload).map_err(|e| e.at("AA_Custom"))?,
                    )),
                    other => ::core::result::Result::Err(rt::unexpected_constructor(
                        "AllocationAction",
                        other,
                    )),
                }
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct AllocationAction_AA_Custom {
            #[serde(rename = "id")]
            pub id: ::std::string::String,
        }
        impl rt::ToValue for AllocationAction_AA_Custom {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![("id", rt::ToValue::to_value(&self.id)),])
            }
        }
        impl rt::FromValue for AllocationAction_AA_Custom {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    id: rt::FromValue::from_value(rt::required_field(value, 0usize, "id")?)
                        .map_err(|e| e.at("id"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct AllocationSpecification {
            #[serde(rename = "admin")]
            pub admin: rt::Party,
            #[serde(rename = "authorizer")]
            pub authorizer: ::canton_splice_api_token_holding_v2::splice_api_token_holding_v2::Splice_Api_Token_HoldingV2::Account,
            ///Daml field `transferLegSides`.
            #[serde(rename = "transferLegSides")]
            pub transfer_leg_sides: ::std::vec::Vec<
                crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::TransferLegSide,
            >,
            ///Daml field `settlementDeadline`.
            #[serde(rename = "settlementDeadline")]
            pub settlement_deadline: ::core::option::Option<rt::Timestamp>,
            ///Daml field `nextIterationFunding`.
            #[serde(rename = "nextIterationFunding")]
            pub next_iteration_funding: ::core::option::Option<rt::TextMap<rt::Numeric>>,
            #[serde(rename = "committed")]
            pub committed: bool,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for AllocationSpecification {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("admin", rt::ToValue::to_value(&self.admin)),
                    ("authorizer", rt::ToValue::to_value(&self.authorizer)),
                    (
                        "transferLegSides",
                        rt::ToValue::to_value(&self.transfer_leg_sides)
                    ),
                    (
                        "settlementDeadline",
                        rt::ToValue::to_value(&self.settlement_deadline)
                    ),
                    (
                        "nextIterationFunding",
                        rt::ToValue::to_value(&self.next_iteration_funding)
                    ),
                    ("committed", rt::ToValue::to_value(&self.committed)),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for AllocationSpecification {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    admin: rt::FromValue::from_value(rt::required_field(value, 0usize, "admin")?)
                        .map_err(|e| e.at("admin"))?,
                    authorizer: rt::FromValue::from_value(rt::required_field(
                        value,
                        1usize,
                        "authorizer",
                    )?)
                    .map_err(|e| e.at("authorizer"))?,
                    transfer_leg_sides: rt::FromValue::from_value(rt::required_field(
                        value,
                        2usize,
                        "transferLegSides",
                    )?)
                    .map_err(|e| e.at("transferLegSides"))?,
                    settlement_deadline: rt::optional_field(value, 3usize, "settlementDeadline")
                        .map_err(|e| e.at("settlementDeadline"))?,
                    next_iteration_funding: rt::optional_field(
                        value,
                        4usize,
                        "nextIterationFunding",
                    )
                    .map_err(|e| e.at("nextIterationFunding"))?,
                    committed: rt::FromValue::from_value(rt::required_field(
                        value,
                        5usize,
                        "committed",
                    )?)
                    .map_err(|e| e.at("committed"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 6usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct TransferLegSide {
            ///Daml field `transferLegId`.
            #[serde(rename = "transferLegId")]
            pub transfer_leg_id: ::std::string::String,
            #[serde(rename = "side")]
            pub side: crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::TransferSide,
            #[serde(rename = "otherside")]
            pub otherside: ::canton_splice_api_token_holding_v2::splice_api_token_holding_v2::Splice_Api_Token_HoldingV2::Account,
            #[serde(rename = "amount")]
            pub amount: rt::Numeric,
            ///Daml field `instrumentId`.
            #[serde(rename = "instrumentId")]
            pub instrument_id: ::std::string::String,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for TransferLegSide {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    (
                        "transferLegId",
                        rt::ToValue::to_value(&self.transfer_leg_id)
                    ),
                    ("side", rt::ToValue::to_value(&self.side)),
                    ("otherside", rt::ToValue::to_value(&self.otherside)),
                    ("amount", rt::ToValue::to_value(&self.amount)),
                    ("instrumentId", rt::ToValue::to_value(&self.instrument_id)),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for TransferLegSide {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    transfer_leg_id: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "transferLegId",
                    )?)
                    .map_err(|e| e.at("transferLegId"))?,
                    side: rt::FromValue::from_value(rt::required_field(value, 1usize, "side")?)
                        .map_err(|e| e.at("side"))?,
                    otherside: rt::FromValue::from_value(rt::required_field(
                        value,
                        2usize,
                        "otherside",
                    )?)
                    .map_err(|e| e.at("otherside"))?,
                    amount: rt::FromValue::from_value(rt::required_field(value, 3usize, "amount")?)
                        .map_err(|e| e.at("amount"))?,
                    instrument_id: rt::FromValue::from_value(rt::required_field(
                        value,
                        4usize,
                        "instrumentId",
                    )?)
                    .map_err(|e| e.at("instrumentId"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 5usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(
            Clone, Copy, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize,
        )]
        #[serde(crate = "rt::serde")]
        pub enum TransferSide {
            #[serde(rename = "SenderSide")]
            SenderSide,
            #[serde(rename = "ReceiverSide")]
            ReceiverSide,
        }
        impl rt::ToValue for TransferSide {
            fn to_value(&self) -> rt::Value {
                rt::enum_value(match self {
                    TransferSide::SenderSide => "SenderSide",
                    TransferSide::ReceiverSide => "ReceiverSide",
                })
            }
        }
        impl rt::FromValue for TransferSide {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                match rt::enum_constructor(value)? {
                    "SenderSide" => ::core::result::Result::Ok(TransferSide::SenderSide),
                    "ReceiverSide" => ::core::result::Result::Ok(TransferSide::ReceiverSide),
                    other => ::core::result::Result::Err(rt::unexpected_constructor(
                        "TransferSide",
                        other,
                    )),
                }
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct TransferLeg {
            ///Daml field `transferLegId`.
            #[serde(rename = "transferLegId")]
            pub transfer_leg_id: ::std::string::String,
            #[serde(rename = "sender")]
            pub sender: ::canton_splice_api_token_holding_v2::splice_api_token_holding_v2::Splice_Api_Token_HoldingV2::Account,
            #[serde(rename = "receiver")]
            pub receiver: ::canton_splice_api_token_holding_v2::splice_api_token_holding_v2::Splice_Api_Token_HoldingV2::Account,
            #[serde(rename = "amount")]
            pub amount: rt::Numeric,
            ///Daml field `instrumentId`.
            #[serde(rename = "instrumentId")]
            pub instrument_id: ::std::string::String,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for TransferLeg {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    (
                        "transferLegId",
                        rt::ToValue::to_value(&self.transfer_leg_id)
                    ),
                    ("sender", rt::ToValue::to_value(&self.sender)),
                    ("receiver", rt::ToValue::to_value(&self.receiver)),
                    ("amount", rt::ToValue::to_value(&self.amount)),
                    ("instrumentId", rt::ToValue::to_value(&self.instrument_id)),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for TransferLeg {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    transfer_leg_id: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "transferLegId",
                    )?)
                    .map_err(|e| e.at("transferLegId"))?,
                    sender: rt::FromValue::from_value(rt::required_field(value, 1usize, "sender")?)
                        .map_err(|e| e.at("sender"))?,
                    receiver: rt::FromValue::from_value(rt::required_field(
                        value, 2usize, "receiver",
                    )?)
                    .map_err(|e| e.at("receiver"))?,
                    amount: rt::FromValue::from_value(rt::required_field(value, 3usize, "amount")?)
                        .map_err(|e| e.at("amount"))?,
                    instrument_id: rt::FromValue::from_value(rt::required_field(
                        value,
                        4usize,
                        "instrumentId",
                    )?)
                    .map_err(|e| e.at("instrumentId"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 5usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        #[derive(Clone, Debug, PartialEq, Eq, rt::serde::Serialize, rt::serde::Deserialize)]
        #[serde(crate = "rt::serde")]
        pub struct SettlementInfo {
            #[serde(rename = "executors")]
            pub executors: ::std::vec::Vec<rt::Party>,
            #[serde(rename = "id")]
            pub id: ::std::string::String,
            #[serde(rename = "cid")]
            pub cid: ::core::option::Option<
                rt::ContractId<
                    ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::AnyContract,
                >,
            >,
            #[serde(rename = "meta")]
            pub meta: ::canton_splice_api_token_metadata_v1::splice_api_token_metadata_v1::Splice_Api_Token_MetadataV1::Metadata,
        }
        impl rt::ToValue for SettlementInfo {
            fn to_value(&self) -> rt::Value {
                rt::record(::std::vec![
                    ("executors", rt::ToValue::to_value(&self.executors)),
                    ("id", rt::ToValue::to_value(&self.id)),
                    ("cid", rt::ToValue::to_value(&self.cid)),
                    ("meta", rt::ToValue::to_value(&self.meta)),
                ])
            }
        }
        impl rt::FromValue for SettlementInfo {
            fn from_value(value: &rt::Value) -> ::core::result::Result<Self, rt::ValueError> {
                ::core::result::Result::Ok(Self {
                    executors: rt::FromValue::from_value(rt::required_field(
                        value,
                        0usize,
                        "executors",
                    )?)
                    .map_err(|e| e.at("executors"))?,
                    id: rt::FromValue::from_value(rt::required_field(value, 1usize, "id")?)
                        .map_err(|e| e.at("id"))?,
                    cid: rt::optional_field(value, 2usize, "cid").map_err(|e| e.at("cid"))?,
                    meta: rt::FromValue::from_value(rt::required_field(value, 3usize, "meta")?)
                        .map_err(|e| e.at("meta"))?,
                })
            }
        }
        ///Marker for the Daml interface `Allocation` (held via `ContractId`).
        #[derive(Clone, Copy, Debug, PartialEq, Eq)]
        pub struct Allocation;
        ///Marker for the Daml interface `SettlementFactory` (held via `ContractId`).
        #[derive(Clone, Copy, Debug, PartialEq, Eq)]
        pub struct SettlementFactory;
        impl rt::Contract for Allocation {
            const PACKAGE_ID: &'static str =
                "051a3b0563a6fa4df4cb34448081e48b061e555aa1a265abf6ae8f3f4cafe439";
            const PACKAGE_NAME: &'static str = "splice-api-token-allocation-v2";
            const MODULE_NAME: &'static str = "Splice.Api.Token.AllocationV2";
            const ENTITY_NAME: &'static str = "Allocation";
        }
        impl rt::Interface for Allocation {
            type View = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationView;
        }
        ///The `Archive` choice on [`Allocation`] (consuming).
        impl rt::Choice<Allocation>
            for ::canton_daml_stdlib::ghc_stdlib_DA_Internal_Template::DA_Internal_Template::Archive
        {
            type Return = rt::Unit;
            const NAME: &'static str = "Archive";
            const CONSUMING: bool = true;
        }
        ///The `Allocation_Settle` choice on [`Allocation`] (non-consuming).
        impl rt::Choice<Allocation>
        for crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation_Settle {
            type Return = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult;
            const NAME: &'static str = "Allocation_Settle";
            const CONSUMING: bool = false;
        }
        ///The `Allocation_Cancel` choice on [`Allocation`] (non-consuming).
        impl rt::Choice<Allocation>
        for crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation_Cancel {
            type Return = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult;
            const NAME: &'static str = "Allocation_Cancel";
            const CONSUMING: bool = false;
        }
        ///The `Allocation_Withdraw` choice on [`Allocation`] (non-consuming).
        impl rt::Choice<Allocation>
        for crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::Allocation_Withdraw {
            type Return = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::AllocationResult;
            const NAME: &'static str = "Allocation_Withdraw";
            const CONSUMING: bool = false;
        }
        impl rt::Contract for SettlementFactory {
            const PACKAGE_ID: &'static str =
                "051a3b0563a6fa4df4cb34448081e48b061e555aa1a265abf6ae8f3f4cafe439";
            const PACKAGE_NAME: &'static str = "splice-api-token-allocation-v2";
            const MODULE_NAME: &'static str = "Splice.Api.Token.AllocationV2";
            const ENTITY_NAME: &'static str = "SettlementFactory";
        }
        impl rt::Interface for SettlementFactory {
            type View = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementFactoryView;
        }
        ///The `Archive` choice on [`SettlementFactory`] (consuming).
        impl rt::Choice<SettlementFactory>
            for ::canton_daml_stdlib::ghc_stdlib_DA_Internal_Template::DA_Internal_Template::Archive
        {
            type Return = rt::Unit;
            const NAME: &'static str = "Archive";
            const CONSUMING: bool = true;
        }
        ///The `SettlementFactory_PublicFetch` choice on [`SettlementFactory`] (non-consuming).
        impl rt::Choice<SettlementFactory>
        for crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementFactory_PublicFetch {
            type Return = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementFactoryView;
            const NAME: &'static str = "SettlementFactory_PublicFetch";
            const CONSUMING: bool = false;
        }
        ///The `SettlementFactory_SettleBatch` choice on [`SettlementFactory`] (non-consuming).
        impl rt::Choice<SettlementFactory>
        for crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementFactory_SettleBatch {
            type Return = crate::splice_api_token_allocation_v2::Splice_Api_Token_AllocationV2::SettlementFactory_SettleBatchResult;
            const NAME: &'static str = "SettlementFactory_SettleBatch";
            const CONSUMING: bool = false;
        }
    }
}