Skip to main content

polyester/gen/buffa/
tradews.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// ClientFrame is the protobuf write-websocket envelope. Its payloads reuse the
4/// public Orders API request contracts so every transport shares one order model.
5#[derive(Clone, PartialEq, Default)]
6#[derive(::serde::Serialize)]
7#[serde(default)]
8pub struct ClientFrame {
9    /// Monotonic per-connection client sequence number, starting at 1.
10    ///
11    /// Field 1: `seq`
12    #[serde(
13        rename = "seq",
14        with = "::buffa::json_helpers::uint64",
15        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
16    )]
17    pub seq: u64,
18    /// Client correlation token echoed in every server response.
19    ///
20    /// Field 2: `correlation_id`
21    #[serde(
22        rename = "correlationId",
23        alias = "correlation_id",
24        with = "::buffa::json_helpers::proto_string",
25        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
26    )]
27    pub correlation_id: ::buffa::alloc::string::String,
28    #[serde(flatten)]
29    pub payload: ::core::option::Option<__buffa::oneof::client_frame::Payload>,
30    #[serde(skip)]
31    #[doc(hidden)]
32    pub __buffa_unknown_fields: ::buffa::UnknownFields,
33}
34impl ::core::fmt::Debug for ClientFrame {
35    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
36        f.debug_struct("ClientFrame")
37            .field("seq", &self.seq)
38            .field("correlation_id", &self.correlation_id)
39            .field("payload", &self.payload)
40            .finish()
41    }
42}
43impl ClientFrame {
44    /// Protobuf type URL for this message, for use with `Any::pack` and
45    /// `Any::unpack_if`.
46    ///
47    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
48    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.ClientFrame";
49}
50::buffa::impl_default_instance!(ClientFrame);
51impl ::buffa::MessageName for ClientFrame {
52    const PACKAGE: &'static str = "tradews.v1";
53    const NAME: &'static str = "ClientFrame";
54    const FULL_NAME: &'static str = "tradews.v1.ClientFrame";
55    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.ClientFrame";
56}
57impl ::buffa::Message for ClientFrame {
58    /// Returns the total encoded size in bytes.
59    ///
60    /// The result is a `u32`; the protobuf specification requires all
61    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
62    /// compliant message will never overflow this type.
63    #[allow(clippy::let_and_return)]
64    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
65        #[allow(unused_imports)]
66        use ::buffa::Enumeration as _;
67        let mut size = 0u32;
68        if self.seq != 0u64 {
69            size += 1u32 + ::buffa::types::uint64_encoded_len(self.seq) as u32;
70        }
71        if !self.correlation_id.is_empty() {
72            size
73                += 1u32
74                    + ::buffa::types::string_encoded_len(&self.correlation_id) as u32;
75        }
76        if let ::core::option::Option::Some(ref v) = self.payload {
77            match v {
78                __buffa::oneof::client_frame::Payload::Ping(x) => {
79                    let __slot = __cache.reserve();
80                    let inner = x.compute_size(__cache);
81                    __cache.set(__slot, inner);
82                    size
83                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
84                            + inner;
85                }
86                __buffa::oneof::client_frame::Payload::CreateOrder(x) => {
87                    let __slot = __cache.reserve();
88                    let inner = x.compute_size(__cache);
89                    __cache.set(__slot, inner);
90                    size
91                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
92                            + inner;
93                }
94                __buffa::oneof::client_frame::Payload::CancelOrder(x) => {
95                    let __slot = __cache.reserve();
96                    let inner = x.compute_size(__cache);
97                    __cache.set(__slot, inner);
98                    size
99                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
100                            + inner;
101                }
102                __buffa::oneof::client_frame::Payload::ModifyOrder(x) => {
103                    let __slot = __cache.reserve();
104                    let inner = x.compute_size(__cache);
105                    __cache.set(__slot, inner);
106                    size
107                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
108                            + inner;
109                }
110                __buffa::oneof::client_frame::Payload::CancelAllOrders(x) => {
111                    let __slot = __cache.reserve();
112                    let inner = x.compute_size(__cache);
113                    __cache.set(__slot, inner);
114                    size
115                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
116                            + inner;
117                }
118            }
119        }
120        size += self.__buffa_unknown_fields.encoded_len() as u32;
121        size
122    }
123    fn write_to(
124        &self,
125        __cache: &mut ::buffa::SizeCache,
126        buf: &mut impl ::buffa::bytes::BufMut,
127    ) {
128        #[allow(unused_imports)]
129        use ::buffa::Enumeration as _;
130        if self.seq != 0u64 {
131            ::buffa::types::put_uint64_field(1u32, self.seq, buf);
132        }
133        if !self.correlation_id.is_empty() {
134            ::buffa::types::put_string_field(2u32, &self.correlation_id, buf);
135        }
136        if let ::core::option::Option::Some(ref v) = self.payload {
137            match v {
138                __buffa::oneof::client_frame::Payload::Ping(x) => {
139                    ::buffa::types::put_len_delimited_header(
140                        10u32,
141                        __cache.consume_next(),
142                        buf,
143                    );
144                    x.write_to(__cache, buf);
145                }
146                __buffa::oneof::client_frame::Payload::CreateOrder(x) => {
147                    ::buffa::types::put_len_delimited_header(
148                        11u32,
149                        __cache.consume_next(),
150                        buf,
151                    );
152                    x.write_to(__cache, buf);
153                }
154                __buffa::oneof::client_frame::Payload::CancelOrder(x) => {
155                    ::buffa::types::put_len_delimited_header(
156                        12u32,
157                        __cache.consume_next(),
158                        buf,
159                    );
160                    x.write_to(__cache, buf);
161                }
162                __buffa::oneof::client_frame::Payload::ModifyOrder(x) => {
163                    ::buffa::types::put_len_delimited_header(
164                        13u32,
165                        __cache.consume_next(),
166                        buf,
167                    );
168                    x.write_to(__cache, buf);
169                }
170                __buffa::oneof::client_frame::Payload::CancelAllOrders(x) => {
171                    ::buffa::types::put_len_delimited_header(
172                        14u32,
173                        __cache.consume_next(),
174                        buf,
175                    );
176                    x.write_to(__cache, buf);
177                }
178            }
179        }
180        self.__buffa_unknown_fields.write_to(buf);
181    }
182    fn merge_field(
183        &mut self,
184        tag: ::buffa::encoding::Tag,
185        buf: &mut impl ::buffa::bytes::Buf,
186        ctx: ::buffa::DecodeContext<'_>,
187    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
188        #[allow(unused_imports)]
189        use ::buffa::bytes::Buf as _;
190        #[allow(unused_imports)]
191        use ::buffa::Enumeration as _;
192        match tag.field_number() {
193            1u32 => {
194                ::buffa::encoding::check_wire_type(
195                    tag,
196                    ::buffa::encoding::WireType::Varint,
197                )?;
198                self.seq = ::buffa::types::decode_uint64(buf)?;
199            }
200            2u32 => {
201                ::buffa::encoding::check_wire_type(
202                    tag,
203                    ::buffa::encoding::WireType::LengthDelimited,
204                )?;
205                ::buffa::types::merge_string(&mut self.correlation_id, buf)?;
206            }
207            10u32 => {
208                ::buffa::encoding::check_wire_type(
209                    tag,
210                    ::buffa::encoding::WireType::LengthDelimited,
211                )?;
212                if let ::core::option::Option::Some(
213                    __buffa::oneof::client_frame::Payload::Ping(ref mut existing),
214                ) = self.payload
215                {
216                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
217                } else {
218                    let mut val = ::core::default::Default::default();
219                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
220                    self.payload = ::core::option::Option::Some(
221                        __buffa::oneof::client_frame::Payload::Ping(
222                            ::buffa::alloc::boxed::Box::new(val),
223                        ),
224                    );
225                }
226            }
227            11u32 => {
228                ::buffa::encoding::check_wire_type(
229                    tag,
230                    ::buffa::encoding::WireType::LengthDelimited,
231                )?;
232                if let ::core::option::Option::Some(
233                    __buffa::oneof::client_frame::Payload::CreateOrder(ref mut existing),
234                ) = self.payload
235                {
236                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
237                } else {
238                    let mut val = ::core::default::Default::default();
239                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
240                    self.payload = ::core::option::Option::Some(
241                        __buffa::oneof::client_frame::Payload::CreateOrder(
242                            ::buffa::alloc::boxed::Box::new(val),
243                        ),
244                    );
245                }
246            }
247            12u32 => {
248                ::buffa::encoding::check_wire_type(
249                    tag,
250                    ::buffa::encoding::WireType::LengthDelimited,
251                )?;
252                if let ::core::option::Option::Some(
253                    __buffa::oneof::client_frame::Payload::CancelOrder(ref mut existing),
254                ) = self.payload
255                {
256                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
257                } else {
258                    let mut val = ::core::default::Default::default();
259                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
260                    self.payload = ::core::option::Option::Some(
261                        __buffa::oneof::client_frame::Payload::CancelOrder(
262                            ::buffa::alloc::boxed::Box::new(val),
263                        ),
264                    );
265                }
266            }
267            13u32 => {
268                ::buffa::encoding::check_wire_type(
269                    tag,
270                    ::buffa::encoding::WireType::LengthDelimited,
271                )?;
272                if let ::core::option::Option::Some(
273                    __buffa::oneof::client_frame::Payload::ModifyOrder(ref mut existing),
274                ) = self.payload
275                {
276                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
277                } else {
278                    let mut val = ::core::default::Default::default();
279                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
280                    self.payload = ::core::option::Option::Some(
281                        __buffa::oneof::client_frame::Payload::ModifyOrder(
282                            ::buffa::alloc::boxed::Box::new(val),
283                        ),
284                    );
285                }
286            }
287            14u32 => {
288                ::buffa::encoding::check_wire_type(
289                    tag,
290                    ::buffa::encoding::WireType::LengthDelimited,
291                )?;
292                if let ::core::option::Option::Some(
293                    __buffa::oneof::client_frame::Payload::CancelAllOrders(
294                        ref mut existing,
295                    ),
296                ) = self.payload
297                {
298                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
299                } else {
300                    let mut val = ::core::default::Default::default();
301                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
302                    self.payload = ::core::option::Option::Some(
303                        __buffa::oneof::client_frame::Payload::CancelAllOrders(
304                            ::buffa::alloc::boxed::Box::new(val),
305                        ),
306                    );
307                }
308            }
309            _ => {
310                self.__buffa_unknown_fields
311                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
312            }
313        }
314        ::core::result::Result::Ok(())
315    }
316    fn clear(&mut self) {
317        self.seq = 0u64;
318        self.correlation_id.clear();
319        self.payload = ::core::option::Option::None;
320        self.__buffa_unknown_fields.clear();
321    }
322}
323impl ::buffa::ExtensionSet for ClientFrame {
324    const PROTO_FQN: &'static str = "tradews.v1.ClientFrame";
325    fn unknown_fields(&self) -> &::buffa::UnknownFields {
326        &self.__buffa_unknown_fields
327    }
328    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
329        &mut self.__buffa_unknown_fields
330    }
331}
332impl<'de> serde::Deserialize<'de> for ClientFrame {
333    fn deserialize<D: serde::Deserializer<'de>>(
334        d: D,
335    ) -> ::core::result::Result<Self, D::Error> {
336        struct _V;
337        impl<'de> serde::de::Visitor<'de> for _V {
338            type Value = ClientFrame;
339            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
340                f.write_str("struct ClientFrame")
341            }
342            #[allow(clippy::field_reassign_with_default)]
343            fn visit_map<A: serde::de::MapAccess<'de>>(
344                self,
345                mut map: A,
346            ) -> ::core::result::Result<ClientFrame, A::Error> {
347                let mut __f_seq: ::core::option::Option<u64> = None;
348                let mut __f_correlation_id: ::core::option::Option<
349                    ::buffa::alloc::string::String,
350                > = None;
351                let mut __oneof_payload: ::core::option::Option<
352                    __buffa::oneof::client_frame::Payload,
353                > = None;
354                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
355                    match key.as_str() {
356                        "seq" => {
357                            __f_seq = Some({
358                                struct _S;
359                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
360                                    type Value = u64;
361                                    fn deserialize<D: serde::Deserializer<'de>>(
362                                        self,
363                                        d: D,
364                                    ) -> ::core::result::Result<u64, D::Error> {
365                                        ::buffa::json_helpers::uint64::deserialize(d)
366                                    }
367                                }
368                                map.next_value_seed(_S)?
369                            });
370                        }
371                        "correlationId" | "correlation_id" => {
372                            __f_correlation_id = Some({
373                                struct _S;
374                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
375                                    type Value = ::buffa::alloc::string::String;
376                                    fn deserialize<D: serde::Deserializer<'de>>(
377                                        self,
378                                        d: D,
379                                    ) -> ::core::result::Result<
380                                        ::buffa::alloc::string::String,
381                                        D::Error,
382                                    > {
383                                        ::buffa::json_helpers::proto_string::deserialize(d)
384                                    }
385                                }
386                                map.next_value_seed(_S)?
387                            });
388                        }
389                        "ping" => {
390                            let v: ::core::option::Option<PingRequest> = map
391                                .next_value_seed(
392                                    ::buffa::json_helpers::NullableDeserializeSeed(
393                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
394                                            PingRequest,
395                                        >::new(),
396                                    ),
397                                )?;
398                            if let Some(v) = v {
399                                if __oneof_payload.is_some() {
400                                    return Err(
401                                        serde::de::Error::custom(
402                                            "multiple oneof fields set for 'payload'",
403                                        ),
404                                    );
405                                }
406                                __oneof_payload = Some(
407                                    __buffa::oneof::client_frame::Payload::Ping(
408                                        ::buffa::alloc::boxed::Box::new(v),
409                                    ),
410                                );
411                            }
412                        }
413                        "createOrder" | "create_order" => {
414                            let v: ::core::option::Option<
415                                super::super::orders::v1::CreateOrderRequest,
416                            > = map
417                                .next_value_seed(
418                                    ::buffa::json_helpers::NullableDeserializeSeed(
419                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
420                                            super::super::orders::v1::CreateOrderRequest,
421                                        >::new(),
422                                    ),
423                                )?;
424                            if let Some(v) = v {
425                                if __oneof_payload.is_some() {
426                                    return Err(
427                                        serde::de::Error::custom(
428                                            "multiple oneof fields set for 'payload'",
429                                        ),
430                                    );
431                                }
432                                __oneof_payload = Some(
433                                    __buffa::oneof::client_frame::Payload::CreateOrder(
434                                        ::buffa::alloc::boxed::Box::new(v),
435                                    ),
436                                );
437                            }
438                        }
439                        "cancelOrder" | "cancel_order" => {
440                            let v: ::core::option::Option<
441                                super::super::orders::v1::CancelOrderRequest,
442                            > = map
443                                .next_value_seed(
444                                    ::buffa::json_helpers::NullableDeserializeSeed(
445                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
446                                            super::super::orders::v1::CancelOrderRequest,
447                                        >::new(),
448                                    ),
449                                )?;
450                            if let Some(v) = v {
451                                if __oneof_payload.is_some() {
452                                    return Err(
453                                        serde::de::Error::custom(
454                                            "multiple oneof fields set for 'payload'",
455                                        ),
456                                    );
457                                }
458                                __oneof_payload = Some(
459                                    __buffa::oneof::client_frame::Payload::CancelOrder(
460                                        ::buffa::alloc::boxed::Box::new(v),
461                                    ),
462                                );
463                            }
464                        }
465                        "modifyOrder" | "modify_order" => {
466                            let v: ::core::option::Option<
467                                super::super::orders::v1::ModifyOrderRequest,
468                            > = map
469                                .next_value_seed(
470                                    ::buffa::json_helpers::NullableDeserializeSeed(
471                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
472                                            super::super::orders::v1::ModifyOrderRequest,
473                                        >::new(),
474                                    ),
475                                )?;
476                            if let Some(v) = v {
477                                if __oneof_payload.is_some() {
478                                    return Err(
479                                        serde::de::Error::custom(
480                                            "multiple oneof fields set for 'payload'",
481                                        ),
482                                    );
483                                }
484                                __oneof_payload = Some(
485                                    __buffa::oneof::client_frame::Payload::ModifyOrder(
486                                        ::buffa::alloc::boxed::Box::new(v),
487                                    ),
488                                );
489                            }
490                        }
491                        "cancelAllOrders" | "cancel_all_orders" => {
492                            let v: ::core::option::Option<
493                                super::super::orders::v1::CancelAllOrdersRequest,
494                            > = map
495                                .next_value_seed(
496                                    ::buffa::json_helpers::NullableDeserializeSeed(
497                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
498                                            super::super::orders::v1::CancelAllOrdersRequest,
499                                        >::new(),
500                                    ),
501                                )?;
502                            if let Some(v) = v {
503                                if __oneof_payload.is_some() {
504                                    return Err(
505                                        serde::de::Error::custom(
506                                            "multiple oneof fields set for 'payload'",
507                                        ),
508                                    );
509                                }
510                                __oneof_payload = Some(
511                                    __buffa::oneof::client_frame::Payload::CancelAllOrders(
512                                        ::buffa::alloc::boxed::Box::new(v),
513                                    ),
514                                );
515                            }
516                        }
517                        _ => {
518                            map.next_value::<serde::de::IgnoredAny>()?;
519                        }
520                    }
521                }
522                let mut __r = <ClientFrame as ::core::default::Default>::default();
523                if let ::core::option::Option::Some(v) = __f_seq {
524                    __r.seq = v;
525                }
526                if let ::core::option::Option::Some(v) = __f_correlation_id {
527                    __r.correlation_id = v;
528                }
529                __r.payload = __oneof_payload;
530                Ok(__r)
531            }
532        }
533        d.deserialize_map(_V)
534    }
535}
536impl ::buffa::json_helpers::ProtoElemJson for ClientFrame {
537    fn serialize_proto_json<S: ::serde::Serializer>(
538        v: &Self,
539        s: S,
540    ) -> ::core::result::Result<S::Ok, S::Error> {
541        ::serde::Serialize::serialize(v, s)
542    }
543    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
544        d: D,
545    ) -> ::core::result::Result<Self, D::Error> {
546        <Self as ::serde::Deserialize>::deserialize(d)
547    }
548}
549#[doc(hidden)]
550pub const __CLIENT_FRAME_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
551    type_url: "type.googleapis.com/tradews.v1.ClientFrame",
552    to_json: ::buffa::type_registry::any_to_json::<ClientFrame>,
553    from_json: ::buffa::type_registry::any_from_json::<ClientFrame>,
554    is_wkt: false,
555};
556pub mod client_frame {
557    #[allow(unused_imports)]
558    use super::*;
559    #[doc(inline)]
560    pub use super::__buffa::oneof::client_frame::Payload;
561    #[doc(inline)]
562    pub use super::__buffa::view::oneof::client_frame::Payload as PayloadView;
563}
564/// PingRequest carries an opaque payload that is echoed by PongResponse.
565#[derive(Clone, PartialEq, Default)]
566#[derive(::serde::Serialize, ::serde::Deserialize)]
567#[serde(default)]
568pub struct PingRequest {
569    /// Opaque client payload echoed by the server.
570    ///
571    /// Field 1: `payload`
572    #[serde(
573        rename = "payload",
574        with = "::buffa::json_helpers::bytes",
575        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
576    )]
577    pub payload: ::buffa::alloc::vec::Vec<u8>,
578    #[serde(skip)]
579    #[doc(hidden)]
580    pub __buffa_unknown_fields: ::buffa::UnknownFields,
581}
582impl ::core::fmt::Debug for PingRequest {
583    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
584        f.debug_struct("PingRequest").field("payload", &self.payload).finish()
585    }
586}
587impl PingRequest {
588    /// Protobuf type URL for this message, for use with `Any::pack` and
589    /// `Any::unpack_if`.
590    ///
591    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
592    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.PingRequest";
593}
594::buffa::impl_default_instance!(PingRequest);
595impl ::buffa::MessageName for PingRequest {
596    const PACKAGE: &'static str = "tradews.v1";
597    const NAME: &'static str = "PingRequest";
598    const FULL_NAME: &'static str = "tradews.v1.PingRequest";
599    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.PingRequest";
600}
601impl ::buffa::Message for PingRequest {
602    /// Returns the total encoded size in bytes.
603    ///
604    /// The result is a `u32`; the protobuf specification requires all
605    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
606    /// compliant message will never overflow this type.
607    #[allow(clippy::let_and_return)]
608    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
609        #[allow(unused_imports)]
610        use ::buffa::Enumeration as _;
611        let mut size = 0u32;
612        if !self.payload.is_empty() {
613            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.payload) as u32;
614        }
615        size += self.__buffa_unknown_fields.encoded_len() as u32;
616        size
617    }
618    fn write_to(
619        &self,
620        _cache: &mut ::buffa::SizeCache,
621        buf: &mut impl ::buffa::bytes::BufMut,
622    ) {
623        #[allow(unused_imports)]
624        use ::buffa::Enumeration as _;
625        if !self.payload.is_empty() {
626            ::buffa::types::put_bytes_field(1u32, &self.payload, buf);
627        }
628        self.__buffa_unknown_fields.write_to(buf);
629    }
630    fn merge_field(
631        &mut self,
632        tag: ::buffa::encoding::Tag,
633        buf: &mut impl ::buffa::bytes::Buf,
634        ctx: ::buffa::DecodeContext<'_>,
635    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
636        #[allow(unused_imports)]
637        use ::buffa::bytes::Buf as _;
638        #[allow(unused_imports)]
639        use ::buffa::Enumeration as _;
640        match tag.field_number() {
641            1u32 => {
642                ::buffa::encoding::check_wire_type(
643                    tag,
644                    ::buffa::encoding::WireType::LengthDelimited,
645                )?;
646                ::buffa::types::merge_bytes(&mut self.payload, buf)?;
647            }
648            _ => {
649                self.__buffa_unknown_fields
650                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
651            }
652        }
653        ::core::result::Result::Ok(())
654    }
655    fn clear(&mut self) {
656        self.payload.clear();
657        self.__buffa_unknown_fields.clear();
658    }
659}
660impl ::buffa::ExtensionSet for PingRequest {
661    const PROTO_FQN: &'static str = "tradews.v1.PingRequest";
662    fn unknown_fields(&self) -> &::buffa::UnknownFields {
663        &self.__buffa_unknown_fields
664    }
665    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
666        &mut self.__buffa_unknown_fields
667    }
668}
669impl ::buffa::json_helpers::ProtoElemJson for PingRequest {
670    fn serialize_proto_json<S: ::serde::Serializer>(
671        v: &Self,
672        s: S,
673    ) -> ::core::result::Result<S::Ok, S::Error> {
674        ::serde::Serialize::serialize(v, s)
675    }
676    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
677        d: D,
678    ) -> ::core::result::Result<Self, D::Error> {
679        <Self as ::serde::Deserialize>::deserialize(d)
680    }
681}
682#[doc(hidden)]
683pub const __PING_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
684    type_url: "type.googleapis.com/tradews.v1.PingRequest",
685    to_json: ::buffa::type_registry::any_to_json::<PingRequest>,
686    from_json: ::buffa::type_registry::any_from_json::<PingRequest>,
687    is_wkt: false,
688};
689/// ServerFrame is the protobuf write-websocket response envelope.
690#[derive(Clone, PartialEq, Default)]
691#[derive(::serde::Serialize)]
692#[serde(default)]
693pub struct ServerFrame {
694    /// Client sequence number copied from the accepted or rejected frame.
695    ///
696    /// Field 1: `seq`
697    #[serde(
698        rename = "seq",
699        with = "::buffa::json_helpers::uint64",
700        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
701    )]
702    pub seq: u64,
703    /// Client correlation token copied from the accepted or rejected frame.
704    ///
705    /// Field 2: `correlation_id`
706    #[serde(
707        rename = "correlationId",
708        alias = "correlation_id",
709        with = "::buffa::json_helpers::proto_string",
710        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
711    )]
712    pub correlation_id: ::buffa::alloc::string::String,
713    #[serde(flatten)]
714    pub payload: ::core::option::Option<__buffa::oneof::server_frame::Payload>,
715    #[serde(skip)]
716    #[doc(hidden)]
717    pub __buffa_unknown_fields: ::buffa::UnknownFields,
718}
719impl ::core::fmt::Debug for ServerFrame {
720    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
721        f.debug_struct("ServerFrame")
722            .field("seq", &self.seq)
723            .field("correlation_id", &self.correlation_id)
724            .field("payload", &self.payload)
725            .finish()
726    }
727}
728impl ServerFrame {
729    /// Protobuf type URL for this message, for use with `Any::pack` and
730    /// `Any::unpack_if`.
731    ///
732    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
733    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.ServerFrame";
734}
735::buffa::impl_default_instance!(ServerFrame);
736impl ::buffa::MessageName for ServerFrame {
737    const PACKAGE: &'static str = "tradews.v1";
738    const NAME: &'static str = "ServerFrame";
739    const FULL_NAME: &'static str = "tradews.v1.ServerFrame";
740    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.ServerFrame";
741}
742impl ::buffa::Message for ServerFrame {
743    /// Returns the total encoded size in bytes.
744    ///
745    /// The result is a `u32`; the protobuf specification requires all
746    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
747    /// compliant message will never overflow this type.
748    #[allow(clippy::let_and_return)]
749    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
750        #[allow(unused_imports)]
751        use ::buffa::Enumeration as _;
752        let mut size = 0u32;
753        if self.seq != 0u64 {
754            size += 1u32 + ::buffa::types::uint64_encoded_len(self.seq) as u32;
755        }
756        if !self.correlation_id.is_empty() {
757            size
758                += 1u32
759                    + ::buffa::types::string_encoded_len(&self.correlation_id) as u32;
760        }
761        if let ::core::option::Option::Some(ref v) = self.payload {
762            match v {
763                __buffa::oneof::server_frame::Payload::Pong(x) => {
764                    let __slot = __cache.reserve();
765                    let inner = x.compute_size(__cache);
766                    __cache.set(__slot, inner);
767                    size
768                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
769                            + inner;
770                }
771                __buffa::oneof::server_frame::Payload::Ack(x) => {
772                    let __slot = __cache.reserve();
773                    let inner = x.compute_size(__cache);
774                    __cache.set(__slot, inner);
775                    size
776                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
777                            + inner;
778                }
779                __buffa::oneof::server_frame::Payload::Reject(x) => {
780                    let __slot = __cache.reserve();
781                    let inner = x.compute_size(__cache);
782                    __cache.set(__slot, inner);
783                    size
784                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
785                            + inner;
786                }
787                __buffa::oneof::server_frame::Payload::Overload(x) => {
788                    let __slot = __cache.reserve();
789                    let inner = x.compute_size(__cache);
790                    __cache.set(__slot, inner);
791                    size
792                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
793                            + inner;
794                }
795                __buffa::oneof::server_frame::Payload::Terminal(x) => {
796                    let __slot = __cache.reserve();
797                    let inner = x.compute_size(__cache);
798                    __cache.set(__slot, inner);
799                    size
800                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
801                            + inner;
802                }
803            }
804        }
805        size += self.__buffa_unknown_fields.encoded_len() as u32;
806        size
807    }
808    fn write_to(
809        &self,
810        __cache: &mut ::buffa::SizeCache,
811        buf: &mut impl ::buffa::bytes::BufMut,
812    ) {
813        #[allow(unused_imports)]
814        use ::buffa::Enumeration as _;
815        if self.seq != 0u64 {
816            ::buffa::types::put_uint64_field(1u32, self.seq, buf);
817        }
818        if !self.correlation_id.is_empty() {
819            ::buffa::types::put_string_field(2u32, &self.correlation_id, buf);
820        }
821        if let ::core::option::Option::Some(ref v) = self.payload {
822            match v {
823                __buffa::oneof::server_frame::Payload::Pong(x) => {
824                    ::buffa::types::put_len_delimited_header(
825                        10u32,
826                        __cache.consume_next(),
827                        buf,
828                    );
829                    x.write_to(__cache, buf);
830                }
831                __buffa::oneof::server_frame::Payload::Ack(x) => {
832                    ::buffa::types::put_len_delimited_header(
833                        11u32,
834                        __cache.consume_next(),
835                        buf,
836                    );
837                    x.write_to(__cache, buf);
838                }
839                __buffa::oneof::server_frame::Payload::Reject(x) => {
840                    ::buffa::types::put_len_delimited_header(
841                        12u32,
842                        __cache.consume_next(),
843                        buf,
844                    );
845                    x.write_to(__cache, buf);
846                }
847                __buffa::oneof::server_frame::Payload::Overload(x) => {
848                    ::buffa::types::put_len_delimited_header(
849                        13u32,
850                        __cache.consume_next(),
851                        buf,
852                    );
853                    x.write_to(__cache, buf);
854                }
855                __buffa::oneof::server_frame::Payload::Terminal(x) => {
856                    ::buffa::types::put_len_delimited_header(
857                        14u32,
858                        __cache.consume_next(),
859                        buf,
860                    );
861                    x.write_to(__cache, buf);
862                }
863            }
864        }
865        self.__buffa_unknown_fields.write_to(buf);
866    }
867    fn merge_field(
868        &mut self,
869        tag: ::buffa::encoding::Tag,
870        buf: &mut impl ::buffa::bytes::Buf,
871        ctx: ::buffa::DecodeContext<'_>,
872    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
873        #[allow(unused_imports)]
874        use ::buffa::bytes::Buf as _;
875        #[allow(unused_imports)]
876        use ::buffa::Enumeration as _;
877        match tag.field_number() {
878            1u32 => {
879                ::buffa::encoding::check_wire_type(
880                    tag,
881                    ::buffa::encoding::WireType::Varint,
882                )?;
883                self.seq = ::buffa::types::decode_uint64(buf)?;
884            }
885            2u32 => {
886                ::buffa::encoding::check_wire_type(
887                    tag,
888                    ::buffa::encoding::WireType::LengthDelimited,
889                )?;
890                ::buffa::types::merge_string(&mut self.correlation_id, buf)?;
891            }
892            10u32 => {
893                ::buffa::encoding::check_wire_type(
894                    tag,
895                    ::buffa::encoding::WireType::LengthDelimited,
896                )?;
897                if let ::core::option::Option::Some(
898                    __buffa::oneof::server_frame::Payload::Pong(ref mut existing),
899                ) = self.payload
900                {
901                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
902                } else {
903                    let mut val = ::core::default::Default::default();
904                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
905                    self.payload = ::core::option::Option::Some(
906                        __buffa::oneof::server_frame::Payload::Pong(
907                            ::buffa::alloc::boxed::Box::new(val),
908                        ),
909                    );
910                }
911            }
912            11u32 => {
913                ::buffa::encoding::check_wire_type(
914                    tag,
915                    ::buffa::encoding::WireType::LengthDelimited,
916                )?;
917                if let ::core::option::Option::Some(
918                    __buffa::oneof::server_frame::Payload::Ack(ref mut existing),
919                ) = self.payload
920                {
921                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
922                } else {
923                    let mut val = ::core::default::Default::default();
924                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
925                    self.payload = ::core::option::Option::Some(
926                        __buffa::oneof::server_frame::Payload::Ack(
927                            ::buffa::alloc::boxed::Box::new(val),
928                        ),
929                    );
930                }
931            }
932            12u32 => {
933                ::buffa::encoding::check_wire_type(
934                    tag,
935                    ::buffa::encoding::WireType::LengthDelimited,
936                )?;
937                if let ::core::option::Option::Some(
938                    __buffa::oneof::server_frame::Payload::Reject(ref mut existing),
939                ) = self.payload
940                {
941                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
942                } else {
943                    let mut val = ::core::default::Default::default();
944                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
945                    self.payload = ::core::option::Option::Some(
946                        __buffa::oneof::server_frame::Payload::Reject(
947                            ::buffa::alloc::boxed::Box::new(val),
948                        ),
949                    );
950                }
951            }
952            13u32 => {
953                ::buffa::encoding::check_wire_type(
954                    tag,
955                    ::buffa::encoding::WireType::LengthDelimited,
956                )?;
957                if let ::core::option::Option::Some(
958                    __buffa::oneof::server_frame::Payload::Overload(ref mut existing),
959                ) = self.payload
960                {
961                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
962                } else {
963                    let mut val = ::core::default::Default::default();
964                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
965                    self.payload = ::core::option::Option::Some(
966                        __buffa::oneof::server_frame::Payload::Overload(
967                            ::buffa::alloc::boxed::Box::new(val),
968                        ),
969                    );
970                }
971            }
972            14u32 => {
973                ::buffa::encoding::check_wire_type(
974                    tag,
975                    ::buffa::encoding::WireType::LengthDelimited,
976                )?;
977                if let ::core::option::Option::Some(
978                    __buffa::oneof::server_frame::Payload::Terminal(ref mut existing),
979                ) = self.payload
980                {
981                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
982                } else {
983                    let mut val = ::core::default::Default::default();
984                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
985                    self.payload = ::core::option::Option::Some(
986                        __buffa::oneof::server_frame::Payload::Terminal(
987                            ::buffa::alloc::boxed::Box::new(val),
988                        ),
989                    );
990                }
991            }
992            _ => {
993                self.__buffa_unknown_fields
994                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
995            }
996        }
997        ::core::result::Result::Ok(())
998    }
999    fn clear(&mut self) {
1000        self.seq = 0u64;
1001        self.correlation_id.clear();
1002        self.payload = ::core::option::Option::None;
1003        self.__buffa_unknown_fields.clear();
1004    }
1005}
1006impl ::buffa::ExtensionSet for ServerFrame {
1007    const PROTO_FQN: &'static str = "tradews.v1.ServerFrame";
1008    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1009        &self.__buffa_unknown_fields
1010    }
1011    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1012        &mut self.__buffa_unknown_fields
1013    }
1014}
1015impl<'de> serde::Deserialize<'de> for ServerFrame {
1016    fn deserialize<D: serde::Deserializer<'de>>(
1017        d: D,
1018    ) -> ::core::result::Result<Self, D::Error> {
1019        struct _V;
1020        impl<'de> serde::de::Visitor<'de> for _V {
1021            type Value = ServerFrame;
1022            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1023                f.write_str("struct ServerFrame")
1024            }
1025            #[allow(clippy::field_reassign_with_default)]
1026            fn visit_map<A: serde::de::MapAccess<'de>>(
1027                self,
1028                mut map: A,
1029            ) -> ::core::result::Result<ServerFrame, A::Error> {
1030                let mut __f_seq: ::core::option::Option<u64> = None;
1031                let mut __f_correlation_id: ::core::option::Option<
1032                    ::buffa::alloc::string::String,
1033                > = None;
1034                let mut __oneof_payload: ::core::option::Option<
1035                    __buffa::oneof::server_frame::Payload,
1036                > = None;
1037                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
1038                    match key.as_str() {
1039                        "seq" => {
1040                            __f_seq = Some({
1041                                struct _S;
1042                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
1043                                    type Value = u64;
1044                                    fn deserialize<D: serde::Deserializer<'de>>(
1045                                        self,
1046                                        d: D,
1047                                    ) -> ::core::result::Result<u64, D::Error> {
1048                                        ::buffa::json_helpers::uint64::deserialize(d)
1049                                    }
1050                                }
1051                                map.next_value_seed(_S)?
1052                            });
1053                        }
1054                        "correlationId" | "correlation_id" => {
1055                            __f_correlation_id = Some({
1056                                struct _S;
1057                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
1058                                    type Value = ::buffa::alloc::string::String;
1059                                    fn deserialize<D: serde::Deserializer<'de>>(
1060                                        self,
1061                                        d: D,
1062                                    ) -> ::core::result::Result<
1063                                        ::buffa::alloc::string::String,
1064                                        D::Error,
1065                                    > {
1066                                        ::buffa::json_helpers::proto_string::deserialize(d)
1067                                    }
1068                                }
1069                                map.next_value_seed(_S)?
1070                            });
1071                        }
1072                        "pong" => {
1073                            let v: ::core::option::Option<PongResponse> = map
1074                                .next_value_seed(
1075                                    ::buffa::json_helpers::NullableDeserializeSeed(
1076                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1077                                            PongResponse,
1078                                        >::new(),
1079                                    ),
1080                                )?;
1081                            if let Some(v) = v {
1082                                if __oneof_payload.is_some() {
1083                                    return Err(
1084                                        serde::de::Error::custom(
1085                                            "multiple oneof fields set for 'payload'",
1086                                        ),
1087                                    );
1088                                }
1089                                __oneof_payload = Some(
1090                                    __buffa::oneof::server_frame::Payload::Pong(
1091                                        ::buffa::alloc::boxed::Box::new(v),
1092                                    ),
1093                                );
1094                            }
1095                        }
1096                        "ack" => {
1097                            let v: ::core::option::Option<AckResponse> = map
1098                                .next_value_seed(
1099                                    ::buffa::json_helpers::NullableDeserializeSeed(
1100                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1101                                            AckResponse,
1102                                        >::new(),
1103                                    ),
1104                                )?;
1105                            if let Some(v) = v {
1106                                if __oneof_payload.is_some() {
1107                                    return Err(
1108                                        serde::de::Error::custom(
1109                                            "multiple oneof fields set for 'payload'",
1110                                        ),
1111                                    );
1112                                }
1113                                __oneof_payload = Some(
1114                                    __buffa::oneof::server_frame::Payload::Ack(
1115                                        ::buffa::alloc::boxed::Box::new(v),
1116                                    ),
1117                                );
1118                            }
1119                        }
1120                        "reject" => {
1121                            let v: ::core::option::Option<CommandReject> = map
1122                                .next_value_seed(
1123                                    ::buffa::json_helpers::NullableDeserializeSeed(
1124                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1125                                            CommandReject,
1126                                        >::new(),
1127                                    ),
1128                                )?;
1129                            if let Some(v) = v {
1130                                if __oneof_payload.is_some() {
1131                                    return Err(
1132                                        serde::de::Error::custom(
1133                                            "multiple oneof fields set for 'payload'",
1134                                        ),
1135                                    );
1136                                }
1137                                __oneof_payload = Some(
1138                                    __buffa::oneof::server_frame::Payload::Reject(
1139                                        ::buffa::alloc::boxed::Box::new(v),
1140                                    ),
1141                                );
1142                            }
1143                        }
1144                        "overload" => {
1145                            let v: ::core::option::Option<OverloadResponse> = map
1146                                .next_value_seed(
1147                                    ::buffa::json_helpers::NullableDeserializeSeed(
1148                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1149                                            OverloadResponse,
1150                                        >::new(),
1151                                    ),
1152                                )?;
1153                            if let Some(v) = v {
1154                                if __oneof_payload.is_some() {
1155                                    return Err(
1156                                        serde::de::Error::custom(
1157                                            "multiple oneof fields set for 'payload'",
1158                                        ),
1159                                    );
1160                                }
1161                                __oneof_payload = Some(
1162                                    __buffa::oneof::server_frame::Payload::Overload(
1163                                        ::buffa::alloc::boxed::Box::new(v),
1164                                    ),
1165                                );
1166                            }
1167                        }
1168                        "terminal" => {
1169                            let v: ::core::option::Option<TerminalSessionEvent> = map
1170                                .next_value_seed(
1171                                    ::buffa::json_helpers::NullableDeserializeSeed(
1172                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1173                                            TerminalSessionEvent,
1174                                        >::new(),
1175                                    ),
1176                                )?;
1177                            if let Some(v) = v {
1178                                if __oneof_payload.is_some() {
1179                                    return Err(
1180                                        serde::de::Error::custom(
1181                                            "multiple oneof fields set for 'payload'",
1182                                        ),
1183                                    );
1184                                }
1185                                __oneof_payload = Some(
1186                                    __buffa::oneof::server_frame::Payload::Terminal(
1187                                        ::buffa::alloc::boxed::Box::new(v),
1188                                    ),
1189                                );
1190                            }
1191                        }
1192                        _ => {
1193                            map.next_value::<serde::de::IgnoredAny>()?;
1194                        }
1195                    }
1196                }
1197                let mut __r = <ServerFrame as ::core::default::Default>::default();
1198                if let ::core::option::Option::Some(v) = __f_seq {
1199                    __r.seq = v;
1200                }
1201                if let ::core::option::Option::Some(v) = __f_correlation_id {
1202                    __r.correlation_id = v;
1203                }
1204                __r.payload = __oneof_payload;
1205                Ok(__r)
1206            }
1207        }
1208        d.deserialize_map(_V)
1209    }
1210}
1211impl ::buffa::json_helpers::ProtoElemJson for ServerFrame {
1212    fn serialize_proto_json<S: ::serde::Serializer>(
1213        v: &Self,
1214        s: S,
1215    ) -> ::core::result::Result<S::Ok, S::Error> {
1216        ::serde::Serialize::serialize(v, s)
1217    }
1218    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1219        d: D,
1220    ) -> ::core::result::Result<Self, D::Error> {
1221        <Self as ::serde::Deserialize>::deserialize(d)
1222    }
1223}
1224#[doc(hidden)]
1225pub const __SERVER_FRAME_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1226    type_url: "type.googleapis.com/tradews.v1.ServerFrame",
1227    to_json: ::buffa::type_registry::any_to_json::<ServerFrame>,
1228    from_json: ::buffa::type_registry::any_from_json::<ServerFrame>,
1229    is_wkt: false,
1230};
1231pub mod server_frame {
1232    #[allow(unused_imports)]
1233    use super::*;
1234    #[doc(inline)]
1235    pub use super::__buffa::oneof::server_frame::Payload;
1236    #[doc(inline)]
1237    pub use super::__buffa::view::oneof::server_frame::Payload as PayloadView;
1238}
1239/// PongResponse echoes a PingRequest payload.
1240#[derive(Clone, PartialEq, Default)]
1241#[derive(::serde::Serialize, ::serde::Deserialize)]
1242#[serde(default)]
1243pub struct PongResponse {
1244    /// Opaque payload copied from PingRequest.
1245    ///
1246    /// Field 1: `payload`
1247    #[serde(
1248        rename = "payload",
1249        with = "::buffa::json_helpers::bytes",
1250        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
1251    )]
1252    pub payload: ::buffa::alloc::vec::Vec<u8>,
1253    #[serde(skip)]
1254    #[doc(hidden)]
1255    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1256}
1257impl ::core::fmt::Debug for PongResponse {
1258    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1259        f.debug_struct("PongResponse").field("payload", &self.payload).finish()
1260    }
1261}
1262impl PongResponse {
1263    /// Protobuf type URL for this message, for use with `Any::pack` and
1264    /// `Any::unpack_if`.
1265    ///
1266    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1267    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.PongResponse";
1268}
1269::buffa::impl_default_instance!(PongResponse);
1270impl ::buffa::MessageName for PongResponse {
1271    const PACKAGE: &'static str = "tradews.v1";
1272    const NAME: &'static str = "PongResponse";
1273    const FULL_NAME: &'static str = "tradews.v1.PongResponse";
1274    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.PongResponse";
1275}
1276impl ::buffa::Message for PongResponse {
1277    /// Returns the total encoded size in bytes.
1278    ///
1279    /// The result is a `u32`; the protobuf specification requires all
1280    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1281    /// compliant message will never overflow this type.
1282    #[allow(clippy::let_and_return)]
1283    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1284        #[allow(unused_imports)]
1285        use ::buffa::Enumeration as _;
1286        let mut size = 0u32;
1287        if !self.payload.is_empty() {
1288            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.payload) as u32;
1289        }
1290        size += self.__buffa_unknown_fields.encoded_len() as u32;
1291        size
1292    }
1293    fn write_to(
1294        &self,
1295        _cache: &mut ::buffa::SizeCache,
1296        buf: &mut impl ::buffa::bytes::BufMut,
1297    ) {
1298        #[allow(unused_imports)]
1299        use ::buffa::Enumeration as _;
1300        if !self.payload.is_empty() {
1301            ::buffa::types::put_bytes_field(1u32, &self.payload, buf);
1302        }
1303        self.__buffa_unknown_fields.write_to(buf);
1304    }
1305    fn merge_field(
1306        &mut self,
1307        tag: ::buffa::encoding::Tag,
1308        buf: &mut impl ::buffa::bytes::Buf,
1309        ctx: ::buffa::DecodeContext<'_>,
1310    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1311        #[allow(unused_imports)]
1312        use ::buffa::bytes::Buf as _;
1313        #[allow(unused_imports)]
1314        use ::buffa::Enumeration as _;
1315        match tag.field_number() {
1316            1u32 => {
1317                ::buffa::encoding::check_wire_type(
1318                    tag,
1319                    ::buffa::encoding::WireType::LengthDelimited,
1320                )?;
1321                ::buffa::types::merge_bytes(&mut self.payload, buf)?;
1322            }
1323            _ => {
1324                self.__buffa_unknown_fields
1325                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1326            }
1327        }
1328        ::core::result::Result::Ok(())
1329    }
1330    fn clear(&mut self) {
1331        self.payload.clear();
1332        self.__buffa_unknown_fields.clear();
1333    }
1334}
1335impl ::buffa::ExtensionSet for PongResponse {
1336    const PROTO_FQN: &'static str = "tradews.v1.PongResponse";
1337    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1338        &self.__buffa_unknown_fields
1339    }
1340    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1341        &mut self.__buffa_unknown_fields
1342    }
1343}
1344impl ::buffa::json_helpers::ProtoElemJson for PongResponse {
1345    fn serialize_proto_json<S: ::serde::Serializer>(
1346        v: &Self,
1347        s: S,
1348    ) -> ::core::result::Result<S::Ok, S::Error> {
1349        ::serde::Serialize::serialize(v, s)
1350    }
1351    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1352        d: D,
1353    ) -> ::core::result::Result<Self, D::Error> {
1354        <Self as ::serde::Deserialize>::deserialize(d)
1355    }
1356}
1357#[doc(hidden)]
1358pub const __PONG_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1359    type_url: "type.googleapis.com/tradews.v1.PongResponse",
1360    to_json: ::buffa::type_registry::any_to_json::<PongResponse>,
1361    from_json: ::buffa::type_registry::any_from_json::<PongResponse>,
1362    is_wkt: false,
1363};
1364/// AckResponse carries the command-specific public Orders API acknowledgement.
1365#[derive(Clone, PartialEq, Default)]
1366#[derive(::serde::Serialize)]
1367#[serde(default)]
1368pub struct AckResponse {
1369    #[serde(flatten)]
1370    pub result: ::core::option::Option<__buffa::oneof::ack_response::Result>,
1371    #[serde(skip)]
1372    #[doc(hidden)]
1373    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1374}
1375impl ::core::fmt::Debug for AckResponse {
1376    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1377        f.debug_struct("AckResponse").field("result", &self.result).finish()
1378    }
1379}
1380impl AckResponse {
1381    /// Protobuf type URL for this message, for use with `Any::pack` and
1382    /// `Any::unpack_if`.
1383    ///
1384    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1385    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.AckResponse";
1386}
1387::buffa::impl_default_instance!(AckResponse);
1388impl ::buffa::MessageName for AckResponse {
1389    const PACKAGE: &'static str = "tradews.v1";
1390    const NAME: &'static str = "AckResponse";
1391    const FULL_NAME: &'static str = "tradews.v1.AckResponse";
1392    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.AckResponse";
1393}
1394impl ::buffa::Message for AckResponse {
1395    /// Returns the total encoded size in bytes.
1396    ///
1397    /// The result is a `u32`; the protobuf specification requires all
1398    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1399    /// compliant message will never overflow this type.
1400    #[allow(clippy::let_and_return)]
1401    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1402        #[allow(unused_imports)]
1403        use ::buffa::Enumeration as _;
1404        let mut size = 0u32;
1405        if let ::core::option::Option::Some(ref v) = self.result {
1406            match v {
1407                __buffa::oneof::ack_response::Result::CreateOrder(x) => {
1408                    let __slot = __cache.reserve();
1409                    let inner = x.compute_size(__cache);
1410                    __cache.set(__slot, inner);
1411                    size
1412                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1413                            + inner;
1414                }
1415                __buffa::oneof::ack_response::Result::CancelOrder(x) => {
1416                    let __slot = __cache.reserve();
1417                    let inner = x.compute_size(__cache);
1418                    __cache.set(__slot, inner);
1419                    size
1420                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1421                            + inner;
1422                }
1423                __buffa::oneof::ack_response::Result::ModifyOrder(x) => {
1424                    let __slot = __cache.reserve();
1425                    let inner = x.compute_size(__cache);
1426                    __cache.set(__slot, inner);
1427                    size
1428                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1429                            + inner;
1430                }
1431                __buffa::oneof::ack_response::Result::CancelAllOrders(x) => {
1432                    let __slot = __cache.reserve();
1433                    let inner = x.compute_size(__cache);
1434                    __cache.set(__slot, inner);
1435                    size
1436                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1437                            + inner;
1438                }
1439            }
1440        }
1441        size += self.__buffa_unknown_fields.encoded_len() as u32;
1442        size
1443    }
1444    fn write_to(
1445        &self,
1446        __cache: &mut ::buffa::SizeCache,
1447        buf: &mut impl ::buffa::bytes::BufMut,
1448    ) {
1449        #[allow(unused_imports)]
1450        use ::buffa::Enumeration as _;
1451        if let ::core::option::Option::Some(ref v) = self.result {
1452            match v {
1453                __buffa::oneof::ack_response::Result::CreateOrder(x) => {
1454                    ::buffa::types::put_len_delimited_header(
1455                        1u32,
1456                        __cache.consume_next(),
1457                        buf,
1458                    );
1459                    x.write_to(__cache, buf);
1460                }
1461                __buffa::oneof::ack_response::Result::CancelOrder(x) => {
1462                    ::buffa::types::put_len_delimited_header(
1463                        2u32,
1464                        __cache.consume_next(),
1465                        buf,
1466                    );
1467                    x.write_to(__cache, buf);
1468                }
1469                __buffa::oneof::ack_response::Result::ModifyOrder(x) => {
1470                    ::buffa::types::put_len_delimited_header(
1471                        3u32,
1472                        __cache.consume_next(),
1473                        buf,
1474                    );
1475                    x.write_to(__cache, buf);
1476                }
1477                __buffa::oneof::ack_response::Result::CancelAllOrders(x) => {
1478                    ::buffa::types::put_len_delimited_header(
1479                        4u32,
1480                        __cache.consume_next(),
1481                        buf,
1482                    );
1483                    x.write_to(__cache, buf);
1484                }
1485            }
1486        }
1487        self.__buffa_unknown_fields.write_to(buf);
1488    }
1489    fn merge_field(
1490        &mut self,
1491        tag: ::buffa::encoding::Tag,
1492        buf: &mut impl ::buffa::bytes::Buf,
1493        ctx: ::buffa::DecodeContext<'_>,
1494    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1495        #[allow(unused_imports)]
1496        use ::buffa::bytes::Buf as _;
1497        #[allow(unused_imports)]
1498        use ::buffa::Enumeration as _;
1499        match tag.field_number() {
1500            1u32 => {
1501                ::buffa::encoding::check_wire_type(
1502                    tag,
1503                    ::buffa::encoding::WireType::LengthDelimited,
1504                )?;
1505                if let ::core::option::Option::Some(
1506                    __buffa::oneof::ack_response::Result::CreateOrder(ref mut existing),
1507                ) = self.result
1508                {
1509                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1510                } else {
1511                    let mut val = ::core::default::Default::default();
1512                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1513                    self.result = ::core::option::Option::Some(
1514                        __buffa::oneof::ack_response::Result::CreateOrder(
1515                            ::buffa::alloc::boxed::Box::new(val),
1516                        ),
1517                    );
1518                }
1519            }
1520            2u32 => {
1521                ::buffa::encoding::check_wire_type(
1522                    tag,
1523                    ::buffa::encoding::WireType::LengthDelimited,
1524                )?;
1525                if let ::core::option::Option::Some(
1526                    __buffa::oneof::ack_response::Result::CancelOrder(ref mut existing),
1527                ) = self.result
1528                {
1529                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1530                } else {
1531                    let mut val = ::core::default::Default::default();
1532                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1533                    self.result = ::core::option::Option::Some(
1534                        __buffa::oneof::ack_response::Result::CancelOrder(
1535                            ::buffa::alloc::boxed::Box::new(val),
1536                        ),
1537                    );
1538                }
1539            }
1540            3u32 => {
1541                ::buffa::encoding::check_wire_type(
1542                    tag,
1543                    ::buffa::encoding::WireType::LengthDelimited,
1544                )?;
1545                if let ::core::option::Option::Some(
1546                    __buffa::oneof::ack_response::Result::ModifyOrder(ref mut existing),
1547                ) = self.result
1548                {
1549                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1550                } else {
1551                    let mut val = ::core::default::Default::default();
1552                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1553                    self.result = ::core::option::Option::Some(
1554                        __buffa::oneof::ack_response::Result::ModifyOrder(
1555                            ::buffa::alloc::boxed::Box::new(val),
1556                        ),
1557                    );
1558                }
1559            }
1560            4u32 => {
1561                ::buffa::encoding::check_wire_type(
1562                    tag,
1563                    ::buffa::encoding::WireType::LengthDelimited,
1564                )?;
1565                if let ::core::option::Option::Some(
1566                    __buffa::oneof::ack_response::Result::CancelAllOrders(
1567                        ref mut existing,
1568                    ),
1569                ) = self.result
1570                {
1571                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1572                } else {
1573                    let mut val = ::core::default::Default::default();
1574                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1575                    self.result = ::core::option::Option::Some(
1576                        __buffa::oneof::ack_response::Result::CancelAllOrders(
1577                            ::buffa::alloc::boxed::Box::new(val),
1578                        ),
1579                    );
1580                }
1581            }
1582            _ => {
1583                self.__buffa_unknown_fields
1584                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1585            }
1586        }
1587        ::core::result::Result::Ok(())
1588    }
1589    fn clear(&mut self) {
1590        self.result = ::core::option::Option::None;
1591        self.__buffa_unknown_fields.clear();
1592    }
1593}
1594impl ::buffa::ExtensionSet for AckResponse {
1595    const PROTO_FQN: &'static str = "tradews.v1.AckResponse";
1596    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1597        &self.__buffa_unknown_fields
1598    }
1599    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1600        &mut self.__buffa_unknown_fields
1601    }
1602}
1603impl<'de> serde::Deserialize<'de> for AckResponse {
1604    fn deserialize<D: serde::Deserializer<'de>>(
1605        d: D,
1606    ) -> ::core::result::Result<Self, D::Error> {
1607        struct _V;
1608        impl<'de> serde::de::Visitor<'de> for _V {
1609            type Value = AckResponse;
1610            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1611                f.write_str("struct AckResponse")
1612            }
1613            #[allow(clippy::field_reassign_with_default)]
1614            fn visit_map<A: serde::de::MapAccess<'de>>(
1615                self,
1616                mut map: A,
1617            ) -> ::core::result::Result<AckResponse, A::Error> {
1618                let mut __oneof_result: ::core::option::Option<
1619                    __buffa::oneof::ack_response::Result,
1620                > = None;
1621                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
1622                    match key.as_str() {
1623                        "createOrder" | "create_order" => {
1624                            let v: ::core::option::Option<
1625                                super::super::orders::v1::CreateOrderResponse,
1626                            > = map
1627                                .next_value_seed(
1628                                    ::buffa::json_helpers::NullableDeserializeSeed(
1629                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1630                                            super::super::orders::v1::CreateOrderResponse,
1631                                        >::new(),
1632                                    ),
1633                                )?;
1634                            if let Some(v) = v {
1635                                if __oneof_result.is_some() {
1636                                    return Err(
1637                                        serde::de::Error::custom(
1638                                            "multiple oneof fields set for 'result'",
1639                                        ),
1640                                    );
1641                                }
1642                                __oneof_result = Some(
1643                                    __buffa::oneof::ack_response::Result::CreateOrder(
1644                                        ::buffa::alloc::boxed::Box::new(v),
1645                                    ),
1646                                );
1647                            }
1648                        }
1649                        "cancelOrder" | "cancel_order" => {
1650                            let v: ::core::option::Option<
1651                                super::super::orders::v1::CancelOrderResponse,
1652                            > = map
1653                                .next_value_seed(
1654                                    ::buffa::json_helpers::NullableDeserializeSeed(
1655                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1656                                            super::super::orders::v1::CancelOrderResponse,
1657                                        >::new(),
1658                                    ),
1659                                )?;
1660                            if let Some(v) = v {
1661                                if __oneof_result.is_some() {
1662                                    return Err(
1663                                        serde::de::Error::custom(
1664                                            "multiple oneof fields set for 'result'",
1665                                        ),
1666                                    );
1667                                }
1668                                __oneof_result = Some(
1669                                    __buffa::oneof::ack_response::Result::CancelOrder(
1670                                        ::buffa::alloc::boxed::Box::new(v),
1671                                    ),
1672                                );
1673                            }
1674                        }
1675                        "modifyOrder" | "modify_order" => {
1676                            let v: ::core::option::Option<
1677                                super::super::orders::v1::ModifyOrderResponse,
1678                            > = map
1679                                .next_value_seed(
1680                                    ::buffa::json_helpers::NullableDeserializeSeed(
1681                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1682                                            super::super::orders::v1::ModifyOrderResponse,
1683                                        >::new(),
1684                                    ),
1685                                )?;
1686                            if let Some(v) = v {
1687                                if __oneof_result.is_some() {
1688                                    return Err(
1689                                        serde::de::Error::custom(
1690                                            "multiple oneof fields set for 'result'",
1691                                        ),
1692                                    );
1693                                }
1694                                __oneof_result = Some(
1695                                    __buffa::oneof::ack_response::Result::ModifyOrder(
1696                                        ::buffa::alloc::boxed::Box::new(v),
1697                                    ),
1698                                );
1699                            }
1700                        }
1701                        "cancelAllOrders" | "cancel_all_orders" => {
1702                            let v: ::core::option::Option<
1703                                super::super::orders::v1::CancelAllOrdersResponse,
1704                            > = map
1705                                .next_value_seed(
1706                                    ::buffa::json_helpers::NullableDeserializeSeed(
1707                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1708                                            super::super::orders::v1::CancelAllOrdersResponse,
1709                                        >::new(),
1710                                    ),
1711                                )?;
1712                            if let Some(v) = v {
1713                                if __oneof_result.is_some() {
1714                                    return Err(
1715                                        serde::de::Error::custom(
1716                                            "multiple oneof fields set for 'result'",
1717                                        ),
1718                                    );
1719                                }
1720                                __oneof_result = Some(
1721                                    __buffa::oneof::ack_response::Result::CancelAllOrders(
1722                                        ::buffa::alloc::boxed::Box::new(v),
1723                                    ),
1724                                );
1725                            }
1726                        }
1727                        _ => {
1728                            map.next_value::<serde::de::IgnoredAny>()?;
1729                        }
1730                    }
1731                }
1732                let mut __r = <AckResponse as ::core::default::Default>::default();
1733                __r.result = __oneof_result;
1734                Ok(__r)
1735            }
1736        }
1737        d.deserialize_map(_V)
1738    }
1739}
1740impl ::buffa::json_helpers::ProtoElemJson for AckResponse {
1741    fn serialize_proto_json<S: ::serde::Serializer>(
1742        v: &Self,
1743        s: S,
1744    ) -> ::core::result::Result<S::Ok, S::Error> {
1745        ::serde::Serialize::serialize(v, s)
1746    }
1747    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1748        d: D,
1749    ) -> ::core::result::Result<Self, D::Error> {
1750        <Self as ::serde::Deserialize>::deserialize(d)
1751    }
1752}
1753#[doc(hidden)]
1754pub const __ACK_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1755    type_url: "type.googleapis.com/tradews.v1.AckResponse",
1756    to_json: ::buffa::type_registry::any_to_json::<AckResponse>,
1757    from_json: ::buffa::type_registry::any_from_json::<AckResponse>,
1758    is_wkt: false,
1759};
1760pub mod ack_response {
1761    #[allow(unused_imports)]
1762    use super::*;
1763    #[doc(inline)]
1764    pub use super::__buffa::oneof::ack_response::Result;
1765    #[doc(inline)]
1766    pub use super::__buffa::view::oneof::ack_response::Result as ResultView;
1767}
1768/// CommandReject reports a command-level failure without closing the session.
1769#[derive(Clone, PartialEq, Default)]
1770#[derive(::serde::Serialize, ::serde::Deserialize)]
1771#[serde(default)]
1772pub struct CommandReject {
1773    /// Stable machine-readable reject code.
1774    ///
1775    /// Field 1: `code`
1776    #[serde(
1777        rename = "code",
1778        with = "::buffa::json_helpers::proto_string",
1779        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1780    )]
1781    pub code: ::buffa::alloc::string::String,
1782    /// Client-safe diagnostic detail.
1783    ///
1784    /// Field 2: `detail`
1785    #[serde(
1786        rename = "detail",
1787        with = "::buffa::json_helpers::proto_string",
1788        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1789    )]
1790    pub detail: ::buffa::alloc::string::String,
1791    #[serde(skip)]
1792    #[doc(hidden)]
1793    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1794}
1795impl ::core::fmt::Debug for CommandReject {
1796    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1797        f.debug_struct("CommandReject")
1798            .field("code", &self.code)
1799            .field("detail", &self.detail)
1800            .finish()
1801    }
1802}
1803impl CommandReject {
1804    /// Protobuf type URL for this message, for use with `Any::pack` and
1805    /// `Any::unpack_if`.
1806    ///
1807    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1808    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.CommandReject";
1809}
1810::buffa::impl_default_instance!(CommandReject);
1811impl ::buffa::MessageName for CommandReject {
1812    const PACKAGE: &'static str = "tradews.v1";
1813    const NAME: &'static str = "CommandReject";
1814    const FULL_NAME: &'static str = "tradews.v1.CommandReject";
1815    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.CommandReject";
1816}
1817impl ::buffa::Message for CommandReject {
1818    /// Returns the total encoded size in bytes.
1819    ///
1820    /// The result is a `u32`; the protobuf specification requires all
1821    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1822    /// compliant message will never overflow this type.
1823    #[allow(clippy::let_and_return)]
1824    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1825        #[allow(unused_imports)]
1826        use ::buffa::Enumeration as _;
1827        let mut size = 0u32;
1828        if !self.code.is_empty() {
1829            size += 1u32 + ::buffa::types::string_encoded_len(&self.code) as u32;
1830        }
1831        if !self.detail.is_empty() {
1832            size += 1u32 + ::buffa::types::string_encoded_len(&self.detail) as u32;
1833        }
1834        size += self.__buffa_unknown_fields.encoded_len() as u32;
1835        size
1836    }
1837    fn write_to(
1838        &self,
1839        _cache: &mut ::buffa::SizeCache,
1840        buf: &mut impl ::buffa::bytes::BufMut,
1841    ) {
1842        #[allow(unused_imports)]
1843        use ::buffa::Enumeration as _;
1844        if !self.code.is_empty() {
1845            ::buffa::types::put_string_field(1u32, &self.code, buf);
1846        }
1847        if !self.detail.is_empty() {
1848            ::buffa::types::put_string_field(2u32, &self.detail, buf);
1849        }
1850        self.__buffa_unknown_fields.write_to(buf);
1851    }
1852    fn merge_field(
1853        &mut self,
1854        tag: ::buffa::encoding::Tag,
1855        buf: &mut impl ::buffa::bytes::Buf,
1856        ctx: ::buffa::DecodeContext<'_>,
1857    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1858        #[allow(unused_imports)]
1859        use ::buffa::bytes::Buf as _;
1860        #[allow(unused_imports)]
1861        use ::buffa::Enumeration as _;
1862        match tag.field_number() {
1863            1u32 => {
1864                ::buffa::encoding::check_wire_type(
1865                    tag,
1866                    ::buffa::encoding::WireType::LengthDelimited,
1867                )?;
1868                ::buffa::types::merge_string(&mut self.code, buf)?;
1869            }
1870            2u32 => {
1871                ::buffa::encoding::check_wire_type(
1872                    tag,
1873                    ::buffa::encoding::WireType::LengthDelimited,
1874                )?;
1875                ::buffa::types::merge_string(&mut self.detail, buf)?;
1876            }
1877            _ => {
1878                self.__buffa_unknown_fields
1879                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1880            }
1881        }
1882        ::core::result::Result::Ok(())
1883    }
1884    fn clear(&mut self) {
1885        self.code.clear();
1886        self.detail.clear();
1887        self.__buffa_unknown_fields.clear();
1888    }
1889}
1890impl ::buffa::ExtensionSet for CommandReject {
1891    const PROTO_FQN: &'static str = "tradews.v1.CommandReject";
1892    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1893        &self.__buffa_unknown_fields
1894    }
1895    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1896        &mut self.__buffa_unknown_fields
1897    }
1898}
1899impl ::buffa::json_helpers::ProtoElemJson for CommandReject {
1900    fn serialize_proto_json<S: ::serde::Serializer>(
1901        v: &Self,
1902        s: S,
1903    ) -> ::core::result::Result<S::Ok, S::Error> {
1904        ::serde::Serialize::serialize(v, s)
1905    }
1906    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1907        d: D,
1908    ) -> ::core::result::Result<Self, D::Error> {
1909        <Self as ::serde::Deserialize>::deserialize(d)
1910    }
1911}
1912#[doc(hidden)]
1913pub const __COMMAND_REJECT_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1914    type_url: "type.googleapis.com/tradews.v1.CommandReject",
1915    to_json: ::buffa::type_registry::any_to_json::<CommandReject>,
1916    from_json: ::buffa::type_registry::any_from_json::<CommandReject>,
1917    is_wkt: false,
1918};
1919/// OverloadResponse reports that the session exceeded server admission limits.
1920#[derive(Clone, PartialEq, Default)]
1921#[derive(::serde::Serialize, ::serde::Deserialize)]
1922#[serde(default)]
1923pub struct OverloadResponse {
1924    /// Stable machine-readable overload code.
1925    ///
1926    /// Field 1: `code`
1927    #[serde(
1928        rename = "code",
1929        with = "::buffa::json_helpers::proto_string",
1930        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1931    )]
1932    pub code: ::buffa::alloc::string::String,
1933    /// Client-safe diagnostic detail.
1934    ///
1935    /// Field 2: `detail`
1936    #[serde(
1937        rename = "detail",
1938        with = "::buffa::json_helpers::proto_string",
1939        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1940    )]
1941    pub detail: ::buffa::alloc::string::String,
1942    #[serde(skip)]
1943    #[doc(hidden)]
1944    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1945}
1946impl ::core::fmt::Debug for OverloadResponse {
1947    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1948        f.debug_struct("OverloadResponse")
1949            .field("code", &self.code)
1950            .field("detail", &self.detail)
1951            .finish()
1952    }
1953}
1954impl OverloadResponse {
1955    /// Protobuf type URL for this message, for use with `Any::pack` and
1956    /// `Any::unpack_if`.
1957    ///
1958    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1959    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.OverloadResponse";
1960}
1961::buffa::impl_default_instance!(OverloadResponse);
1962impl ::buffa::MessageName for OverloadResponse {
1963    const PACKAGE: &'static str = "tradews.v1";
1964    const NAME: &'static str = "OverloadResponse";
1965    const FULL_NAME: &'static str = "tradews.v1.OverloadResponse";
1966    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.OverloadResponse";
1967}
1968impl ::buffa::Message for OverloadResponse {
1969    /// Returns the total encoded size in bytes.
1970    ///
1971    /// The result is a `u32`; the protobuf specification requires all
1972    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1973    /// compliant message will never overflow this type.
1974    #[allow(clippy::let_and_return)]
1975    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1976        #[allow(unused_imports)]
1977        use ::buffa::Enumeration as _;
1978        let mut size = 0u32;
1979        if !self.code.is_empty() {
1980            size += 1u32 + ::buffa::types::string_encoded_len(&self.code) as u32;
1981        }
1982        if !self.detail.is_empty() {
1983            size += 1u32 + ::buffa::types::string_encoded_len(&self.detail) as u32;
1984        }
1985        size += self.__buffa_unknown_fields.encoded_len() as u32;
1986        size
1987    }
1988    fn write_to(
1989        &self,
1990        _cache: &mut ::buffa::SizeCache,
1991        buf: &mut impl ::buffa::bytes::BufMut,
1992    ) {
1993        #[allow(unused_imports)]
1994        use ::buffa::Enumeration as _;
1995        if !self.code.is_empty() {
1996            ::buffa::types::put_string_field(1u32, &self.code, buf);
1997        }
1998        if !self.detail.is_empty() {
1999            ::buffa::types::put_string_field(2u32, &self.detail, buf);
2000        }
2001        self.__buffa_unknown_fields.write_to(buf);
2002    }
2003    fn merge_field(
2004        &mut self,
2005        tag: ::buffa::encoding::Tag,
2006        buf: &mut impl ::buffa::bytes::Buf,
2007        ctx: ::buffa::DecodeContext<'_>,
2008    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2009        #[allow(unused_imports)]
2010        use ::buffa::bytes::Buf as _;
2011        #[allow(unused_imports)]
2012        use ::buffa::Enumeration as _;
2013        match tag.field_number() {
2014            1u32 => {
2015                ::buffa::encoding::check_wire_type(
2016                    tag,
2017                    ::buffa::encoding::WireType::LengthDelimited,
2018                )?;
2019                ::buffa::types::merge_string(&mut self.code, buf)?;
2020            }
2021            2u32 => {
2022                ::buffa::encoding::check_wire_type(
2023                    tag,
2024                    ::buffa::encoding::WireType::LengthDelimited,
2025                )?;
2026                ::buffa::types::merge_string(&mut self.detail, buf)?;
2027            }
2028            _ => {
2029                self.__buffa_unknown_fields
2030                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2031            }
2032        }
2033        ::core::result::Result::Ok(())
2034    }
2035    fn clear(&mut self) {
2036        self.code.clear();
2037        self.detail.clear();
2038        self.__buffa_unknown_fields.clear();
2039    }
2040}
2041impl ::buffa::ExtensionSet for OverloadResponse {
2042    const PROTO_FQN: &'static str = "tradews.v1.OverloadResponse";
2043    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2044        &self.__buffa_unknown_fields
2045    }
2046    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2047        &mut self.__buffa_unknown_fields
2048    }
2049}
2050impl ::buffa::json_helpers::ProtoElemJson for OverloadResponse {
2051    fn serialize_proto_json<S: ::serde::Serializer>(
2052        v: &Self,
2053        s: S,
2054    ) -> ::core::result::Result<S::Ok, S::Error> {
2055        ::serde::Serialize::serialize(v, s)
2056    }
2057    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2058        d: D,
2059    ) -> ::core::result::Result<Self, D::Error> {
2060        <Self as ::serde::Deserialize>::deserialize(d)
2061    }
2062}
2063#[doc(hidden)]
2064pub const __OVERLOAD_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2065    type_url: "type.googleapis.com/tradews.v1.OverloadResponse",
2066    to_json: ::buffa::type_registry::any_to_json::<OverloadResponse>,
2067    from_json: ::buffa::type_registry::any_from_json::<OverloadResponse>,
2068    is_wkt: false,
2069};
2070/// TerminalSessionEvent reports a terminal session condition.
2071#[derive(Clone, PartialEq, Default)]
2072#[derive(::serde::Serialize, ::serde::Deserialize)]
2073#[serde(default)]
2074pub struct TerminalSessionEvent {
2075    /// Stable machine-readable terminal code.
2076    ///
2077    /// Field 1: `code`
2078    #[serde(
2079        rename = "code",
2080        with = "::buffa::json_helpers::proto_string",
2081        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2082    )]
2083    pub code: ::buffa::alloc::string::String,
2084    /// Client-safe diagnostic detail.
2085    ///
2086    /// Field 2: `detail`
2087    #[serde(
2088        rename = "detail",
2089        with = "::buffa::json_helpers::proto_string",
2090        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2091    )]
2092    pub detail: ::buffa::alloc::string::String,
2093    #[serde(skip)]
2094    #[doc(hidden)]
2095    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2096}
2097impl ::core::fmt::Debug for TerminalSessionEvent {
2098    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2099        f.debug_struct("TerminalSessionEvent")
2100            .field("code", &self.code)
2101            .field("detail", &self.detail)
2102            .finish()
2103    }
2104}
2105impl TerminalSessionEvent {
2106    /// Protobuf type URL for this message, for use with `Any::pack` and
2107    /// `Any::unpack_if`.
2108    ///
2109    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2110    pub const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.TerminalSessionEvent";
2111}
2112::buffa::impl_default_instance!(TerminalSessionEvent);
2113impl ::buffa::MessageName for TerminalSessionEvent {
2114    const PACKAGE: &'static str = "tradews.v1";
2115    const NAME: &'static str = "TerminalSessionEvent";
2116    const FULL_NAME: &'static str = "tradews.v1.TerminalSessionEvent";
2117    const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.TerminalSessionEvent";
2118}
2119impl ::buffa::Message for TerminalSessionEvent {
2120    /// Returns the total encoded size in bytes.
2121    ///
2122    /// The result is a `u32`; the protobuf specification requires all
2123    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2124    /// compliant message will never overflow this type.
2125    #[allow(clippy::let_and_return)]
2126    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2127        #[allow(unused_imports)]
2128        use ::buffa::Enumeration as _;
2129        let mut size = 0u32;
2130        if !self.code.is_empty() {
2131            size += 1u32 + ::buffa::types::string_encoded_len(&self.code) as u32;
2132        }
2133        if !self.detail.is_empty() {
2134            size += 1u32 + ::buffa::types::string_encoded_len(&self.detail) as u32;
2135        }
2136        size += self.__buffa_unknown_fields.encoded_len() as u32;
2137        size
2138    }
2139    fn write_to(
2140        &self,
2141        _cache: &mut ::buffa::SizeCache,
2142        buf: &mut impl ::buffa::bytes::BufMut,
2143    ) {
2144        #[allow(unused_imports)]
2145        use ::buffa::Enumeration as _;
2146        if !self.code.is_empty() {
2147            ::buffa::types::put_string_field(1u32, &self.code, buf);
2148        }
2149        if !self.detail.is_empty() {
2150            ::buffa::types::put_string_field(2u32, &self.detail, buf);
2151        }
2152        self.__buffa_unknown_fields.write_to(buf);
2153    }
2154    fn merge_field(
2155        &mut self,
2156        tag: ::buffa::encoding::Tag,
2157        buf: &mut impl ::buffa::bytes::Buf,
2158        ctx: ::buffa::DecodeContext<'_>,
2159    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2160        #[allow(unused_imports)]
2161        use ::buffa::bytes::Buf as _;
2162        #[allow(unused_imports)]
2163        use ::buffa::Enumeration as _;
2164        match tag.field_number() {
2165            1u32 => {
2166                ::buffa::encoding::check_wire_type(
2167                    tag,
2168                    ::buffa::encoding::WireType::LengthDelimited,
2169                )?;
2170                ::buffa::types::merge_string(&mut self.code, buf)?;
2171            }
2172            2u32 => {
2173                ::buffa::encoding::check_wire_type(
2174                    tag,
2175                    ::buffa::encoding::WireType::LengthDelimited,
2176                )?;
2177                ::buffa::types::merge_string(&mut self.detail, buf)?;
2178            }
2179            _ => {
2180                self.__buffa_unknown_fields
2181                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2182            }
2183        }
2184        ::core::result::Result::Ok(())
2185    }
2186    fn clear(&mut self) {
2187        self.code.clear();
2188        self.detail.clear();
2189        self.__buffa_unknown_fields.clear();
2190    }
2191}
2192impl ::buffa::ExtensionSet for TerminalSessionEvent {
2193    const PROTO_FQN: &'static str = "tradews.v1.TerminalSessionEvent";
2194    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2195        &self.__buffa_unknown_fields
2196    }
2197    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2198        &mut self.__buffa_unknown_fields
2199    }
2200}
2201impl ::buffa::json_helpers::ProtoElemJson for TerminalSessionEvent {
2202    fn serialize_proto_json<S: ::serde::Serializer>(
2203        v: &Self,
2204        s: S,
2205    ) -> ::core::result::Result<S::Ok, S::Error> {
2206        ::serde::Serialize::serialize(v, s)
2207    }
2208    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2209        d: D,
2210    ) -> ::core::result::Result<Self, D::Error> {
2211        <Self as ::serde::Deserialize>::deserialize(d)
2212    }
2213}
2214#[doc(hidden)]
2215pub const __TERMINAL_SESSION_EVENT_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2216    type_url: "type.googleapis.com/tradews.v1.TerminalSessionEvent",
2217    to_json: ::buffa::type_registry::any_to_json::<TerminalSessionEvent>,
2218    from_json: ::buffa::type_registry::any_from_json::<TerminalSessionEvent>,
2219    is_wkt: false,
2220};
2221#[allow(
2222    non_camel_case_types,
2223    dead_code,
2224    unused_imports,
2225    unused_qualifications,
2226    clippy::derivable_impls,
2227    clippy::match_single_binding,
2228    clippy::uninlined_format_args,
2229    clippy::doc_lazy_continuation,
2230    clippy::module_inception
2231)]
2232pub mod __buffa {
2233    #[allow(unused_imports)]
2234    use super::*;
2235    pub mod view {
2236        #[allow(unused_imports)]
2237        use super::*;
2238        /// ClientFrame is the protobuf write-websocket envelope. Its payloads reuse the
2239        /// public Orders API request contracts so every transport shares one order model.
2240        #[derive(Clone, Debug, Default)]
2241        pub struct ClientFrameView<'a> {
2242            /// Monotonic per-connection client sequence number, starting at 1.
2243            ///
2244            /// Field 1: `seq`
2245            pub seq: u64,
2246            /// Client correlation token echoed in every server response.
2247            ///
2248            /// Field 2: `correlation_id`
2249            pub correlation_id: &'a str,
2250            pub payload: ::core::option::Option<
2251                super::super::__buffa::view::oneof::client_frame::Payload<'a>,
2252            >,
2253            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2254        }
2255        impl<'a> ::buffa::MessageView<'a> for ClientFrameView<'a> {
2256            type Owned = super::super::ClientFrame;
2257            fn decode_view(
2258                buf: &'a [u8],
2259            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2260                let __limit = ::core::cell::Cell::new(
2261                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
2262                );
2263                <Self as ::buffa::MessageView>::decode_view_ctx(
2264                    buf,
2265                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2266                )
2267            }
2268            fn decode_view_with_ctx(
2269                buf: &'a [u8],
2270                ctx: ::buffa::DecodeContext<'_>,
2271            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2272                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2273            }
2274            fn merge_view_field(
2275                &mut self,
2276                tag: ::buffa::encoding::Tag,
2277                cur: &'a [u8],
2278                before_tag: &'a [u8],
2279                ctx: ::buffa::DecodeContext<'_>,
2280            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2281                let _ = ctx;
2282                #[allow(unused_variables)]
2283                let view = self;
2284                let mut cur = cur;
2285                match tag.field_number() {
2286                    1u32 => {
2287                        ::buffa::encoding::check_wire_type(
2288                            tag,
2289                            ::buffa::encoding::WireType::Varint,
2290                        )?;
2291                        view.seq = ::buffa::types::decode_uint64(&mut cur)?;
2292                    }
2293                    2u32 => {
2294                        ::buffa::encoding::check_wire_type(
2295                            tag,
2296                            ::buffa::encoding::WireType::LengthDelimited,
2297                        )?;
2298                        view.correlation_id = ::buffa::types::borrow_str(&mut cur)?;
2299                    }
2300                    10u32 => {
2301                        ::buffa::encoding::check_wire_type(
2302                            tag,
2303                            ::buffa::encoding::WireType::LengthDelimited,
2304                        )?;
2305                        let __sub_ctx = ctx.descend()?;
2306                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2307                        if let Some(
2308                            super::super::__buffa::view::oneof::client_frame::Payload::Ping(
2309                                ref mut existing,
2310                            ),
2311                        ) = view.payload
2312                        {
2313                            ::buffa::MessageView::merge_into_view(
2314                                &mut **existing,
2315                                sub,
2316                                __sub_ctx,
2317                            )?;
2318                        } else {
2319                            view.payload = Some(
2320                                super::super::__buffa::view::oneof::client_frame::Payload::Ping(
2321                                    ::buffa::alloc::boxed::Box::new(
2322                                        <super::super::__buffa::view::PingRequestView as ::buffa::MessageView>::decode_view_ctx(
2323                                            sub,
2324                                            __sub_ctx,
2325                                        )?,
2326                                    ),
2327                                ),
2328                            );
2329                        }
2330                    }
2331                    11u32 => {
2332                        ::buffa::encoding::check_wire_type(
2333                            tag,
2334                            ::buffa::encoding::WireType::LengthDelimited,
2335                        )?;
2336                        let __sub_ctx = ctx.descend()?;
2337                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2338                        if let Some(
2339                            super::super::__buffa::view::oneof::client_frame::Payload::CreateOrder(
2340                                ref mut existing,
2341                            ),
2342                        ) = view.payload
2343                        {
2344                            ::buffa::MessageView::merge_into_view(
2345                                &mut **existing,
2346                                sub,
2347                                __sub_ctx,
2348                            )?;
2349                        } else {
2350                            view.payload = Some(
2351                                super::super::__buffa::view::oneof::client_frame::Payload::CreateOrder(
2352                                    ::buffa::alloc::boxed::Box::new(
2353                                        <super::super::super::super::orders::v1::__buffa::view::CreateOrderRequestView as ::buffa::MessageView>::decode_view_ctx(
2354                                            sub,
2355                                            __sub_ctx,
2356                                        )?,
2357                                    ),
2358                                ),
2359                            );
2360                        }
2361                    }
2362                    12u32 => {
2363                        ::buffa::encoding::check_wire_type(
2364                            tag,
2365                            ::buffa::encoding::WireType::LengthDelimited,
2366                        )?;
2367                        let __sub_ctx = ctx.descend()?;
2368                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2369                        if let Some(
2370                            super::super::__buffa::view::oneof::client_frame::Payload::CancelOrder(
2371                                ref mut existing,
2372                            ),
2373                        ) = view.payload
2374                        {
2375                            ::buffa::MessageView::merge_into_view(
2376                                &mut **existing,
2377                                sub,
2378                                __sub_ctx,
2379                            )?;
2380                        } else {
2381                            view.payload = Some(
2382                                super::super::__buffa::view::oneof::client_frame::Payload::CancelOrder(
2383                                    ::buffa::alloc::boxed::Box::new(
2384                                        <super::super::super::super::orders::v1::__buffa::view::CancelOrderRequestView as ::buffa::MessageView>::decode_view_ctx(
2385                                            sub,
2386                                            __sub_ctx,
2387                                        )?,
2388                                    ),
2389                                ),
2390                            );
2391                        }
2392                    }
2393                    13u32 => {
2394                        ::buffa::encoding::check_wire_type(
2395                            tag,
2396                            ::buffa::encoding::WireType::LengthDelimited,
2397                        )?;
2398                        let __sub_ctx = ctx.descend()?;
2399                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2400                        if let Some(
2401                            super::super::__buffa::view::oneof::client_frame::Payload::ModifyOrder(
2402                                ref mut existing,
2403                            ),
2404                        ) = view.payload
2405                        {
2406                            ::buffa::MessageView::merge_into_view(
2407                                &mut **existing,
2408                                sub,
2409                                __sub_ctx,
2410                            )?;
2411                        } else {
2412                            view.payload = Some(
2413                                super::super::__buffa::view::oneof::client_frame::Payload::ModifyOrder(
2414                                    ::buffa::alloc::boxed::Box::new(
2415                                        <super::super::super::super::orders::v1::__buffa::view::ModifyOrderRequestView as ::buffa::MessageView>::decode_view_ctx(
2416                                            sub,
2417                                            __sub_ctx,
2418                                        )?,
2419                                    ),
2420                                ),
2421                            );
2422                        }
2423                    }
2424                    14u32 => {
2425                        ::buffa::encoding::check_wire_type(
2426                            tag,
2427                            ::buffa::encoding::WireType::LengthDelimited,
2428                        )?;
2429                        let __sub_ctx = ctx.descend()?;
2430                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2431                        if let Some(
2432                            super::super::__buffa::view::oneof::client_frame::Payload::CancelAllOrders(
2433                                ref mut existing,
2434                            ),
2435                        ) = view.payload
2436                        {
2437                            ::buffa::MessageView::merge_into_view(
2438                                &mut **existing,
2439                                sub,
2440                                __sub_ctx,
2441                            )?;
2442                        } else {
2443                            view.payload = Some(
2444                                super::super::__buffa::view::oneof::client_frame::Payload::CancelAllOrders(
2445                                    ::buffa::alloc::boxed::Box::new(
2446                                        <super::super::super::super::orders::v1::__buffa::view::CancelAllOrdersRequestView as ::buffa::MessageView>::decode_view_ctx(
2447                                            sub,
2448                                            __sub_ctx,
2449                                        )?,
2450                                    ),
2451                                ),
2452                            );
2453                        }
2454                    }
2455                    _ => {
2456                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2457                        let span_len = before_tag.len() - cur.len();
2458                        view.__buffa_unknown_fields
2459                            .push_record(before_tag, span_len, ctx)?;
2460                    }
2461                }
2462                ::core::result::Result::Ok(cur)
2463            }
2464            fn to_owned_message(
2465                &self,
2466            ) -> ::core::result::Result<
2467                super::super::ClientFrame,
2468                ::buffa::DecodeError,
2469            > {
2470                self.to_owned_from_source(None)
2471            }
2472            #[allow(clippy::useless_conversion, clippy::needless_update)]
2473            fn to_owned_from_source(
2474                &self,
2475                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2476            ) -> ::core::result::Result<
2477                super::super::ClientFrame,
2478                ::buffa::DecodeError,
2479            > {
2480                #[allow(unused_imports)]
2481                use ::buffa::alloc::string::ToString as _;
2482                let _ = __buffa_src;
2483                ::core::result::Result::Ok(super::super::ClientFrame {
2484                    seq: self.seq,
2485                    correlation_id: self.correlation_id.to_string(),
2486                    payload: match self.payload.as_ref() {
2487                        ::core::option::Option::Some(v) => {
2488                            ::core::option::Option::Some(
2489                                match v {
2490                                    super::super::__buffa::view::oneof::client_frame::Payload::Ping(
2491                                        v,
2492                                    ) => {
2493                                        super::super::__buffa::oneof::client_frame::Payload::Ping(
2494                                            ::buffa::alloc::boxed::Box::new(
2495                                                v.to_owned_from_source(__buffa_src)?,
2496                                            ),
2497                                        )
2498                                    }
2499                                    super::super::__buffa::view::oneof::client_frame::Payload::CreateOrder(
2500                                        v,
2501                                    ) => {
2502                                        super::super::__buffa::oneof::client_frame::Payload::CreateOrder(
2503                                            ::buffa::alloc::boxed::Box::new(
2504                                                v.to_owned_from_source(__buffa_src)?,
2505                                            ),
2506                                        )
2507                                    }
2508                                    super::super::__buffa::view::oneof::client_frame::Payload::CancelOrder(
2509                                        v,
2510                                    ) => {
2511                                        super::super::__buffa::oneof::client_frame::Payload::CancelOrder(
2512                                            ::buffa::alloc::boxed::Box::new(
2513                                                v.to_owned_from_source(__buffa_src)?,
2514                                            ),
2515                                        )
2516                                    }
2517                                    super::super::__buffa::view::oneof::client_frame::Payload::ModifyOrder(
2518                                        v,
2519                                    ) => {
2520                                        super::super::__buffa::oneof::client_frame::Payload::ModifyOrder(
2521                                            ::buffa::alloc::boxed::Box::new(
2522                                                v.to_owned_from_source(__buffa_src)?,
2523                                            ),
2524                                        )
2525                                    }
2526                                    super::super::__buffa::view::oneof::client_frame::Payload::CancelAllOrders(
2527                                        v,
2528                                    ) => {
2529                                        super::super::__buffa::oneof::client_frame::Payload::CancelAllOrders(
2530                                            ::buffa::alloc::boxed::Box::new(
2531                                                v.to_owned_from_source(__buffa_src)?,
2532                                            ),
2533                                        )
2534                                    }
2535                                },
2536                            )
2537                        }
2538                        ::core::option::Option::None => ::core::option::Option::None,
2539                    },
2540                    __buffa_unknown_fields: self
2541                        .__buffa_unknown_fields
2542                        .to_owned()?
2543                        .into(),
2544                    ..::core::default::Default::default()
2545                })
2546            }
2547        }
2548        impl<'a> ::buffa::ViewEncode<'a> for ClientFrameView<'a> {
2549            #[allow(clippy::needless_borrow, clippy::let_and_return)]
2550            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2551                #[allow(unused_imports)]
2552                use ::buffa::Enumeration as _;
2553                let mut size = 0u32;
2554                if self.seq != 0u64 {
2555                    size += 1u32 + ::buffa::types::uint64_encoded_len(self.seq) as u32;
2556                }
2557                if !self.correlation_id.is_empty() {
2558                    size
2559                        += 1u32
2560                            + ::buffa::types::string_encoded_len(&self.correlation_id)
2561                                as u32;
2562                }
2563                if let ::core::option::Option::Some(ref v) = self.payload {
2564                    match v {
2565                        super::super::__buffa::view::oneof::client_frame::Payload::Ping(
2566                            x,
2567                        ) => {
2568                            let __slot = __cache.reserve();
2569                            let inner = x.compute_size(__cache);
2570                            __cache.set(__slot, inner);
2571                            size
2572                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
2573                                    + inner;
2574                        }
2575                        super::super::__buffa::view::oneof::client_frame::Payload::CreateOrder(
2576                            x,
2577                        ) => {
2578                            let __slot = __cache.reserve();
2579                            let inner = x.compute_size(__cache);
2580                            __cache.set(__slot, inner);
2581                            size
2582                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
2583                                    + inner;
2584                        }
2585                        super::super::__buffa::view::oneof::client_frame::Payload::CancelOrder(
2586                            x,
2587                        ) => {
2588                            let __slot = __cache.reserve();
2589                            let inner = x.compute_size(__cache);
2590                            __cache.set(__slot, inner);
2591                            size
2592                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
2593                                    + inner;
2594                        }
2595                        super::super::__buffa::view::oneof::client_frame::Payload::ModifyOrder(
2596                            x,
2597                        ) => {
2598                            let __slot = __cache.reserve();
2599                            let inner = x.compute_size(__cache);
2600                            __cache.set(__slot, inner);
2601                            size
2602                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
2603                                    + inner;
2604                        }
2605                        super::super::__buffa::view::oneof::client_frame::Payload::CancelAllOrders(
2606                            x,
2607                        ) => {
2608                            let __slot = __cache.reserve();
2609                            let inner = x.compute_size(__cache);
2610                            __cache.set(__slot, inner);
2611                            size
2612                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
2613                                    + inner;
2614                        }
2615                    }
2616                }
2617                size += self.__buffa_unknown_fields.encoded_len() as u32;
2618                size
2619            }
2620            #[allow(clippy::needless_borrow)]
2621            fn write_to(
2622                &self,
2623                __cache: &mut ::buffa::SizeCache,
2624                buf: &mut impl ::buffa::bytes::BufMut,
2625            ) {
2626                #[allow(unused_imports)]
2627                use ::buffa::Enumeration as _;
2628                if self.seq != 0u64 {
2629                    ::buffa::types::put_uint64_field(1u32, self.seq, buf);
2630                }
2631                if !self.correlation_id.is_empty() {
2632                    ::buffa::types::put_string_field(2u32, &self.correlation_id, buf);
2633                }
2634                if let ::core::option::Option::Some(ref v) = self.payload {
2635                    match v {
2636                        super::super::__buffa::view::oneof::client_frame::Payload::Ping(
2637                            x,
2638                        ) => {
2639                            ::buffa::types::put_len_delimited_header(
2640                                10u32,
2641                                __cache.consume_next(),
2642                                buf,
2643                            );
2644                            x.write_to(__cache, buf);
2645                        }
2646                        super::super::__buffa::view::oneof::client_frame::Payload::CreateOrder(
2647                            x,
2648                        ) => {
2649                            ::buffa::types::put_len_delimited_header(
2650                                11u32,
2651                                __cache.consume_next(),
2652                                buf,
2653                            );
2654                            x.write_to(__cache, buf);
2655                        }
2656                        super::super::__buffa::view::oneof::client_frame::Payload::CancelOrder(
2657                            x,
2658                        ) => {
2659                            ::buffa::types::put_len_delimited_header(
2660                                12u32,
2661                                __cache.consume_next(),
2662                                buf,
2663                            );
2664                            x.write_to(__cache, buf);
2665                        }
2666                        super::super::__buffa::view::oneof::client_frame::Payload::ModifyOrder(
2667                            x,
2668                        ) => {
2669                            ::buffa::types::put_len_delimited_header(
2670                                13u32,
2671                                __cache.consume_next(),
2672                                buf,
2673                            );
2674                            x.write_to(__cache, buf);
2675                        }
2676                        super::super::__buffa::view::oneof::client_frame::Payload::CancelAllOrders(
2677                            x,
2678                        ) => {
2679                            ::buffa::types::put_len_delimited_header(
2680                                14u32,
2681                                __cache.consume_next(),
2682                                buf,
2683                            );
2684                            x.write_to(__cache, buf);
2685                        }
2686                    }
2687                }
2688                self.__buffa_unknown_fields.write_to(buf);
2689            }
2690        }
2691        /// Serializes this view as protobuf JSON.
2692        ///
2693        /// Implicit-presence fields with default values are omitted, `required`
2694        /// fields are always emitted, explicit-presence (`optional`) fields are
2695        /// emitted only when set, bytes fields are base64-encoded, and enum
2696        /// values are their proto name strings.
2697        ///
2698        /// This impl uses `serialize_map(None)` because the number of emitted
2699        /// fields depends on default-omission rules; serializers that require
2700        /// known map lengths (e.g. `bincode`) will return a runtime error.
2701        /// Use the owned message type for those formats.
2702        impl<'__a> ::serde::Serialize for ClientFrameView<'__a> {
2703            fn serialize<__S: ::serde::Serializer>(
2704                &self,
2705                __s: __S,
2706            ) -> ::core::result::Result<__S::Ok, __S::Error> {
2707                use ::serde::ser::SerializeMap as _;
2708                let mut __map = __s.serialize_map(::core::option::Option::None)?;
2709                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.seq) {
2710                    __map
2711                        .serialize_entry(
2712                            "seq",
2713                            &::buffa::json_helpers::ProtoJson(&self.seq),
2714                        )?;
2715                }
2716                if !::buffa::json_helpers::skip_if::is_empty_str(self.correlation_id) {
2717                    __map.serialize_entry("correlationId", self.correlation_id)?;
2718                }
2719                if let ::core::option::Option::Some(ref __ov) = self.payload {
2720                    match __ov {
2721                        super::super::__buffa::view::oneof::client_frame::Payload::Ping(
2722                            v,
2723                        ) => {
2724                            __map.serialize_entry("ping", v)?;
2725                        }
2726                        super::super::__buffa::view::oneof::client_frame::Payload::CreateOrder(
2727                            v,
2728                        ) => {
2729                            __map.serialize_entry("createOrder", v)?;
2730                        }
2731                        super::super::__buffa::view::oneof::client_frame::Payload::CancelOrder(
2732                            v,
2733                        ) => {
2734                            __map.serialize_entry("cancelOrder", v)?;
2735                        }
2736                        super::super::__buffa::view::oneof::client_frame::Payload::ModifyOrder(
2737                            v,
2738                        ) => {
2739                            __map.serialize_entry("modifyOrder", v)?;
2740                        }
2741                        super::super::__buffa::view::oneof::client_frame::Payload::CancelAllOrders(
2742                            v,
2743                        ) => {
2744                            __map.serialize_entry("cancelAllOrders", v)?;
2745                        }
2746                    }
2747                }
2748                __map.end()
2749            }
2750        }
2751        impl<'a> ::buffa::MessageName for ClientFrameView<'a> {
2752            const PACKAGE: &'static str = "tradews.v1";
2753            const NAME: &'static str = "ClientFrame";
2754            const FULL_NAME: &'static str = "tradews.v1.ClientFrame";
2755            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.ClientFrame";
2756        }
2757        ::buffa::impl_default_view_instance!(ClientFrameView);
2758        ::buffa::impl_view_reborrow!(ClientFrameView);
2759        /** Self-contained, `'static` owned view of a `ClientFrame` message.
2760
2761 Wraps [`::buffa::OwnedView`]`<`[`ClientFrameView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
2762
2763 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ClientFrameView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
2764        #[derive(Clone, Debug)]
2765        pub struct ClientFrameOwnedView(::buffa::OwnedView<ClientFrameView<'static>>);
2766        impl ClientFrameOwnedView {
2767            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
2768            ///
2769            /// The view borrows directly from the buffer's data; the buffer is
2770            /// retained inside the returned handle.
2771            ///
2772            /// # Errors
2773            ///
2774            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
2775            /// protobuf data.
2776            pub fn decode(
2777                bytes: ::buffa::bytes::Bytes,
2778            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2779                ::core::result::Result::Ok(
2780                    ClientFrameOwnedView(::buffa::OwnedView::decode(bytes)?),
2781                )
2782            }
2783            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
2784            /// max message size).
2785            ///
2786            /// # Errors
2787            ///
2788            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
2789            /// exceeds the configured limits.
2790            pub fn decode_with_options(
2791                bytes: ::buffa::bytes::Bytes,
2792                opts: &::buffa::DecodeOptions,
2793            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2794                ::core::result::Result::Ok(
2795                    ClientFrameOwnedView(
2796                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
2797                    ),
2798                )
2799            }
2800            /// Build from an owned message via an encode → decode round-trip.
2801            ///
2802            /// # Errors
2803            ///
2804            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
2805            /// somehow invalid (should not happen for well-formed messages).
2806            pub fn from_owned(
2807                msg: &super::super::ClientFrame,
2808            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2809                ::core::result::Result::Ok(
2810                    ClientFrameOwnedView(::buffa::OwnedView::from_owned(msg)?),
2811                )
2812            }
2813            /// Borrow the full [`ClientFrameView`] with its lifetime tied to `&self`.
2814            #[must_use]
2815            pub fn view(&self) -> &ClientFrameView<'_> {
2816                self.0.reborrow()
2817            }
2818            /// Convert to the owned message type.
2819            ///
2820            /// # Errors
2821            ///
2822            /// Returns an error if re-materializing preserved unknown fields
2823            /// fails (e.g. the unknown-field limit is exceeded).
2824            pub fn to_owned_message(
2825                &self,
2826            ) -> ::core::result::Result<
2827                super::super::ClientFrame,
2828                ::buffa::DecodeError,
2829            > {
2830                self.0.to_owned_message()
2831            }
2832            /// The underlying bytes buffer.
2833            #[must_use]
2834            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2835                self.0.bytes()
2836            }
2837            /// Consume the handle, returning the underlying bytes buffer.
2838            #[must_use]
2839            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2840                self.0.into_bytes()
2841            }
2842            /// Monotonic per-connection client sequence number, starting at 1.
2843            ///
2844            /// Field 1: `seq`
2845            #[must_use]
2846            pub fn seq(&self) -> u64 {
2847                self.0.reborrow().seq
2848            }
2849            /// Client correlation token echoed in every server response.
2850            ///
2851            /// Field 2: `correlation_id`
2852            #[must_use]
2853            pub fn correlation_id(&self) -> &'_ str {
2854                self.0.reborrow().correlation_id
2855            }
2856            /// Oneof `payload`.
2857            #[must_use]
2858            pub fn payload(
2859                &self,
2860            ) -> ::core::option::Option<
2861                &super::super::__buffa::view::oneof::client_frame::Payload<'_>,
2862            > {
2863                self.0.reborrow().payload.as_ref()
2864            }
2865        }
2866        impl ::core::convert::From<::buffa::OwnedView<ClientFrameView<'static>>>
2867        for ClientFrameOwnedView {
2868            fn from(inner: ::buffa::OwnedView<ClientFrameView<'static>>) -> Self {
2869                ClientFrameOwnedView(inner)
2870            }
2871        }
2872        impl ::core::convert::From<ClientFrameOwnedView>
2873        for ::buffa::OwnedView<ClientFrameView<'static>> {
2874            fn from(wrapper: ClientFrameOwnedView) -> Self {
2875                wrapper.0
2876            }
2877        }
2878        impl ::core::convert::AsRef<::buffa::OwnedView<ClientFrameView<'static>>>
2879        for ClientFrameOwnedView {
2880            fn as_ref(&self) -> &::buffa::OwnedView<ClientFrameView<'static>> {
2881                &self.0
2882            }
2883        }
2884        impl ::buffa::HasMessageView for super::super::ClientFrame {
2885            type View<'a> = ClientFrameView<'a>;
2886            type ViewHandle = ClientFrameOwnedView;
2887        }
2888        impl ::serde::Serialize for ClientFrameOwnedView {
2889            fn serialize<__S: ::serde::Serializer>(
2890                &self,
2891                __s: __S,
2892            ) -> ::core::result::Result<__S::Ok, __S::Error> {
2893                ::serde::Serialize::serialize(&self.0, __s)
2894            }
2895        }
2896        /// PingRequest carries an opaque payload that is echoed by PongResponse.
2897        #[derive(Clone, Debug, Default)]
2898        pub struct PingRequestView<'a> {
2899            /// Opaque client payload echoed by the server.
2900            ///
2901            /// Field 1: `payload`
2902            pub payload: &'a [u8],
2903            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2904        }
2905        impl<'a> ::buffa::MessageView<'a> for PingRequestView<'a> {
2906            type Owned = super::super::PingRequest;
2907            fn decode_view(
2908                buf: &'a [u8],
2909            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2910                let __limit = ::core::cell::Cell::new(
2911                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
2912                );
2913                <Self as ::buffa::MessageView>::decode_view_ctx(
2914                    buf,
2915                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2916                )
2917            }
2918            fn decode_view_with_ctx(
2919                buf: &'a [u8],
2920                ctx: ::buffa::DecodeContext<'_>,
2921            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2922                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2923            }
2924            fn merge_view_field(
2925                &mut self,
2926                tag: ::buffa::encoding::Tag,
2927                cur: &'a [u8],
2928                before_tag: &'a [u8],
2929                ctx: ::buffa::DecodeContext<'_>,
2930            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2931                let _ = ctx;
2932                #[allow(unused_variables)]
2933                let view = self;
2934                let mut cur = cur;
2935                match tag.field_number() {
2936                    1u32 => {
2937                        ::buffa::encoding::check_wire_type(
2938                            tag,
2939                            ::buffa::encoding::WireType::LengthDelimited,
2940                        )?;
2941                        view.payload = ::buffa::types::borrow_bytes(&mut cur)?;
2942                    }
2943                    _ => {
2944                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2945                        let span_len = before_tag.len() - cur.len();
2946                        view.__buffa_unknown_fields
2947                            .push_record(before_tag, span_len, ctx)?;
2948                    }
2949                }
2950                ::core::result::Result::Ok(cur)
2951            }
2952            fn to_owned_message(
2953                &self,
2954            ) -> ::core::result::Result<
2955                super::super::PingRequest,
2956                ::buffa::DecodeError,
2957            > {
2958                self.to_owned_from_source(None)
2959            }
2960            #[allow(clippy::useless_conversion, clippy::needless_update)]
2961            fn to_owned_from_source(
2962                &self,
2963                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2964            ) -> ::core::result::Result<
2965                super::super::PingRequest,
2966                ::buffa::DecodeError,
2967            > {
2968                #[allow(unused_imports)]
2969                use ::buffa::alloc::string::ToString as _;
2970                let _ = __buffa_src;
2971                ::core::result::Result::Ok(super::super::PingRequest {
2972                    payload: (self.payload).to_vec(),
2973                    __buffa_unknown_fields: self
2974                        .__buffa_unknown_fields
2975                        .to_owned()?
2976                        .into(),
2977                    ..::core::default::Default::default()
2978                })
2979            }
2980        }
2981        impl<'a> ::buffa::ViewEncode<'a> for PingRequestView<'a> {
2982            #[allow(clippy::needless_borrow, clippy::let_and_return)]
2983            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2984                #[allow(unused_imports)]
2985                use ::buffa::Enumeration as _;
2986                let mut size = 0u32;
2987                if !self.payload.is_empty() {
2988                    size
2989                        += 1u32
2990                            + ::buffa::types::bytes_encoded_len(&self.payload) as u32;
2991                }
2992                size += self.__buffa_unknown_fields.encoded_len() as u32;
2993                size
2994            }
2995            #[allow(clippy::needless_borrow)]
2996            fn write_to(
2997                &self,
2998                _cache: &mut ::buffa::SizeCache,
2999                buf: &mut impl ::buffa::bytes::BufMut,
3000            ) {
3001                #[allow(unused_imports)]
3002                use ::buffa::Enumeration as _;
3003                if !self.payload.is_empty() {
3004                    ::buffa::types::put_bytes_field(1u32, &self.payload, buf);
3005                }
3006                self.__buffa_unknown_fields.write_to(buf);
3007            }
3008        }
3009        /// Serializes this view as protobuf JSON.
3010        ///
3011        /// Implicit-presence fields with default values are omitted, `required`
3012        /// fields are always emitted, explicit-presence (`optional`) fields are
3013        /// emitted only when set, bytes fields are base64-encoded, and enum
3014        /// values are their proto name strings.
3015        ///
3016        /// This impl uses `serialize_map(None)` because the number of emitted
3017        /// fields depends on default-omission rules; serializers that require
3018        /// known map lengths (e.g. `bincode`) will return a runtime error.
3019        /// Use the owned message type for those formats.
3020        impl<'__a> ::serde::Serialize for PingRequestView<'__a> {
3021            fn serialize<__S: ::serde::Serializer>(
3022                &self,
3023                __s: __S,
3024            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3025                use ::serde::ser::SerializeMap as _;
3026                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3027                if !::buffa::json_helpers::skip_if::is_empty_bytes(self.payload) {
3028                    __map
3029                        .serialize_entry(
3030                            "payload",
3031                            &::buffa::json_helpers::BytesJson(self.payload),
3032                        )?;
3033                }
3034                __map.end()
3035            }
3036        }
3037        impl<'a> ::buffa::MessageName for PingRequestView<'a> {
3038            const PACKAGE: &'static str = "tradews.v1";
3039            const NAME: &'static str = "PingRequest";
3040            const FULL_NAME: &'static str = "tradews.v1.PingRequest";
3041            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.PingRequest";
3042        }
3043        ::buffa::impl_default_view_instance!(PingRequestView);
3044        ::buffa::impl_view_reborrow!(PingRequestView);
3045        /** Self-contained, `'static` owned view of a `PingRequest` message.
3046
3047 Wraps [`::buffa::OwnedView`]`<`[`PingRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
3048
3049 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`PingRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3050        #[derive(Clone, Debug)]
3051        pub struct PingRequestOwnedView(::buffa::OwnedView<PingRequestView<'static>>);
3052        impl PingRequestOwnedView {
3053            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3054            ///
3055            /// The view borrows directly from the buffer's data; the buffer is
3056            /// retained inside the returned handle.
3057            ///
3058            /// # Errors
3059            ///
3060            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3061            /// protobuf data.
3062            pub fn decode(
3063                bytes: ::buffa::bytes::Bytes,
3064            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3065                ::core::result::Result::Ok(
3066                    PingRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
3067                )
3068            }
3069            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3070            /// max message size).
3071            ///
3072            /// # Errors
3073            ///
3074            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3075            /// exceeds the configured limits.
3076            pub fn decode_with_options(
3077                bytes: ::buffa::bytes::Bytes,
3078                opts: &::buffa::DecodeOptions,
3079            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3080                ::core::result::Result::Ok(
3081                    PingRequestOwnedView(
3082                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3083                    ),
3084                )
3085            }
3086            /// Build from an owned message via an encode → decode round-trip.
3087            ///
3088            /// # Errors
3089            ///
3090            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3091            /// somehow invalid (should not happen for well-formed messages).
3092            pub fn from_owned(
3093                msg: &super::super::PingRequest,
3094            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3095                ::core::result::Result::Ok(
3096                    PingRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
3097                )
3098            }
3099            /// Borrow the full [`PingRequestView`] with its lifetime tied to `&self`.
3100            #[must_use]
3101            pub fn view(&self) -> &PingRequestView<'_> {
3102                self.0.reborrow()
3103            }
3104            /// Convert to the owned message type.
3105            ///
3106            /// # Errors
3107            ///
3108            /// Returns an error if re-materializing preserved unknown fields
3109            /// fails (e.g. the unknown-field limit is exceeded).
3110            pub fn to_owned_message(
3111                &self,
3112            ) -> ::core::result::Result<
3113                super::super::PingRequest,
3114                ::buffa::DecodeError,
3115            > {
3116                self.0.to_owned_message()
3117            }
3118            /// The underlying bytes buffer.
3119            #[must_use]
3120            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3121                self.0.bytes()
3122            }
3123            /// Consume the handle, returning the underlying bytes buffer.
3124            #[must_use]
3125            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3126                self.0.into_bytes()
3127            }
3128            /// Opaque client payload echoed by the server.
3129            ///
3130            /// Field 1: `payload`
3131            #[must_use]
3132            pub fn payload(&self) -> &'_ [u8] {
3133                self.0.reborrow().payload
3134            }
3135        }
3136        impl ::core::convert::From<::buffa::OwnedView<PingRequestView<'static>>>
3137        for PingRequestOwnedView {
3138            fn from(inner: ::buffa::OwnedView<PingRequestView<'static>>) -> Self {
3139                PingRequestOwnedView(inner)
3140            }
3141        }
3142        impl ::core::convert::From<PingRequestOwnedView>
3143        for ::buffa::OwnedView<PingRequestView<'static>> {
3144            fn from(wrapper: PingRequestOwnedView) -> Self {
3145                wrapper.0
3146            }
3147        }
3148        impl ::core::convert::AsRef<::buffa::OwnedView<PingRequestView<'static>>>
3149        for PingRequestOwnedView {
3150            fn as_ref(&self) -> &::buffa::OwnedView<PingRequestView<'static>> {
3151                &self.0
3152            }
3153        }
3154        impl ::buffa::HasMessageView for super::super::PingRequest {
3155            type View<'a> = PingRequestView<'a>;
3156            type ViewHandle = PingRequestOwnedView;
3157        }
3158        impl ::serde::Serialize for PingRequestOwnedView {
3159            fn serialize<__S: ::serde::Serializer>(
3160                &self,
3161                __s: __S,
3162            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3163                ::serde::Serialize::serialize(&self.0, __s)
3164            }
3165        }
3166        /// ServerFrame is the protobuf write-websocket response envelope.
3167        #[derive(Clone, Debug, Default)]
3168        pub struct ServerFrameView<'a> {
3169            /// Client sequence number copied from the accepted or rejected frame.
3170            ///
3171            /// Field 1: `seq`
3172            pub seq: u64,
3173            /// Client correlation token copied from the accepted or rejected frame.
3174            ///
3175            /// Field 2: `correlation_id`
3176            pub correlation_id: &'a str,
3177            pub payload: ::core::option::Option<
3178                super::super::__buffa::view::oneof::server_frame::Payload<'a>,
3179            >,
3180            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3181        }
3182        impl<'a> ::buffa::MessageView<'a> for ServerFrameView<'a> {
3183            type Owned = super::super::ServerFrame;
3184            fn decode_view(
3185                buf: &'a [u8],
3186            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3187                let __limit = ::core::cell::Cell::new(
3188                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
3189                );
3190                <Self as ::buffa::MessageView>::decode_view_ctx(
3191                    buf,
3192                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
3193                )
3194            }
3195            fn decode_view_with_ctx(
3196                buf: &'a [u8],
3197                ctx: ::buffa::DecodeContext<'_>,
3198            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3199                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
3200            }
3201            fn merge_view_field(
3202                &mut self,
3203                tag: ::buffa::encoding::Tag,
3204                cur: &'a [u8],
3205                before_tag: &'a [u8],
3206                ctx: ::buffa::DecodeContext<'_>,
3207            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
3208                let _ = ctx;
3209                #[allow(unused_variables)]
3210                let view = self;
3211                let mut cur = cur;
3212                match tag.field_number() {
3213                    1u32 => {
3214                        ::buffa::encoding::check_wire_type(
3215                            tag,
3216                            ::buffa::encoding::WireType::Varint,
3217                        )?;
3218                        view.seq = ::buffa::types::decode_uint64(&mut cur)?;
3219                    }
3220                    2u32 => {
3221                        ::buffa::encoding::check_wire_type(
3222                            tag,
3223                            ::buffa::encoding::WireType::LengthDelimited,
3224                        )?;
3225                        view.correlation_id = ::buffa::types::borrow_str(&mut cur)?;
3226                    }
3227                    10u32 => {
3228                        ::buffa::encoding::check_wire_type(
3229                            tag,
3230                            ::buffa::encoding::WireType::LengthDelimited,
3231                        )?;
3232                        let __sub_ctx = ctx.descend()?;
3233                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3234                        if let Some(
3235                            super::super::__buffa::view::oneof::server_frame::Payload::Pong(
3236                                ref mut existing,
3237                            ),
3238                        ) = view.payload
3239                        {
3240                            ::buffa::MessageView::merge_into_view(
3241                                &mut **existing,
3242                                sub,
3243                                __sub_ctx,
3244                            )?;
3245                        } else {
3246                            view.payload = Some(
3247                                super::super::__buffa::view::oneof::server_frame::Payload::Pong(
3248                                    ::buffa::alloc::boxed::Box::new(
3249                                        <super::super::__buffa::view::PongResponseView as ::buffa::MessageView>::decode_view_ctx(
3250                                            sub,
3251                                            __sub_ctx,
3252                                        )?,
3253                                    ),
3254                                ),
3255                            );
3256                        }
3257                    }
3258                    11u32 => {
3259                        ::buffa::encoding::check_wire_type(
3260                            tag,
3261                            ::buffa::encoding::WireType::LengthDelimited,
3262                        )?;
3263                        let __sub_ctx = ctx.descend()?;
3264                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3265                        if let Some(
3266                            super::super::__buffa::view::oneof::server_frame::Payload::Ack(
3267                                ref mut existing,
3268                            ),
3269                        ) = view.payload
3270                        {
3271                            ::buffa::MessageView::merge_into_view(
3272                                &mut **existing,
3273                                sub,
3274                                __sub_ctx,
3275                            )?;
3276                        } else {
3277                            view.payload = Some(
3278                                super::super::__buffa::view::oneof::server_frame::Payload::Ack(
3279                                    ::buffa::alloc::boxed::Box::new(
3280                                        <super::super::__buffa::view::AckResponseView as ::buffa::MessageView>::decode_view_ctx(
3281                                            sub,
3282                                            __sub_ctx,
3283                                        )?,
3284                                    ),
3285                                ),
3286                            );
3287                        }
3288                    }
3289                    12u32 => {
3290                        ::buffa::encoding::check_wire_type(
3291                            tag,
3292                            ::buffa::encoding::WireType::LengthDelimited,
3293                        )?;
3294                        let __sub_ctx = ctx.descend()?;
3295                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3296                        if let Some(
3297                            super::super::__buffa::view::oneof::server_frame::Payload::Reject(
3298                                ref mut existing,
3299                            ),
3300                        ) = view.payload
3301                        {
3302                            ::buffa::MessageView::merge_into_view(
3303                                &mut **existing,
3304                                sub,
3305                                __sub_ctx,
3306                            )?;
3307                        } else {
3308                            view.payload = Some(
3309                                super::super::__buffa::view::oneof::server_frame::Payload::Reject(
3310                                    ::buffa::alloc::boxed::Box::new(
3311                                        <super::super::__buffa::view::CommandRejectView as ::buffa::MessageView>::decode_view_ctx(
3312                                            sub,
3313                                            __sub_ctx,
3314                                        )?,
3315                                    ),
3316                                ),
3317                            );
3318                        }
3319                    }
3320                    13u32 => {
3321                        ::buffa::encoding::check_wire_type(
3322                            tag,
3323                            ::buffa::encoding::WireType::LengthDelimited,
3324                        )?;
3325                        let __sub_ctx = ctx.descend()?;
3326                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3327                        if let Some(
3328                            super::super::__buffa::view::oneof::server_frame::Payload::Overload(
3329                                ref mut existing,
3330                            ),
3331                        ) = view.payload
3332                        {
3333                            ::buffa::MessageView::merge_into_view(
3334                                &mut **existing,
3335                                sub,
3336                                __sub_ctx,
3337                            )?;
3338                        } else {
3339                            view.payload = Some(
3340                                super::super::__buffa::view::oneof::server_frame::Payload::Overload(
3341                                    ::buffa::alloc::boxed::Box::new(
3342                                        <super::super::__buffa::view::OverloadResponseView as ::buffa::MessageView>::decode_view_ctx(
3343                                            sub,
3344                                            __sub_ctx,
3345                                        )?,
3346                                    ),
3347                                ),
3348                            );
3349                        }
3350                    }
3351                    14u32 => {
3352                        ::buffa::encoding::check_wire_type(
3353                            tag,
3354                            ::buffa::encoding::WireType::LengthDelimited,
3355                        )?;
3356                        let __sub_ctx = ctx.descend()?;
3357                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3358                        if let Some(
3359                            super::super::__buffa::view::oneof::server_frame::Payload::Terminal(
3360                                ref mut existing,
3361                            ),
3362                        ) = view.payload
3363                        {
3364                            ::buffa::MessageView::merge_into_view(
3365                                &mut **existing,
3366                                sub,
3367                                __sub_ctx,
3368                            )?;
3369                        } else {
3370                            view.payload = Some(
3371                                super::super::__buffa::view::oneof::server_frame::Payload::Terminal(
3372                                    ::buffa::alloc::boxed::Box::new(
3373                                        <super::super::__buffa::view::TerminalSessionEventView as ::buffa::MessageView>::decode_view_ctx(
3374                                            sub,
3375                                            __sub_ctx,
3376                                        )?,
3377                                    ),
3378                                ),
3379                            );
3380                        }
3381                    }
3382                    _ => {
3383                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
3384                        let span_len = before_tag.len() - cur.len();
3385                        view.__buffa_unknown_fields
3386                            .push_record(before_tag, span_len, ctx)?;
3387                    }
3388                }
3389                ::core::result::Result::Ok(cur)
3390            }
3391            fn to_owned_message(
3392                &self,
3393            ) -> ::core::result::Result<
3394                super::super::ServerFrame,
3395                ::buffa::DecodeError,
3396            > {
3397                self.to_owned_from_source(None)
3398            }
3399            #[allow(clippy::useless_conversion, clippy::needless_update)]
3400            fn to_owned_from_source(
3401                &self,
3402                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3403            ) -> ::core::result::Result<
3404                super::super::ServerFrame,
3405                ::buffa::DecodeError,
3406            > {
3407                #[allow(unused_imports)]
3408                use ::buffa::alloc::string::ToString as _;
3409                let _ = __buffa_src;
3410                ::core::result::Result::Ok(super::super::ServerFrame {
3411                    seq: self.seq,
3412                    correlation_id: self.correlation_id.to_string(),
3413                    payload: match self.payload.as_ref() {
3414                        ::core::option::Option::Some(v) => {
3415                            ::core::option::Option::Some(
3416                                match v {
3417                                    super::super::__buffa::view::oneof::server_frame::Payload::Pong(
3418                                        v,
3419                                    ) => {
3420                                        super::super::__buffa::oneof::server_frame::Payload::Pong(
3421                                            ::buffa::alloc::boxed::Box::new(
3422                                                v.to_owned_from_source(__buffa_src)?,
3423                                            ),
3424                                        )
3425                                    }
3426                                    super::super::__buffa::view::oneof::server_frame::Payload::Ack(
3427                                        v,
3428                                    ) => {
3429                                        super::super::__buffa::oneof::server_frame::Payload::Ack(
3430                                            ::buffa::alloc::boxed::Box::new(
3431                                                v.to_owned_from_source(__buffa_src)?,
3432                                            ),
3433                                        )
3434                                    }
3435                                    super::super::__buffa::view::oneof::server_frame::Payload::Reject(
3436                                        v,
3437                                    ) => {
3438                                        super::super::__buffa::oneof::server_frame::Payload::Reject(
3439                                            ::buffa::alloc::boxed::Box::new(
3440                                                v.to_owned_from_source(__buffa_src)?,
3441                                            ),
3442                                        )
3443                                    }
3444                                    super::super::__buffa::view::oneof::server_frame::Payload::Overload(
3445                                        v,
3446                                    ) => {
3447                                        super::super::__buffa::oneof::server_frame::Payload::Overload(
3448                                            ::buffa::alloc::boxed::Box::new(
3449                                                v.to_owned_from_source(__buffa_src)?,
3450                                            ),
3451                                        )
3452                                    }
3453                                    super::super::__buffa::view::oneof::server_frame::Payload::Terminal(
3454                                        v,
3455                                    ) => {
3456                                        super::super::__buffa::oneof::server_frame::Payload::Terminal(
3457                                            ::buffa::alloc::boxed::Box::new(
3458                                                v.to_owned_from_source(__buffa_src)?,
3459                                            ),
3460                                        )
3461                                    }
3462                                },
3463                            )
3464                        }
3465                        ::core::option::Option::None => ::core::option::Option::None,
3466                    },
3467                    __buffa_unknown_fields: self
3468                        .__buffa_unknown_fields
3469                        .to_owned()?
3470                        .into(),
3471                    ..::core::default::Default::default()
3472                })
3473            }
3474        }
3475        impl<'a> ::buffa::ViewEncode<'a> for ServerFrameView<'a> {
3476            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3477            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3478                #[allow(unused_imports)]
3479                use ::buffa::Enumeration as _;
3480                let mut size = 0u32;
3481                if self.seq != 0u64 {
3482                    size += 1u32 + ::buffa::types::uint64_encoded_len(self.seq) as u32;
3483                }
3484                if !self.correlation_id.is_empty() {
3485                    size
3486                        += 1u32
3487                            + ::buffa::types::string_encoded_len(&self.correlation_id)
3488                                as u32;
3489                }
3490                if let ::core::option::Option::Some(ref v) = self.payload {
3491                    match v {
3492                        super::super::__buffa::view::oneof::server_frame::Payload::Pong(
3493                            x,
3494                        ) => {
3495                            let __slot = __cache.reserve();
3496                            let inner = x.compute_size(__cache);
3497                            __cache.set(__slot, inner);
3498                            size
3499                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
3500                                    + inner;
3501                        }
3502                        super::super::__buffa::view::oneof::server_frame::Payload::Ack(
3503                            x,
3504                        ) => {
3505                            let __slot = __cache.reserve();
3506                            let inner = x.compute_size(__cache);
3507                            __cache.set(__slot, inner);
3508                            size
3509                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
3510                                    + inner;
3511                        }
3512                        super::super::__buffa::view::oneof::server_frame::Payload::Reject(
3513                            x,
3514                        ) => {
3515                            let __slot = __cache.reserve();
3516                            let inner = x.compute_size(__cache);
3517                            __cache.set(__slot, inner);
3518                            size
3519                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
3520                                    + inner;
3521                        }
3522                        super::super::__buffa::view::oneof::server_frame::Payload::Overload(
3523                            x,
3524                        ) => {
3525                            let __slot = __cache.reserve();
3526                            let inner = x.compute_size(__cache);
3527                            __cache.set(__slot, inner);
3528                            size
3529                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
3530                                    + inner;
3531                        }
3532                        super::super::__buffa::view::oneof::server_frame::Payload::Terminal(
3533                            x,
3534                        ) => {
3535                            let __slot = __cache.reserve();
3536                            let inner = x.compute_size(__cache);
3537                            __cache.set(__slot, inner);
3538                            size
3539                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
3540                                    + inner;
3541                        }
3542                    }
3543                }
3544                size += self.__buffa_unknown_fields.encoded_len() as u32;
3545                size
3546            }
3547            #[allow(clippy::needless_borrow)]
3548            fn write_to(
3549                &self,
3550                __cache: &mut ::buffa::SizeCache,
3551                buf: &mut impl ::buffa::bytes::BufMut,
3552            ) {
3553                #[allow(unused_imports)]
3554                use ::buffa::Enumeration as _;
3555                if self.seq != 0u64 {
3556                    ::buffa::types::put_uint64_field(1u32, self.seq, buf);
3557                }
3558                if !self.correlation_id.is_empty() {
3559                    ::buffa::types::put_string_field(2u32, &self.correlation_id, buf);
3560                }
3561                if let ::core::option::Option::Some(ref v) = self.payload {
3562                    match v {
3563                        super::super::__buffa::view::oneof::server_frame::Payload::Pong(
3564                            x,
3565                        ) => {
3566                            ::buffa::types::put_len_delimited_header(
3567                                10u32,
3568                                __cache.consume_next(),
3569                                buf,
3570                            );
3571                            x.write_to(__cache, buf);
3572                        }
3573                        super::super::__buffa::view::oneof::server_frame::Payload::Ack(
3574                            x,
3575                        ) => {
3576                            ::buffa::types::put_len_delimited_header(
3577                                11u32,
3578                                __cache.consume_next(),
3579                                buf,
3580                            );
3581                            x.write_to(__cache, buf);
3582                        }
3583                        super::super::__buffa::view::oneof::server_frame::Payload::Reject(
3584                            x,
3585                        ) => {
3586                            ::buffa::types::put_len_delimited_header(
3587                                12u32,
3588                                __cache.consume_next(),
3589                                buf,
3590                            );
3591                            x.write_to(__cache, buf);
3592                        }
3593                        super::super::__buffa::view::oneof::server_frame::Payload::Overload(
3594                            x,
3595                        ) => {
3596                            ::buffa::types::put_len_delimited_header(
3597                                13u32,
3598                                __cache.consume_next(),
3599                                buf,
3600                            );
3601                            x.write_to(__cache, buf);
3602                        }
3603                        super::super::__buffa::view::oneof::server_frame::Payload::Terminal(
3604                            x,
3605                        ) => {
3606                            ::buffa::types::put_len_delimited_header(
3607                                14u32,
3608                                __cache.consume_next(),
3609                                buf,
3610                            );
3611                            x.write_to(__cache, buf);
3612                        }
3613                    }
3614                }
3615                self.__buffa_unknown_fields.write_to(buf);
3616            }
3617        }
3618        /// Serializes this view as protobuf JSON.
3619        ///
3620        /// Implicit-presence fields with default values are omitted, `required`
3621        /// fields are always emitted, explicit-presence (`optional`) fields are
3622        /// emitted only when set, bytes fields are base64-encoded, and enum
3623        /// values are their proto name strings.
3624        ///
3625        /// This impl uses `serialize_map(None)` because the number of emitted
3626        /// fields depends on default-omission rules; serializers that require
3627        /// known map lengths (e.g. `bincode`) will return a runtime error.
3628        /// Use the owned message type for those formats.
3629        impl<'__a> ::serde::Serialize for ServerFrameView<'__a> {
3630            fn serialize<__S: ::serde::Serializer>(
3631                &self,
3632                __s: __S,
3633            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3634                use ::serde::ser::SerializeMap as _;
3635                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3636                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.seq) {
3637                    __map
3638                        .serialize_entry(
3639                            "seq",
3640                            &::buffa::json_helpers::ProtoJson(&self.seq),
3641                        )?;
3642                }
3643                if !::buffa::json_helpers::skip_if::is_empty_str(self.correlation_id) {
3644                    __map.serialize_entry("correlationId", self.correlation_id)?;
3645                }
3646                if let ::core::option::Option::Some(ref __ov) = self.payload {
3647                    match __ov {
3648                        super::super::__buffa::view::oneof::server_frame::Payload::Pong(
3649                            v,
3650                        ) => {
3651                            __map.serialize_entry("pong", v)?;
3652                        }
3653                        super::super::__buffa::view::oneof::server_frame::Payload::Ack(
3654                            v,
3655                        ) => {
3656                            __map.serialize_entry("ack", v)?;
3657                        }
3658                        super::super::__buffa::view::oneof::server_frame::Payload::Reject(
3659                            v,
3660                        ) => {
3661                            __map.serialize_entry("reject", v)?;
3662                        }
3663                        super::super::__buffa::view::oneof::server_frame::Payload::Overload(
3664                            v,
3665                        ) => {
3666                            __map.serialize_entry("overload", v)?;
3667                        }
3668                        super::super::__buffa::view::oneof::server_frame::Payload::Terminal(
3669                            v,
3670                        ) => {
3671                            __map.serialize_entry("terminal", v)?;
3672                        }
3673                    }
3674                }
3675                __map.end()
3676            }
3677        }
3678        impl<'a> ::buffa::MessageName for ServerFrameView<'a> {
3679            const PACKAGE: &'static str = "tradews.v1";
3680            const NAME: &'static str = "ServerFrame";
3681            const FULL_NAME: &'static str = "tradews.v1.ServerFrame";
3682            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.ServerFrame";
3683        }
3684        ::buffa::impl_default_view_instance!(ServerFrameView);
3685        ::buffa::impl_view_reborrow!(ServerFrameView);
3686        /** Self-contained, `'static` owned view of a `ServerFrame` message.
3687
3688 Wraps [`::buffa::OwnedView`]`<`[`ServerFrameView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
3689
3690 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ServerFrameView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3691        #[derive(Clone, Debug)]
3692        pub struct ServerFrameOwnedView(::buffa::OwnedView<ServerFrameView<'static>>);
3693        impl ServerFrameOwnedView {
3694            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3695            ///
3696            /// The view borrows directly from the buffer's data; the buffer is
3697            /// retained inside the returned handle.
3698            ///
3699            /// # Errors
3700            ///
3701            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3702            /// protobuf data.
3703            pub fn decode(
3704                bytes: ::buffa::bytes::Bytes,
3705            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3706                ::core::result::Result::Ok(
3707                    ServerFrameOwnedView(::buffa::OwnedView::decode(bytes)?),
3708                )
3709            }
3710            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3711            /// max message size).
3712            ///
3713            /// # Errors
3714            ///
3715            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3716            /// exceeds the configured limits.
3717            pub fn decode_with_options(
3718                bytes: ::buffa::bytes::Bytes,
3719                opts: &::buffa::DecodeOptions,
3720            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3721                ::core::result::Result::Ok(
3722                    ServerFrameOwnedView(
3723                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3724                    ),
3725                )
3726            }
3727            /// Build from an owned message via an encode → decode round-trip.
3728            ///
3729            /// # Errors
3730            ///
3731            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3732            /// somehow invalid (should not happen for well-formed messages).
3733            pub fn from_owned(
3734                msg: &super::super::ServerFrame,
3735            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3736                ::core::result::Result::Ok(
3737                    ServerFrameOwnedView(::buffa::OwnedView::from_owned(msg)?),
3738                )
3739            }
3740            /// Borrow the full [`ServerFrameView`] with its lifetime tied to `&self`.
3741            #[must_use]
3742            pub fn view(&self) -> &ServerFrameView<'_> {
3743                self.0.reborrow()
3744            }
3745            /// Convert to the owned message type.
3746            ///
3747            /// # Errors
3748            ///
3749            /// Returns an error if re-materializing preserved unknown fields
3750            /// fails (e.g. the unknown-field limit is exceeded).
3751            pub fn to_owned_message(
3752                &self,
3753            ) -> ::core::result::Result<
3754                super::super::ServerFrame,
3755                ::buffa::DecodeError,
3756            > {
3757                self.0.to_owned_message()
3758            }
3759            /// The underlying bytes buffer.
3760            #[must_use]
3761            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3762                self.0.bytes()
3763            }
3764            /// Consume the handle, returning the underlying bytes buffer.
3765            #[must_use]
3766            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3767                self.0.into_bytes()
3768            }
3769            /// Client sequence number copied from the accepted or rejected frame.
3770            ///
3771            /// Field 1: `seq`
3772            #[must_use]
3773            pub fn seq(&self) -> u64 {
3774                self.0.reborrow().seq
3775            }
3776            /// Client correlation token copied from the accepted or rejected frame.
3777            ///
3778            /// Field 2: `correlation_id`
3779            #[must_use]
3780            pub fn correlation_id(&self) -> &'_ str {
3781                self.0.reborrow().correlation_id
3782            }
3783            /// Oneof `payload`.
3784            #[must_use]
3785            pub fn payload(
3786                &self,
3787            ) -> ::core::option::Option<
3788                &super::super::__buffa::view::oneof::server_frame::Payload<'_>,
3789            > {
3790                self.0.reborrow().payload.as_ref()
3791            }
3792        }
3793        impl ::core::convert::From<::buffa::OwnedView<ServerFrameView<'static>>>
3794        for ServerFrameOwnedView {
3795            fn from(inner: ::buffa::OwnedView<ServerFrameView<'static>>) -> Self {
3796                ServerFrameOwnedView(inner)
3797            }
3798        }
3799        impl ::core::convert::From<ServerFrameOwnedView>
3800        for ::buffa::OwnedView<ServerFrameView<'static>> {
3801            fn from(wrapper: ServerFrameOwnedView) -> Self {
3802                wrapper.0
3803            }
3804        }
3805        impl ::core::convert::AsRef<::buffa::OwnedView<ServerFrameView<'static>>>
3806        for ServerFrameOwnedView {
3807            fn as_ref(&self) -> &::buffa::OwnedView<ServerFrameView<'static>> {
3808                &self.0
3809            }
3810        }
3811        impl ::buffa::HasMessageView for super::super::ServerFrame {
3812            type View<'a> = ServerFrameView<'a>;
3813            type ViewHandle = ServerFrameOwnedView;
3814        }
3815        impl ::serde::Serialize for ServerFrameOwnedView {
3816            fn serialize<__S: ::serde::Serializer>(
3817                &self,
3818                __s: __S,
3819            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3820                ::serde::Serialize::serialize(&self.0, __s)
3821            }
3822        }
3823        /// PongResponse echoes a PingRequest payload.
3824        #[derive(Clone, Debug, Default)]
3825        pub struct PongResponseView<'a> {
3826            /// Opaque payload copied from PingRequest.
3827            ///
3828            /// Field 1: `payload`
3829            pub payload: &'a [u8],
3830            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3831        }
3832        impl<'a> ::buffa::MessageView<'a> for PongResponseView<'a> {
3833            type Owned = super::super::PongResponse;
3834            fn decode_view(
3835                buf: &'a [u8],
3836            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3837                let __limit = ::core::cell::Cell::new(
3838                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
3839                );
3840                <Self as ::buffa::MessageView>::decode_view_ctx(
3841                    buf,
3842                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
3843                )
3844            }
3845            fn decode_view_with_ctx(
3846                buf: &'a [u8],
3847                ctx: ::buffa::DecodeContext<'_>,
3848            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3849                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
3850            }
3851            fn merge_view_field(
3852                &mut self,
3853                tag: ::buffa::encoding::Tag,
3854                cur: &'a [u8],
3855                before_tag: &'a [u8],
3856                ctx: ::buffa::DecodeContext<'_>,
3857            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
3858                let _ = ctx;
3859                #[allow(unused_variables)]
3860                let view = self;
3861                let mut cur = cur;
3862                match tag.field_number() {
3863                    1u32 => {
3864                        ::buffa::encoding::check_wire_type(
3865                            tag,
3866                            ::buffa::encoding::WireType::LengthDelimited,
3867                        )?;
3868                        view.payload = ::buffa::types::borrow_bytes(&mut cur)?;
3869                    }
3870                    _ => {
3871                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
3872                        let span_len = before_tag.len() - cur.len();
3873                        view.__buffa_unknown_fields
3874                            .push_record(before_tag, span_len, ctx)?;
3875                    }
3876                }
3877                ::core::result::Result::Ok(cur)
3878            }
3879            fn to_owned_message(
3880                &self,
3881            ) -> ::core::result::Result<
3882                super::super::PongResponse,
3883                ::buffa::DecodeError,
3884            > {
3885                self.to_owned_from_source(None)
3886            }
3887            #[allow(clippy::useless_conversion, clippy::needless_update)]
3888            fn to_owned_from_source(
3889                &self,
3890                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3891            ) -> ::core::result::Result<
3892                super::super::PongResponse,
3893                ::buffa::DecodeError,
3894            > {
3895                #[allow(unused_imports)]
3896                use ::buffa::alloc::string::ToString as _;
3897                let _ = __buffa_src;
3898                ::core::result::Result::Ok(super::super::PongResponse {
3899                    payload: (self.payload).to_vec(),
3900                    __buffa_unknown_fields: self
3901                        .__buffa_unknown_fields
3902                        .to_owned()?
3903                        .into(),
3904                    ..::core::default::Default::default()
3905                })
3906            }
3907        }
3908        impl<'a> ::buffa::ViewEncode<'a> for PongResponseView<'a> {
3909            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3910            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3911                #[allow(unused_imports)]
3912                use ::buffa::Enumeration as _;
3913                let mut size = 0u32;
3914                if !self.payload.is_empty() {
3915                    size
3916                        += 1u32
3917                            + ::buffa::types::bytes_encoded_len(&self.payload) as u32;
3918                }
3919                size += self.__buffa_unknown_fields.encoded_len() as u32;
3920                size
3921            }
3922            #[allow(clippy::needless_borrow)]
3923            fn write_to(
3924                &self,
3925                _cache: &mut ::buffa::SizeCache,
3926                buf: &mut impl ::buffa::bytes::BufMut,
3927            ) {
3928                #[allow(unused_imports)]
3929                use ::buffa::Enumeration as _;
3930                if !self.payload.is_empty() {
3931                    ::buffa::types::put_bytes_field(1u32, &self.payload, buf);
3932                }
3933                self.__buffa_unknown_fields.write_to(buf);
3934            }
3935        }
3936        /// Serializes this view as protobuf JSON.
3937        ///
3938        /// Implicit-presence fields with default values are omitted, `required`
3939        /// fields are always emitted, explicit-presence (`optional`) fields are
3940        /// emitted only when set, bytes fields are base64-encoded, and enum
3941        /// values are their proto name strings.
3942        ///
3943        /// This impl uses `serialize_map(None)` because the number of emitted
3944        /// fields depends on default-omission rules; serializers that require
3945        /// known map lengths (e.g. `bincode`) will return a runtime error.
3946        /// Use the owned message type for those formats.
3947        impl<'__a> ::serde::Serialize for PongResponseView<'__a> {
3948            fn serialize<__S: ::serde::Serializer>(
3949                &self,
3950                __s: __S,
3951            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3952                use ::serde::ser::SerializeMap as _;
3953                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3954                if !::buffa::json_helpers::skip_if::is_empty_bytes(self.payload) {
3955                    __map
3956                        .serialize_entry(
3957                            "payload",
3958                            &::buffa::json_helpers::BytesJson(self.payload),
3959                        )?;
3960                }
3961                __map.end()
3962            }
3963        }
3964        impl<'a> ::buffa::MessageName for PongResponseView<'a> {
3965            const PACKAGE: &'static str = "tradews.v1";
3966            const NAME: &'static str = "PongResponse";
3967            const FULL_NAME: &'static str = "tradews.v1.PongResponse";
3968            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.PongResponse";
3969        }
3970        ::buffa::impl_default_view_instance!(PongResponseView);
3971        ::buffa::impl_view_reborrow!(PongResponseView);
3972        /** Self-contained, `'static` owned view of a `PongResponse` message.
3973
3974 Wraps [`::buffa::OwnedView`]`<`[`PongResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
3975
3976 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`PongResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3977        #[derive(Clone, Debug)]
3978        pub struct PongResponseOwnedView(::buffa::OwnedView<PongResponseView<'static>>);
3979        impl PongResponseOwnedView {
3980            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3981            ///
3982            /// The view borrows directly from the buffer's data; the buffer is
3983            /// retained inside the returned handle.
3984            ///
3985            /// # Errors
3986            ///
3987            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3988            /// protobuf data.
3989            pub fn decode(
3990                bytes: ::buffa::bytes::Bytes,
3991            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3992                ::core::result::Result::Ok(
3993                    PongResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
3994                )
3995            }
3996            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3997            /// max message size).
3998            ///
3999            /// # Errors
4000            ///
4001            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4002            /// exceeds the configured limits.
4003            pub fn decode_with_options(
4004                bytes: ::buffa::bytes::Bytes,
4005                opts: &::buffa::DecodeOptions,
4006            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4007                ::core::result::Result::Ok(
4008                    PongResponseOwnedView(
4009                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4010                    ),
4011                )
4012            }
4013            /// Build from an owned message via an encode → decode round-trip.
4014            ///
4015            /// # Errors
4016            ///
4017            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4018            /// somehow invalid (should not happen for well-formed messages).
4019            pub fn from_owned(
4020                msg: &super::super::PongResponse,
4021            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4022                ::core::result::Result::Ok(
4023                    PongResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
4024                )
4025            }
4026            /// Borrow the full [`PongResponseView`] with its lifetime tied to `&self`.
4027            #[must_use]
4028            pub fn view(&self) -> &PongResponseView<'_> {
4029                self.0.reborrow()
4030            }
4031            /// Convert to the owned message type.
4032            ///
4033            /// # Errors
4034            ///
4035            /// Returns an error if re-materializing preserved unknown fields
4036            /// fails (e.g. the unknown-field limit is exceeded).
4037            pub fn to_owned_message(
4038                &self,
4039            ) -> ::core::result::Result<
4040                super::super::PongResponse,
4041                ::buffa::DecodeError,
4042            > {
4043                self.0.to_owned_message()
4044            }
4045            /// The underlying bytes buffer.
4046            #[must_use]
4047            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4048                self.0.bytes()
4049            }
4050            /// Consume the handle, returning the underlying bytes buffer.
4051            #[must_use]
4052            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4053                self.0.into_bytes()
4054            }
4055            /// Opaque payload copied from PingRequest.
4056            ///
4057            /// Field 1: `payload`
4058            #[must_use]
4059            pub fn payload(&self) -> &'_ [u8] {
4060                self.0.reborrow().payload
4061            }
4062        }
4063        impl ::core::convert::From<::buffa::OwnedView<PongResponseView<'static>>>
4064        for PongResponseOwnedView {
4065            fn from(inner: ::buffa::OwnedView<PongResponseView<'static>>) -> Self {
4066                PongResponseOwnedView(inner)
4067            }
4068        }
4069        impl ::core::convert::From<PongResponseOwnedView>
4070        for ::buffa::OwnedView<PongResponseView<'static>> {
4071            fn from(wrapper: PongResponseOwnedView) -> Self {
4072                wrapper.0
4073            }
4074        }
4075        impl ::core::convert::AsRef<::buffa::OwnedView<PongResponseView<'static>>>
4076        for PongResponseOwnedView {
4077            fn as_ref(&self) -> &::buffa::OwnedView<PongResponseView<'static>> {
4078                &self.0
4079            }
4080        }
4081        impl ::buffa::HasMessageView for super::super::PongResponse {
4082            type View<'a> = PongResponseView<'a>;
4083            type ViewHandle = PongResponseOwnedView;
4084        }
4085        impl ::serde::Serialize for PongResponseOwnedView {
4086            fn serialize<__S: ::serde::Serializer>(
4087                &self,
4088                __s: __S,
4089            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4090                ::serde::Serialize::serialize(&self.0, __s)
4091            }
4092        }
4093        /// AckResponse carries the command-specific public Orders API acknowledgement.
4094        #[derive(Clone, Debug, Default)]
4095        pub struct AckResponseView<'a> {
4096            pub result: ::core::option::Option<
4097                super::super::__buffa::view::oneof::ack_response::Result<'a>,
4098            >,
4099            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4100        }
4101        impl<'a> ::buffa::MessageView<'a> for AckResponseView<'a> {
4102            type Owned = super::super::AckResponse;
4103            fn decode_view(
4104                buf: &'a [u8],
4105            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4106                let __limit = ::core::cell::Cell::new(
4107                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4108                );
4109                <Self as ::buffa::MessageView>::decode_view_ctx(
4110                    buf,
4111                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4112                )
4113            }
4114            fn decode_view_with_ctx(
4115                buf: &'a [u8],
4116                ctx: ::buffa::DecodeContext<'_>,
4117            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4118                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4119            }
4120            fn merge_view_field(
4121                &mut self,
4122                tag: ::buffa::encoding::Tag,
4123                cur: &'a [u8],
4124                before_tag: &'a [u8],
4125                ctx: ::buffa::DecodeContext<'_>,
4126            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4127                let _ = ctx;
4128                #[allow(unused_variables)]
4129                let view = self;
4130                let mut cur = cur;
4131                match tag.field_number() {
4132                    1u32 => {
4133                        ::buffa::encoding::check_wire_type(
4134                            tag,
4135                            ::buffa::encoding::WireType::LengthDelimited,
4136                        )?;
4137                        let __sub_ctx = ctx.descend()?;
4138                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4139                        if let Some(
4140                            super::super::__buffa::view::oneof::ack_response::Result::CreateOrder(
4141                                ref mut existing,
4142                            ),
4143                        ) = view.result
4144                        {
4145                            ::buffa::MessageView::merge_into_view(
4146                                &mut **existing,
4147                                sub,
4148                                __sub_ctx,
4149                            )?;
4150                        } else {
4151                            view.result = Some(
4152                                super::super::__buffa::view::oneof::ack_response::Result::CreateOrder(
4153                                    ::buffa::alloc::boxed::Box::new(
4154                                        <super::super::super::super::orders::v1::__buffa::view::CreateOrderResponseView as ::buffa::MessageView>::decode_view_ctx(
4155                                            sub,
4156                                            __sub_ctx,
4157                                        )?,
4158                                    ),
4159                                ),
4160                            );
4161                        }
4162                    }
4163                    2u32 => {
4164                        ::buffa::encoding::check_wire_type(
4165                            tag,
4166                            ::buffa::encoding::WireType::LengthDelimited,
4167                        )?;
4168                        let __sub_ctx = ctx.descend()?;
4169                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4170                        if let Some(
4171                            super::super::__buffa::view::oneof::ack_response::Result::CancelOrder(
4172                                ref mut existing,
4173                            ),
4174                        ) = view.result
4175                        {
4176                            ::buffa::MessageView::merge_into_view(
4177                                &mut **existing,
4178                                sub,
4179                                __sub_ctx,
4180                            )?;
4181                        } else {
4182                            view.result = Some(
4183                                super::super::__buffa::view::oneof::ack_response::Result::CancelOrder(
4184                                    ::buffa::alloc::boxed::Box::new(
4185                                        <super::super::super::super::orders::v1::__buffa::view::CancelOrderResponseView as ::buffa::MessageView>::decode_view_ctx(
4186                                            sub,
4187                                            __sub_ctx,
4188                                        )?,
4189                                    ),
4190                                ),
4191                            );
4192                        }
4193                    }
4194                    3u32 => {
4195                        ::buffa::encoding::check_wire_type(
4196                            tag,
4197                            ::buffa::encoding::WireType::LengthDelimited,
4198                        )?;
4199                        let __sub_ctx = ctx.descend()?;
4200                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4201                        if let Some(
4202                            super::super::__buffa::view::oneof::ack_response::Result::ModifyOrder(
4203                                ref mut existing,
4204                            ),
4205                        ) = view.result
4206                        {
4207                            ::buffa::MessageView::merge_into_view(
4208                                &mut **existing,
4209                                sub,
4210                                __sub_ctx,
4211                            )?;
4212                        } else {
4213                            view.result = Some(
4214                                super::super::__buffa::view::oneof::ack_response::Result::ModifyOrder(
4215                                    ::buffa::alloc::boxed::Box::new(
4216                                        <super::super::super::super::orders::v1::__buffa::view::ModifyOrderResponseView as ::buffa::MessageView>::decode_view_ctx(
4217                                            sub,
4218                                            __sub_ctx,
4219                                        )?,
4220                                    ),
4221                                ),
4222                            );
4223                        }
4224                    }
4225                    4u32 => {
4226                        ::buffa::encoding::check_wire_type(
4227                            tag,
4228                            ::buffa::encoding::WireType::LengthDelimited,
4229                        )?;
4230                        let __sub_ctx = ctx.descend()?;
4231                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4232                        if let Some(
4233                            super::super::__buffa::view::oneof::ack_response::Result::CancelAllOrders(
4234                                ref mut existing,
4235                            ),
4236                        ) = view.result
4237                        {
4238                            ::buffa::MessageView::merge_into_view(
4239                                &mut **existing,
4240                                sub,
4241                                __sub_ctx,
4242                            )?;
4243                        } else {
4244                            view.result = Some(
4245                                super::super::__buffa::view::oneof::ack_response::Result::CancelAllOrders(
4246                                    ::buffa::alloc::boxed::Box::new(
4247                                        <super::super::super::super::orders::v1::__buffa::view::CancelAllOrdersResponseView as ::buffa::MessageView>::decode_view_ctx(
4248                                            sub,
4249                                            __sub_ctx,
4250                                        )?,
4251                                    ),
4252                                ),
4253                            );
4254                        }
4255                    }
4256                    _ => {
4257                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4258                        let span_len = before_tag.len() - cur.len();
4259                        view.__buffa_unknown_fields
4260                            .push_record(before_tag, span_len, ctx)?;
4261                    }
4262                }
4263                ::core::result::Result::Ok(cur)
4264            }
4265            fn to_owned_message(
4266                &self,
4267            ) -> ::core::result::Result<
4268                super::super::AckResponse,
4269                ::buffa::DecodeError,
4270            > {
4271                self.to_owned_from_source(None)
4272            }
4273            #[allow(clippy::useless_conversion, clippy::needless_update)]
4274            fn to_owned_from_source(
4275                &self,
4276                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4277            ) -> ::core::result::Result<
4278                super::super::AckResponse,
4279                ::buffa::DecodeError,
4280            > {
4281                #[allow(unused_imports)]
4282                use ::buffa::alloc::string::ToString as _;
4283                let _ = __buffa_src;
4284                ::core::result::Result::Ok(super::super::AckResponse {
4285                    result: match self.result.as_ref() {
4286                        ::core::option::Option::Some(v) => {
4287                            ::core::option::Option::Some(
4288                                match v {
4289                                    super::super::__buffa::view::oneof::ack_response::Result::CreateOrder(
4290                                        v,
4291                                    ) => {
4292                                        super::super::__buffa::oneof::ack_response::Result::CreateOrder(
4293                                            ::buffa::alloc::boxed::Box::new(
4294                                                v.to_owned_from_source(__buffa_src)?,
4295                                            ),
4296                                        )
4297                                    }
4298                                    super::super::__buffa::view::oneof::ack_response::Result::CancelOrder(
4299                                        v,
4300                                    ) => {
4301                                        super::super::__buffa::oneof::ack_response::Result::CancelOrder(
4302                                            ::buffa::alloc::boxed::Box::new(
4303                                                v.to_owned_from_source(__buffa_src)?,
4304                                            ),
4305                                        )
4306                                    }
4307                                    super::super::__buffa::view::oneof::ack_response::Result::ModifyOrder(
4308                                        v,
4309                                    ) => {
4310                                        super::super::__buffa::oneof::ack_response::Result::ModifyOrder(
4311                                            ::buffa::alloc::boxed::Box::new(
4312                                                v.to_owned_from_source(__buffa_src)?,
4313                                            ),
4314                                        )
4315                                    }
4316                                    super::super::__buffa::view::oneof::ack_response::Result::CancelAllOrders(
4317                                        v,
4318                                    ) => {
4319                                        super::super::__buffa::oneof::ack_response::Result::CancelAllOrders(
4320                                            ::buffa::alloc::boxed::Box::new(
4321                                                v.to_owned_from_source(__buffa_src)?,
4322                                            ),
4323                                        )
4324                                    }
4325                                },
4326                            )
4327                        }
4328                        ::core::option::Option::None => ::core::option::Option::None,
4329                    },
4330                    __buffa_unknown_fields: self
4331                        .__buffa_unknown_fields
4332                        .to_owned()?
4333                        .into(),
4334                    ..::core::default::Default::default()
4335                })
4336            }
4337        }
4338        impl<'a> ::buffa::ViewEncode<'a> for AckResponseView<'a> {
4339            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4340            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4341                #[allow(unused_imports)]
4342                use ::buffa::Enumeration as _;
4343                let mut size = 0u32;
4344                if let ::core::option::Option::Some(ref v) = self.result {
4345                    match v {
4346                        super::super::__buffa::view::oneof::ack_response::Result::CreateOrder(
4347                            x,
4348                        ) => {
4349                            let __slot = __cache.reserve();
4350                            let inner = x.compute_size(__cache);
4351                            __cache.set(__slot, inner);
4352                            size
4353                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
4354                                    + inner;
4355                        }
4356                        super::super::__buffa::view::oneof::ack_response::Result::CancelOrder(
4357                            x,
4358                        ) => {
4359                            let __slot = __cache.reserve();
4360                            let inner = x.compute_size(__cache);
4361                            __cache.set(__slot, inner);
4362                            size
4363                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
4364                                    + inner;
4365                        }
4366                        super::super::__buffa::view::oneof::ack_response::Result::ModifyOrder(
4367                            x,
4368                        ) => {
4369                            let __slot = __cache.reserve();
4370                            let inner = x.compute_size(__cache);
4371                            __cache.set(__slot, inner);
4372                            size
4373                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
4374                                    + inner;
4375                        }
4376                        super::super::__buffa::view::oneof::ack_response::Result::CancelAllOrders(
4377                            x,
4378                        ) => {
4379                            let __slot = __cache.reserve();
4380                            let inner = x.compute_size(__cache);
4381                            __cache.set(__slot, inner);
4382                            size
4383                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
4384                                    + inner;
4385                        }
4386                    }
4387                }
4388                size += self.__buffa_unknown_fields.encoded_len() as u32;
4389                size
4390            }
4391            #[allow(clippy::needless_borrow)]
4392            fn write_to(
4393                &self,
4394                __cache: &mut ::buffa::SizeCache,
4395                buf: &mut impl ::buffa::bytes::BufMut,
4396            ) {
4397                #[allow(unused_imports)]
4398                use ::buffa::Enumeration as _;
4399                if let ::core::option::Option::Some(ref v) = self.result {
4400                    match v {
4401                        super::super::__buffa::view::oneof::ack_response::Result::CreateOrder(
4402                            x,
4403                        ) => {
4404                            ::buffa::types::put_len_delimited_header(
4405                                1u32,
4406                                __cache.consume_next(),
4407                                buf,
4408                            );
4409                            x.write_to(__cache, buf);
4410                        }
4411                        super::super::__buffa::view::oneof::ack_response::Result::CancelOrder(
4412                            x,
4413                        ) => {
4414                            ::buffa::types::put_len_delimited_header(
4415                                2u32,
4416                                __cache.consume_next(),
4417                                buf,
4418                            );
4419                            x.write_to(__cache, buf);
4420                        }
4421                        super::super::__buffa::view::oneof::ack_response::Result::ModifyOrder(
4422                            x,
4423                        ) => {
4424                            ::buffa::types::put_len_delimited_header(
4425                                3u32,
4426                                __cache.consume_next(),
4427                                buf,
4428                            );
4429                            x.write_to(__cache, buf);
4430                        }
4431                        super::super::__buffa::view::oneof::ack_response::Result::CancelAllOrders(
4432                            x,
4433                        ) => {
4434                            ::buffa::types::put_len_delimited_header(
4435                                4u32,
4436                                __cache.consume_next(),
4437                                buf,
4438                            );
4439                            x.write_to(__cache, buf);
4440                        }
4441                    }
4442                }
4443                self.__buffa_unknown_fields.write_to(buf);
4444            }
4445        }
4446        /// Serializes this view as protobuf JSON.
4447        ///
4448        /// Implicit-presence fields with default values are omitted, `required`
4449        /// fields are always emitted, explicit-presence (`optional`) fields are
4450        /// emitted only when set, bytes fields are base64-encoded, and enum
4451        /// values are their proto name strings.
4452        ///
4453        /// This impl uses `serialize_map(None)` because the number of emitted
4454        /// fields depends on default-omission rules; serializers that require
4455        /// known map lengths (e.g. `bincode`) will return a runtime error.
4456        /// Use the owned message type for those formats.
4457        impl<'__a> ::serde::Serialize for AckResponseView<'__a> {
4458            fn serialize<__S: ::serde::Serializer>(
4459                &self,
4460                __s: __S,
4461            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4462                use ::serde::ser::SerializeMap as _;
4463                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4464                if let ::core::option::Option::Some(ref __ov) = self.result {
4465                    match __ov {
4466                        super::super::__buffa::view::oneof::ack_response::Result::CreateOrder(
4467                            v,
4468                        ) => {
4469                            __map.serialize_entry("createOrder", v)?;
4470                        }
4471                        super::super::__buffa::view::oneof::ack_response::Result::CancelOrder(
4472                            v,
4473                        ) => {
4474                            __map.serialize_entry("cancelOrder", v)?;
4475                        }
4476                        super::super::__buffa::view::oneof::ack_response::Result::ModifyOrder(
4477                            v,
4478                        ) => {
4479                            __map.serialize_entry("modifyOrder", v)?;
4480                        }
4481                        super::super::__buffa::view::oneof::ack_response::Result::CancelAllOrders(
4482                            v,
4483                        ) => {
4484                            __map.serialize_entry("cancelAllOrders", v)?;
4485                        }
4486                    }
4487                }
4488                __map.end()
4489            }
4490        }
4491        impl<'a> ::buffa::MessageName for AckResponseView<'a> {
4492            const PACKAGE: &'static str = "tradews.v1";
4493            const NAME: &'static str = "AckResponse";
4494            const FULL_NAME: &'static str = "tradews.v1.AckResponse";
4495            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.AckResponse";
4496        }
4497        ::buffa::impl_default_view_instance!(AckResponseView);
4498        ::buffa::impl_view_reborrow!(AckResponseView);
4499        /** Self-contained, `'static` owned view of a `AckResponse` message.
4500
4501 Wraps [`::buffa::OwnedView`]`<`[`AckResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
4502
4503 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AckResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4504        #[derive(Clone, Debug)]
4505        pub struct AckResponseOwnedView(::buffa::OwnedView<AckResponseView<'static>>);
4506        impl AckResponseOwnedView {
4507            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4508            ///
4509            /// The view borrows directly from the buffer's data; the buffer is
4510            /// retained inside the returned handle.
4511            ///
4512            /// # Errors
4513            ///
4514            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4515            /// protobuf data.
4516            pub fn decode(
4517                bytes: ::buffa::bytes::Bytes,
4518            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4519                ::core::result::Result::Ok(
4520                    AckResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
4521                )
4522            }
4523            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4524            /// max message size).
4525            ///
4526            /// # Errors
4527            ///
4528            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4529            /// exceeds the configured limits.
4530            pub fn decode_with_options(
4531                bytes: ::buffa::bytes::Bytes,
4532                opts: &::buffa::DecodeOptions,
4533            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4534                ::core::result::Result::Ok(
4535                    AckResponseOwnedView(
4536                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4537                    ),
4538                )
4539            }
4540            /// Build from an owned message via an encode → decode round-trip.
4541            ///
4542            /// # Errors
4543            ///
4544            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4545            /// somehow invalid (should not happen for well-formed messages).
4546            pub fn from_owned(
4547                msg: &super::super::AckResponse,
4548            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4549                ::core::result::Result::Ok(
4550                    AckResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
4551                )
4552            }
4553            /// Borrow the full [`AckResponseView`] with its lifetime tied to `&self`.
4554            #[must_use]
4555            pub fn view(&self) -> &AckResponseView<'_> {
4556                self.0.reborrow()
4557            }
4558            /// Convert to the owned message type.
4559            ///
4560            /// # Errors
4561            ///
4562            /// Returns an error if re-materializing preserved unknown fields
4563            /// fails (e.g. the unknown-field limit is exceeded).
4564            pub fn to_owned_message(
4565                &self,
4566            ) -> ::core::result::Result<
4567                super::super::AckResponse,
4568                ::buffa::DecodeError,
4569            > {
4570                self.0.to_owned_message()
4571            }
4572            /// The underlying bytes buffer.
4573            #[must_use]
4574            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4575                self.0.bytes()
4576            }
4577            /// Consume the handle, returning the underlying bytes buffer.
4578            #[must_use]
4579            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4580                self.0.into_bytes()
4581            }
4582            /// Oneof `result`.
4583            #[must_use]
4584            pub fn result(
4585                &self,
4586            ) -> ::core::option::Option<
4587                &super::super::__buffa::view::oneof::ack_response::Result<'_>,
4588            > {
4589                self.0.reborrow().result.as_ref()
4590            }
4591        }
4592        impl ::core::convert::From<::buffa::OwnedView<AckResponseView<'static>>>
4593        for AckResponseOwnedView {
4594            fn from(inner: ::buffa::OwnedView<AckResponseView<'static>>) -> Self {
4595                AckResponseOwnedView(inner)
4596            }
4597        }
4598        impl ::core::convert::From<AckResponseOwnedView>
4599        for ::buffa::OwnedView<AckResponseView<'static>> {
4600            fn from(wrapper: AckResponseOwnedView) -> Self {
4601                wrapper.0
4602            }
4603        }
4604        impl ::core::convert::AsRef<::buffa::OwnedView<AckResponseView<'static>>>
4605        for AckResponseOwnedView {
4606            fn as_ref(&self) -> &::buffa::OwnedView<AckResponseView<'static>> {
4607                &self.0
4608            }
4609        }
4610        impl ::buffa::HasMessageView for super::super::AckResponse {
4611            type View<'a> = AckResponseView<'a>;
4612            type ViewHandle = AckResponseOwnedView;
4613        }
4614        impl ::serde::Serialize for AckResponseOwnedView {
4615            fn serialize<__S: ::serde::Serializer>(
4616                &self,
4617                __s: __S,
4618            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4619                ::serde::Serialize::serialize(&self.0, __s)
4620            }
4621        }
4622        /// CommandReject reports a command-level failure without closing the session.
4623        #[derive(Clone, Debug, Default)]
4624        pub struct CommandRejectView<'a> {
4625            /// Stable machine-readable reject code.
4626            ///
4627            /// Field 1: `code`
4628            pub code: &'a str,
4629            /// Client-safe diagnostic detail.
4630            ///
4631            /// Field 2: `detail`
4632            pub detail: &'a str,
4633            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4634        }
4635        impl<'a> ::buffa::MessageView<'a> for CommandRejectView<'a> {
4636            type Owned = super::super::CommandReject;
4637            fn decode_view(
4638                buf: &'a [u8],
4639            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4640                let __limit = ::core::cell::Cell::new(
4641                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4642                );
4643                <Self as ::buffa::MessageView>::decode_view_ctx(
4644                    buf,
4645                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4646                )
4647            }
4648            fn decode_view_with_ctx(
4649                buf: &'a [u8],
4650                ctx: ::buffa::DecodeContext<'_>,
4651            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4652                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4653            }
4654            fn merge_view_field(
4655                &mut self,
4656                tag: ::buffa::encoding::Tag,
4657                cur: &'a [u8],
4658                before_tag: &'a [u8],
4659                ctx: ::buffa::DecodeContext<'_>,
4660            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4661                let _ = ctx;
4662                #[allow(unused_variables)]
4663                let view = self;
4664                let mut cur = cur;
4665                match tag.field_number() {
4666                    1u32 => {
4667                        ::buffa::encoding::check_wire_type(
4668                            tag,
4669                            ::buffa::encoding::WireType::LengthDelimited,
4670                        )?;
4671                        view.code = ::buffa::types::borrow_str(&mut cur)?;
4672                    }
4673                    2u32 => {
4674                        ::buffa::encoding::check_wire_type(
4675                            tag,
4676                            ::buffa::encoding::WireType::LengthDelimited,
4677                        )?;
4678                        view.detail = ::buffa::types::borrow_str(&mut cur)?;
4679                    }
4680                    _ => {
4681                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4682                        let span_len = before_tag.len() - cur.len();
4683                        view.__buffa_unknown_fields
4684                            .push_record(before_tag, span_len, ctx)?;
4685                    }
4686                }
4687                ::core::result::Result::Ok(cur)
4688            }
4689            fn to_owned_message(
4690                &self,
4691            ) -> ::core::result::Result<
4692                super::super::CommandReject,
4693                ::buffa::DecodeError,
4694            > {
4695                self.to_owned_from_source(None)
4696            }
4697            #[allow(clippy::useless_conversion, clippy::needless_update)]
4698            fn to_owned_from_source(
4699                &self,
4700                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4701            ) -> ::core::result::Result<
4702                super::super::CommandReject,
4703                ::buffa::DecodeError,
4704            > {
4705                #[allow(unused_imports)]
4706                use ::buffa::alloc::string::ToString as _;
4707                let _ = __buffa_src;
4708                ::core::result::Result::Ok(super::super::CommandReject {
4709                    code: self.code.to_string(),
4710                    detail: self.detail.to_string(),
4711                    __buffa_unknown_fields: self
4712                        .__buffa_unknown_fields
4713                        .to_owned()?
4714                        .into(),
4715                    ..::core::default::Default::default()
4716                })
4717            }
4718        }
4719        impl<'a> ::buffa::ViewEncode<'a> for CommandRejectView<'a> {
4720            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4721            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4722                #[allow(unused_imports)]
4723                use ::buffa::Enumeration as _;
4724                let mut size = 0u32;
4725                if !self.code.is_empty() {
4726                    size += 1u32 + ::buffa::types::string_encoded_len(&self.code) as u32;
4727                }
4728                if !self.detail.is_empty() {
4729                    size
4730                        += 1u32
4731                            + ::buffa::types::string_encoded_len(&self.detail) as u32;
4732                }
4733                size += self.__buffa_unknown_fields.encoded_len() as u32;
4734                size
4735            }
4736            #[allow(clippy::needless_borrow)]
4737            fn write_to(
4738                &self,
4739                _cache: &mut ::buffa::SizeCache,
4740                buf: &mut impl ::buffa::bytes::BufMut,
4741            ) {
4742                #[allow(unused_imports)]
4743                use ::buffa::Enumeration as _;
4744                if !self.code.is_empty() {
4745                    ::buffa::types::put_string_field(1u32, &self.code, buf);
4746                }
4747                if !self.detail.is_empty() {
4748                    ::buffa::types::put_string_field(2u32, &self.detail, buf);
4749                }
4750                self.__buffa_unknown_fields.write_to(buf);
4751            }
4752        }
4753        /// Serializes this view as protobuf JSON.
4754        ///
4755        /// Implicit-presence fields with default values are omitted, `required`
4756        /// fields are always emitted, explicit-presence (`optional`) fields are
4757        /// emitted only when set, bytes fields are base64-encoded, and enum
4758        /// values are their proto name strings.
4759        ///
4760        /// This impl uses `serialize_map(None)` because the number of emitted
4761        /// fields depends on default-omission rules; serializers that require
4762        /// known map lengths (e.g. `bincode`) will return a runtime error.
4763        /// Use the owned message type for those formats.
4764        impl<'__a> ::serde::Serialize for CommandRejectView<'__a> {
4765            fn serialize<__S: ::serde::Serializer>(
4766                &self,
4767                __s: __S,
4768            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4769                use ::serde::ser::SerializeMap as _;
4770                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4771                if !::buffa::json_helpers::skip_if::is_empty_str(self.code) {
4772                    __map.serialize_entry("code", self.code)?;
4773                }
4774                if !::buffa::json_helpers::skip_if::is_empty_str(self.detail) {
4775                    __map.serialize_entry("detail", self.detail)?;
4776                }
4777                __map.end()
4778            }
4779        }
4780        impl<'a> ::buffa::MessageName for CommandRejectView<'a> {
4781            const PACKAGE: &'static str = "tradews.v1";
4782            const NAME: &'static str = "CommandReject";
4783            const FULL_NAME: &'static str = "tradews.v1.CommandReject";
4784            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.CommandReject";
4785        }
4786        ::buffa::impl_default_view_instance!(CommandRejectView);
4787        ::buffa::impl_view_reborrow!(CommandRejectView);
4788        /** Self-contained, `'static` owned view of a `CommandReject` message.
4789
4790 Wraps [`::buffa::OwnedView`]`<`[`CommandRejectView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
4791
4792 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CommandRejectView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4793        #[derive(Clone, Debug)]
4794        pub struct CommandRejectOwnedView(
4795            ::buffa::OwnedView<CommandRejectView<'static>>,
4796        );
4797        impl CommandRejectOwnedView {
4798            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4799            ///
4800            /// The view borrows directly from the buffer's data; the buffer is
4801            /// retained inside the returned handle.
4802            ///
4803            /// # Errors
4804            ///
4805            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4806            /// protobuf data.
4807            pub fn decode(
4808                bytes: ::buffa::bytes::Bytes,
4809            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4810                ::core::result::Result::Ok(
4811                    CommandRejectOwnedView(::buffa::OwnedView::decode(bytes)?),
4812                )
4813            }
4814            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4815            /// max message size).
4816            ///
4817            /// # Errors
4818            ///
4819            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4820            /// exceeds the configured limits.
4821            pub fn decode_with_options(
4822                bytes: ::buffa::bytes::Bytes,
4823                opts: &::buffa::DecodeOptions,
4824            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4825                ::core::result::Result::Ok(
4826                    CommandRejectOwnedView(
4827                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4828                    ),
4829                )
4830            }
4831            /// Build from an owned message via an encode → decode round-trip.
4832            ///
4833            /// # Errors
4834            ///
4835            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4836            /// somehow invalid (should not happen for well-formed messages).
4837            pub fn from_owned(
4838                msg: &super::super::CommandReject,
4839            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4840                ::core::result::Result::Ok(
4841                    CommandRejectOwnedView(::buffa::OwnedView::from_owned(msg)?),
4842                )
4843            }
4844            /// Borrow the full [`CommandRejectView`] with its lifetime tied to `&self`.
4845            #[must_use]
4846            pub fn view(&self) -> &CommandRejectView<'_> {
4847                self.0.reborrow()
4848            }
4849            /// Convert to the owned message type.
4850            ///
4851            /// # Errors
4852            ///
4853            /// Returns an error if re-materializing preserved unknown fields
4854            /// fails (e.g. the unknown-field limit is exceeded).
4855            pub fn to_owned_message(
4856                &self,
4857            ) -> ::core::result::Result<
4858                super::super::CommandReject,
4859                ::buffa::DecodeError,
4860            > {
4861                self.0.to_owned_message()
4862            }
4863            /// The underlying bytes buffer.
4864            #[must_use]
4865            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4866                self.0.bytes()
4867            }
4868            /// Consume the handle, returning the underlying bytes buffer.
4869            #[must_use]
4870            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4871                self.0.into_bytes()
4872            }
4873            /// Stable machine-readable reject code.
4874            ///
4875            /// Field 1: `code`
4876            #[must_use]
4877            pub fn code(&self) -> &'_ str {
4878                self.0.reborrow().code
4879            }
4880            /// Client-safe diagnostic detail.
4881            ///
4882            /// Field 2: `detail`
4883            #[must_use]
4884            pub fn detail(&self) -> &'_ str {
4885                self.0.reborrow().detail
4886            }
4887        }
4888        impl ::core::convert::From<::buffa::OwnedView<CommandRejectView<'static>>>
4889        for CommandRejectOwnedView {
4890            fn from(inner: ::buffa::OwnedView<CommandRejectView<'static>>) -> Self {
4891                CommandRejectOwnedView(inner)
4892            }
4893        }
4894        impl ::core::convert::From<CommandRejectOwnedView>
4895        for ::buffa::OwnedView<CommandRejectView<'static>> {
4896            fn from(wrapper: CommandRejectOwnedView) -> Self {
4897                wrapper.0
4898            }
4899        }
4900        impl ::core::convert::AsRef<::buffa::OwnedView<CommandRejectView<'static>>>
4901        for CommandRejectOwnedView {
4902            fn as_ref(&self) -> &::buffa::OwnedView<CommandRejectView<'static>> {
4903                &self.0
4904            }
4905        }
4906        impl ::buffa::HasMessageView for super::super::CommandReject {
4907            type View<'a> = CommandRejectView<'a>;
4908            type ViewHandle = CommandRejectOwnedView;
4909        }
4910        impl ::serde::Serialize for CommandRejectOwnedView {
4911            fn serialize<__S: ::serde::Serializer>(
4912                &self,
4913                __s: __S,
4914            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4915                ::serde::Serialize::serialize(&self.0, __s)
4916            }
4917        }
4918        /// OverloadResponse reports that the session exceeded server admission limits.
4919        #[derive(Clone, Debug, Default)]
4920        pub struct OverloadResponseView<'a> {
4921            /// Stable machine-readable overload code.
4922            ///
4923            /// Field 1: `code`
4924            pub code: &'a str,
4925            /// Client-safe diagnostic detail.
4926            ///
4927            /// Field 2: `detail`
4928            pub detail: &'a str,
4929            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4930        }
4931        impl<'a> ::buffa::MessageView<'a> for OverloadResponseView<'a> {
4932            type Owned = super::super::OverloadResponse;
4933            fn decode_view(
4934                buf: &'a [u8],
4935            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4936                let __limit = ::core::cell::Cell::new(
4937                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4938                );
4939                <Self as ::buffa::MessageView>::decode_view_ctx(
4940                    buf,
4941                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4942                )
4943            }
4944            fn decode_view_with_ctx(
4945                buf: &'a [u8],
4946                ctx: ::buffa::DecodeContext<'_>,
4947            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4948                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4949            }
4950            fn merge_view_field(
4951                &mut self,
4952                tag: ::buffa::encoding::Tag,
4953                cur: &'a [u8],
4954                before_tag: &'a [u8],
4955                ctx: ::buffa::DecodeContext<'_>,
4956            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4957                let _ = ctx;
4958                #[allow(unused_variables)]
4959                let view = self;
4960                let mut cur = cur;
4961                match tag.field_number() {
4962                    1u32 => {
4963                        ::buffa::encoding::check_wire_type(
4964                            tag,
4965                            ::buffa::encoding::WireType::LengthDelimited,
4966                        )?;
4967                        view.code = ::buffa::types::borrow_str(&mut cur)?;
4968                    }
4969                    2u32 => {
4970                        ::buffa::encoding::check_wire_type(
4971                            tag,
4972                            ::buffa::encoding::WireType::LengthDelimited,
4973                        )?;
4974                        view.detail = ::buffa::types::borrow_str(&mut cur)?;
4975                    }
4976                    _ => {
4977                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4978                        let span_len = before_tag.len() - cur.len();
4979                        view.__buffa_unknown_fields
4980                            .push_record(before_tag, span_len, ctx)?;
4981                    }
4982                }
4983                ::core::result::Result::Ok(cur)
4984            }
4985            fn to_owned_message(
4986                &self,
4987            ) -> ::core::result::Result<
4988                super::super::OverloadResponse,
4989                ::buffa::DecodeError,
4990            > {
4991                self.to_owned_from_source(None)
4992            }
4993            #[allow(clippy::useless_conversion, clippy::needless_update)]
4994            fn to_owned_from_source(
4995                &self,
4996                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4997            ) -> ::core::result::Result<
4998                super::super::OverloadResponse,
4999                ::buffa::DecodeError,
5000            > {
5001                #[allow(unused_imports)]
5002                use ::buffa::alloc::string::ToString as _;
5003                let _ = __buffa_src;
5004                ::core::result::Result::Ok(super::super::OverloadResponse {
5005                    code: self.code.to_string(),
5006                    detail: self.detail.to_string(),
5007                    __buffa_unknown_fields: self
5008                        .__buffa_unknown_fields
5009                        .to_owned()?
5010                        .into(),
5011                    ..::core::default::Default::default()
5012                })
5013            }
5014        }
5015        impl<'a> ::buffa::ViewEncode<'a> for OverloadResponseView<'a> {
5016            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5017            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5018                #[allow(unused_imports)]
5019                use ::buffa::Enumeration as _;
5020                let mut size = 0u32;
5021                if !self.code.is_empty() {
5022                    size += 1u32 + ::buffa::types::string_encoded_len(&self.code) as u32;
5023                }
5024                if !self.detail.is_empty() {
5025                    size
5026                        += 1u32
5027                            + ::buffa::types::string_encoded_len(&self.detail) as u32;
5028                }
5029                size += self.__buffa_unknown_fields.encoded_len() as u32;
5030                size
5031            }
5032            #[allow(clippy::needless_borrow)]
5033            fn write_to(
5034                &self,
5035                _cache: &mut ::buffa::SizeCache,
5036                buf: &mut impl ::buffa::bytes::BufMut,
5037            ) {
5038                #[allow(unused_imports)]
5039                use ::buffa::Enumeration as _;
5040                if !self.code.is_empty() {
5041                    ::buffa::types::put_string_field(1u32, &self.code, buf);
5042                }
5043                if !self.detail.is_empty() {
5044                    ::buffa::types::put_string_field(2u32, &self.detail, buf);
5045                }
5046                self.__buffa_unknown_fields.write_to(buf);
5047            }
5048        }
5049        /// Serializes this view as protobuf JSON.
5050        ///
5051        /// Implicit-presence fields with default values are omitted, `required`
5052        /// fields are always emitted, explicit-presence (`optional`) fields are
5053        /// emitted only when set, bytes fields are base64-encoded, and enum
5054        /// values are their proto name strings.
5055        ///
5056        /// This impl uses `serialize_map(None)` because the number of emitted
5057        /// fields depends on default-omission rules; serializers that require
5058        /// known map lengths (e.g. `bincode`) will return a runtime error.
5059        /// Use the owned message type for those formats.
5060        impl<'__a> ::serde::Serialize for OverloadResponseView<'__a> {
5061            fn serialize<__S: ::serde::Serializer>(
5062                &self,
5063                __s: __S,
5064            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5065                use ::serde::ser::SerializeMap as _;
5066                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5067                if !::buffa::json_helpers::skip_if::is_empty_str(self.code) {
5068                    __map.serialize_entry("code", self.code)?;
5069                }
5070                if !::buffa::json_helpers::skip_if::is_empty_str(self.detail) {
5071                    __map.serialize_entry("detail", self.detail)?;
5072                }
5073                __map.end()
5074            }
5075        }
5076        impl<'a> ::buffa::MessageName for OverloadResponseView<'a> {
5077            const PACKAGE: &'static str = "tradews.v1";
5078            const NAME: &'static str = "OverloadResponse";
5079            const FULL_NAME: &'static str = "tradews.v1.OverloadResponse";
5080            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.OverloadResponse";
5081        }
5082        ::buffa::impl_default_view_instance!(OverloadResponseView);
5083        ::buffa::impl_view_reborrow!(OverloadResponseView);
5084        /** Self-contained, `'static` owned view of a `OverloadResponse` message.
5085
5086 Wraps [`::buffa::OwnedView`]`<`[`OverloadResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5087
5088 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`OverloadResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5089        #[derive(Clone, Debug)]
5090        pub struct OverloadResponseOwnedView(
5091            ::buffa::OwnedView<OverloadResponseView<'static>>,
5092        );
5093        impl OverloadResponseOwnedView {
5094            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5095            ///
5096            /// The view borrows directly from the buffer's data; the buffer is
5097            /// retained inside the returned handle.
5098            ///
5099            /// # Errors
5100            ///
5101            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5102            /// protobuf data.
5103            pub fn decode(
5104                bytes: ::buffa::bytes::Bytes,
5105            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5106                ::core::result::Result::Ok(
5107                    OverloadResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
5108                )
5109            }
5110            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5111            /// max message size).
5112            ///
5113            /// # Errors
5114            ///
5115            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5116            /// exceeds the configured limits.
5117            pub fn decode_with_options(
5118                bytes: ::buffa::bytes::Bytes,
5119                opts: &::buffa::DecodeOptions,
5120            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5121                ::core::result::Result::Ok(
5122                    OverloadResponseOwnedView(
5123                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5124                    ),
5125                )
5126            }
5127            /// Build from an owned message via an encode → decode round-trip.
5128            ///
5129            /// # Errors
5130            ///
5131            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5132            /// somehow invalid (should not happen for well-formed messages).
5133            pub fn from_owned(
5134                msg: &super::super::OverloadResponse,
5135            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5136                ::core::result::Result::Ok(
5137                    OverloadResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
5138                )
5139            }
5140            /// Borrow the full [`OverloadResponseView`] with its lifetime tied to `&self`.
5141            #[must_use]
5142            pub fn view(&self) -> &OverloadResponseView<'_> {
5143                self.0.reborrow()
5144            }
5145            /// Convert to the owned message type.
5146            ///
5147            /// # Errors
5148            ///
5149            /// Returns an error if re-materializing preserved unknown fields
5150            /// fails (e.g. the unknown-field limit is exceeded).
5151            pub fn to_owned_message(
5152                &self,
5153            ) -> ::core::result::Result<
5154                super::super::OverloadResponse,
5155                ::buffa::DecodeError,
5156            > {
5157                self.0.to_owned_message()
5158            }
5159            /// The underlying bytes buffer.
5160            #[must_use]
5161            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5162                self.0.bytes()
5163            }
5164            /// Consume the handle, returning the underlying bytes buffer.
5165            #[must_use]
5166            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5167                self.0.into_bytes()
5168            }
5169            /// Stable machine-readable overload code.
5170            ///
5171            /// Field 1: `code`
5172            #[must_use]
5173            pub fn code(&self) -> &'_ str {
5174                self.0.reborrow().code
5175            }
5176            /// Client-safe diagnostic detail.
5177            ///
5178            /// Field 2: `detail`
5179            #[must_use]
5180            pub fn detail(&self) -> &'_ str {
5181                self.0.reborrow().detail
5182            }
5183        }
5184        impl ::core::convert::From<::buffa::OwnedView<OverloadResponseView<'static>>>
5185        for OverloadResponseOwnedView {
5186            fn from(inner: ::buffa::OwnedView<OverloadResponseView<'static>>) -> Self {
5187                OverloadResponseOwnedView(inner)
5188            }
5189        }
5190        impl ::core::convert::From<OverloadResponseOwnedView>
5191        for ::buffa::OwnedView<OverloadResponseView<'static>> {
5192            fn from(wrapper: OverloadResponseOwnedView) -> Self {
5193                wrapper.0
5194            }
5195        }
5196        impl ::core::convert::AsRef<::buffa::OwnedView<OverloadResponseView<'static>>>
5197        for OverloadResponseOwnedView {
5198            fn as_ref(&self) -> &::buffa::OwnedView<OverloadResponseView<'static>> {
5199                &self.0
5200            }
5201        }
5202        impl ::buffa::HasMessageView for super::super::OverloadResponse {
5203            type View<'a> = OverloadResponseView<'a>;
5204            type ViewHandle = OverloadResponseOwnedView;
5205        }
5206        impl ::serde::Serialize for OverloadResponseOwnedView {
5207            fn serialize<__S: ::serde::Serializer>(
5208                &self,
5209                __s: __S,
5210            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5211                ::serde::Serialize::serialize(&self.0, __s)
5212            }
5213        }
5214        /// TerminalSessionEvent reports a terminal session condition.
5215        #[derive(Clone, Debug, Default)]
5216        pub struct TerminalSessionEventView<'a> {
5217            /// Stable machine-readable terminal code.
5218            ///
5219            /// Field 1: `code`
5220            pub code: &'a str,
5221            /// Client-safe diagnostic detail.
5222            ///
5223            /// Field 2: `detail`
5224            pub detail: &'a str,
5225            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5226        }
5227        impl<'a> ::buffa::MessageView<'a> for TerminalSessionEventView<'a> {
5228            type Owned = super::super::TerminalSessionEvent;
5229            fn decode_view(
5230                buf: &'a [u8],
5231            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5232                let __limit = ::core::cell::Cell::new(
5233                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
5234                );
5235                <Self as ::buffa::MessageView>::decode_view_ctx(
5236                    buf,
5237                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
5238                )
5239            }
5240            fn decode_view_with_ctx(
5241                buf: &'a [u8],
5242                ctx: ::buffa::DecodeContext<'_>,
5243            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5244                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
5245            }
5246            fn merge_view_field(
5247                &mut self,
5248                tag: ::buffa::encoding::Tag,
5249                cur: &'a [u8],
5250                before_tag: &'a [u8],
5251                ctx: ::buffa::DecodeContext<'_>,
5252            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
5253                let _ = ctx;
5254                #[allow(unused_variables)]
5255                let view = self;
5256                let mut cur = cur;
5257                match tag.field_number() {
5258                    1u32 => {
5259                        ::buffa::encoding::check_wire_type(
5260                            tag,
5261                            ::buffa::encoding::WireType::LengthDelimited,
5262                        )?;
5263                        view.code = ::buffa::types::borrow_str(&mut cur)?;
5264                    }
5265                    2u32 => {
5266                        ::buffa::encoding::check_wire_type(
5267                            tag,
5268                            ::buffa::encoding::WireType::LengthDelimited,
5269                        )?;
5270                        view.detail = ::buffa::types::borrow_str(&mut cur)?;
5271                    }
5272                    _ => {
5273                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
5274                        let span_len = before_tag.len() - cur.len();
5275                        view.__buffa_unknown_fields
5276                            .push_record(before_tag, span_len, ctx)?;
5277                    }
5278                }
5279                ::core::result::Result::Ok(cur)
5280            }
5281            fn to_owned_message(
5282                &self,
5283            ) -> ::core::result::Result<
5284                super::super::TerminalSessionEvent,
5285                ::buffa::DecodeError,
5286            > {
5287                self.to_owned_from_source(None)
5288            }
5289            #[allow(clippy::useless_conversion, clippy::needless_update)]
5290            fn to_owned_from_source(
5291                &self,
5292                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5293            ) -> ::core::result::Result<
5294                super::super::TerminalSessionEvent,
5295                ::buffa::DecodeError,
5296            > {
5297                #[allow(unused_imports)]
5298                use ::buffa::alloc::string::ToString as _;
5299                let _ = __buffa_src;
5300                ::core::result::Result::Ok(super::super::TerminalSessionEvent {
5301                    code: self.code.to_string(),
5302                    detail: self.detail.to_string(),
5303                    __buffa_unknown_fields: self
5304                        .__buffa_unknown_fields
5305                        .to_owned()?
5306                        .into(),
5307                    ..::core::default::Default::default()
5308                })
5309            }
5310        }
5311        impl<'a> ::buffa::ViewEncode<'a> for TerminalSessionEventView<'a> {
5312            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5313            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5314                #[allow(unused_imports)]
5315                use ::buffa::Enumeration as _;
5316                let mut size = 0u32;
5317                if !self.code.is_empty() {
5318                    size += 1u32 + ::buffa::types::string_encoded_len(&self.code) as u32;
5319                }
5320                if !self.detail.is_empty() {
5321                    size
5322                        += 1u32
5323                            + ::buffa::types::string_encoded_len(&self.detail) as u32;
5324                }
5325                size += self.__buffa_unknown_fields.encoded_len() as u32;
5326                size
5327            }
5328            #[allow(clippy::needless_borrow)]
5329            fn write_to(
5330                &self,
5331                _cache: &mut ::buffa::SizeCache,
5332                buf: &mut impl ::buffa::bytes::BufMut,
5333            ) {
5334                #[allow(unused_imports)]
5335                use ::buffa::Enumeration as _;
5336                if !self.code.is_empty() {
5337                    ::buffa::types::put_string_field(1u32, &self.code, buf);
5338                }
5339                if !self.detail.is_empty() {
5340                    ::buffa::types::put_string_field(2u32, &self.detail, buf);
5341                }
5342                self.__buffa_unknown_fields.write_to(buf);
5343            }
5344        }
5345        /// Serializes this view as protobuf JSON.
5346        ///
5347        /// Implicit-presence fields with default values are omitted, `required`
5348        /// fields are always emitted, explicit-presence (`optional`) fields are
5349        /// emitted only when set, bytes fields are base64-encoded, and enum
5350        /// values are their proto name strings.
5351        ///
5352        /// This impl uses `serialize_map(None)` because the number of emitted
5353        /// fields depends on default-omission rules; serializers that require
5354        /// known map lengths (e.g. `bincode`) will return a runtime error.
5355        /// Use the owned message type for those formats.
5356        impl<'__a> ::serde::Serialize for TerminalSessionEventView<'__a> {
5357            fn serialize<__S: ::serde::Serializer>(
5358                &self,
5359                __s: __S,
5360            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5361                use ::serde::ser::SerializeMap as _;
5362                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5363                if !::buffa::json_helpers::skip_if::is_empty_str(self.code) {
5364                    __map.serialize_entry("code", self.code)?;
5365                }
5366                if !::buffa::json_helpers::skip_if::is_empty_str(self.detail) {
5367                    __map.serialize_entry("detail", self.detail)?;
5368                }
5369                __map.end()
5370            }
5371        }
5372        impl<'a> ::buffa::MessageName for TerminalSessionEventView<'a> {
5373            const PACKAGE: &'static str = "tradews.v1";
5374            const NAME: &'static str = "TerminalSessionEvent";
5375            const FULL_NAME: &'static str = "tradews.v1.TerminalSessionEvent";
5376            const TYPE_URL: &'static str = "type.googleapis.com/tradews.v1.TerminalSessionEvent";
5377        }
5378        ::buffa::impl_default_view_instance!(TerminalSessionEventView);
5379        ::buffa::impl_view_reborrow!(TerminalSessionEventView);
5380        /** Self-contained, `'static` owned view of a `TerminalSessionEvent` message.
5381
5382 Wraps [`::buffa::OwnedView`]`<`[`TerminalSessionEventView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5383
5384 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`TerminalSessionEventView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5385        #[derive(Clone, Debug)]
5386        pub struct TerminalSessionEventOwnedView(
5387            ::buffa::OwnedView<TerminalSessionEventView<'static>>,
5388        );
5389        impl TerminalSessionEventOwnedView {
5390            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5391            ///
5392            /// The view borrows directly from the buffer's data; the buffer is
5393            /// retained inside the returned handle.
5394            ///
5395            /// # Errors
5396            ///
5397            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5398            /// protobuf data.
5399            pub fn decode(
5400                bytes: ::buffa::bytes::Bytes,
5401            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5402                ::core::result::Result::Ok(
5403                    TerminalSessionEventOwnedView(::buffa::OwnedView::decode(bytes)?),
5404                )
5405            }
5406            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5407            /// max message size).
5408            ///
5409            /// # Errors
5410            ///
5411            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5412            /// exceeds the configured limits.
5413            pub fn decode_with_options(
5414                bytes: ::buffa::bytes::Bytes,
5415                opts: &::buffa::DecodeOptions,
5416            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5417                ::core::result::Result::Ok(
5418                    TerminalSessionEventOwnedView(
5419                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5420                    ),
5421                )
5422            }
5423            /// Build from an owned message via an encode → decode round-trip.
5424            ///
5425            /// # Errors
5426            ///
5427            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5428            /// somehow invalid (should not happen for well-formed messages).
5429            pub fn from_owned(
5430                msg: &super::super::TerminalSessionEvent,
5431            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5432                ::core::result::Result::Ok(
5433                    TerminalSessionEventOwnedView(::buffa::OwnedView::from_owned(msg)?),
5434                )
5435            }
5436            /// Borrow the full [`TerminalSessionEventView`] with its lifetime tied to `&self`.
5437            #[must_use]
5438            pub fn view(&self) -> &TerminalSessionEventView<'_> {
5439                self.0.reborrow()
5440            }
5441            /// Convert to the owned message type.
5442            ///
5443            /// # Errors
5444            ///
5445            /// Returns an error if re-materializing preserved unknown fields
5446            /// fails (e.g. the unknown-field limit is exceeded).
5447            pub fn to_owned_message(
5448                &self,
5449            ) -> ::core::result::Result<
5450                super::super::TerminalSessionEvent,
5451                ::buffa::DecodeError,
5452            > {
5453                self.0.to_owned_message()
5454            }
5455            /// The underlying bytes buffer.
5456            #[must_use]
5457            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5458                self.0.bytes()
5459            }
5460            /// Consume the handle, returning the underlying bytes buffer.
5461            #[must_use]
5462            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5463                self.0.into_bytes()
5464            }
5465            /// Stable machine-readable terminal code.
5466            ///
5467            /// Field 1: `code`
5468            #[must_use]
5469            pub fn code(&self) -> &'_ str {
5470                self.0.reborrow().code
5471            }
5472            /// Client-safe diagnostic detail.
5473            ///
5474            /// Field 2: `detail`
5475            #[must_use]
5476            pub fn detail(&self) -> &'_ str {
5477                self.0.reborrow().detail
5478            }
5479        }
5480        impl ::core::convert::From<::buffa::OwnedView<TerminalSessionEventView<'static>>>
5481        for TerminalSessionEventOwnedView {
5482            fn from(
5483                inner: ::buffa::OwnedView<TerminalSessionEventView<'static>>,
5484            ) -> Self {
5485                TerminalSessionEventOwnedView(inner)
5486            }
5487        }
5488        impl ::core::convert::From<TerminalSessionEventOwnedView>
5489        for ::buffa::OwnedView<TerminalSessionEventView<'static>> {
5490            fn from(wrapper: TerminalSessionEventOwnedView) -> Self {
5491                wrapper.0
5492            }
5493        }
5494        impl ::core::convert::AsRef<
5495            ::buffa::OwnedView<TerminalSessionEventView<'static>>,
5496        > for TerminalSessionEventOwnedView {
5497            fn as_ref(&self) -> &::buffa::OwnedView<TerminalSessionEventView<'static>> {
5498                &self.0
5499            }
5500        }
5501        impl ::buffa::HasMessageView for super::super::TerminalSessionEvent {
5502            type View<'a> = TerminalSessionEventView<'a>;
5503            type ViewHandle = TerminalSessionEventOwnedView;
5504        }
5505        impl ::serde::Serialize for TerminalSessionEventOwnedView {
5506            fn serialize<__S: ::serde::Serializer>(
5507                &self,
5508                __s: __S,
5509            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5510                ::serde::Serialize::serialize(&self.0, __s)
5511            }
5512        }
5513        pub mod oneof {
5514            #[allow(unused_imports)]
5515            use super::*;
5516            pub mod client_frame {
5517                #[allow(unused_imports)]
5518                use super::*;
5519                #[derive(Clone, Debug)]
5520                pub enum Payload<'a> {
5521                    Ping(
5522                        ::buffa::alloc::boxed::Box<
5523                            super::super::super::super::__buffa::view::PingRequestView<
5524                                'a,
5525                            >,
5526                        >,
5527                    ),
5528                    CreateOrder(
5529                        ::buffa::alloc::boxed::Box<
5530                            super::super::super::super::super::super::orders::v1::__buffa::view::CreateOrderRequestView<
5531                                'a,
5532                            >,
5533                        >,
5534                    ),
5535                    CancelOrder(
5536                        ::buffa::alloc::boxed::Box<
5537                            super::super::super::super::super::super::orders::v1::__buffa::view::CancelOrderRequestView<
5538                                'a,
5539                            >,
5540                        >,
5541                    ),
5542                    ModifyOrder(
5543                        ::buffa::alloc::boxed::Box<
5544                            super::super::super::super::super::super::orders::v1::__buffa::view::ModifyOrderRequestView<
5545                                'a,
5546                            >,
5547                        >,
5548                    ),
5549                    CancelAllOrders(
5550                        ::buffa::alloc::boxed::Box<
5551                            super::super::super::super::super::super::orders::v1::__buffa::view::CancelAllOrdersRequestView<
5552                                'a,
5553                            >,
5554                        >,
5555                    ),
5556                }
5557            }
5558            pub mod server_frame {
5559                #[allow(unused_imports)]
5560                use super::*;
5561                #[derive(Clone, Debug)]
5562                pub enum Payload<'a> {
5563                    Pong(
5564                        ::buffa::alloc::boxed::Box<
5565                            super::super::super::super::__buffa::view::PongResponseView<
5566                                'a,
5567                            >,
5568                        >,
5569                    ),
5570                    Ack(
5571                        ::buffa::alloc::boxed::Box<
5572                            super::super::super::super::__buffa::view::AckResponseView<
5573                                'a,
5574                            >,
5575                        >,
5576                    ),
5577                    Reject(
5578                        ::buffa::alloc::boxed::Box<
5579                            super::super::super::super::__buffa::view::CommandRejectView<
5580                                'a,
5581                            >,
5582                        >,
5583                    ),
5584                    Overload(
5585                        ::buffa::alloc::boxed::Box<
5586                            super::super::super::super::__buffa::view::OverloadResponseView<
5587                                'a,
5588                            >,
5589                        >,
5590                    ),
5591                    Terminal(
5592                        ::buffa::alloc::boxed::Box<
5593                            super::super::super::super::__buffa::view::TerminalSessionEventView<
5594                                'a,
5595                            >,
5596                        >,
5597                    ),
5598                }
5599            }
5600            pub mod ack_response {
5601                #[allow(unused_imports)]
5602                use super::*;
5603                #[derive(Clone, Debug)]
5604                pub enum Result<'a> {
5605                    CreateOrder(
5606                        ::buffa::alloc::boxed::Box<
5607                            super::super::super::super::super::super::orders::v1::__buffa::view::CreateOrderResponseView<
5608                                'a,
5609                            >,
5610                        >,
5611                    ),
5612                    CancelOrder(
5613                        ::buffa::alloc::boxed::Box<
5614                            super::super::super::super::super::super::orders::v1::__buffa::view::CancelOrderResponseView<
5615                                'a,
5616                            >,
5617                        >,
5618                    ),
5619                    ModifyOrder(
5620                        ::buffa::alloc::boxed::Box<
5621                            super::super::super::super::super::super::orders::v1::__buffa::view::ModifyOrderResponseView<
5622                                'a,
5623                            >,
5624                        >,
5625                    ),
5626                    CancelAllOrders(
5627                        ::buffa::alloc::boxed::Box<
5628                            super::super::super::super::super::super::orders::v1::__buffa::view::CancelAllOrdersResponseView<
5629                                'a,
5630                            >,
5631                        >,
5632                    ),
5633                }
5634            }
5635        }
5636    }
5637    pub mod oneof {
5638        #[allow(unused_imports)]
5639        use super::*;
5640        pub mod client_frame {
5641            #[allow(unused_imports)]
5642            use super::*;
5643            #[derive(Clone, PartialEq, Debug)]
5644            pub enum Payload {
5645                Ping(::buffa::alloc::boxed::Box<super::super::super::PingRequest>),
5646                CreateOrder(
5647                    ::buffa::alloc::boxed::Box<
5648                        super::super::super::super::super::orders::v1::CreateOrderRequest,
5649                    >,
5650                ),
5651                CancelOrder(
5652                    ::buffa::alloc::boxed::Box<
5653                        super::super::super::super::super::orders::v1::CancelOrderRequest,
5654                    >,
5655                ),
5656                ModifyOrder(
5657                    ::buffa::alloc::boxed::Box<
5658                        super::super::super::super::super::orders::v1::ModifyOrderRequest,
5659                    >,
5660                ),
5661                CancelAllOrders(
5662                    ::buffa::alloc::boxed::Box<
5663                        super::super::super::super::super::orders::v1::CancelAllOrdersRequest,
5664                    >,
5665                ),
5666            }
5667            impl ::buffa::Oneof for Payload {}
5668            impl From<super::super::super::PingRequest> for Payload {
5669                fn from(v: super::super::super::PingRequest) -> Self {
5670                    Self::Ping(::buffa::alloc::boxed::Box::new(v))
5671                }
5672            }
5673            impl From<super::super::super::PingRequest>
5674            for ::core::option::Option<Payload> {
5675                fn from(v: super::super::super::PingRequest) -> Self {
5676                    Self::Some(Payload::from(v))
5677                }
5678            }
5679            impl From<super::super::super::super::super::orders::v1::CreateOrderRequest>
5680            for Payload {
5681                fn from(
5682                    v: super::super::super::super::super::orders::v1::CreateOrderRequest,
5683                ) -> Self {
5684                    Self::CreateOrder(::buffa::alloc::boxed::Box::new(v))
5685                }
5686            }
5687            impl From<super::super::super::super::super::orders::v1::CreateOrderRequest>
5688            for ::core::option::Option<Payload> {
5689                fn from(
5690                    v: super::super::super::super::super::orders::v1::CreateOrderRequest,
5691                ) -> Self {
5692                    Self::Some(Payload::from(v))
5693                }
5694            }
5695            impl From<super::super::super::super::super::orders::v1::CancelOrderRequest>
5696            for Payload {
5697                fn from(
5698                    v: super::super::super::super::super::orders::v1::CancelOrderRequest,
5699                ) -> Self {
5700                    Self::CancelOrder(::buffa::alloc::boxed::Box::new(v))
5701                }
5702            }
5703            impl From<super::super::super::super::super::orders::v1::CancelOrderRequest>
5704            for ::core::option::Option<Payload> {
5705                fn from(
5706                    v: super::super::super::super::super::orders::v1::CancelOrderRequest,
5707                ) -> Self {
5708                    Self::Some(Payload::from(v))
5709                }
5710            }
5711            impl From<super::super::super::super::super::orders::v1::ModifyOrderRequest>
5712            for Payload {
5713                fn from(
5714                    v: super::super::super::super::super::orders::v1::ModifyOrderRequest,
5715                ) -> Self {
5716                    Self::ModifyOrder(::buffa::alloc::boxed::Box::new(v))
5717                }
5718            }
5719            impl From<super::super::super::super::super::orders::v1::ModifyOrderRequest>
5720            for ::core::option::Option<Payload> {
5721                fn from(
5722                    v: super::super::super::super::super::orders::v1::ModifyOrderRequest,
5723                ) -> Self {
5724                    Self::Some(Payload::from(v))
5725                }
5726            }
5727            impl From<
5728                super::super::super::super::super::orders::v1::CancelAllOrdersRequest,
5729            > for Payload {
5730                fn from(
5731                    v: super::super::super::super::super::orders::v1::CancelAllOrdersRequest,
5732                ) -> Self {
5733                    Self::CancelAllOrders(::buffa::alloc::boxed::Box::new(v))
5734                }
5735            }
5736            impl From<
5737                super::super::super::super::super::orders::v1::CancelAllOrdersRequest,
5738            > for ::core::option::Option<Payload> {
5739                fn from(
5740                    v: super::super::super::super::super::orders::v1::CancelAllOrdersRequest,
5741                ) -> Self {
5742                    Self::Some(Payload::from(v))
5743                }
5744            }
5745            impl serde::Serialize for Payload {
5746                fn serialize<S: serde::Serializer>(
5747                    &self,
5748                    s: S,
5749                ) -> ::core::result::Result<S::Ok, S::Error> {
5750                    use serde::ser::SerializeMap;
5751                    let mut map = s.serialize_map(Some(1))?;
5752                    match self {
5753                        Self::Ping(v) => {
5754                            map.serialize_entry("ping", v)?;
5755                        }
5756                        Self::CreateOrder(v) => {
5757                            map.serialize_entry("createOrder", v)?;
5758                        }
5759                        Self::CancelOrder(v) => {
5760                            map.serialize_entry("cancelOrder", v)?;
5761                        }
5762                        Self::ModifyOrder(v) => {
5763                            map.serialize_entry("modifyOrder", v)?;
5764                        }
5765                        Self::CancelAllOrders(v) => {
5766                            map.serialize_entry("cancelAllOrders", v)?;
5767                        }
5768                    }
5769                    map.end()
5770                }
5771            }
5772        }
5773        pub mod server_frame {
5774            #[allow(unused_imports)]
5775            use super::*;
5776            #[derive(Clone, PartialEq, Debug)]
5777            pub enum Payload {
5778                Pong(::buffa::alloc::boxed::Box<super::super::super::PongResponse>),
5779                Ack(::buffa::alloc::boxed::Box<super::super::super::AckResponse>),
5780                Reject(::buffa::alloc::boxed::Box<super::super::super::CommandReject>),
5781                Overload(
5782                    ::buffa::alloc::boxed::Box<super::super::super::OverloadResponse>,
5783                ),
5784                Terminal(
5785                    ::buffa::alloc::boxed::Box<super::super::super::TerminalSessionEvent>,
5786                ),
5787            }
5788            impl ::buffa::Oneof for Payload {}
5789            impl From<super::super::super::PongResponse> for Payload {
5790                fn from(v: super::super::super::PongResponse) -> Self {
5791                    Self::Pong(::buffa::alloc::boxed::Box::new(v))
5792                }
5793            }
5794            impl From<super::super::super::PongResponse>
5795            for ::core::option::Option<Payload> {
5796                fn from(v: super::super::super::PongResponse) -> Self {
5797                    Self::Some(Payload::from(v))
5798                }
5799            }
5800            impl From<super::super::super::AckResponse> for Payload {
5801                fn from(v: super::super::super::AckResponse) -> Self {
5802                    Self::Ack(::buffa::alloc::boxed::Box::new(v))
5803                }
5804            }
5805            impl From<super::super::super::AckResponse>
5806            for ::core::option::Option<Payload> {
5807                fn from(v: super::super::super::AckResponse) -> Self {
5808                    Self::Some(Payload::from(v))
5809                }
5810            }
5811            impl From<super::super::super::CommandReject> for Payload {
5812                fn from(v: super::super::super::CommandReject) -> Self {
5813                    Self::Reject(::buffa::alloc::boxed::Box::new(v))
5814                }
5815            }
5816            impl From<super::super::super::CommandReject>
5817            for ::core::option::Option<Payload> {
5818                fn from(v: super::super::super::CommandReject) -> Self {
5819                    Self::Some(Payload::from(v))
5820                }
5821            }
5822            impl From<super::super::super::OverloadResponse> for Payload {
5823                fn from(v: super::super::super::OverloadResponse) -> Self {
5824                    Self::Overload(::buffa::alloc::boxed::Box::new(v))
5825                }
5826            }
5827            impl From<super::super::super::OverloadResponse>
5828            for ::core::option::Option<Payload> {
5829                fn from(v: super::super::super::OverloadResponse) -> Self {
5830                    Self::Some(Payload::from(v))
5831                }
5832            }
5833            impl From<super::super::super::TerminalSessionEvent> for Payload {
5834                fn from(v: super::super::super::TerminalSessionEvent) -> Self {
5835                    Self::Terminal(::buffa::alloc::boxed::Box::new(v))
5836                }
5837            }
5838            impl From<super::super::super::TerminalSessionEvent>
5839            for ::core::option::Option<Payload> {
5840                fn from(v: super::super::super::TerminalSessionEvent) -> Self {
5841                    Self::Some(Payload::from(v))
5842                }
5843            }
5844            impl serde::Serialize for Payload {
5845                fn serialize<S: serde::Serializer>(
5846                    &self,
5847                    s: S,
5848                ) -> ::core::result::Result<S::Ok, S::Error> {
5849                    use serde::ser::SerializeMap;
5850                    let mut map = s.serialize_map(Some(1))?;
5851                    match self {
5852                        Self::Pong(v) => {
5853                            map.serialize_entry("pong", v)?;
5854                        }
5855                        Self::Ack(v) => {
5856                            map.serialize_entry("ack", v)?;
5857                        }
5858                        Self::Reject(v) => {
5859                            map.serialize_entry("reject", v)?;
5860                        }
5861                        Self::Overload(v) => {
5862                            map.serialize_entry("overload", v)?;
5863                        }
5864                        Self::Terminal(v) => {
5865                            map.serialize_entry("terminal", v)?;
5866                        }
5867                    }
5868                    map.end()
5869                }
5870            }
5871        }
5872        pub mod ack_response {
5873            #[allow(unused_imports)]
5874            use super::*;
5875            #[derive(Clone, PartialEq, Debug)]
5876            pub enum Result {
5877                CreateOrder(
5878                    ::buffa::alloc::boxed::Box<
5879                        super::super::super::super::super::orders::v1::CreateOrderResponse,
5880                    >,
5881                ),
5882                CancelOrder(
5883                    ::buffa::alloc::boxed::Box<
5884                        super::super::super::super::super::orders::v1::CancelOrderResponse,
5885                    >,
5886                ),
5887                ModifyOrder(
5888                    ::buffa::alloc::boxed::Box<
5889                        super::super::super::super::super::orders::v1::ModifyOrderResponse,
5890                    >,
5891                ),
5892                CancelAllOrders(
5893                    ::buffa::alloc::boxed::Box<
5894                        super::super::super::super::super::orders::v1::CancelAllOrdersResponse,
5895                    >,
5896                ),
5897            }
5898            impl ::buffa::Oneof for Result {}
5899            impl From<super::super::super::super::super::orders::v1::CreateOrderResponse>
5900            for Result {
5901                fn from(
5902                    v: super::super::super::super::super::orders::v1::CreateOrderResponse,
5903                ) -> Self {
5904                    Self::CreateOrder(::buffa::alloc::boxed::Box::new(v))
5905                }
5906            }
5907            impl From<super::super::super::super::super::orders::v1::CreateOrderResponse>
5908            for ::core::option::Option<Result> {
5909                fn from(
5910                    v: super::super::super::super::super::orders::v1::CreateOrderResponse,
5911                ) -> Self {
5912                    Self::Some(Result::from(v))
5913                }
5914            }
5915            impl From<super::super::super::super::super::orders::v1::CancelOrderResponse>
5916            for Result {
5917                fn from(
5918                    v: super::super::super::super::super::orders::v1::CancelOrderResponse,
5919                ) -> Self {
5920                    Self::CancelOrder(::buffa::alloc::boxed::Box::new(v))
5921                }
5922            }
5923            impl From<super::super::super::super::super::orders::v1::CancelOrderResponse>
5924            for ::core::option::Option<Result> {
5925                fn from(
5926                    v: super::super::super::super::super::orders::v1::CancelOrderResponse,
5927                ) -> Self {
5928                    Self::Some(Result::from(v))
5929                }
5930            }
5931            impl From<super::super::super::super::super::orders::v1::ModifyOrderResponse>
5932            for Result {
5933                fn from(
5934                    v: super::super::super::super::super::orders::v1::ModifyOrderResponse,
5935                ) -> Self {
5936                    Self::ModifyOrder(::buffa::alloc::boxed::Box::new(v))
5937                }
5938            }
5939            impl From<super::super::super::super::super::orders::v1::ModifyOrderResponse>
5940            for ::core::option::Option<Result> {
5941                fn from(
5942                    v: super::super::super::super::super::orders::v1::ModifyOrderResponse,
5943                ) -> Self {
5944                    Self::Some(Result::from(v))
5945                }
5946            }
5947            impl From<
5948                super::super::super::super::super::orders::v1::CancelAllOrdersResponse,
5949            > for Result {
5950                fn from(
5951                    v: super::super::super::super::super::orders::v1::CancelAllOrdersResponse,
5952                ) -> Self {
5953                    Self::CancelAllOrders(::buffa::alloc::boxed::Box::new(v))
5954                }
5955            }
5956            impl From<
5957                super::super::super::super::super::orders::v1::CancelAllOrdersResponse,
5958            > for ::core::option::Option<Result> {
5959                fn from(
5960                    v: super::super::super::super::super::orders::v1::CancelAllOrdersResponse,
5961                ) -> Self {
5962                    Self::Some(Result::from(v))
5963                }
5964            }
5965            impl serde::Serialize for Result {
5966                fn serialize<S: serde::Serializer>(
5967                    &self,
5968                    s: S,
5969                ) -> ::core::result::Result<S::Ok, S::Error> {
5970                    use serde::ser::SerializeMap;
5971                    let mut map = s.serialize_map(Some(1))?;
5972                    match self {
5973                        Self::CreateOrder(v) => {
5974                            map.serialize_entry("createOrder", v)?;
5975                        }
5976                        Self::CancelOrder(v) => {
5977                            map.serialize_entry("cancelOrder", v)?;
5978                        }
5979                        Self::ModifyOrder(v) => {
5980                            map.serialize_entry("modifyOrder", v)?;
5981                        }
5982                        Self::CancelAllOrders(v) => {
5983                            map.serialize_entry("cancelAllOrders", v)?;
5984                        }
5985                    }
5986                    map.end()
5987                }
5988            }
5989        }
5990    }
5991    /// Register this package's `Any` type entries and extension entries.
5992    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
5993        reg.register_json_any(super::__CLIENT_FRAME_JSON_ANY);
5994        reg.register_json_any(super::__PING_REQUEST_JSON_ANY);
5995        reg.register_json_any(super::__SERVER_FRAME_JSON_ANY);
5996        reg.register_json_any(super::__PONG_RESPONSE_JSON_ANY);
5997        reg.register_json_any(super::__ACK_RESPONSE_JSON_ANY);
5998        reg.register_json_any(super::__COMMAND_REJECT_JSON_ANY);
5999        reg.register_json_any(super::__OVERLOAD_RESPONSE_JSON_ANY);
6000        reg.register_json_any(super::__TERMINAL_SESSION_EVENT_JSON_ANY);
6001    }
6002}
6003#[doc(inline)]
6004pub use self::__buffa::view::ClientFrameView;
6005#[doc(inline)]
6006pub use self::__buffa::view::ClientFrameOwnedView;
6007#[doc(inline)]
6008pub use self::__buffa::view::PingRequestView;
6009#[doc(inline)]
6010pub use self::__buffa::view::PingRequestOwnedView;
6011#[doc(inline)]
6012pub use self::__buffa::view::ServerFrameView;
6013#[doc(inline)]
6014pub use self::__buffa::view::ServerFrameOwnedView;
6015#[doc(inline)]
6016pub use self::__buffa::view::PongResponseView;
6017#[doc(inline)]
6018pub use self::__buffa::view::PongResponseOwnedView;
6019#[doc(inline)]
6020pub use self::__buffa::view::AckResponseView;
6021#[doc(inline)]
6022pub use self::__buffa::view::AckResponseOwnedView;
6023#[doc(inline)]
6024pub use self::__buffa::view::CommandRejectView;
6025#[doc(inline)]
6026pub use self::__buffa::view::CommandRejectOwnedView;
6027#[doc(inline)]
6028pub use self::__buffa::view::OverloadResponseView;
6029#[doc(inline)]
6030pub use self::__buffa::view::OverloadResponseOwnedView;
6031#[doc(inline)]
6032pub use self::__buffa::view::TerminalSessionEventView;
6033#[doc(inline)]
6034pub use self::__buffa::view::TerminalSessionEventOwnedView;
6035#[doc(inline)]
6036pub use self::__buffa::register_types;