refix_fix44/generated/messages/
list_cancel_request.rs1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{Date, InvalidValue, LazyKnownTags, RawMessage, Tag, UtcTimestamp};
5
6use super::super::components::{Header, Trailer};
7
8pub struct ListCancelRequest(RawMessage);
10
11impl ListCancelRequest {
12 pub const MSG_TYPE: &[u8] = b"K";
13
14 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
15 static TAGS: LazyKnownTags = LazyKnownTags::new(
16 &[Tag(66), Tag(60), Tag(229), Tag(75), Tag(58), Tag(354), Tag(355)],
17 &[Header::known_tags(), Trailer::known_tags()],
18 );
19 &TAGS
20 }
21
22 pub fn from_raw(raw: RawMessage) -> Self {
23 Self(raw)
24 }
25
26 pub fn raw(&self) -> &RawMessage {
27 &self.0
28 }
29
30 pub fn header(&self) -> Header<'_> {
31 Header(self.0.scope(), Self::known_tags().get())
32 }
33
34 pub fn trailer(&self) -> Trailer<'_> {
35 Trailer(self.0.scope())
36 }
37
38 #[doc(alias = "ListID")]
40 pub fn list_id(&self) -> Result<Option<&str>, InvalidValue> {
41 self.0.get_str(Tag(66))
42 }
43
44 #[doc(alias = "TransactTime")]
46 pub fn transact_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
47 self.0.get_utc_timestamp(Tag(60))
48 }
49
50 #[doc(alias = "TradeOriginationDate")]
52 pub fn trade_origination_date(&self) -> Result<Option<Date>, InvalidValue> {
53 self.0.get_date(Tag(229))
54 }
55
56 #[doc(alias = "TradeDate")]
58 pub fn trade_date(&self) -> Result<Option<Date>, InvalidValue> {
59 self.0.get_date(Tag(75))
60 }
61
62 #[doc(alias = "Text")]
64 pub fn text(&self) -> Result<Option<&str>, InvalidValue> {
65 self.0.get_str(Tag(58))
66 }
67
68 #[doc(alias = "EncodedTextLen")]
70 pub fn encoded_text_len(&self) -> Result<Option<i64>, InvalidValue> {
71 self.0.get_int(Tag(354))
72 }
73
74 #[doc(alias = "EncodedText")]
76 pub fn encoded_text(&self) -> Option<&[u8]> {
77 self.0.get(Tag(355))
78 }
79}
80
81impl std::fmt::Debug for ListCancelRequest {
82 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
83 write!(f, "ListCancelRequest({})", self.0)
84 }
85}
86
87impl std::fmt::Display for ListCancelRequest {
88 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
89 std::fmt::Display::fmt(&self.0, f)
90 }
91}