1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
6pub enum AdvSide<'a> {
7 Buy,
9 Sell,
11 Trade,
13 Cross,
15 Unrecognized(&'a str),
17}
18
19impl<'a> AdvSide<'a> {
20 pub fn from_value(value: &'a str) -> Self {
21 match value {
22 "B" => Self::Buy,
23 "S" => Self::Sell,
24 "T" => Self::Trade,
25 "X" => Self::Cross,
26 unrecognized => Self::Unrecognized(unrecognized),
27 }
28 }
29
30 pub fn value(self) -> &'a str {
31 match self {
32 Self::Buy => "B",
33 Self::Sell => "S",
34 Self::Trade => "T",
35 Self::Cross => "X",
36 Self::Unrecognized(value) => value,
37 }
38 }
39}
40
41impl<'a> From<&'a str> for AdvSide<'a> {
42 fn from(value: &'a str) -> Self {
43 Self::from_value(value)
44 }
45}
46
47#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
49pub enum AdvTransType<'a> {
50 Cancel,
52 New,
54 Replace,
56 Unrecognized(&'a str),
58}
59
60impl<'a> AdvTransType<'a> {
61 pub fn from_value(value: &'a str) -> Self {
62 match value {
63 "C" => Self::Cancel,
64 "N" => Self::New,
65 "R" => Self::Replace,
66 unrecognized => Self::Unrecognized(unrecognized),
67 }
68 }
69
70 pub fn value(self) -> &'a str {
71 match self {
72 Self::Cancel => "C",
73 Self::New => "N",
74 Self::Replace => "R",
75 Self::Unrecognized(value) => value,
76 }
77 }
78}
79
80impl<'a> From<&'a str> for AdvTransType<'a> {
81 fn from(value: &'a str) -> Self {
82 Self::from_value(value)
83 }
84}
85
86#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
88pub enum CommType<'a> {
89 PerUnit,
91 Percent,
93 Absolute,
95 Unrecognized(&'a str),
97}
98
99impl<'a> CommType<'a> {
100 pub fn from_value(value: &'a str) -> Self {
101 match value {
102 "1" => Self::PerUnit,
103 "2" => Self::Percent,
104 "3" => Self::Absolute,
105 unrecognized => Self::Unrecognized(unrecognized),
106 }
107 }
108
109 pub fn value(self) -> &'a str {
110 match self {
111 Self::PerUnit => "1",
112 Self::Percent => "2",
113 Self::Absolute => "3",
114 Self::Unrecognized(value) => value,
115 }
116 }
117}
118
119impl<'a> From<&'a str> for CommType<'a> {
120 fn from(value: &'a str) -> Self {
121 Self::from_value(value)
122 }
123}
124
125#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
127pub enum ExecInst<'a> {
128 StayOnOfferSide,
130 NotHeld,
132 Work,
134 GoAlong,
136 OverTheDay,
138 Held,
140 ParticipateDoNotInitiate,
142 StrictScale,
144 TryToScale,
146 StayOnBidSide,
148 NoCross,
150 OkToCross,
152 CallFirst,
154 PercentOfVolume,
156 DoNotIncrease,
158 DoNotReduce,
160 AllOrNone,
162 InstitutionsOnly,
164 LastPeg,
166 MidPricePeg,
168 NonNegotiable,
170 OpeningPeg,
172 MarketPeg,
174 PrimaryPeg,
176 Suspend,
178 FixedPegToLocalBestBidOrOfferAtTimeOfOrder,
180 CustomerDisplayInstruction,
182 Netting,
184 PegToVwap,
186 Unrecognized(&'a str),
188}
189
190impl<'a> ExecInst<'a> {
191 pub fn from_value(value: &'a str) -> Self {
192 match value {
193 "0" => Self::StayOnOfferSide,
194 "1" => Self::NotHeld,
195 "2" => Self::Work,
196 "3" => Self::GoAlong,
197 "4" => Self::OverTheDay,
198 "5" => Self::Held,
199 "6" => Self::ParticipateDoNotInitiate,
200 "7" => Self::StrictScale,
201 "8" => Self::TryToScale,
202 "9" => Self::StayOnBidSide,
203 "A" => Self::NoCross,
204 "B" => Self::OkToCross,
205 "C" => Self::CallFirst,
206 "D" => Self::PercentOfVolume,
207 "E" => Self::DoNotIncrease,
208 "F" => Self::DoNotReduce,
209 "G" => Self::AllOrNone,
210 "I" => Self::InstitutionsOnly,
211 "L" => Self::LastPeg,
212 "M" => Self::MidPricePeg,
213 "N" => Self::NonNegotiable,
214 "O" => Self::OpeningPeg,
215 "P" => Self::MarketPeg,
216 "R" => Self::PrimaryPeg,
217 "S" => Self::Suspend,
218 "T" => Self::FixedPegToLocalBestBidOrOfferAtTimeOfOrder,
219 "U" => Self::CustomerDisplayInstruction,
220 "V" => Self::Netting,
221 "W" => Self::PegToVwap,
222 unrecognized => Self::Unrecognized(unrecognized),
223 }
224 }
225
226 pub fn value(self) -> &'a str {
227 match self {
228 Self::StayOnOfferSide => "0",
229 Self::NotHeld => "1",
230 Self::Work => "2",
231 Self::GoAlong => "3",
232 Self::OverTheDay => "4",
233 Self::Held => "5",
234 Self::ParticipateDoNotInitiate => "6",
235 Self::StrictScale => "7",
236 Self::TryToScale => "8",
237 Self::StayOnBidSide => "9",
238 Self::NoCross => "A",
239 Self::OkToCross => "B",
240 Self::CallFirst => "C",
241 Self::PercentOfVolume => "D",
242 Self::DoNotIncrease => "E",
243 Self::DoNotReduce => "F",
244 Self::AllOrNone => "G",
245 Self::InstitutionsOnly => "I",
246 Self::LastPeg => "L",
247 Self::MidPricePeg => "M",
248 Self::NonNegotiable => "N",
249 Self::OpeningPeg => "O",
250 Self::MarketPeg => "P",
251 Self::PrimaryPeg => "R",
252 Self::Suspend => "S",
253 Self::FixedPegToLocalBestBidOrOfferAtTimeOfOrder => "T",
254 Self::CustomerDisplayInstruction => "U",
255 Self::Netting => "V",
256 Self::PegToVwap => "W",
257 Self::Unrecognized(value) => value,
258 }
259 }
260}
261
262impl<'a> From<&'a str> for ExecInst<'a> {
263 fn from(value: &'a str) -> Self {
264 Self::from_value(value)
265 }
266}
267
268#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
270pub enum ExecTransType<'a> {
271 New,
273 Cancel,
275 Correct,
277 Status,
279 Unrecognized(&'a str),
281}
282
283impl<'a> ExecTransType<'a> {
284 pub fn from_value(value: &'a str) -> Self {
285 match value {
286 "0" => Self::New,
287 "1" => Self::Cancel,
288 "2" => Self::Correct,
289 "3" => Self::Status,
290 unrecognized => Self::Unrecognized(unrecognized),
291 }
292 }
293
294 pub fn value(self) -> &'a str {
295 match self {
296 Self::New => "0",
297 Self::Cancel => "1",
298 Self::Correct => "2",
299 Self::Status => "3",
300 Self::Unrecognized(value) => value,
301 }
302 }
303}
304
305impl<'a> From<&'a str> for ExecTransType<'a> {
306 fn from(value: &'a str) -> Self {
307 Self::from_value(value)
308 }
309}
310
311#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
313pub enum HandlInst<'a> {
314 AutomatedExecutionNoIntervention,
316 AutomatedExecutionInterventionOk,
318 ManualOrder,
320 Unrecognized(&'a str),
322}
323
324impl<'a> HandlInst<'a> {
325 pub fn from_value(value: &'a str) -> Self {
326 match value {
327 "1" => Self::AutomatedExecutionNoIntervention,
328 "2" => Self::AutomatedExecutionInterventionOk,
329 "3" => Self::ManualOrder,
330 unrecognized => Self::Unrecognized(unrecognized),
331 }
332 }
333
334 pub fn value(self) -> &'a str {
335 match self {
336 Self::AutomatedExecutionNoIntervention => "1",
337 Self::AutomatedExecutionInterventionOk => "2",
338 Self::ManualOrder => "3",
339 Self::Unrecognized(value) => value,
340 }
341 }
342}
343
344impl<'a> From<&'a str> for HandlInst<'a> {
345 fn from(value: &'a str) -> Self {
346 Self::from_value(value)
347 }
348}
349
350#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
352pub enum IDSource<'a> {
353 Cusip,
355 Sedol,
357 Quik,
359 IsinNumber,
361 RicCode,
363 IsoCurrencyCode,
365 IsoCountryCode,
367 ExchangeSymbol,
369 ConsolidatedTapeAssociation,
371 Unrecognized(&'a str),
373}
374
375impl<'a> IDSource<'a> {
376 pub fn from_value(value: &'a str) -> Self {
377 match value {
378 "1" => Self::Cusip,
379 "2" => Self::Sedol,
380 "3" => Self::Quik,
381 "4" => Self::IsinNumber,
382 "5" => Self::RicCode,
383 "6" => Self::IsoCurrencyCode,
384 "7" => Self::IsoCountryCode,
385 "8" => Self::ExchangeSymbol,
386 "9" => Self::ConsolidatedTapeAssociation,
387 unrecognized => Self::Unrecognized(unrecognized),
388 }
389 }
390
391 pub fn value(self) -> &'a str {
392 match self {
393 Self::Cusip => "1",
394 Self::Sedol => "2",
395 Self::Quik => "3",
396 Self::IsinNumber => "4",
397 Self::RicCode => "5",
398 Self::IsoCurrencyCode => "6",
399 Self::IsoCountryCode => "7",
400 Self::ExchangeSymbol => "8",
401 Self::ConsolidatedTapeAssociation => "9",
402 Self::Unrecognized(value) => value,
403 }
404 }
405}
406
407impl<'a> From<&'a str> for IDSource<'a> {
408 fn from(value: &'a str) -> Self {
409 Self::from_value(value)
410 }
411}
412
413#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
415pub enum IOIQltyInd<'a> {
416 High,
418 Low,
420 Medium,
422 Unrecognized(&'a str),
424}
425
426impl<'a> IOIQltyInd<'a> {
427 pub fn from_value(value: &'a str) -> Self {
428 match value {
429 "H" => Self::High,
430 "L" => Self::Low,
431 "M" => Self::Medium,
432 unrecognized => Self::Unrecognized(unrecognized),
433 }
434 }
435
436 pub fn value(self) -> &'a str {
437 match self {
438 Self::High => "H",
439 Self::Low => "L",
440 Self::Medium => "M",
441 Self::Unrecognized(value) => value,
442 }
443 }
444}
445
446impl<'a> From<&'a str> for IOIQltyInd<'a> {
447 fn from(value: &'a str) -> Self {
448 Self::from_value(value)
449 }
450}
451
452#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
454pub enum IOIShares<'a> {
455 Large,
457 Medium,
459 Small,
461 Unrecognized(&'a str),
463}
464
465impl<'a> IOIShares<'a> {
466 pub fn from_value(value: &'a str) -> Self {
467 match value {
468 "L" => Self::Large,
469 "M" => Self::Medium,
470 "S" => Self::Small,
471 unrecognized => Self::Unrecognized(unrecognized),
472 }
473 }
474
475 pub fn value(self) -> &'a str {
476 match self {
477 Self::Large => "L",
478 Self::Medium => "M",
479 Self::Small => "S",
480 Self::Unrecognized(value) => value,
481 }
482 }
483}
484
485impl<'a> From<&'a str> for IOIShares<'a> {
486 fn from(value: &'a str) -> Self {
487 Self::from_value(value)
488 }
489}
490
491#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
493pub enum IOITransType<'a> {
494 Cancel,
496 New,
498 Replace,
500 Unrecognized(&'a str),
502}
503
504impl<'a> IOITransType<'a> {
505 pub fn from_value(value: &'a str) -> Self {
506 match value {
507 "C" => Self::Cancel,
508 "N" => Self::New,
509 "R" => Self::Replace,
510 unrecognized => Self::Unrecognized(unrecognized),
511 }
512 }
513
514 pub fn value(self) -> &'a str {
515 match self {
516 Self::Cancel => "C",
517 Self::New => "N",
518 Self::Replace => "R",
519 Self::Unrecognized(value) => value,
520 }
521 }
522}
523
524impl<'a> From<&'a str> for IOITransType<'a> {
525 fn from(value: &'a str) -> Self {
526 Self::from_value(value)
527 }
528}
529
530#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
532pub enum LastCapacity<'a> {
533 Agent,
535 CrossAsAgent,
537 CrossAsPrincipal,
539 Principal,
541 Unrecognized(&'a str),
543}
544
545impl<'a> LastCapacity<'a> {
546 pub fn from_value(value: &'a str) -> Self {
547 match value {
548 "1" => Self::Agent,
549 "2" => Self::CrossAsAgent,
550 "3" => Self::CrossAsPrincipal,
551 "4" => Self::Principal,
552 unrecognized => Self::Unrecognized(unrecognized),
553 }
554 }
555
556 pub fn value(self) -> &'a str {
557 match self {
558 Self::Agent => "1",
559 Self::CrossAsAgent => "2",
560 Self::CrossAsPrincipal => "3",
561 Self::Principal => "4",
562 Self::Unrecognized(value) => value,
563 }
564 }
565}
566
567impl<'a> From<&'a str> for LastCapacity<'a> {
568 fn from(value: &'a str) -> Self {
569 Self::from_value(value)
570 }
571}
572
573#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
575pub enum MsgType<'a> {
576 Heartbeat,
578 TestRequest,
580 ResendRequest,
582 Reject,
584 SequenceReset,
586 Logout,
588 Ioi,
590 Advertisement,
592 ExecutionReport,
594 OrderCancelReject,
596 Logon,
598 News,
600 Email,
602 NewOrderSingle,
604 NewOrderList,
606 OrderCancelRequest,
608 OrderCancelReplaceRequest,
610 OrderStatusRequest,
612 AllocationInstruction,
614 ListCancelRequest,
616 ListExecute,
618 ListStatusRequest,
620 ListStatus,
622 AllocationInstructionAck,
624 DontKnowTrade,
626 QuoteRequest,
628 Quote,
630 SettlementInstructions,
632 MarketDataRequest,
634 MarketDataSnapshotFullRefresh,
636 MarketDataIncrementalRefresh,
638 MarketDataRequestReject,
640 QuoteCancel,
642 QuoteStatusRequest,
644 MassQuoteAcknowledgement,
646 SecurityDefinitionRequest,
648 SecurityDefinition,
650 SecurityStatusRequest,
652 SecurityStatus,
654 TradingSessionStatusRequest,
656 TradingSessionStatus,
658 MassQuote,
660 BusinessMessageReject,
662 BidRequest,
664 BidResponse,
666 ListStrikePrice,
668 Unrecognized(&'a str),
670}
671
672impl<'a> MsgType<'a> {
673 pub fn from_value(value: &'a str) -> Self {
674 match value {
675 "0" => Self::Heartbeat,
676 "1" => Self::TestRequest,
677 "2" => Self::ResendRequest,
678 "3" => Self::Reject,
679 "4" => Self::SequenceReset,
680 "5" => Self::Logout,
681 "6" => Self::Ioi,
682 "7" => Self::Advertisement,
683 "8" => Self::ExecutionReport,
684 "9" => Self::OrderCancelReject,
685 "A" => Self::Logon,
686 "B" => Self::News,
687 "C" => Self::Email,
688 "D" => Self::NewOrderSingle,
689 "E" => Self::NewOrderList,
690 "F" => Self::OrderCancelRequest,
691 "G" => Self::OrderCancelReplaceRequest,
692 "H" => Self::OrderStatusRequest,
693 "J" => Self::AllocationInstruction,
694 "K" => Self::ListCancelRequest,
695 "L" => Self::ListExecute,
696 "M" => Self::ListStatusRequest,
697 "N" => Self::ListStatus,
698 "P" => Self::AllocationInstructionAck,
699 "Q" => Self::DontKnowTrade,
700 "R" => Self::QuoteRequest,
701 "S" => Self::Quote,
702 "T" => Self::SettlementInstructions,
703 "V" => Self::MarketDataRequest,
704 "W" => Self::MarketDataSnapshotFullRefresh,
705 "X" => Self::MarketDataIncrementalRefresh,
706 "Y" => Self::MarketDataRequestReject,
707 "Z" => Self::QuoteCancel,
708 "a" => Self::QuoteStatusRequest,
709 "b" => Self::MassQuoteAcknowledgement,
710 "c" => Self::SecurityDefinitionRequest,
711 "d" => Self::SecurityDefinition,
712 "e" => Self::SecurityStatusRequest,
713 "f" => Self::SecurityStatus,
714 "g" => Self::TradingSessionStatusRequest,
715 "h" => Self::TradingSessionStatus,
716 "i" => Self::MassQuote,
717 "j" => Self::BusinessMessageReject,
718 "k" => Self::BidRequest,
719 "l" => Self::BidResponse,
720 "m" => Self::ListStrikePrice,
721 unrecognized => Self::Unrecognized(unrecognized),
722 }
723 }
724
725 pub fn value(self) -> &'a str {
726 match self {
727 Self::Heartbeat => "0",
728 Self::TestRequest => "1",
729 Self::ResendRequest => "2",
730 Self::Reject => "3",
731 Self::SequenceReset => "4",
732 Self::Logout => "5",
733 Self::Ioi => "6",
734 Self::Advertisement => "7",
735 Self::ExecutionReport => "8",
736 Self::OrderCancelReject => "9",
737 Self::Logon => "A",
738 Self::News => "B",
739 Self::Email => "C",
740 Self::NewOrderSingle => "D",
741 Self::NewOrderList => "E",
742 Self::OrderCancelRequest => "F",
743 Self::OrderCancelReplaceRequest => "G",
744 Self::OrderStatusRequest => "H",
745 Self::AllocationInstruction => "J",
746 Self::ListCancelRequest => "K",
747 Self::ListExecute => "L",
748 Self::ListStatusRequest => "M",
749 Self::ListStatus => "N",
750 Self::AllocationInstructionAck => "P",
751 Self::DontKnowTrade => "Q",
752 Self::QuoteRequest => "R",
753 Self::Quote => "S",
754 Self::SettlementInstructions => "T",
755 Self::MarketDataRequest => "V",
756 Self::MarketDataSnapshotFullRefresh => "W",
757 Self::MarketDataIncrementalRefresh => "X",
758 Self::MarketDataRequestReject => "Y",
759 Self::QuoteCancel => "Z",
760 Self::QuoteStatusRequest => "a",
761 Self::MassQuoteAcknowledgement => "b",
762 Self::SecurityDefinitionRequest => "c",
763 Self::SecurityDefinition => "d",
764 Self::SecurityStatusRequest => "e",
765 Self::SecurityStatus => "f",
766 Self::TradingSessionStatusRequest => "g",
767 Self::TradingSessionStatus => "h",
768 Self::MassQuote => "i",
769 Self::BusinessMessageReject => "j",
770 Self::BidRequest => "k",
771 Self::BidResponse => "l",
772 Self::ListStrikePrice => "m",
773 Self::Unrecognized(value) => value,
774 }
775 }
776}
777
778impl<'a> From<&'a str> for MsgType<'a> {
779 fn from(value: &'a str) -> Self {
780 Self::from_value(value)
781 }
782}
783
784#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
786pub enum OrdStatus<'a> {
787 New,
789 PartiallyFilled,
791 Filled,
793 DoneForDay,
795 Canceled,
797 Replaced,
799 PendingCancel,
801 Stopped,
803 Rejected,
805 Suspended,
807 PendingNew,
809 Calculated,
811 Expired,
813 AcceptedForBidding,
815 PendingReplace,
817 Unrecognized(&'a str),
819}
820
821impl<'a> OrdStatus<'a> {
822 pub fn from_value(value: &'a str) -> Self {
823 match value {
824 "0" => Self::New,
825 "1" => Self::PartiallyFilled,
826 "2" => Self::Filled,
827 "3" => Self::DoneForDay,
828 "4" => Self::Canceled,
829 "5" => Self::Replaced,
830 "6" => Self::PendingCancel,
831 "7" => Self::Stopped,
832 "8" => Self::Rejected,
833 "9" => Self::Suspended,
834 "A" => Self::PendingNew,
835 "B" => Self::Calculated,
836 "C" => Self::Expired,
837 "D" => Self::AcceptedForBidding,
838 "E" => Self::PendingReplace,
839 unrecognized => Self::Unrecognized(unrecognized),
840 }
841 }
842
843 pub fn value(self) -> &'a str {
844 match self {
845 Self::New => "0",
846 Self::PartiallyFilled => "1",
847 Self::Filled => "2",
848 Self::DoneForDay => "3",
849 Self::Canceled => "4",
850 Self::Replaced => "5",
851 Self::PendingCancel => "6",
852 Self::Stopped => "7",
853 Self::Rejected => "8",
854 Self::Suspended => "9",
855 Self::PendingNew => "A",
856 Self::Calculated => "B",
857 Self::Expired => "C",
858 Self::AcceptedForBidding => "D",
859 Self::PendingReplace => "E",
860 Self::Unrecognized(value) => value,
861 }
862 }
863}
864
865impl<'a> From<&'a str> for OrdStatus<'a> {
866 fn from(value: &'a str) -> Self {
867 Self::from_value(value)
868 }
869}
870
871#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
873pub enum OrdType<'a> {
874 Market,
876 Limit,
878 Stop,
880 StopLimit,
882 MarketOnClose,
884 WithOrWithout,
886 LimitOrBetter,
888 LimitWithOrWithout,
890 OnBasis,
892 OnClose,
894 LimitOnClose,
896 ForexMarket,
898 PreviouslyQuoted,
900 PreviouslyIndicated,
902 ForexLimit,
904 ForexSwap,
906 ForexPreviouslyQuoted,
908 Funari,
910 Pegged,
912 Unrecognized(&'a str),
914}
915
916impl<'a> OrdType<'a> {
917 pub fn from_value(value: &'a str) -> Self {
918 match value {
919 "1" => Self::Market,
920 "2" => Self::Limit,
921 "3" => Self::Stop,
922 "4" => Self::StopLimit,
923 "5" => Self::MarketOnClose,
924 "6" => Self::WithOrWithout,
925 "7" => Self::LimitOrBetter,
926 "8" => Self::LimitWithOrWithout,
927 "9" => Self::OnBasis,
928 "A" => Self::OnClose,
929 "B" => Self::LimitOnClose,
930 "C" => Self::ForexMarket,
931 "D" => Self::PreviouslyQuoted,
932 "E" => Self::PreviouslyIndicated,
933 "F" => Self::ForexLimit,
934 "G" => Self::ForexSwap,
935 "H" => Self::ForexPreviouslyQuoted,
936 "I" => Self::Funari,
937 "P" => Self::Pegged,
938 unrecognized => Self::Unrecognized(unrecognized),
939 }
940 }
941
942 pub fn value(self) -> &'a str {
943 match self {
944 Self::Market => "1",
945 Self::Limit => "2",
946 Self::Stop => "3",
947 Self::StopLimit => "4",
948 Self::MarketOnClose => "5",
949 Self::WithOrWithout => "6",
950 Self::LimitOrBetter => "7",
951 Self::LimitWithOrWithout => "8",
952 Self::OnBasis => "9",
953 Self::OnClose => "A",
954 Self::LimitOnClose => "B",
955 Self::ForexMarket => "C",
956 Self::PreviouslyQuoted => "D",
957 Self::PreviouslyIndicated => "E",
958 Self::ForexLimit => "F",
959 Self::ForexSwap => "G",
960 Self::ForexPreviouslyQuoted => "H",
961 Self::Funari => "I",
962 Self::Pegged => "P",
963 Self::Unrecognized(value) => value,
964 }
965 }
966}
967
968impl<'a> From<&'a str> for OrdType<'a> {
969 fn from(value: &'a str) -> Self {
970 Self::from_value(value)
971 }
972}
973
974#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
976pub enum Rule80A<'a> {
977 AgencySingleOrder,
979 ShortExemptTransactionAType,
981 ProprietaryNonAlgo,
983 ProgramOrderMember,
985 ShortExemptTransactionForPrincipal,
987 ShortExemptTransactionWType,
989 ShortExemptTransactionIType,
991 IndividualInvestor,
993 ProprietaryAlgo,
995 AgencyAlgo,
997 ShortExemptTransactionMemberAffliated,
999 ProgramOrderOtherMember,
1001 AgentForOtherMember,
1003 ProprietaryTransactionAffiliated,
1005 Principal,
1007 TransactionNonMember,
1009 SpecialistTrades,
1011 TransactionUnaffiliatedMember,
1013 AgencyIndexArb,
1015 AllOtherOrdersAsAgentForOtherMember,
1017 ShortExemptTransactionMemberNotAffliated,
1019 AgencyNonAlgo,
1021 ShortExemptTransactionNonMember,
1023 Unrecognized(&'a str),
1025}
1026
1027impl<'a> Rule80A<'a> {
1028 pub fn from_value(value: &'a str) -> Self {
1029 match value {
1030 "A" => Self::AgencySingleOrder,
1031 "B" => Self::ShortExemptTransactionAType,
1032 "C" => Self::ProprietaryNonAlgo,
1033 "D" => Self::ProgramOrderMember,
1034 "E" => Self::ShortExemptTransactionForPrincipal,
1035 "F" => Self::ShortExemptTransactionWType,
1036 "H" => Self::ShortExemptTransactionIType,
1037 "I" => Self::IndividualInvestor,
1038 "J" => Self::ProprietaryAlgo,
1039 "K" => Self::AgencyAlgo,
1040 "L" => Self::ShortExemptTransactionMemberAffliated,
1041 "M" => Self::ProgramOrderOtherMember,
1042 "N" => Self::AgentForOtherMember,
1043 "O" => Self::ProprietaryTransactionAffiliated,
1044 "P" => Self::Principal,
1045 "R" => Self::TransactionNonMember,
1046 "S" => Self::SpecialistTrades,
1047 "T" => Self::TransactionUnaffiliatedMember,
1048 "U" => Self::AgencyIndexArb,
1049 "W" => Self::AllOtherOrdersAsAgentForOtherMember,
1050 "X" => Self::ShortExemptTransactionMemberNotAffliated,
1051 "Y" => Self::AgencyNonAlgo,
1052 "Z" => Self::ShortExemptTransactionNonMember,
1053 unrecognized => Self::Unrecognized(unrecognized),
1054 }
1055 }
1056
1057 pub fn value(self) -> &'a str {
1058 match self {
1059 Self::AgencySingleOrder => "A",
1060 Self::ShortExemptTransactionAType => "B",
1061 Self::ProprietaryNonAlgo => "C",
1062 Self::ProgramOrderMember => "D",
1063 Self::ShortExemptTransactionForPrincipal => "E",
1064 Self::ShortExemptTransactionWType => "F",
1065 Self::ShortExemptTransactionIType => "H",
1066 Self::IndividualInvestor => "I",
1067 Self::ProprietaryAlgo => "J",
1068 Self::AgencyAlgo => "K",
1069 Self::ShortExemptTransactionMemberAffliated => "L",
1070 Self::ProgramOrderOtherMember => "M",
1071 Self::AgentForOtherMember => "N",
1072 Self::ProprietaryTransactionAffiliated => "O",
1073 Self::Principal => "P",
1074 Self::TransactionNonMember => "R",
1075 Self::SpecialistTrades => "S",
1076 Self::TransactionUnaffiliatedMember => "T",
1077 Self::AgencyIndexArb => "U",
1078 Self::AllOtherOrdersAsAgentForOtherMember => "W",
1079 Self::ShortExemptTransactionMemberNotAffliated => "X",
1080 Self::AgencyNonAlgo => "Y",
1081 Self::ShortExemptTransactionNonMember => "Z",
1082 Self::Unrecognized(value) => value,
1083 }
1084 }
1085}
1086
1087impl<'a> From<&'a str> for Rule80A<'a> {
1088 fn from(value: &'a str) -> Self {
1089 Self::from_value(value)
1090 }
1091}
1092
1093#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1095pub enum Side<'a> {
1096 Buy,
1098 Sell,
1100 BuyMinus,
1102 SellPlus,
1104 SellShort,
1106 SellShortExempt,
1108 Undisclosed,
1110 Cross,
1112 CrossShort,
1114 Unrecognized(&'a str),
1116}
1117
1118impl<'a> Side<'a> {
1119 pub fn from_value(value: &'a str) -> Self {
1120 match value {
1121 "1" => Self::Buy,
1122 "2" => Self::Sell,
1123 "3" => Self::BuyMinus,
1124 "4" => Self::SellPlus,
1125 "5" => Self::SellShort,
1126 "6" => Self::SellShortExempt,
1127 "7" => Self::Undisclosed,
1128 "8" => Self::Cross,
1129 "9" => Self::CrossShort,
1130 unrecognized => Self::Unrecognized(unrecognized),
1131 }
1132 }
1133
1134 pub fn value(self) -> &'a str {
1135 match self {
1136 Self::Buy => "1",
1137 Self::Sell => "2",
1138 Self::BuyMinus => "3",
1139 Self::SellPlus => "4",
1140 Self::SellShort => "5",
1141 Self::SellShortExempt => "6",
1142 Self::Undisclosed => "7",
1143 Self::Cross => "8",
1144 Self::CrossShort => "9",
1145 Self::Unrecognized(value) => value,
1146 }
1147 }
1148}
1149
1150impl<'a> From<&'a str> for Side<'a> {
1151 fn from(value: &'a str) -> Self {
1152 Self::from_value(value)
1153 }
1154}
1155
1156#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1158pub enum TimeInForce<'a> {
1159 Day,
1161 GoodTillCancel,
1163 AtTheOpening,
1165 ImmediateOrCancel,
1167 FillOrKill,
1169 GoodTillCrossing,
1171 GoodTillDate,
1173 Unrecognized(&'a str),
1175}
1176
1177impl<'a> TimeInForce<'a> {
1178 pub fn from_value(value: &'a str) -> Self {
1179 match value {
1180 "0" => Self::Day,
1181 "1" => Self::GoodTillCancel,
1182 "2" => Self::AtTheOpening,
1183 "3" => Self::ImmediateOrCancel,
1184 "4" => Self::FillOrKill,
1185 "5" => Self::GoodTillCrossing,
1186 "6" => Self::GoodTillDate,
1187 unrecognized => Self::Unrecognized(unrecognized),
1188 }
1189 }
1190
1191 pub fn value(self) -> &'a str {
1192 match self {
1193 Self::Day => "0",
1194 Self::GoodTillCancel => "1",
1195 Self::AtTheOpening => "2",
1196 Self::ImmediateOrCancel => "3",
1197 Self::FillOrKill => "4",
1198 Self::GoodTillCrossing => "5",
1199 Self::GoodTillDate => "6",
1200 Self::Unrecognized(value) => value,
1201 }
1202 }
1203}
1204
1205impl<'a> From<&'a str> for TimeInForce<'a> {
1206 fn from(value: &'a str) -> Self {
1207 Self::from_value(value)
1208 }
1209}
1210
1211#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1213pub enum Urgency<'a> {
1214 Normal,
1216 Flash,
1218 Background,
1220 Unrecognized(&'a str),
1222}
1223
1224impl<'a> Urgency<'a> {
1225 pub fn from_value(value: &'a str) -> Self {
1226 match value {
1227 "0" => Self::Normal,
1228 "1" => Self::Flash,
1229 "2" => Self::Background,
1230 unrecognized => Self::Unrecognized(unrecognized),
1231 }
1232 }
1233
1234 pub fn value(self) -> &'a str {
1235 match self {
1236 Self::Normal => "0",
1237 Self::Flash => "1",
1238 Self::Background => "2",
1239 Self::Unrecognized(value) => value,
1240 }
1241 }
1242}
1243
1244impl<'a> From<&'a str> for Urgency<'a> {
1245 fn from(value: &'a str) -> Self {
1246 Self::from_value(value)
1247 }
1248}
1249
1250#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1252pub enum SettlmntTyp<'a> {
1253 Regular,
1255 Cash,
1257 NextDay,
1259 TPlus2,
1261 TPlus3,
1263 TPlus4,
1265 Future,
1267 WhenAndIfIssued,
1269 SellersOption,
1271 TPlus5,
1273 Unrecognized(&'a str),
1275}
1276
1277impl<'a> SettlmntTyp<'a> {
1278 pub fn from_value(value: &'a str) -> Self {
1279 match value {
1280 "0" => Self::Regular,
1281 "1" => Self::Cash,
1282 "2" => Self::NextDay,
1283 "3" => Self::TPlus2,
1284 "4" => Self::TPlus3,
1285 "5" => Self::TPlus4,
1286 "6" => Self::Future,
1287 "7" => Self::WhenAndIfIssued,
1288 "8" => Self::SellersOption,
1289 "9" => Self::TPlus5,
1290 unrecognized => Self::Unrecognized(unrecognized),
1291 }
1292 }
1293
1294 pub fn value(self) -> &'a str {
1295 match self {
1296 Self::Regular => "0",
1297 Self::Cash => "1",
1298 Self::NextDay => "2",
1299 Self::TPlus2 => "3",
1300 Self::TPlus3 => "4",
1301 Self::TPlus4 => "5",
1302 Self::Future => "6",
1303 Self::WhenAndIfIssued => "7",
1304 Self::SellersOption => "8",
1305 Self::TPlus5 => "9",
1306 Self::Unrecognized(value) => value,
1307 }
1308 }
1309}
1310
1311impl<'a> From<&'a str> for SettlmntTyp<'a> {
1312 fn from(value: &'a str) -> Self {
1313 Self::from_value(value)
1314 }
1315}
1316
1317#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1319pub enum AllocTransType<'a> {
1320 New,
1322 Replace,
1324 Cancel,
1326 Preliminary,
1328 Calculated,
1330 CalculatedWithoutPreliminary,
1332 Unrecognized(&'a str),
1334}
1335
1336impl<'a> AllocTransType<'a> {
1337 pub fn from_value(value: &'a str) -> Self {
1338 match value {
1339 "0" => Self::New,
1340 "1" => Self::Replace,
1341 "2" => Self::Cancel,
1342 "3" => Self::Preliminary,
1343 "4" => Self::Calculated,
1344 "5" => Self::CalculatedWithoutPreliminary,
1345 unrecognized => Self::Unrecognized(unrecognized),
1346 }
1347 }
1348
1349 pub fn value(self) -> &'a str {
1350 match self {
1351 Self::New => "0",
1352 Self::Replace => "1",
1353 Self::Cancel => "2",
1354 Self::Preliminary => "3",
1355 Self::Calculated => "4",
1356 Self::CalculatedWithoutPreliminary => "5",
1357 Self::Unrecognized(value) => value,
1358 }
1359 }
1360}
1361
1362impl<'a> From<&'a str> for AllocTransType<'a> {
1363 fn from(value: &'a str) -> Self {
1364 Self::from_value(value)
1365 }
1366}
1367
1368#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1370pub enum OpenClose<'a> {
1371 Close,
1373 Open,
1375 Unrecognized(&'a str),
1377}
1378
1379impl<'a> OpenClose<'a> {
1380 pub fn from_value(value: &'a str) -> Self {
1381 match value {
1382 "C" => Self::Close,
1383 "O" => Self::Open,
1384 unrecognized => Self::Unrecognized(unrecognized),
1385 }
1386 }
1387
1388 pub fn value(self) -> &'a str {
1389 match self {
1390 Self::Close => "C",
1391 Self::Open => "O",
1392 Self::Unrecognized(value) => value,
1393 }
1394 }
1395}
1396
1397impl<'a> From<&'a str> for OpenClose<'a> {
1398 fn from(value: &'a str) -> Self {
1399 Self::from_value(value)
1400 }
1401}
1402
1403#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1405pub enum ProcessCode<'a> {
1406 Regular,
1408 SoftDollar,
1410 StepIn,
1412 StepOut,
1414 SoftDollarStepIn,
1416 SoftDollarStepOut,
1418 PlanSponsor,
1420 Unrecognized(&'a str),
1422}
1423
1424impl<'a> ProcessCode<'a> {
1425 pub fn from_value(value: &'a str) -> Self {
1426 match value {
1427 "0" => Self::Regular,
1428 "1" => Self::SoftDollar,
1429 "2" => Self::StepIn,
1430 "3" => Self::StepOut,
1431 "4" => Self::SoftDollarStepIn,
1432 "5" => Self::SoftDollarStepOut,
1433 "6" => Self::PlanSponsor,
1434 unrecognized => Self::Unrecognized(unrecognized),
1435 }
1436 }
1437
1438 pub fn value(self) -> &'a str {
1439 match self {
1440 Self::Regular => "0",
1441 Self::SoftDollar => "1",
1442 Self::StepIn => "2",
1443 Self::StepOut => "3",
1444 Self::SoftDollarStepIn => "4",
1445 Self::SoftDollarStepOut => "5",
1446 Self::PlanSponsor => "6",
1447 Self::Unrecognized(value) => value,
1448 }
1449 }
1450}
1451
1452impl<'a> From<&'a str> for ProcessCode<'a> {
1453 fn from(value: &'a str) -> Self {
1454 Self::from_value(value)
1455 }
1456}
1457
1458#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1460pub enum AllocStatus {
1461 Accepted,
1463 BlockLevelReject,
1465 AccountLevelReject,
1467 Received,
1469 Unrecognized(i64),
1471}
1472
1473impl AllocStatus {
1474 pub fn from_value(value: i64) -> Self {
1475 match value {
1476 0 => Self::Accepted,
1477 1 => Self::BlockLevelReject,
1478 2 => Self::AccountLevelReject,
1479 3 => Self::Received,
1480 unrecognized => Self::Unrecognized(unrecognized),
1481 }
1482 }
1483
1484 pub fn value(self) -> i64 {
1485 match self {
1486 Self::Accepted => 0,
1487 Self::BlockLevelReject => 1,
1488 Self::AccountLevelReject => 2,
1489 Self::Received => 3,
1490 Self::Unrecognized(value) => value,
1491 }
1492 }
1493}
1494
1495#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1497pub enum AllocRejCode {
1498 UnknownAccount,
1500 IncorrectQuantity,
1502 IncorrectAveragegPrice,
1504 UnknownExecutingBrokerMnemonic,
1506 CommissionDifference,
1508 UnknownOrderId,
1510 UnknownListId,
1512 OtherSeeText,
1514 Unrecognized(i64),
1516}
1517
1518impl AllocRejCode {
1519 pub fn from_value(value: i64) -> Self {
1520 match value {
1521 0 => Self::UnknownAccount,
1522 1 => Self::IncorrectQuantity,
1523 2 => Self::IncorrectAveragegPrice,
1524 3 => Self::UnknownExecutingBrokerMnemonic,
1525 4 => Self::CommissionDifference,
1526 5 => Self::UnknownOrderId,
1527 6 => Self::UnknownListId,
1528 7 => Self::OtherSeeText,
1529 unrecognized => Self::Unrecognized(unrecognized),
1530 }
1531 }
1532
1533 pub fn value(self) -> i64 {
1534 match self {
1535 Self::UnknownAccount => 0,
1536 Self::IncorrectQuantity => 1,
1537 Self::IncorrectAveragegPrice => 2,
1538 Self::UnknownExecutingBrokerMnemonic => 3,
1539 Self::CommissionDifference => 4,
1540 Self::UnknownOrderId => 5,
1541 Self::UnknownListId => 6,
1542 Self::OtherSeeText => 7,
1543 Self::Unrecognized(value) => value,
1544 }
1545 }
1546}
1547
1548#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1550pub enum EmailType<'a> {
1551 New,
1553 Reply,
1555 AdminReply,
1557 Unrecognized(&'a str),
1559}
1560
1561impl<'a> EmailType<'a> {
1562 pub fn from_value(value: &'a str) -> Self {
1563 match value {
1564 "0" => Self::New,
1565 "1" => Self::Reply,
1566 "2" => Self::AdminReply,
1567 unrecognized => Self::Unrecognized(unrecognized),
1568 }
1569 }
1570
1571 pub fn value(self) -> &'a str {
1572 match self {
1573 Self::New => "0",
1574 Self::Reply => "1",
1575 Self::AdminReply => "2",
1576 Self::Unrecognized(value) => value,
1577 }
1578 }
1579}
1580
1581impl<'a> From<&'a str> for EmailType<'a> {
1582 fn from(value: &'a str) -> Self {
1583 Self::from_value(value)
1584 }
1585}
1586
1587#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1589pub enum EncryptMethod {
1590 None,
1592 Pkcs,
1594 Des,
1596 Pkcsdes,
1598 Pgpdes,
1600 Pgpdesmd5,
1602 Pem,
1604 Unrecognized(i64),
1606}
1607
1608impl EncryptMethod {
1609 pub fn from_value(value: i64) -> Self {
1610 match value {
1611 0 => Self::None,
1612 1 => Self::Pkcs,
1613 2 => Self::Des,
1614 3 => Self::Pkcsdes,
1615 4 => Self::Pgpdes,
1616 5 => Self::Pgpdesmd5,
1617 6 => Self::Pem,
1618 unrecognized => Self::Unrecognized(unrecognized),
1619 }
1620 }
1621
1622 pub fn value(self) -> i64 {
1623 match self {
1624 Self::None => 0,
1625 Self::Pkcs => 1,
1626 Self::Des => 2,
1627 Self::Pkcsdes => 3,
1628 Self::Pgpdes => 4,
1629 Self::Pgpdesmd5 => 5,
1630 Self::Pem => 6,
1631 Self::Unrecognized(value) => value,
1632 }
1633 }
1634}
1635
1636#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1638pub enum CxlRejReason {
1639 TooLateToCancel,
1641 UnknownOrder,
1643 BrokerCredit,
1645 OrderAlreadyInPendingStatus,
1647 Unrecognized(i64),
1649}
1650
1651impl CxlRejReason {
1652 pub fn from_value(value: i64) -> Self {
1653 match value {
1654 0 => Self::TooLateToCancel,
1655 1 => Self::UnknownOrder,
1656 2 => Self::BrokerCredit,
1657 3 => Self::OrderAlreadyInPendingStatus,
1658 unrecognized => Self::Unrecognized(unrecognized),
1659 }
1660 }
1661
1662 pub fn value(self) -> i64 {
1663 match self {
1664 Self::TooLateToCancel => 0,
1665 Self::UnknownOrder => 1,
1666 Self::BrokerCredit => 2,
1667 Self::OrderAlreadyInPendingStatus => 3,
1668 Self::Unrecognized(value) => value,
1669 }
1670 }
1671}
1672
1673#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1675pub enum OrdRejReason {
1676 BrokerCredit,
1678 UnknownSymbol,
1680 ExchangeClosed,
1682 OrderExceedsLimit,
1684 TooLateToEnter,
1686 UnknownOrder,
1688 DuplicateOrder,
1690 DuplicateOfAVerballyCommunicatedOrder,
1692 StaleOrder,
1694 Unrecognized(i64),
1696}
1697
1698impl OrdRejReason {
1699 pub fn from_value(value: i64) -> Self {
1700 match value {
1701 0 => Self::BrokerCredit,
1702 1 => Self::UnknownSymbol,
1703 2 => Self::ExchangeClosed,
1704 3 => Self::OrderExceedsLimit,
1705 4 => Self::TooLateToEnter,
1706 5 => Self::UnknownOrder,
1707 6 => Self::DuplicateOrder,
1708 7 => Self::DuplicateOfAVerballyCommunicatedOrder,
1709 8 => Self::StaleOrder,
1710 unrecognized => Self::Unrecognized(unrecognized),
1711 }
1712 }
1713
1714 pub fn value(self) -> i64 {
1715 match self {
1716 Self::BrokerCredit => 0,
1717 Self::UnknownSymbol => 1,
1718 Self::ExchangeClosed => 2,
1719 Self::OrderExceedsLimit => 3,
1720 Self::TooLateToEnter => 4,
1721 Self::UnknownOrder => 5,
1722 Self::DuplicateOrder => 6,
1723 Self::DuplicateOfAVerballyCommunicatedOrder => 7,
1724 Self::StaleOrder => 8,
1725 Self::Unrecognized(value) => value,
1726 }
1727 }
1728}
1729
1730#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1732pub enum IOIQualifier<'a> {
1733 AllOrNone,
1735 AtTheClose,
1737 InTouchWith,
1739 Limit,
1741 MoreBehind,
1743 AtTheOpen,
1745 TakingAPosition,
1747 AtTheMarket,
1749 ReadyToTrade,
1751 PortfolioShown,
1753 ThroughTheDay,
1755 Versus,
1757 Indication,
1759 CrossingOpportunity,
1761 AtTheMidpoint,
1763 PreOpen,
1765 Unrecognized(&'a str),
1767}
1768
1769impl<'a> IOIQualifier<'a> {
1770 pub fn from_value(value: &'a str) -> Self {
1771 match value {
1772 "A" => Self::AllOrNone,
1773 "C" => Self::AtTheClose,
1774 "I" => Self::InTouchWith,
1775 "L" => Self::Limit,
1776 "M" => Self::MoreBehind,
1777 "O" => Self::AtTheOpen,
1778 "P" => Self::TakingAPosition,
1779 "Q" => Self::AtTheMarket,
1780 "R" => Self::ReadyToTrade,
1781 "S" => Self::PortfolioShown,
1782 "T" => Self::ThroughTheDay,
1783 "V" => Self::Versus,
1784 "W" => Self::Indication,
1785 "X" => Self::CrossingOpportunity,
1786 "Y" => Self::AtTheMidpoint,
1787 "Z" => Self::PreOpen,
1788 unrecognized => Self::Unrecognized(unrecognized),
1789 }
1790 }
1791
1792 pub fn value(self) -> &'a str {
1793 match self {
1794 Self::AllOrNone => "A",
1795 Self::AtTheClose => "C",
1796 Self::InTouchWith => "I",
1797 Self::Limit => "L",
1798 Self::MoreBehind => "M",
1799 Self::AtTheOpen => "O",
1800 Self::TakingAPosition => "P",
1801 Self::AtTheMarket => "Q",
1802 Self::ReadyToTrade => "R",
1803 Self::PortfolioShown => "S",
1804 Self::ThroughTheDay => "T",
1805 Self::Versus => "V",
1806 Self::Indication => "W",
1807 Self::CrossingOpportunity => "X",
1808 Self::AtTheMidpoint => "Y",
1809 Self::PreOpen => "Z",
1810 Self::Unrecognized(value) => value,
1811 }
1812 }
1813}
1814
1815impl<'a> From<&'a str> for IOIQualifier<'a> {
1816 fn from(value: &'a str) -> Self {
1817 Self::from_value(value)
1818 }
1819}
1820
1821#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1823pub enum DKReason<'a> {
1824 UnknownSymbol,
1826 WrongSide,
1828 QuantityExceedsOrder,
1830 NoMatchingOrder,
1832 PriceExceedsLimit,
1834 Other,
1836 Unrecognized(&'a str),
1838}
1839
1840impl<'a> DKReason<'a> {
1841 pub fn from_value(value: &'a str) -> Self {
1842 match value {
1843 "A" => Self::UnknownSymbol,
1844 "B" => Self::WrongSide,
1845 "C" => Self::QuantityExceedsOrder,
1846 "D" => Self::NoMatchingOrder,
1847 "E" => Self::PriceExceedsLimit,
1848 "Z" => Self::Other,
1849 unrecognized => Self::Unrecognized(unrecognized),
1850 }
1851 }
1852
1853 pub fn value(self) -> &'a str {
1854 match self {
1855 Self::UnknownSymbol => "A",
1856 Self::WrongSide => "B",
1857 Self::QuantityExceedsOrder => "C",
1858 Self::NoMatchingOrder => "D",
1859 Self::PriceExceedsLimit => "E",
1860 Self::Other => "Z",
1861 Self::Unrecognized(value) => value,
1862 }
1863 }
1864}
1865
1866impl<'a> From<&'a str> for DKReason<'a> {
1867 fn from(value: &'a str) -> Self {
1868 Self::from_value(value)
1869 }
1870}
1871
1872#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1874pub enum MiscFeeType<'a> {
1875 Regulatory,
1877 Tax,
1879 LocalCommission,
1881 ExchangeFees,
1883 Stamp,
1885 Levy,
1887 Other,
1889 Markup,
1891 ConsumptionTax,
1893 Unrecognized(&'a str),
1895}
1896
1897impl<'a> MiscFeeType<'a> {
1898 pub fn from_value(value: &'a str) -> Self {
1899 match value {
1900 "1" => Self::Regulatory,
1901 "2" => Self::Tax,
1902 "3" => Self::LocalCommission,
1903 "4" => Self::ExchangeFees,
1904 "5" => Self::Stamp,
1905 "6" => Self::Levy,
1906 "7" => Self::Other,
1907 "8" => Self::Markup,
1908 "9" => Self::ConsumptionTax,
1909 unrecognized => Self::Unrecognized(unrecognized),
1910 }
1911 }
1912
1913 pub fn value(self) -> &'a str {
1914 match self {
1915 Self::Regulatory => "1",
1916 Self::Tax => "2",
1917 Self::LocalCommission => "3",
1918 Self::ExchangeFees => "4",
1919 Self::Stamp => "5",
1920 Self::Levy => "6",
1921 Self::Other => "7",
1922 Self::Markup => "8",
1923 Self::ConsumptionTax => "9",
1924 Self::Unrecognized(value) => value,
1925 }
1926 }
1927}
1928
1929impl<'a> From<&'a str> for MiscFeeType<'a> {
1930 fn from(value: &'a str) -> Self {
1931 Self::from_value(value)
1932 }
1933}
1934
1935#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1937pub enum ExecType<'a> {
1938 New,
1940 PartialFill,
1942 Fill,
1944 DoneForDay,
1946 Canceled,
1948 Replaced,
1950 PendingCancel,
1952 Stopped,
1954 Rejected,
1956 Suspended,
1958 PendingNew,
1960 Calculated,
1962 Expired,
1964 Restated,
1966 PendingReplace,
1968 Unrecognized(&'a str),
1970}
1971
1972impl<'a> ExecType<'a> {
1973 pub fn from_value(value: &'a str) -> Self {
1974 match value {
1975 "0" => Self::New,
1976 "1" => Self::PartialFill,
1977 "2" => Self::Fill,
1978 "3" => Self::DoneForDay,
1979 "4" => Self::Canceled,
1980 "5" => Self::Replaced,
1981 "6" => Self::PendingCancel,
1982 "7" => Self::Stopped,
1983 "8" => Self::Rejected,
1984 "9" => Self::Suspended,
1985 "A" => Self::PendingNew,
1986 "B" => Self::Calculated,
1987 "C" => Self::Expired,
1988 "D" => Self::Restated,
1989 "E" => Self::PendingReplace,
1990 unrecognized => Self::Unrecognized(unrecognized),
1991 }
1992 }
1993
1994 pub fn value(self) -> &'a str {
1995 match self {
1996 Self::New => "0",
1997 Self::PartialFill => "1",
1998 Self::Fill => "2",
1999 Self::DoneForDay => "3",
2000 Self::Canceled => "4",
2001 Self::Replaced => "5",
2002 Self::PendingCancel => "6",
2003 Self::Stopped => "7",
2004 Self::Rejected => "8",
2005 Self::Suspended => "9",
2006 Self::PendingNew => "A",
2007 Self::Calculated => "B",
2008 Self::Expired => "C",
2009 Self::Restated => "D",
2010 Self::PendingReplace => "E",
2011 Self::Unrecognized(value) => value,
2012 }
2013 }
2014}
2015
2016impl<'a> From<&'a str> for ExecType<'a> {
2017 fn from(value: &'a str) -> Self {
2018 Self::from_value(value)
2019 }
2020}
2021
2022#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2024pub enum SettlInstMode<'a> {
2025 Default,
2027 StandingInstructionsProvided,
2029 SpecificAllocationAccountOverriding,
2031 SpecificAllocationAccountStanding,
2033 Unrecognized(&'a str),
2035}
2036
2037impl<'a> SettlInstMode<'a> {
2038 pub fn from_value(value: &'a str) -> Self {
2039 match value {
2040 "0" => Self::Default,
2041 "1" => Self::StandingInstructionsProvided,
2042 "2" => Self::SpecificAllocationAccountOverriding,
2043 "3" => Self::SpecificAllocationAccountStanding,
2044 unrecognized => Self::Unrecognized(unrecognized),
2045 }
2046 }
2047
2048 pub fn value(self) -> &'a str {
2049 match self {
2050 Self::Default => "0",
2051 Self::StandingInstructionsProvided => "1",
2052 Self::SpecificAllocationAccountOverriding => "2",
2053 Self::SpecificAllocationAccountStanding => "3",
2054 Self::Unrecognized(value) => value,
2055 }
2056 }
2057}
2058
2059impl<'a> From<&'a str> for SettlInstMode<'a> {
2060 fn from(value: &'a str) -> Self {
2061 Self::from_value(value)
2062 }
2063}
2064
2065#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2067pub enum SettlInstTransType<'a> {
2068 Cancel,
2070 New,
2072 Replace,
2074 Unrecognized(&'a str),
2076}
2077
2078impl<'a> SettlInstTransType<'a> {
2079 pub fn from_value(value: &'a str) -> Self {
2080 match value {
2081 "C" => Self::Cancel,
2082 "N" => Self::New,
2083 "R" => Self::Replace,
2084 unrecognized => Self::Unrecognized(unrecognized),
2085 }
2086 }
2087
2088 pub fn value(self) -> &'a str {
2089 match self {
2090 Self::Cancel => "C",
2091 Self::New => "N",
2092 Self::Replace => "R",
2093 Self::Unrecognized(value) => value,
2094 }
2095 }
2096}
2097
2098impl<'a> From<&'a str> for SettlInstTransType<'a> {
2099 fn from(value: &'a str) -> Self {
2100 Self::from_value(value)
2101 }
2102}
2103
2104#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2106pub enum SettlInstSource<'a> {
2107 BrokerCredit,
2109 Institution,
2111 Unrecognized(&'a str),
2113}
2114
2115impl<'a> SettlInstSource<'a> {
2116 pub fn from_value(value: &'a str) -> Self {
2117 match value {
2118 "1" => Self::BrokerCredit,
2119 "2" => Self::Institution,
2120 unrecognized => Self::Unrecognized(unrecognized),
2121 }
2122 }
2123
2124 pub fn value(self) -> &'a str {
2125 match self {
2126 Self::BrokerCredit => "1",
2127 Self::Institution => "2",
2128 Self::Unrecognized(value) => value,
2129 }
2130 }
2131}
2132
2133impl<'a> From<&'a str> for SettlInstSource<'a> {
2134 fn from(value: &'a str) -> Self {
2135 Self::from_value(value)
2136 }
2137}
2138
2139#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2141pub enum SettlLocation<'a> {
2142 Cedel,
2144 DepositoryTrustCompany,
2146 EuroClear,
2148 FederalBookEntry,
2150 LocalMarketSettleLocation,
2152 Physical,
2154 ParticipantTrustCompany,
2156 Unrecognized(&'a str),
2158}
2159
2160impl<'a> SettlLocation<'a> {
2161 pub fn from_value(value: &'a str) -> Self {
2162 match value {
2163 "CED" => Self::Cedel,
2164 "DTC" => Self::DepositoryTrustCompany,
2165 "EUR" => Self::EuroClear,
2166 "FED" => Self::FederalBookEntry,
2167 "ISO Country Code" => Self::LocalMarketSettleLocation,
2168 "PNY" => Self::Physical,
2169 "PTC" => Self::ParticipantTrustCompany,
2170 unrecognized => Self::Unrecognized(unrecognized),
2171 }
2172 }
2173
2174 pub fn value(self) -> &'a str {
2175 match self {
2176 Self::Cedel => "CED",
2177 Self::DepositoryTrustCompany => "DTC",
2178 Self::EuroClear => "EUR",
2179 Self::FederalBookEntry => "FED",
2180 Self::LocalMarketSettleLocation => "ISO Country Code",
2181 Self::Physical => "PNY",
2182 Self::ParticipantTrustCompany => "PTC",
2183 Self::Unrecognized(value) => value,
2184 }
2185 }
2186}
2187
2188impl<'a> From<&'a str> for SettlLocation<'a> {
2189 fn from(value: &'a str) -> Self {
2190 Self::from_value(value)
2191 }
2192}
2193
2194#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2196pub enum SecurityType<'a> {
2197 Wildcard,
2199 BankersAcceptance,
2201 ConvertibleBond,
2203 CertificateOfDeposit,
2205 CollateralizedMortgageObligation,
2207 CorporateBond,
2209 CommercialPaper,
2211 CorporatePrivatePlacement,
2213 CommonStock,
2215 FederalHousingAuthority,
2217 FederalHomeLoan,
2219 FederalNationalMortgageAssociation,
2221 ForeignExchangeContract,
2223 Future,
2225 GovernmentNationalMortgageAssociation,
2227 TreasuriesAgencyDebenture,
2229 IoetteMortgage,
2231 MutualFund,
2233 MortgageInterestOnly,
2235 MortgagePrincipalOnly,
2237 MortgagePrivatePlacement,
2239 MiscellaneousPassThrough,
2241 MunicipalBond,
2243 NoSecurityType,
2245 Option,
2247 PreferredStock,
2249 RepurchaseAgreement,
2251 ReverseRepurchaseAgreement,
2253 StudentLoanMarketingAssociation,
2255 TimeDeposit,
2257 UsTreasuryBillOld,
2259 Warrant,
2261 CatsTigersAndLions,
2263 Unrecognized(&'a str),
2265}
2266
2267impl<'a> SecurityType<'a> {
2268 pub fn from_value(value: &'a str) -> Self {
2269 match value {
2270 "?" => Self::Wildcard,
2271 "BA" => Self::BankersAcceptance,
2272 "CB" => Self::ConvertibleBond,
2273 "CD" => Self::CertificateOfDeposit,
2274 "CMO" => Self::CollateralizedMortgageObligation,
2275 "CORP" => Self::CorporateBond,
2276 "CP" => Self::CommercialPaper,
2277 "CPP" => Self::CorporatePrivatePlacement,
2278 "CS" => Self::CommonStock,
2279 "FHA" => Self::FederalHousingAuthority,
2280 "FHL" => Self::FederalHomeLoan,
2281 "FN" => Self::FederalNationalMortgageAssociation,
2282 "FOR" => Self::ForeignExchangeContract,
2283 "FUT" => Self::Future,
2284 "GN" => Self::GovernmentNationalMortgageAssociation,
2285 "GOVT" => Self::TreasuriesAgencyDebenture,
2286 "IET" => Self::IoetteMortgage,
2287 "MF" => Self::MutualFund,
2288 "MIO" => Self::MortgageInterestOnly,
2289 "MPO" => Self::MortgagePrincipalOnly,
2290 "MPP" => Self::MortgagePrivatePlacement,
2291 "MPT" => Self::MiscellaneousPassThrough,
2292 "MUNI" => Self::MunicipalBond,
2293 "NONE" => Self::NoSecurityType,
2294 "OPT" => Self::Option,
2295 "PS" => Self::PreferredStock,
2296 "RP" => Self::RepurchaseAgreement,
2297 "RVRP" => Self::ReverseRepurchaseAgreement,
2298 "SL" => Self::StudentLoanMarketingAssociation,
2299 "TD" => Self::TimeDeposit,
2300 "USTB" => Self::UsTreasuryBillOld,
2301 "WAR" => Self::Warrant,
2302 "ZOO" => Self::CatsTigersAndLions,
2303 unrecognized => Self::Unrecognized(unrecognized),
2304 }
2305 }
2306
2307 pub fn value(self) -> &'a str {
2308 match self {
2309 Self::Wildcard => "?",
2310 Self::BankersAcceptance => "BA",
2311 Self::ConvertibleBond => "CB",
2312 Self::CertificateOfDeposit => "CD",
2313 Self::CollateralizedMortgageObligation => "CMO",
2314 Self::CorporateBond => "CORP",
2315 Self::CommercialPaper => "CP",
2316 Self::CorporatePrivatePlacement => "CPP",
2317 Self::CommonStock => "CS",
2318 Self::FederalHousingAuthority => "FHA",
2319 Self::FederalHomeLoan => "FHL",
2320 Self::FederalNationalMortgageAssociation => "FN",
2321 Self::ForeignExchangeContract => "FOR",
2322 Self::Future => "FUT",
2323 Self::GovernmentNationalMortgageAssociation => "GN",
2324 Self::TreasuriesAgencyDebenture => "GOVT",
2325 Self::IoetteMortgage => "IET",
2326 Self::MutualFund => "MF",
2327 Self::MortgageInterestOnly => "MIO",
2328 Self::MortgagePrincipalOnly => "MPO",
2329 Self::MortgagePrivatePlacement => "MPP",
2330 Self::MiscellaneousPassThrough => "MPT",
2331 Self::MunicipalBond => "MUNI",
2332 Self::NoSecurityType => "NONE",
2333 Self::Option => "OPT",
2334 Self::PreferredStock => "PS",
2335 Self::RepurchaseAgreement => "RP",
2336 Self::ReverseRepurchaseAgreement => "RVRP",
2337 Self::StudentLoanMarketingAssociation => "SL",
2338 Self::TimeDeposit => "TD",
2339 Self::UsTreasuryBillOld => "USTB",
2340 Self::Warrant => "WAR",
2341 Self::CatsTigersAndLions => "ZOO",
2342 Self::Unrecognized(value) => value,
2343 }
2344 }
2345}
2346
2347impl<'a> From<&'a str> for SecurityType<'a> {
2348 fn from(value: &'a str) -> Self {
2349 Self::from_value(value)
2350 }
2351}
2352
2353#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2355pub enum StandInstDbType {
2356 Other,
2358 Dtcsid,
2360 ThomsonAlert,
2362 AGlobalCustodian,
2364 Unrecognized(i64),
2366}
2367
2368impl StandInstDbType {
2369 pub fn from_value(value: i64) -> Self {
2370 match value {
2371 0 => Self::Other,
2372 1 => Self::Dtcsid,
2373 2 => Self::ThomsonAlert,
2374 3 => Self::AGlobalCustodian,
2375 unrecognized => Self::Unrecognized(unrecognized),
2376 }
2377 }
2378
2379 pub fn value(self) -> i64 {
2380 match self {
2381 Self::Other => 0,
2382 Self::Dtcsid => 1,
2383 Self::ThomsonAlert => 2,
2384 Self::AGlobalCustodian => 3,
2385 Self::Unrecognized(value) => value,
2386 }
2387 }
2388}
2389
2390#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2392pub enum AllocLinkType {
2393 FxNetting,
2395 FxSwap,
2397 Unrecognized(i64),
2399}
2400
2401impl AllocLinkType {
2402 pub fn from_value(value: i64) -> Self {
2403 match value {
2404 0 => Self::FxNetting,
2405 1 => Self::FxSwap,
2406 unrecognized => Self::Unrecognized(unrecognized),
2407 }
2408 }
2409
2410 pub fn value(self) -> i64 {
2411 match self {
2412 Self::FxNetting => 0,
2413 Self::FxSwap => 1,
2414 Self::Unrecognized(value) => value,
2415 }
2416 }
2417}
2418
2419#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2421pub enum PutOrCall {
2422 Put,
2424 Call,
2426 Unrecognized(i64),
2428}
2429
2430impl PutOrCall {
2431 pub fn from_value(value: i64) -> Self {
2432 match value {
2433 0 => Self::Put,
2434 1 => Self::Call,
2435 unrecognized => Self::Unrecognized(unrecognized),
2436 }
2437 }
2438
2439 pub fn value(self) -> i64 {
2440 match self {
2441 Self::Put => 0,
2442 Self::Call => 1,
2443 Self::Unrecognized(value) => value,
2444 }
2445 }
2446}
2447
2448#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2450pub enum CoveredOrUncovered {
2451 Covered,
2453 Uncovered,
2455 Unrecognized(i64),
2457}
2458
2459impl CoveredOrUncovered {
2460 pub fn from_value(value: i64) -> Self {
2461 match value {
2462 0 => Self::Covered,
2463 1 => Self::Uncovered,
2464 unrecognized => Self::Unrecognized(unrecognized),
2465 }
2466 }
2467
2468 pub fn value(self) -> i64 {
2469 match self {
2470 Self::Covered => 0,
2471 Self::Uncovered => 1,
2472 Self::Unrecognized(value) => value,
2473 }
2474 }
2475}
2476
2477#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2479pub enum CustomerOrFirm {
2480 Customer,
2482 Firm,
2484 Unrecognized(i64),
2486}
2487
2488impl CustomerOrFirm {
2489 pub fn from_value(value: i64) -> Self {
2490 match value {
2491 0 => Self::Customer,
2492 1 => Self::Firm,
2493 unrecognized => Self::Unrecognized(unrecognized),
2494 }
2495 }
2496
2497 pub fn value(self) -> i64 {
2498 match self {
2499 Self::Customer => 0,
2500 Self::Firm => 1,
2501 Self::Unrecognized(value) => value,
2502 }
2503 }
2504}
2505
2506#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2508pub enum AllocHandlInst {
2509 Match,
2511 Forward,
2513 ForwardAndMatch,
2515 Unrecognized(i64),
2517}
2518
2519impl AllocHandlInst {
2520 pub fn from_value(value: i64) -> Self {
2521 match value {
2522 1 => Self::Match,
2523 2 => Self::Forward,
2524 3 => Self::ForwardAndMatch,
2525 unrecognized => Self::Unrecognized(unrecognized),
2526 }
2527 }
2528
2529 pub fn value(self) -> i64 {
2530 match self {
2531 Self::Match => 1,
2532 Self::Forward => 2,
2533 Self::ForwardAndMatch => 3,
2534 Self::Unrecognized(value) => value,
2535 }
2536 }
2537}
2538
2539#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2541pub enum RoutingType {
2542 TargetFirm,
2544 TargetList,
2546 BlockFirm,
2548 BlockList,
2550 Unrecognized(i64),
2552}
2553
2554impl RoutingType {
2555 pub fn from_value(value: i64) -> Self {
2556 match value {
2557 1 => Self::TargetFirm,
2558 2 => Self::TargetList,
2559 3 => Self::BlockFirm,
2560 4 => Self::BlockList,
2561 unrecognized => Self::Unrecognized(unrecognized),
2562 }
2563 }
2564
2565 pub fn value(self) -> i64 {
2566 match self {
2567 Self::TargetFirm => 1,
2568 Self::TargetList => 2,
2569 Self::BlockFirm => 3,
2570 Self::BlockList => 4,
2571 Self::Unrecognized(value) => value,
2572 }
2573 }
2574}
2575
2576#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2578pub enum Benchmark<'a> {
2579 Curve,
2581 FiveYr,
2583 Old5,
2585 TenYr,
2587 Old10,
2589 ThirtyYr,
2591 Old30,
2593 ThreeMolibor,
2595 SixMolibor,
2597 Unrecognized(&'a str),
2599}
2600
2601impl<'a> Benchmark<'a> {
2602 pub fn from_value(value: &'a str) -> Self {
2603 match value {
2604 "1" => Self::Curve,
2605 "2" => Self::FiveYr,
2606 "3" => Self::Old5,
2607 "4" => Self::TenYr,
2608 "5" => Self::Old10,
2609 "6" => Self::ThirtyYr,
2610 "7" => Self::Old30,
2611 "8" => Self::ThreeMolibor,
2612 "9" => Self::SixMolibor,
2613 unrecognized => Self::Unrecognized(unrecognized),
2614 }
2615 }
2616
2617 pub fn value(self) -> &'a str {
2618 match self {
2619 Self::Curve => "1",
2620 Self::FiveYr => "2",
2621 Self::Old5 => "3",
2622 Self::TenYr => "4",
2623 Self::Old10 => "5",
2624 Self::ThirtyYr => "6",
2625 Self::Old30 => "7",
2626 Self::ThreeMolibor => "8",
2627 Self::SixMolibor => "9",
2628 Self::Unrecognized(value) => value,
2629 }
2630 }
2631}
2632
2633impl<'a> From<&'a str> for Benchmark<'a> {
2634 fn from(value: &'a str) -> Self {
2635 Self::from_value(value)
2636 }
2637}
2638
2639#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2641pub enum SubscriptionRequestType<'a> {
2642 Snapshot,
2644 SnapshotAndUpdates,
2646 DisablePreviousSnapshot,
2648 Unrecognized(&'a str),
2650}
2651
2652impl<'a> SubscriptionRequestType<'a> {
2653 pub fn from_value(value: &'a str) -> Self {
2654 match value {
2655 "0" => Self::Snapshot,
2656 "1" => Self::SnapshotAndUpdates,
2657 "2" => Self::DisablePreviousSnapshot,
2658 unrecognized => Self::Unrecognized(unrecognized),
2659 }
2660 }
2661
2662 pub fn value(self) -> &'a str {
2663 match self {
2664 Self::Snapshot => "0",
2665 Self::SnapshotAndUpdates => "1",
2666 Self::DisablePreviousSnapshot => "2",
2667 Self::Unrecognized(value) => value,
2668 }
2669 }
2670}
2671
2672impl<'a> From<&'a str> for SubscriptionRequestType<'a> {
2673 fn from(value: &'a str) -> Self {
2674 Self::from_value(value)
2675 }
2676}
2677
2678#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2680pub enum MDUpdateType {
2681 FullRefresh,
2683 IncrementalRefresh,
2685 Unrecognized(i64),
2687}
2688
2689impl MDUpdateType {
2690 pub fn from_value(value: i64) -> Self {
2691 match value {
2692 0 => Self::FullRefresh,
2693 1 => Self::IncrementalRefresh,
2694 unrecognized => Self::Unrecognized(unrecognized),
2695 }
2696 }
2697
2698 pub fn value(self) -> i64 {
2699 match self {
2700 Self::FullRefresh => 0,
2701 Self::IncrementalRefresh => 1,
2702 Self::Unrecognized(value) => value,
2703 }
2704 }
2705}
2706
2707#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2709pub enum MDEntryType<'a> {
2710 Bid,
2712 Offer,
2714 Trade,
2716 IndexValue,
2718 OpeningPrice,
2720 ClosingPrice,
2722 SettlementPrice,
2724 TradingSessionHighPrice,
2726 TradingSessionLowPrice,
2728 TradingSessionVwapPrice,
2730 Unrecognized(&'a str),
2732}
2733
2734impl<'a> MDEntryType<'a> {
2735 pub fn from_value(value: &'a str) -> Self {
2736 match value {
2737 "0" => Self::Bid,
2738 "1" => Self::Offer,
2739 "2" => Self::Trade,
2740 "3" => Self::IndexValue,
2741 "4" => Self::OpeningPrice,
2742 "5" => Self::ClosingPrice,
2743 "6" => Self::SettlementPrice,
2744 "7" => Self::TradingSessionHighPrice,
2745 "8" => Self::TradingSessionLowPrice,
2746 "9" => Self::TradingSessionVwapPrice,
2747 unrecognized => Self::Unrecognized(unrecognized),
2748 }
2749 }
2750
2751 pub fn value(self) -> &'a str {
2752 match self {
2753 Self::Bid => "0",
2754 Self::Offer => "1",
2755 Self::Trade => "2",
2756 Self::IndexValue => "3",
2757 Self::OpeningPrice => "4",
2758 Self::ClosingPrice => "5",
2759 Self::SettlementPrice => "6",
2760 Self::TradingSessionHighPrice => "7",
2761 Self::TradingSessionLowPrice => "8",
2762 Self::TradingSessionVwapPrice => "9",
2763 Self::Unrecognized(value) => value,
2764 }
2765 }
2766}
2767
2768impl<'a> From<&'a str> for MDEntryType<'a> {
2769 fn from(value: &'a str) -> Self {
2770 Self::from_value(value)
2771 }
2772}
2773
2774#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2776pub enum TickDirection<'a> {
2777 PlusTick,
2779 ZeroPlusTick,
2781 MinusTick,
2783 ZeroMinusTick,
2785 Unrecognized(&'a str),
2787}
2788
2789impl<'a> TickDirection<'a> {
2790 pub fn from_value(value: &'a str) -> Self {
2791 match value {
2792 "0" => Self::PlusTick,
2793 "1" => Self::ZeroPlusTick,
2794 "2" => Self::MinusTick,
2795 "3" => Self::ZeroMinusTick,
2796 unrecognized => Self::Unrecognized(unrecognized),
2797 }
2798 }
2799
2800 pub fn value(self) -> &'a str {
2801 match self {
2802 Self::PlusTick => "0",
2803 Self::ZeroPlusTick => "1",
2804 Self::MinusTick => "2",
2805 Self::ZeroMinusTick => "3",
2806 Self::Unrecognized(value) => value,
2807 }
2808 }
2809}
2810
2811impl<'a> From<&'a str> for TickDirection<'a> {
2812 fn from(value: &'a str) -> Self {
2813 Self::from_value(value)
2814 }
2815}
2816
2817#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2819pub enum QuoteCondition<'a> {
2820 Open,
2822 Closed,
2824 ExchangeBest,
2826 ConsolidatedBest,
2828 Locked,
2830 Crossed,
2832 Depth,
2834 FastTrading,
2836 NonFirm,
2838 Unrecognized(&'a str),
2840}
2841
2842impl<'a> QuoteCondition<'a> {
2843 pub fn from_value(value: &'a str) -> Self {
2844 match value {
2845 "A" => Self::Open,
2846 "B" => Self::Closed,
2847 "C" => Self::ExchangeBest,
2848 "D" => Self::ConsolidatedBest,
2849 "E" => Self::Locked,
2850 "F" => Self::Crossed,
2851 "G" => Self::Depth,
2852 "H" => Self::FastTrading,
2853 "I" => Self::NonFirm,
2854 unrecognized => Self::Unrecognized(unrecognized),
2855 }
2856 }
2857
2858 pub fn value(self) -> &'a str {
2859 match self {
2860 Self::Open => "A",
2861 Self::Closed => "B",
2862 Self::ExchangeBest => "C",
2863 Self::ConsolidatedBest => "D",
2864 Self::Locked => "E",
2865 Self::Crossed => "F",
2866 Self::Depth => "G",
2867 Self::FastTrading => "H",
2868 Self::NonFirm => "I",
2869 Self::Unrecognized(value) => value,
2870 }
2871 }
2872}
2873
2874impl<'a> From<&'a str> for QuoteCondition<'a> {
2875 fn from(value: &'a str) -> Self {
2876 Self::from_value(value)
2877 }
2878}
2879
2880#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2882pub enum TradeCondition<'a> {
2883 Cash,
2885 AveragePriceTrade,
2887 CashTrade,
2889 NextDay,
2891 Opening,
2893 IntradayTradeDetail,
2895 Rule127Trade,
2897 Rule155Trade,
2899 SoldLast,
2901 NextDayTrade,
2903 Opened,
2905 Seller,
2907 Sold,
2909 StoppedStock,
2911 Unrecognized(&'a str),
2913}
2914
2915impl<'a> TradeCondition<'a> {
2916 pub fn from_value(value: &'a str) -> Self {
2917 match value {
2918 "A" => Self::Cash,
2919 "B" => Self::AveragePriceTrade,
2920 "C" => Self::CashTrade,
2921 "D" => Self::NextDay,
2922 "E" => Self::Opening,
2923 "F" => Self::IntradayTradeDetail,
2924 "G" => Self::Rule127Trade,
2925 "H" => Self::Rule155Trade,
2926 "I" => Self::SoldLast,
2927 "J" => Self::NextDayTrade,
2928 "K" => Self::Opened,
2929 "L" => Self::Seller,
2930 "M" => Self::Sold,
2931 "N" => Self::StoppedStock,
2932 unrecognized => Self::Unrecognized(unrecognized),
2933 }
2934 }
2935
2936 pub fn value(self) -> &'a str {
2937 match self {
2938 Self::Cash => "A",
2939 Self::AveragePriceTrade => "B",
2940 Self::CashTrade => "C",
2941 Self::NextDay => "D",
2942 Self::Opening => "E",
2943 Self::IntradayTradeDetail => "F",
2944 Self::Rule127Trade => "G",
2945 Self::Rule155Trade => "H",
2946 Self::SoldLast => "I",
2947 Self::NextDayTrade => "J",
2948 Self::Opened => "K",
2949 Self::Seller => "L",
2950 Self::Sold => "M",
2951 Self::StoppedStock => "N",
2952 Self::Unrecognized(value) => value,
2953 }
2954 }
2955}
2956
2957impl<'a> From<&'a str> for TradeCondition<'a> {
2958 fn from(value: &'a str) -> Self {
2959 Self::from_value(value)
2960 }
2961}
2962
2963#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
2965pub enum MDUpdateAction<'a> {
2966 New,
2968 Change,
2970 Delete,
2972 Unrecognized(&'a str),
2974}
2975
2976impl<'a> MDUpdateAction<'a> {
2977 pub fn from_value(value: &'a str) -> Self {
2978 match value {
2979 "0" => Self::New,
2980 "1" => Self::Change,
2981 "2" => Self::Delete,
2982 unrecognized => Self::Unrecognized(unrecognized),
2983 }
2984 }
2985
2986 pub fn value(self) -> &'a str {
2987 match self {
2988 Self::New => "0",
2989 Self::Change => "1",
2990 Self::Delete => "2",
2991 Self::Unrecognized(value) => value,
2992 }
2993 }
2994}
2995
2996impl<'a> From<&'a str> for MDUpdateAction<'a> {
2997 fn from(value: &'a str) -> Self {
2998 Self::from_value(value)
2999 }
3000}
3001
3002#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3004pub enum MDReqRejReason<'a> {
3005 UnknownSymbol,
3007 DuplicateMdReqId,
3009 InsufficientBandwidth,
3011 InsufficientPermissions,
3013 UnsupportedSubscriptionRequestType,
3015 UnsupportedMarketDepth,
3017 UnsupportedMdUpdateType,
3019 UnsupportedAggregatedBook,
3021 UnsupportedMdEntryType,
3023 Unrecognized(&'a str),
3025}
3026
3027impl<'a> MDReqRejReason<'a> {
3028 pub fn from_value(value: &'a str) -> Self {
3029 match value {
3030 "0" => Self::UnknownSymbol,
3031 "1" => Self::DuplicateMdReqId,
3032 "2" => Self::InsufficientBandwidth,
3033 "3" => Self::InsufficientPermissions,
3034 "4" => Self::UnsupportedSubscriptionRequestType,
3035 "5" => Self::UnsupportedMarketDepth,
3036 "6" => Self::UnsupportedMdUpdateType,
3037 "7" => Self::UnsupportedAggregatedBook,
3038 "8" => Self::UnsupportedMdEntryType,
3039 unrecognized => Self::Unrecognized(unrecognized),
3040 }
3041 }
3042
3043 pub fn value(self) -> &'a str {
3044 match self {
3045 Self::UnknownSymbol => "0",
3046 Self::DuplicateMdReqId => "1",
3047 Self::InsufficientBandwidth => "2",
3048 Self::InsufficientPermissions => "3",
3049 Self::UnsupportedSubscriptionRequestType => "4",
3050 Self::UnsupportedMarketDepth => "5",
3051 Self::UnsupportedMdUpdateType => "6",
3052 Self::UnsupportedAggregatedBook => "7",
3053 Self::UnsupportedMdEntryType => "8",
3054 Self::Unrecognized(value) => value,
3055 }
3056 }
3057}
3058
3059impl<'a> From<&'a str> for MDReqRejReason<'a> {
3060 fn from(value: &'a str) -> Self {
3061 Self::from_value(value)
3062 }
3063}
3064
3065#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3067pub enum DeleteReason<'a> {
3068 Cancellation,
3070 Error,
3072 Unrecognized(&'a str),
3074}
3075
3076impl<'a> DeleteReason<'a> {
3077 pub fn from_value(value: &'a str) -> Self {
3078 match value {
3079 "0" => Self::Cancellation,
3080 "1" => Self::Error,
3081 unrecognized => Self::Unrecognized(unrecognized),
3082 }
3083 }
3084
3085 pub fn value(self) -> &'a str {
3086 match self {
3087 Self::Cancellation => "0",
3088 Self::Error => "1",
3089 Self::Unrecognized(value) => value,
3090 }
3091 }
3092}
3093
3094impl<'a> From<&'a str> for DeleteReason<'a> {
3095 fn from(value: &'a str) -> Self {
3096 Self::from_value(value)
3097 }
3098}
3099
3100#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3102pub enum OpenCloseSettleFlag<'a> {
3103 DailyOpen,
3105 SessionOpen,
3107 DeliverySettlementEntry,
3109 Unrecognized(&'a str),
3111}
3112
3113impl<'a> OpenCloseSettleFlag<'a> {
3114 pub fn from_value(value: &'a str) -> Self {
3115 match value {
3116 "0" => Self::DailyOpen,
3117 "1" => Self::SessionOpen,
3118 "2" => Self::DeliverySettlementEntry,
3119 unrecognized => Self::Unrecognized(unrecognized),
3120 }
3121 }
3122
3123 pub fn value(self) -> &'a str {
3124 match self {
3125 Self::DailyOpen => "0",
3126 Self::SessionOpen => "1",
3127 Self::DeliverySettlementEntry => "2",
3128 Self::Unrecognized(value) => value,
3129 }
3130 }
3131}
3132
3133impl<'a> From<&'a str> for OpenCloseSettleFlag<'a> {
3134 fn from(value: &'a str) -> Self {
3135 Self::from_value(value)
3136 }
3137}
3138
3139#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3141pub enum FinancialStatus<'a> {
3142 Bankrupt,
3144 Unrecognized(&'a str),
3146}
3147
3148impl<'a> FinancialStatus<'a> {
3149 pub fn from_value(value: &'a str) -> Self {
3150 match value {
3151 "1" => Self::Bankrupt,
3152 unrecognized => Self::Unrecognized(unrecognized),
3153 }
3154 }
3155
3156 pub fn value(self) -> &'a str {
3157 match self {
3158 Self::Bankrupt => "1",
3159 Self::Unrecognized(value) => value,
3160 }
3161 }
3162}
3163
3164impl<'a> From<&'a str> for FinancialStatus<'a> {
3165 fn from(value: &'a str) -> Self {
3166 Self::from_value(value)
3167 }
3168}
3169
3170#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3172pub enum CorporateAction<'a> {
3173 ExDividend,
3175 ExDistribution,
3177 ExRights,
3179 New,
3181 ExInterest,
3183 Unrecognized(&'a str),
3185}
3186
3187impl<'a> CorporateAction<'a> {
3188 pub fn from_value(value: &'a str) -> Self {
3189 match value {
3190 "A" => Self::ExDividend,
3191 "B" => Self::ExDistribution,
3192 "C" => Self::ExRights,
3193 "D" => Self::New,
3194 "E" => Self::ExInterest,
3195 unrecognized => Self::Unrecognized(unrecognized),
3196 }
3197 }
3198
3199 pub fn value(self) -> &'a str {
3200 match self {
3201 Self::ExDividend => "A",
3202 Self::ExDistribution => "B",
3203 Self::ExRights => "C",
3204 Self::New => "D",
3205 Self::ExInterest => "E",
3206 Self::Unrecognized(value) => value,
3207 }
3208 }
3209}
3210
3211impl<'a> From<&'a str> for CorporateAction<'a> {
3212 fn from(value: &'a str) -> Self {
3213 Self::from_value(value)
3214 }
3215}
3216
3217#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3219pub enum QuoteStatus {
3220 Accepted,
3222 CancelForSymbol,
3224 CanceledForSecurityType,
3226 CanceledForUnderlying,
3228 CanceledAll,
3230 Rejected,
3232 Unrecognized(i64),
3234}
3235
3236impl QuoteStatus {
3237 pub fn from_value(value: i64) -> Self {
3238 match value {
3239 0 => Self::Accepted,
3240 1 => Self::CancelForSymbol,
3241 2 => Self::CanceledForSecurityType,
3242 3 => Self::CanceledForUnderlying,
3243 4 => Self::CanceledAll,
3244 5 => Self::Rejected,
3245 unrecognized => Self::Unrecognized(unrecognized),
3246 }
3247 }
3248
3249 pub fn value(self) -> i64 {
3250 match self {
3251 Self::Accepted => 0,
3252 Self::CancelForSymbol => 1,
3253 Self::CanceledForSecurityType => 2,
3254 Self::CanceledForUnderlying => 3,
3255 Self::CanceledAll => 4,
3256 Self::Rejected => 5,
3257 Self::Unrecognized(value) => value,
3258 }
3259 }
3260}
3261
3262#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3264pub enum QuoteCancelType {
3265 CancelForOneOrMoreSecurities,
3267 CancelForSecurityType,
3269 CancelForUnderlyingSecurity,
3271 CancelAllQuotes,
3273 Unrecognized(i64),
3275}
3276
3277impl QuoteCancelType {
3278 pub fn from_value(value: i64) -> Self {
3279 match value {
3280 1 => Self::CancelForOneOrMoreSecurities,
3281 2 => Self::CancelForSecurityType,
3282 3 => Self::CancelForUnderlyingSecurity,
3283 4 => Self::CancelAllQuotes,
3284 unrecognized => Self::Unrecognized(unrecognized),
3285 }
3286 }
3287
3288 pub fn value(self) -> i64 {
3289 match self {
3290 Self::CancelForOneOrMoreSecurities => 1,
3291 Self::CancelForSecurityType => 2,
3292 Self::CancelForUnderlyingSecurity => 3,
3293 Self::CancelAllQuotes => 4,
3294 Self::Unrecognized(value) => value,
3295 }
3296 }
3297}
3298
3299#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3301pub enum QuoteRejectReason {
3302 UnknownSymbol,
3304 Exchange,
3306 QuoteRequestExceedsLimit,
3308 TooLateToEnter,
3310 UnknownQuote,
3312 DuplicateQuote,
3314 InvalidBid,
3316 InvalidPrice,
3318 NotAuthorizedToQuoteSecurity,
3320 Unrecognized(i64),
3322}
3323
3324impl QuoteRejectReason {
3325 pub fn from_value(value: i64) -> Self {
3326 match value {
3327 1 => Self::UnknownSymbol,
3328 2 => Self::Exchange,
3329 3 => Self::QuoteRequestExceedsLimit,
3330 4 => Self::TooLateToEnter,
3331 5 => Self::UnknownQuote,
3332 6 => Self::DuplicateQuote,
3333 7 => Self::InvalidBid,
3334 8 => Self::InvalidPrice,
3335 9 => Self::NotAuthorizedToQuoteSecurity,
3336 unrecognized => Self::Unrecognized(unrecognized),
3337 }
3338 }
3339
3340 pub fn value(self) -> i64 {
3341 match self {
3342 Self::UnknownSymbol => 1,
3343 Self::Exchange => 2,
3344 Self::QuoteRequestExceedsLimit => 3,
3345 Self::TooLateToEnter => 4,
3346 Self::UnknownQuote => 5,
3347 Self::DuplicateQuote => 6,
3348 Self::InvalidBid => 7,
3349 Self::InvalidPrice => 8,
3350 Self::NotAuthorizedToQuoteSecurity => 9,
3351 Self::Unrecognized(value) => value,
3352 }
3353 }
3354}
3355
3356#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3358pub enum QuoteResponseLevel {
3359 NoAcknowledgement,
3361 AcknowledgeOnlyNegativeOrErroneousQuotes,
3363 AcknowledgeEachQuoteMessage,
3365 Unrecognized(i64),
3367}
3368
3369impl QuoteResponseLevel {
3370 pub fn from_value(value: i64) -> Self {
3371 match value {
3372 0 => Self::NoAcknowledgement,
3373 1 => Self::AcknowledgeOnlyNegativeOrErroneousQuotes,
3374 2 => Self::AcknowledgeEachQuoteMessage,
3375 unrecognized => Self::Unrecognized(unrecognized),
3376 }
3377 }
3378
3379 pub fn value(self) -> i64 {
3380 match self {
3381 Self::NoAcknowledgement => 0,
3382 Self::AcknowledgeOnlyNegativeOrErroneousQuotes => 1,
3383 Self::AcknowledgeEachQuoteMessage => 2,
3384 Self::Unrecognized(value) => value,
3385 }
3386 }
3387}
3388
3389#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3391pub enum QuoteRequestType {
3392 Manual,
3394 Automatic,
3396 Unrecognized(i64),
3398}
3399
3400impl QuoteRequestType {
3401 pub fn from_value(value: i64) -> Self {
3402 match value {
3403 1 => Self::Manual,
3404 2 => Self::Automatic,
3405 unrecognized => Self::Unrecognized(unrecognized),
3406 }
3407 }
3408
3409 pub fn value(self) -> i64 {
3410 match self {
3411 Self::Manual => 1,
3412 Self::Automatic => 2,
3413 Self::Unrecognized(value) => value,
3414 }
3415 }
3416}
3417
3418#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3420pub enum SecurityRequestType {
3421 RequestSecurityIdentityAndSpecifications,
3423 RequestSecurityIdentityForSpecifications,
3425 RequestListSecurityTypes,
3427 RequestListSecurities,
3429 Unrecognized(i64),
3431}
3432
3433impl SecurityRequestType {
3434 pub fn from_value(value: i64) -> Self {
3435 match value {
3436 0 => Self::RequestSecurityIdentityAndSpecifications,
3437 1 => Self::RequestSecurityIdentityForSpecifications,
3438 2 => Self::RequestListSecurityTypes,
3439 3 => Self::RequestListSecurities,
3440 unrecognized => Self::Unrecognized(unrecognized),
3441 }
3442 }
3443
3444 pub fn value(self) -> i64 {
3445 match self {
3446 Self::RequestSecurityIdentityAndSpecifications => 0,
3447 Self::RequestSecurityIdentityForSpecifications => 1,
3448 Self::RequestListSecurityTypes => 2,
3449 Self::RequestListSecurities => 3,
3450 Self::Unrecognized(value) => value,
3451 }
3452 }
3453}
3454
3455#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3457pub enum SecurityResponseType {
3458 AcceptAsIs,
3460 AcceptWithRevisions,
3462 ListOfSecurityTypesReturnedPerRequest,
3464 ListOfSecuritiesReturnedPerRequest,
3466 RejectSecurityProposal,
3468 CannotMatchSelectionCriteria,
3470 Unrecognized(i64),
3472}
3473
3474impl SecurityResponseType {
3475 pub fn from_value(value: i64) -> Self {
3476 match value {
3477 1 => Self::AcceptAsIs,
3478 2 => Self::AcceptWithRevisions,
3479 3 => Self::ListOfSecurityTypesReturnedPerRequest,
3480 4 => Self::ListOfSecuritiesReturnedPerRequest,
3481 5 => Self::RejectSecurityProposal,
3482 6 => Self::CannotMatchSelectionCriteria,
3483 unrecognized => Self::Unrecognized(unrecognized),
3484 }
3485 }
3486
3487 pub fn value(self) -> i64 {
3488 match self {
3489 Self::AcceptAsIs => 1,
3490 Self::AcceptWithRevisions => 2,
3491 Self::ListOfSecurityTypesReturnedPerRequest => 3,
3492 Self::ListOfSecuritiesReturnedPerRequest => 4,
3493 Self::RejectSecurityProposal => 5,
3494 Self::CannotMatchSelectionCriteria => 6,
3495 Self::Unrecognized(value) => value,
3496 }
3497 }
3498}
3499
3500#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3502pub enum SecurityTradingStatus {
3503 OpeningDelay,
3505 MarketOnCloseImbalanceSell,
3507 NoMarketImbalance,
3509 NoMarketOnCloseImbalance,
3511 ItsPreOpening,
3513 NewPriceIndication,
3515 TradeDisseminationTime,
3517 ReadyToTrade,
3519 NotAvailableForTrading,
3521 NotTradedOnThisMarket,
3523 TradingHalt,
3525 UnknownOrInvalid,
3527 Resume,
3529 NoOpen,
3531 PriceIndication,
3533 TradingRangeIndication,
3535 MarketImbalanceBuy,
3537 MarketImbalanceSell,
3539 MarketOnCloseImbalanceBuy,
3541 Unrecognized(i64),
3543}
3544
3545impl SecurityTradingStatus {
3546 pub fn from_value(value: i64) -> Self {
3547 match value {
3548 1 => Self::OpeningDelay,
3549 10 => Self::MarketOnCloseImbalanceSell,
3550 12 => Self::NoMarketImbalance,
3551 13 => Self::NoMarketOnCloseImbalance,
3552 14 => Self::ItsPreOpening,
3553 15 => Self::NewPriceIndication,
3554 16 => Self::TradeDisseminationTime,
3555 17 => Self::ReadyToTrade,
3556 18 => Self::NotAvailableForTrading,
3557 19 => Self::NotTradedOnThisMarket,
3558 2 => Self::TradingHalt,
3559 20 => Self::UnknownOrInvalid,
3560 3 => Self::Resume,
3561 4 => Self::NoOpen,
3562 5 => Self::PriceIndication,
3563 6 => Self::TradingRangeIndication,
3564 7 => Self::MarketImbalanceBuy,
3565 8 => Self::MarketImbalanceSell,
3566 9 => Self::MarketOnCloseImbalanceBuy,
3567 unrecognized => Self::Unrecognized(unrecognized),
3568 }
3569 }
3570
3571 pub fn value(self) -> i64 {
3572 match self {
3573 Self::OpeningDelay => 1,
3574 Self::MarketOnCloseImbalanceSell => 10,
3575 Self::NoMarketImbalance => 12,
3576 Self::NoMarketOnCloseImbalance => 13,
3577 Self::ItsPreOpening => 14,
3578 Self::NewPriceIndication => 15,
3579 Self::TradeDisseminationTime => 16,
3580 Self::ReadyToTrade => 17,
3581 Self::NotAvailableForTrading => 18,
3582 Self::NotTradedOnThisMarket => 19,
3583 Self::TradingHalt => 2,
3584 Self::UnknownOrInvalid => 20,
3585 Self::Resume => 3,
3586 Self::NoOpen => 4,
3587 Self::PriceIndication => 5,
3588 Self::TradingRangeIndication => 6,
3589 Self::MarketImbalanceBuy => 7,
3590 Self::MarketImbalanceSell => 8,
3591 Self::MarketOnCloseImbalanceBuy => 9,
3592 Self::Unrecognized(value) => value,
3593 }
3594 }
3595}
3596
3597#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3599pub enum HaltReasonChar<'a> {
3600 NewsDissemination,
3602 OrderInflux,
3604 OrderImbalance,
3606 AdditionalInformation,
3608 NewsPending,
3610 EquipmentChangeover,
3612 Unrecognized(&'a str),
3614}
3615
3616impl<'a> HaltReasonChar<'a> {
3617 pub fn from_value(value: &'a str) -> Self {
3618 match value {
3619 "D" => Self::NewsDissemination,
3620 "E" => Self::OrderInflux,
3621 "I" => Self::OrderImbalance,
3622 "M" => Self::AdditionalInformation,
3623 "P" => Self::NewsPending,
3624 "X" => Self::EquipmentChangeover,
3625 unrecognized => Self::Unrecognized(unrecognized),
3626 }
3627 }
3628
3629 pub fn value(self) -> &'a str {
3630 match self {
3631 Self::NewsDissemination => "D",
3632 Self::OrderInflux => "E",
3633 Self::OrderImbalance => "I",
3634 Self::AdditionalInformation => "M",
3635 Self::NewsPending => "P",
3636 Self::EquipmentChangeover => "X",
3637 Self::Unrecognized(value) => value,
3638 }
3639 }
3640}
3641
3642impl<'a> From<&'a str> for HaltReasonChar<'a> {
3643 fn from(value: &'a str) -> Self {
3644 Self::from_value(value)
3645 }
3646}
3647
3648#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3650pub enum Adjustment {
3651 Cancel,
3653 Error,
3655 Correction,
3657 Unrecognized(i64),
3659}
3660
3661impl Adjustment {
3662 pub fn from_value(value: i64) -> Self {
3663 match value {
3664 1 => Self::Cancel,
3665 2 => Self::Error,
3666 3 => Self::Correction,
3667 unrecognized => Self::Unrecognized(unrecognized),
3668 }
3669 }
3670
3671 pub fn value(self) -> i64 {
3672 match self {
3673 Self::Cancel => 1,
3674 Self::Error => 2,
3675 Self::Correction => 3,
3676 Self::Unrecognized(value) => value,
3677 }
3678 }
3679}
3680
3681#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3683pub enum TradSesMethod {
3684 Electronic,
3686 OpenOutcry,
3688 TwoParty,
3690 Unrecognized(i64),
3692}
3693
3694impl TradSesMethod {
3695 pub fn from_value(value: i64) -> Self {
3696 match value {
3697 1 => Self::Electronic,
3698 2 => Self::OpenOutcry,
3699 3 => Self::TwoParty,
3700 unrecognized => Self::Unrecognized(unrecognized),
3701 }
3702 }
3703
3704 pub fn value(self) -> i64 {
3705 match self {
3706 Self::Electronic => 1,
3707 Self::OpenOutcry => 2,
3708 Self::TwoParty => 3,
3709 Self::Unrecognized(value) => value,
3710 }
3711 }
3712}
3713
3714#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3716pub enum TradSesMode {
3717 Testing,
3719 Simulated,
3721 Production,
3723 Unrecognized(i64),
3725}
3726
3727impl TradSesMode {
3728 pub fn from_value(value: i64) -> Self {
3729 match value {
3730 1 => Self::Testing,
3731 2 => Self::Simulated,
3732 3 => Self::Production,
3733 unrecognized => Self::Unrecognized(unrecognized),
3734 }
3735 }
3736
3737 pub fn value(self) -> i64 {
3738 match self {
3739 Self::Testing => 1,
3740 Self::Simulated => 2,
3741 Self::Production => 3,
3742 Self::Unrecognized(value) => value,
3743 }
3744 }
3745}
3746
3747#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3749pub enum TradSesStatus {
3750 Halted,
3752 Open,
3754 Closed,
3756 PreOpen,
3758 PreClose,
3760 Unrecognized(i64),
3762}
3763
3764impl TradSesStatus {
3765 pub fn from_value(value: i64) -> Self {
3766 match value {
3767 1 => Self::Halted,
3768 2 => Self::Open,
3769 3 => Self::Closed,
3770 4 => Self::PreOpen,
3771 5 => Self::PreClose,
3772 unrecognized => Self::Unrecognized(unrecognized),
3773 }
3774 }
3775
3776 pub fn value(self) -> i64 {
3777 match self {
3778 Self::Halted => 1,
3779 Self::Open => 2,
3780 Self::Closed => 3,
3781 Self::PreOpen => 4,
3782 Self::PreClose => 5,
3783 Self::Unrecognized(value) => value,
3784 }
3785 }
3786}
3787
3788#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3790pub enum MessageEncoding<'a> {
3791 Eucjp,
3793 Iso2022Jp,
3795 ShiftJis,
3797 Utf8,
3799 Unrecognized(&'a str),
3801}
3802
3803impl<'a> MessageEncoding<'a> {
3804 pub fn from_value(value: &'a str) -> Self {
3805 match value {
3806 "EUC-JP" => Self::Eucjp,
3807 "ISO-2022-JP" => Self::Iso2022Jp,
3808 "Shift_JIS" => Self::ShiftJis,
3809 "UTF-8" => Self::Utf8,
3810 unrecognized => Self::Unrecognized(unrecognized),
3811 }
3812 }
3813
3814 pub fn value(self) -> &'a str {
3815 match self {
3816 Self::Eucjp => "EUC-JP",
3817 Self::Iso2022Jp => "ISO-2022-JP",
3818 Self::ShiftJis => "Shift_JIS",
3819 Self::Utf8 => "UTF-8",
3820 Self::Unrecognized(value) => value,
3821 }
3822 }
3823}
3824
3825impl<'a> From<&'a str> for MessageEncoding<'a> {
3826 fn from(value: &'a str) -> Self {
3827 Self::from_value(value)
3828 }
3829}
3830
3831#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3833pub enum QuoteEntryRejectReason {
3834 UnknownSymbol,
3836 Exchange,
3838 QuoteExceedsLimit,
3840 TooLateToEnter,
3842 UnknownQuote,
3844 DuplicateQuote,
3846 InvalidBidAskSpread,
3848 InvalidPrice,
3850 NotAuthorizedToQuoteSecurity,
3852 Unrecognized(i64),
3854}
3855
3856impl QuoteEntryRejectReason {
3857 pub fn from_value(value: i64) -> Self {
3858 match value {
3859 1 => Self::UnknownSymbol,
3860 2 => Self::Exchange,
3861 3 => Self::QuoteExceedsLimit,
3862 4 => Self::TooLateToEnter,
3863 5 => Self::UnknownQuote,
3864 6 => Self::DuplicateQuote,
3865 7 => Self::InvalidBidAskSpread,
3866 8 => Self::InvalidPrice,
3867 9 => Self::NotAuthorizedToQuoteSecurity,
3868 unrecognized => Self::Unrecognized(unrecognized),
3869 }
3870 }
3871
3872 pub fn value(self) -> i64 {
3873 match self {
3874 Self::UnknownSymbol => 1,
3875 Self::Exchange => 2,
3876 Self::QuoteExceedsLimit => 3,
3877 Self::TooLateToEnter => 4,
3878 Self::UnknownQuote => 5,
3879 Self::DuplicateQuote => 6,
3880 Self::InvalidBidAskSpread => 7,
3881 Self::InvalidPrice => 8,
3882 Self::NotAuthorizedToQuoteSecurity => 9,
3883 Self::Unrecognized(value) => value,
3884 }
3885 }
3886}
3887
3888#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3890pub enum SessionRejectReason {
3891 InvalidTagNumber,
3893 RequiredTagMissing,
3895 SendingTimeAccuracyProblem,
3897 InvalidMsgType,
3899 TagNotDefinedForThisMessageType,
3901 UndefinedTag,
3903 TagSpecifiedWithoutAValue,
3905 ValueIsIncorrect,
3907 IncorrectDataFormatForValue,
3909 DecryptionProblem,
3911 SignatureProblem,
3913 CompIdProblem,
3915 Unrecognized(i64),
3917}
3918
3919impl SessionRejectReason {
3920 pub fn from_value(value: i64) -> Self {
3921 match value {
3922 0 => Self::InvalidTagNumber,
3923 1 => Self::RequiredTagMissing,
3924 10 => Self::SendingTimeAccuracyProblem,
3925 11 => Self::InvalidMsgType,
3926 2 => Self::TagNotDefinedForThisMessageType,
3927 3 => Self::UndefinedTag,
3928 4 => Self::TagSpecifiedWithoutAValue,
3929 5 => Self::ValueIsIncorrect,
3930 6 => Self::IncorrectDataFormatForValue,
3931 7 => Self::DecryptionProblem,
3932 8 => Self::SignatureProblem,
3933 9 => Self::CompIdProblem,
3934 unrecognized => Self::Unrecognized(unrecognized),
3935 }
3936 }
3937
3938 pub fn value(self) -> i64 {
3939 match self {
3940 Self::InvalidTagNumber => 0,
3941 Self::RequiredTagMissing => 1,
3942 Self::SendingTimeAccuracyProblem => 10,
3943 Self::InvalidMsgType => 11,
3944 Self::TagNotDefinedForThisMessageType => 2,
3945 Self::UndefinedTag => 3,
3946 Self::TagSpecifiedWithoutAValue => 4,
3947 Self::ValueIsIncorrect => 5,
3948 Self::IncorrectDataFormatForValue => 6,
3949 Self::DecryptionProblem => 7,
3950 Self::SignatureProblem => 8,
3951 Self::CompIdProblem => 9,
3952 Self::Unrecognized(value) => value,
3953 }
3954 }
3955}
3956
3957#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3959pub enum BidRequestTransType<'a> {
3960 Cancel,
3962 New,
3964 Unrecognized(&'a str),
3966}
3967
3968impl<'a> BidRequestTransType<'a> {
3969 pub fn from_value(value: &'a str) -> Self {
3970 match value {
3971 "C" => Self::Cancel,
3972 "N" => Self::New,
3973 unrecognized => Self::Unrecognized(unrecognized),
3974 }
3975 }
3976
3977 pub fn value(self) -> &'a str {
3978 match self {
3979 Self::Cancel => "C",
3980 Self::New => "N",
3981 Self::Unrecognized(value) => value,
3982 }
3983 }
3984}
3985
3986impl<'a> From<&'a str> for BidRequestTransType<'a> {
3987 fn from(value: &'a str) -> Self {
3988 Self::from_value(value)
3989 }
3990}
3991
3992#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
3994pub enum ExecRestatementReason {
3995 GtCorporateAction,
3997 GtRenewal,
3999 VerbalChange,
4001 RepricingOfOrder,
4003 BrokerOption,
4005 PartialDeclineOfOrderQty,
4007 Unrecognized(i64),
4009}
4010
4011impl ExecRestatementReason {
4012 pub fn from_value(value: i64) -> Self {
4013 match value {
4014 0 => Self::GtCorporateAction,
4015 1 => Self::GtRenewal,
4016 2 => Self::VerbalChange,
4017 3 => Self::RepricingOfOrder,
4018 4 => Self::BrokerOption,
4019 5 => Self::PartialDeclineOfOrderQty,
4020 unrecognized => Self::Unrecognized(unrecognized),
4021 }
4022 }
4023
4024 pub fn value(self) -> i64 {
4025 match self {
4026 Self::GtCorporateAction => 0,
4027 Self::GtRenewal => 1,
4028 Self::VerbalChange => 2,
4029 Self::RepricingOfOrder => 3,
4030 Self::BrokerOption => 4,
4031 Self::PartialDeclineOfOrderQty => 5,
4032 Self::Unrecognized(value) => value,
4033 }
4034 }
4035}
4036
4037#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4039pub enum BusinessRejectReason {
4040 Other,
4042 UnknownId,
4044 UnknownSecurity,
4046 UnsupportedMessageType,
4048 ApplicationNotAvailable,
4050 ConditionallyRequiredFieldMissing,
4052 Unrecognized(i64),
4054}
4055
4056impl BusinessRejectReason {
4057 pub fn from_value(value: i64) -> Self {
4058 match value {
4059 0 => Self::Other,
4060 1 => Self::UnknownId,
4061 2 => Self::UnknownSecurity,
4062 3 => Self::UnsupportedMessageType,
4063 4 => Self::ApplicationNotAvailable,
4064 5 => Self::ConditionallyRequiredFieldMissing,
4065 unrecognized => Self::Unrecognized(unrecognized),
4066 }
4067 }
4068
4069 pub fn value(self) -> i64 {
4070 match self {
4071 Self::Other => 0,
4072 Self::UnknownId => 1,
4073 Self::UnknownSecurity => 2,
4074 Self::UnsupportedMessageType => 3,
4075 Self::ApplicationNotAvailable => 4,
4076 Self::ConditionallyRequiredFieldMissing => 5,
4077 Self::Unrecognized(value) => value,
4078 }
4079 }
4080}
4081
4082#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4084pub enum MsgDirection<'a> {
4085 Receive,
4087 Send,
4089 Unrecognized(&'a str),
4091}
4092
4093impl<'a> MsgDirection<'a> {
4094 pub fn from_value(value: &'a str) -> Self {
4095 match value {
4096 "R" => Self::Receive,
4097 "S" => Self::Send,
4098 unrecognized => Self::Unrecognized(unrecognized),
4099 }
4100 }
4101
4102 pub fn value(self) -> &'a str {
4103 match self {
4104 Self::Receive => "R",
4105 Self::Send => "S",
4106 Self::Unrecognized(value) => value,
4107 }
4108 }
4109}
4110
4111impl<'a> From<&'a str> for MsgDirection<'a> {
4112 fn from(value: &'a str) -> Self {
4113 Self::from_value(value)
4114 }
4115}
4116
4117#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4119pub enum DiscretionInst<'a> {
4120 RelatedToDisplayedPrice,
4122 RelatedToMarketPrice,
4124 RelatedToPrimaryPrice,
4126 RelatedToLocalPrimaryPrice,
4128 RelatedToMidpointPrice,
4130 RelatedToLastTradePrice,
4132 Unrecognized(&'a str),
4134}
4135
4136impl<'a> DiscretionInst<'a> {
4137 pub fn from_value(value: &'a str) -> Self {
4138 match value {
4139 "0" => Self::RelatedToDisplayedPrice,
4140 "1" => Self::RelatedToMarketPrice,
4141 "2" => Self::RelatedToPrimaryPrice,
4142 "3" => Self::RelatedToLocalPrimaryPrice,
4143 "4" => Self::RelatedToMidpointPrice,
4144 "5" => Self::RelatedToLastTradePrice,
4145 unrecognized => Self::Unrecognized(unrecognized),
4146 }
4147 }
4148
4149 pub fn value(self) -> &'a str {
4150 match self {
4151 Self::RelatedToDisplayedPrice => "0",
4152 Self::RelatedToMarketPrice => "1",
4153 Self::RelatedToPrimaryPrice => "2",
4154 Self::RelatedToLocalPrimaryPrice => "3",
4155 Self::RelatedToMidpointPrice => "4",
4156 Self::RelatedToLastTradePrice => "5",
4157 Self::Unrecognized(value) => value,
4158 }
4159 }
4160}
4161
4162impl<'a> From<&'a str> for DiscretionInst<'a> {
4163 fn from(value: &'a str) -> Self {
4164 Self::from_value(value)
4165 }
4166}
4167
4168#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4170pub enum LiquidityIndType {
4171 FiveDayMovingAverage,
4173 TwentyDayMovingAverage,
4175 NormalMarketSize,
4177 Other,
4179 Unrecognized(i64),
4181}
4182
4183impl LiquidityIndType {
4184 pub fn from_value(value: i64) -> Self {
4185 match value {
4186 1 => Self::FiveDayMovingAverage,
4187 2 => Self::TwentyDayMovingAverage,
4188 3 => Self::NormalMarketSize,
4189 4 => Self::Other,
4190 unrecognized => Self::Unrecognized(unrecognized),
4191 }
4192 }
4193
4194 pub fn value(self) -> i64 {
4195 match self {
4196 Self::FiveDayMovingAverage => 1,
4197 Self::TwentyDayMovingAverage => 2,
4198 Self::NormalMarketSize => 3,
4199 Self::Other => 4,
4200 Self::Unrecognized(value) => value,
4201 }
4202 }
4203}
4204
4205#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4207pub enum ProgRptReqs {
4208 BuySideRequests,
4210 SellSideSends,
4212 RealTimeExecutionReports,
4214 Unrecognized(i64),
4216}
4217
4218impl ProgRptReqs {
4219 pub fn from_value(value: i64) -> Self {
4220 match value {
4221 1 => Self::BuySideRequests,
4222 2 => Self::SellSideSends,
4223 3 => Self::RealTimeExecutionReports,
4224 unrecognized => Self::Unrecognized(unrecognized),
4225 }
4226 }
4227
4228 pub fn value(self) -> i64 {
4229 match self {
4230 Self::BuySideRequests => 1,
4231 Self::SellSideSends => 2,
4232 Self::RealTimeExecutionReports => 3,
4233 Self::Unrecognized(value) => value,
4234 }
4235 }
4236}
4237
4238#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4240pub enum IncTaxInd {
4241 Net,
4243 Gross,
4245 Unrecognized(i64),
4247}
4248
4249impl IncTaxInd {
4250 pub fn from_value(value: i64) -> Self {
4251 match value {
4252 1 => Self::Net,
4253 2 => Self::Gross,
4254 unrecognized => Self::Unrecognized(unrecognized),
4255 }
4256 }
4257
4258 pub fn value(self) -> i64 {
4259 match self {
4260 Self::Net => 1,
4261 Self::Gross => 2,
4262 Self::Unrecognized(value) => value,
4263 }
4264 }
4265}
4266
4267#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4269pub enum TradeType<'a> {
4270 Agency,
4272 VwapGuarantee,
4274 GuaranteedClose,
4276 RiskTrade,
4278 Unrecognized(&'a str),
4280}
4281
4282impl<'a> TradeType<'a> {
4283 pub fn from_value(value: &'a str) -> Self {
4284 match value {
4285 "A" => Self::Agency,
4286 "G" => Self::VwapGuarantee,
4287 "J" => Self::GuaranteedClose,
4288 "R" => Self::RiskTrade,
4289 unrecognized => Self::Unrecognized(unrecognized),
4290 }
4291 }
4292
4293 pub fn value(self) -> &'a str {
4294 match self {
4295 Self::Agency => "A",
4296 Self::VwapGuarantee => "G",
4297 Self::GuaranteedClose => "J",
4298 Self::RiskTrade => "R",
4299 Self::Unrecognized(value) => value,
4300 }
4301 }
4302}
4303
4304impl<'a> From<&'a str> for TradeType<'a> {
4305 fn from(value: &'a str) -> Self {
4306 Self::from_value(value)
4307 }
4308}
4309
4310#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4312pub enum BasisPxType<'a> {
4313 ClosingPriceAtMorningSession,
4315 ClosingPrice,
4317 CurrentPrice,
4319 Sq,
4321 VwapThroughADay,
4323 VwapThroughAMorningSession,
4325 VwapThroughAnAfternoonSession,
4327 VwapThroughADayExcept,
4329 VwapThroughAMorningSessionExcept,
4331 VwapThroughAnAfternoonSessionExcept,
4333 Strike,
4335 Open,
4337 Others,
4339 Unrecognized(&'a str),
4341}
4342
4343impl<'a> BasisPxType<'a> {
4344 pub fn from_value(value: &'a str) -> Self {
4345 match value {
4346 "2" => Self::ClosingPriceAtMorningSession,
4347 "3" => Self::ClosingPrice,
4348 "4" => Self::CurrentPrice,
4349 "5" => Self::Sq,
4350 "6" => Self::VwapThroughADay,
4351 "7" => Self::VwapThroughAMorningSession,
4352 "8" => Self::VwapThroughAnAfternoonSession,
4353 "9" => Self::VwapThroughADayExcept,
4354 "A" => Self::VwapThroughAMorningSessionExcept,
4355 "B" => Self::VwapThroughAnAfternoonSessionExcept,
4356 "C" => Self::Strike,
4357 "D" => Self::Open,
4358 "Z" => Self::Others,
4359 unrecognized => Self::Unrecognized(unrecognized),
4360 }
4361 }
4362
4363 pub fn value(self) -> &'a str {
4364 match self {
4365 Self::ClosingPriceAtMorningSession => "2",
4366 Self::ClosingPrice => "3",
4367 Self::CurrentPrice => "4",
4368 Self::Sq => "5",
4369 Self::VwapThroughADay => "6",
4370 Self::VwapThroughAMorningSession => "7",
4371 Self::VwapThroughAnAfternoonSession => "8",
4372 Self::VwapThroughADayExcept => "9",
4373 Self::VwapThroughAMorningSessionExcept => "A",
4374 Self::VwapThroughAnAfternoonSessionExcept => "B",
4375 Self::Strike => "C",
4376 Self::Open => "D",
4377 Self::Others => "Z",
4378 Self::Unrecognized(value) => value,
4379 }
4380 }
4381}
4382
4383impl<'a> From<&'a str> for BasisPxType<'a> {
4384 fn from(value: &'a str) -> Self {
4385 Self::from_value(value)
4386 }
4387}
4388
4389#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4391pub enum PriceType {
4392 Percentage,
4394 PerUnit,
4396 FixedAmount,
4398 Unrecognized(i64),
4400}
4401
4402impl PriceType {
4403 pub fn from_value(value: i64) -> Self {
4404 match value {
4405 1 => Self::Percentage,
4406 2 => Self::PerUnit,
4407 3 => Self::FixedAmount,
4408 unrecognized => Self::Unrecognized(unrecognized),
4409 }
4410 }
4411
4412 pub fn value(self) -> i64 {
4413 match self {
4414 Self::Percentage => 1,
4415 Self::PerUnit => 2,
4416 Self::FixedAmount => 3,
4417 Self::Unrecognized(value) => value,
4418 }
4419 }
4420}
4421
4422#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4424pub enum GTBookingInst {
4425 BookOutAllTradesOnDayOfExecution,
4427 AccumulateUntilFilledOrExpired,
4429 AccumulateUntilVerballlyNotifiedOtherwise,
4431 Unrecognized(i64),
4433}
4434
4435impl GTBookingInst {
4436 pub fn from_value(value: i64) -> Self {
4437 match value {
4438 0 => Self::BookOutAllTradesOnDayOfExecution,
4439 1 => Self::AccumulateUntilFilledOrExpired,
4440 2 => Self::AccumulateUntilVerballlyNotifiedOtherwise,
4441 unrecognized => Self::Unrecognized(unrecognized),
4442 }
4443 }
4444
4445 pub fn value(self) -> i64 {
4446 match self {
4447 Self::BookOutAllTradesOnDayOfExecution => 0,
4448 Self::AccumulateUntilFilledOrExpired => 1,
4449 Self::AccumulateUntilVerballlyNotifiedOtherwise => 2,
4450 Self::Unrecognized(value) => value,
4451 }
4452 }
4453}
4454
4455#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4457pub enum NetGrossInd {
4458 Net,
4460 Gross,
4462 Unrecognized(i64),
4464}
4465
4466impl NetGrossInd {
4467 pub fn from_value(value: i64) -> Self {
4468 match value {
4469 1 => Self::Net,
4470 2 => Self::Gross,
4471 unrecognized => Self::Unrecognized(unrecognized),
4472 }
4473 }
4474
4475 pub fn value(self) -> i64 {
4476 match self {
4477 Self::Net => 1,
4478 Self::Gross => 2,
4479 Self::Unrecognized(value) => value,
4480 }
4481 }
4482}
4483
4484#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4486pub enum ListExecInstType<'a> {
4487 Immediate,
4489 WaitForInstruction,
4491 Unrecognized(&'a str),
4493}
4494
4495impl<'a> ListExecInstType<'a> {
4496 pub fn from_value(value: &'a str) -> Self {
4497 match value {
4498 "1" => Self::Immediate,
4499 "2" => Self::WaitForInstruction,
4500 unrecognized => Self::Unrecognized(unrecognized),
4501 }
4502 }
4503
4504 pub fn value(self) -> &'a str {
4505 match self {
4506 Self::Immediate => "1",
4507 Self::WaitForInstruction => "2",
4508 Self::Unrecognized(value) => value,
4509 }
4510 }
4511}
4512
4513impl<'a> From<&'a str> for ListExecInstType<'a> {
4514 fn from(value: &'a str) -> Self {
4515 Self::from_value(value)
4516 }
4517}
4518
4519#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4521pub enum CxlRejResponseTo<'a> {
4522 OrderCancelRequest,
4524 OrderCancel,
4526 Unrecognized(&'a str),
4528}
4529
4530impl<'a> CxlRejResponseTo<'a> {
4531 pub fn from_value(value: &'a str) -> Self {
4532 match value {
4533 "1" => Self::OrderCancelRequest,
4534 "2" => Self::OrderCancel,
4535 unrecognized => Self::Unrecognized(unrecognized),
4536 }
4537 }
4538
4539 pub fn value(self) -> &'a str {
4540 match self {
4541 Self::OrderCancelRequest => "1",
4542 Self::OrderCancel => "2",
4543 Self::Unrecognized(value) => value,
4544 }
4545 }
4546}
4547
4548impl<'a> From<&'a str> for CxlRejResponseTo<'a> {
4549 fn from(value: &'a str) -> Self {
4550 Self::from_value(value)
4551 }
4552}
4553
4554#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4556pub enum MultiLegReportingType<'a> {
4557 SingleSecurity,
4559 IndividualLegOfAMultiLegSecurity,
4561 MultiLegSecurity,
4563 Unrecognized(&'a str),
4565}
4566
4567impl<'a> MultiLegReportingType<'a> {
4568 pub fn from_value(value: &'a str) -> Self {
4569 match value {
4570 "1" => Self::SingleSecurity,
4571 "2" => Self::IndividualLegOfAMultiLegSecurity,
4572 "3" => Self::MultiLegSecurity,
4573 unrecognized => Self::Unrecognized(unrecognized),
4574 }
4575 }
4576
4577 pub fn value(self) -> &'a str {
4578 match self {
4579 Self::SingleSecurity => "1",
4580 Self::IndividualLegOfAMultiLegSecurity => "2",
4581 Self::MultiLegSecurity => "3",
4582 Self::Unrecognized(value) => value,
4583 }
4584 }
4585}
4586
4587impl<'a> From<&'a str> for MultiLegReportingType<'a> {
4588 fn from(value: &'a str) -> Self {
4589 Self::from_value(value)
4590 }
4591}