1#[derive(Clone, PartialEq, Default)]
8#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
9pub struct DoubleValue {
10 pub value: f64,
14 #[doc(hidden)]
15 pub __buffa_unknown_fields: ::buffa::UnknownFields,
16}
17impl ::core::fmt::Debug for DoubleValue {
18 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
19 f.debug_struct("DoubleValue").field("value", &self.value).finish()
20 }
21}
22impl DoubleValue {
23 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DoubleValue";
28}
29impl ::buffa::DefaultInstance for DoubleValue {
30 fn default_instance() -> &'static Self {
31 static VALUE: ::buffa::__private::OnceBox<DoubleValue> = ::buffa::__private::OnceBox::new();
32 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
33 }
34}
35impl ::buffa::Message for DoubleValue {
36 #[allow(clippy::let_and_return)]
42 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
43 #[allow(unused_imports)]
44 use ::buffa::Enumeration as _;
45 let mut size = 0u32;
46 if self.value.to_bits() != 0u64 {
47 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
48 }
49 size += self.__buffa_unknown_fields.encoded_len() as u32;
50 size
51 }
52 fn write_to(
53 &self,
54 _cache: &mut ::buffa::SizeCache,
55 buf: &mut impl ::buffa::bytes::BufMut,
56 ) {
57 #[allow(unused_imports)]
58 use ::buffa::Enumeration as _;
59 if self.value.to_bits() != 0u64 {
60 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed64)
61 .encode(buf);
62 ::buffa::types::encode_double(self.value, buf);
63 }
64 self.__buffa_unknown_fields.write_to(buf);
65 }
66 fn merge_field(
67 &mut self,
68 tag: ::buffa::encoding::Tag,
69 buf: &mut impl ::buffa::bytes::Buf,
70 depth: u32,
71 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
72 #[allow(unused_imports)]
73 use ::buffa::bytes::Buf as _;
74 #[allow(unused_imports)]
75 use ::buffa::Enumeration as _;
76 match tag.field_number() {
77 1u32 => {
78 if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
79 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
80 field_number: 1u32,
81 expected: 1u8,
82 actual: tag.wire_type() as u8,
83 });
84 }
85 self.value = ::buffa::types::decode_double(buf)?;
86 }
87 _ => {
88 self.__buffa_unknown_fields
89 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
90 }
91 }
92 ::core::result::Result::Ok(())
93 }
94 fn clear(&mut self) {
95 self.value = 0f64;
96 self.__buffa_unknown_fields.clear();
97 }
98}
99impl ::buffa::ExtensionSet for DoubleValue {
100 const PROTO_FQN: &'static str = "google.protobuf.DoubleValue";
101 fn unknown_fields(&self) -> &::buffa::UnknownFields {
102 &self.__buffa_unknown_fields
103 }
104 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
105 &mut self.__buffa_unknown_fields
106 }
107}
108impl ::buffa::text::TextFormat for DoubleValue {
109 fn encode_text(
110 &self,
111 enc: &mut ::buffa::text::TextEncoder<'_>,
112 ) -> ::core::fmt::Result {
113 #[allow(unused_imports)]
114 use ::buffa::Enumeration as _;
115 if self.value.to_bits() != 0u64 {
116 enc.write_field_name("value")?;
117 enc.write_f64(self.value)?;
118 }
119 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
120 ::core::result::Result::Ok(())
121 }
122 fn merge_text(
123 &mut self,
124 dec: &mut ::buffa::text::TextDecoder<'_>,
125 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
126 #[allow(unused_imports)]
127 use ::buffa::Enumeration as _;
128 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
129 match __name {
130 "value" => self.value = dec.read_f64()?,
131 _ => dec.skip_value()?,
132 }
133 }
134 ::core::result::Result::Ok(())
135 }
136}
137#[doc(hidden)]
138pub const __DOUBLE_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
139 type_url: "type.googleapis.com/google.protobuf.DoubleValue",
140 text_encode: ::buffa::type_registry::any_encode_text::<DoubleValue>,
141 text_merge: ::buffa::type_registry::any_merge_text::<DoubleValue>,
142};
143#[derive(Clone, PartialEq, Default)]
147#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
148pub struct FloatValue {
149 pub value: f32,
153 #[doc(hidden)]
154 pub __buffa_unknown_fields: ::buffa::UnknownFields,
155}
156impl ::core::fmt::Debug for FloatValue {
157 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
158 f.debug_struct("FloatValue").field("value", &self.value).finish()
159 }
160}
161impl FloatValue {
162 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
167}
168impl ::buffa::DefaultInstance for FloatValue {
169 fn default_instance() -> &'static Self {
170 static VALUE: ::buffa::__private::OnceBox<FloatValue> = ::buffa::__private::OnceBox::new();
171 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
172 }
173}
174impl ::buffa::Message for FloatValue {
175 #[allow(clippy::let_and_return)]
181 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
182 #[allow(unused_imports)]
183 use ::buffa::Enumeration as _;
184 let mut size = 0u32;
185 if self.value.to_bits() != 0u32 {
186 size += 1u32 + ::buffa::types::FIXED32_ENCODED_LEN as u32;
187 }
188 size += self.__buffa_unknown_fields.encoded_len() as u32;
189 size
190 }
191 fn write_to(
192 &self,
193 _cache: &mut ::buffa::SizeCache,
194 buf: &mut impl ::buffa::bytes::BufMut,
195 ) {
196 #[allow(unused_imports)]
197 use ::buffa::Enumeration as _;
198 if self.value.to_bits() != 0u32 {
199 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed32)
200 .encode(buf);
201 ::buffa::types::encode_float(self.value, buf);
202 }
203 self.__buffa_unknown_fields.write_to(buf);
204 }
205 fn merge_field(
206 &mut self,
207 tag: ::buffa::encoding::Tag,
208 buf: &mut impl ::buffa::bytes::Buf,
209 depth: u32,
210 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
211 #[allow(unused_imports)]
212 use ::buffa::bytes::Buf as _;
213 #[allow(unused_imports)]
214 use ::buffa::Enumeration as _;
215 match tag.field_number() {
216 1u32 => {
217 if tag.wire_type() != ::buffa::encoding::WireType::Fixed32 {
218 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
219 field_number: 1u32,
220 expected: 5u8,
221 actual: tag.wire_type() as u8,
222 });
223 }
224 self.value = ::buffa::types::decode_float(buf)?;
225 }
226 _ => {
227 self.__buffa_unknown_fields
228 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
229 }
230 }
231 ::core::result::Result::Ok(())
232 }
233 fn clear(&mut self) {
234 self.value = 0f32;
235 self.__buffa_unknown_fields.clear();
236 }
237}
238impl ::buffa::ExtensionSet for FloatValue {
239 const PROTO_FQN: &'static str = "google.protobuf.FloatValue";
240 fn unknown_fields(&self) -> &::buffa::UnknownFields {
241 &self.__buffa_unknown_fields
242 }
243 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
244 &mut self.__buffa_unknown_fields
245 }
246}
247impl ::buffa::text::TextFormat for FloatValue {
248 fn encode_text(
249 &self,
250 enc: &mut ::buffa::text::TextEncoder<'_>,
251 ) -> ::core::fmt::Result {
252 #[allow(unused_imports)]
253 use ::buffa::Enumeration as _;
254 if self.value.to_bits() != 0u32 {
255 enc.write_field_name("value")?;
256 enc.write_f32(self.value)?;
257 }
258 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
259 ::core::result::Result::Ok(())
260 }
261 fn merge_text(
262 &mut self,
263 dec: &mut ::buffa::text::TextDecoder<'_>,
264 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
265 #[allow(unused_imports)]
266 use ::buffa::Enumeration as _;
267 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
268 match __name {
269 "value" => self.value = dec.read_f32()?,
270 _ => dec.skip_value()?,
271 }
272 }
273 ::core::result::Result::Ok(())
274 }
275}
276#[doc(hidden)]
277pub const __FLOAT_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
278 type_url: "type.googleapis.com/google.protobuf.FloatValue",
279 text_encode: ::buffa::type_registry::any_encode_text::<FloatValue>,
280 text_merge: ::buffa::type_registry::any_merge_text::<FloatValue>,
281};
282#[derive(Clone, PartialEq, Default)]
286#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
287pub struct Int64Value {
288 pub value: i64,
292 #[doc(hidden)]
293 pub __buffa_unknown_fields: ::buffa::UnknownFields,
294}
295impl ::core::fmt::Debug for Int64Value {
296 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
297 f.debug_struct("Int64Value").field("value", &self.value).finish()
298 }
299}
300impl Int64Value {
301 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
306}
307impl ::buffa::DefaultInstance for Int64Value {
308 fn default_instance() -> &'static Self {
309 static VALUE: ::buffa::__private::OnceBox<Int64Value> = ::buffa::__private::OnceBox::new();
310 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
311 }
312}
313impl ::buffa::Message for Int64Value {
314 #[allow(clippy::let_and_return)]
320 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
321 #[allow(unused_imports)]
322 use ::buffa::Enumeration as _;
323 let mut size = 0u32;
324 if self.value != 0i64 {
325 size += 1u32 + ::buffa::types::int64_encoded_len(self.value) as u32;
326 }
327 size += self.__buffa_unknown_fields.encoded_len() as u32;
328 size
329 }
330 fn write_to(
331 &self,
332 _cache: &mut ::buffa::SizeCache,
333 buf: &mut impl ::buffa::bytes::BufMut,
334 ) {
335 #[allow(unused_imports)]
336 use ::buffa::Enumeration as _;
337 if self.value != 0i64 {
338 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
339 .encode(buf);
340 ::buffa::types::encode_int64(self.value, buf);
341 }
342 self.__buffa_unknown_fields.write_to(buf);
343 }
344 fn merge_field(
345 &mut self,
346 tag: ::buffa::encoding::Tag,
347 buf: &mut impl ::buffa::bytes::Buf,
348 depth: u32,
349 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
350 #[allow(unused_imports)]
351 use ::buffa::bytes::Buf as _;
352 #[allow(unused_imports)]
353 use ::buffa::Enumeration as _;
354 match tag.field_number() {
355 1u32 => {
356 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
357 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
358 field_number: 1u32,
359 expected: 0u8,
360 actual: tag.wire_type() as u8,
361 });
362 }
363 self.value = ::buffa::types::decode_int64(buf)?;
364 }
365 _ => {
366 self.__buffa_unknown_fields
367 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
368 }
369 }
370 ::core::result::Result::Ok(())
371 }
372 fn clear(&mut self) {
373 self.value = 0i64;
374 self.__buffa_unknown_fields.clear();
375 }
376}
377impl ::buffa::ExtensionSet for Int64Value {
378 const PROTO_FQN: &'static str = "google.protobuf.Int64Value";
379 fn unknown_fields(&self) -> &::buffa::UnknownFields {
380 &self.__buffa_unknown_fields
381 }
382 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
383 &mut self.__buffa_unknown_fields
384 }
385}
386impl ::buffa::text::TextFormat for Int64Value {
387 fn encode_text(
388 &self,
389 enc: &mut ::buffa::text::TextEncoder<'_>,
390 ) -> ::core::fmt::Result {
391 #[allow(unused_imports)]
392 use ::buffa::Enumeration as _;
393 if self.value != 0i64 {
394 enc.write_field_name("value")?;
395 enc.write_i64(self.value)?;
396 }
397 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
398 ::core::result::Result::Ok(())
399 }
400 fn merge_text(
401 &mut self,
402 dec: &mut ::buffa::text::TextDecoder<'_>,
403 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
404 #[allow(unused_imports)]
405 use ::buffa::Enumeration as _;
406 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
407 match __name {
408 "value" => self.value = dec.read_i64()?,
409 _ => dec.skip_value()?,
410 }
411 }
412 ::core::result::Result::Ok(())
413 }
414}
415#[doc(hidden)]
416pub const __INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
417 type_url: "type.googleapis.com/google.protobuf.Int64Value",
418 text_encode: ::buffa::type_registry::any_encode_text::<Int64Value>,
419 text_merge: ::buffa::type_registry::any_merge_text::<Int64Value>,
420};
421#[derive(Clone, PartialEq, Default)]
425#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
426pub struct UInt64Value {
427 pub value: u64,
431 #[doc(hidden)]
432 pub __buffa_unknown_fields: ::buffa::UnknownFields,
433}
434impl ::core::fmt::Debug for UInt64Value {
435 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
436 f.debug_struct("UInt64Value").field("value", &self.value).finish()
437 }
438}
439impl UInt64Value {
440 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
445}
446impl ::buffa::DefaultInstance for UInt64Value {
447 fn default_instance() -> &'static Self {
448 static VALUE: ::buffa::__private::OnceBox<UInt64Value> = ::buffa::__private::OnceBox::new();
449 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
450 }
451}
452impl ::buffa::Message for UInt64Value {
453 #[allow(clippy::let_and_return)]
459 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
460 #[allow(unused_imports)]
461 use ::buffa::Enumeration as _;
462 let mut size = 0u32;
463 if self.value != 0u64 {
464 size += 1u32 + ::buffa::types::uint64_encoded_len(self.value) as u32;
465 }
466 size += self.__buffa_unknown_fields.encoded_len() as u32;
467 size
468 }
469 fn write_to(
470 &self,
471 _cache: &mut ::buffa::SizeCache,
472 buf: &mut impl ::buffa::bytes::BufMut,
473 ) {
474 #[allow(unused_imports)]
475 use ::buffa::Enumeration as _;
476 if self.value != 0u64 {
477 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
478 .encode(buf);
479 ::buffa::types::encode_uint64(self.value, buf);
480 }
481 self.__buffa_unknown_fields.write_to(buf);
482 }
483 fn merge_field(
484 &mut self,
485 tag: ::buffa::encoding::Tag,
486 buf: &mut impl ::buffa::bytes::Buf,
487 depth: u32,
488 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
489 #[allow(unused_imports)]
490 use ::buffa::bytes::Buf as _;
491 #[allow(unused_imports)]
492 use ::buffa::Enumeration as _;
493 match tag.field_number() {
494 1u32 => {
495 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
496 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
497 field_number: 1u32,
498 expected: 0u8,
499 actual: tag.wire_type() as u8,
500 });
501 }
502 self.value = ::buffa::types::decode_uint64(buf)?;
503 }
504 _ => {
505 self.__buffa_unknown_fields
506 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
507 }
508 }
509 ::core::result::Result::Ok(())
510 }
511 fn clear(&mut self) {
512 self.value = 0u64;
513 self.__buffa_unknown_fields.clear();
514 }
515}
516impl ::buffa::ExtensionSet for UInt64Value {
517 const PROTO_FQN: &'static str = "google.protobuf.UInt64Value";
518 fn unknown_fields(&self) -> &::buffa::UnknownFields {
519 &self.__buffa_unknown_fields
520 }
521 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
522 &mut self.__buffa_unknown_fields
523 }
524}
525impl ::buffa::text::TextFormat for UInt64Value {
526 fn encode_text(
527 &self,
528 enc: &mut ::buffa::text::TextEncoder<'_>,
529 ) -> ::core::fmt::Result {
530 #[allow(unused_imports)]
531 use ::buffa::Enumeration as _;
532 if self.value != 0u64 {
533 enc.write_field_name("value")?;
534 enc.write_u64(self.value)?;
535 }
536 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
537 ::core::result::Result::Ok(())
538 }
539 fn merge_text(
540 &mut self,
541 dec: &mut ::buffa::text::TextDecoder<'_>,
542 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
543 #[allow(unused_imports)]
544 use ::buffa::Enumeration as _;
545 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
546 match __name {
547 "value" => self.value = dec.read_u64()?,
548 _ => dec.skip_value()?,
549 }
550 }
551 ::core::result::Result::Ok(())
552 }
553}
554#[doc(hidden)]
555pub const __U_INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
556 type_url: "type.googleapis.com/google.protobuf.UInt64Value",
557 text_encode: ::buffa::type_registry::any_encode_text::<UInt64Value>,
558 text_merge: ::buffa::type_registry::any_merge_text::<UInt64Value>,
559};
560#[derive(Clone, PartialEq, Default)]
564#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
565pub struct Int32Value {
566 pub value: i32,
570 #[doc(hidden)]
571 pub __buffa_unknown_fields: ::buffa::UnknownFields,
572}
573impl ::core::fmt::Debug for Int32Value {
574 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
575 f.debug_struct("Int32Value").field("value", &self.value).finish()
576 }
577}
578impl Int32Value {
579 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
584}
585impl ::buffa::DefaultInstance for Int32Value {
586 fn default_instance() -> &'static Self {
587 static VALUE: ::buffa::__private::OnceBox<Int32Value> = ::buffa::__private::OnceBox::new();
588 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
589 }
590}
591impl ::buffa::Message for Int32Value {
592 #[allow(clippy::let_and_return)]
598 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
599 #[allow(unused_imports)]
600 use ::buffa::Enumeration as _;
601 let mut size = 0u32;
602 if self.value != 0i32 {
603 size += 1u32 + ::buffa::types::int32_encoded_len(self.value) as u32;
604 }
605 size += self.__buffa_unknown_fields.encoded_len() as u32;
606 size
607 }
608 fn write_to(
609 &self,
610 _cache: &mut ::buffa::SizeCache,
611 buf: &mut impl ::buffa::bytes::BufMut,
612 ) {
613 #[allow(unused_imports)]
614 use ::buffa::Enumeration as _;
615 if self.value != 0i32 {
616 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
617 .encode(buf);
618 ::buffa::types::encode_int32(self.value, buf);
619 }
620 self.__buffa_unknown_fields.write_to(buf);
621 }
622 fn merge_field(
623 &mut self,
624 tag: ::buffa::encoding::Tag,
625 buf: &mut impl ::buffa::bytes::Buf,
626 depth: u32,
627 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
628 #[allow(unused_imports)]
629 use ::buffa::bytes::Buf as _;
630 #[allow(unused_imports)]
631 use ::buffa::Enumeration as _;
632 match tag.field_number() {
633 1u32 => {
634 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
635 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
636 field_number: 1u32,
637 expected: 0u8,
638 actual: tag.wire_type() as u8,
639 });
640 }
641 self.value = ::buffa::types::decode_int32(buf)?;
642 }
643 _ => {
644 self.__buffa_unknown_fields
645 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
646 }
647 }
648 ::core::result::Result::Ok(())
649 }
650 fn clear(&mut self) {
651 self.value = 0i32;
652 self.__buffa_unknown_fields.clear();
653 }
654}
655impl ::buffa::ExtensionSet for Int32Value {
656 const PROTO_FQN: &'static str = "google.protobuf.Int32Value";
657 fn unknown_fields(&self) -> &::buffa::UnknownFields {
658 &self.__buffa_unknown_fields
659 }
660 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
661 &mut self.__buffa_unknown_fields
662 }
663}
664impl ::buffa::text::TextFormat for Int32Value {
665 fn encode_text(
666 &self,
667 enc: &mut ::buffa::text::TextEncoder<'_>,
668 ) -> ::core::fmt::Result {
669 #[allow(unused_imports)]
670 use ::buffa::Enumeration as _;
671 if self.value != 0i32 {
672 enc.write_field_name("value")?;
673 enc.write_i32(self.value)?;
674 }
675 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
676 ::core::result::Result::Ok(())
677 }
678 fn merge_text(
679 &mut self,
680 dec: &mut ::buffa::text::TextDecoder<'_>,
681 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
682 #[allow(unused_imports)]
683 use ::buffa::Enumeration as _;
684 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
685 match __name {
686 "value" => self.value = dec.read_i32()?,
687 _ => dec.skip_value()?,
688 }
689 }
690 ::core::result::Result::Ok(())
691 }
692}
693#[doc(hidden)]
694pub const __INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
695 type_url: "type.googleapis.com/google.protobuf.Int32Value",
696 text_encode: ::buffa::type_registry::any_encode_text::<Int32Value>,
697 text_merge: ::buffa::type_registry::any_merge_text::<Int32Value>,
698};
699#[derive(Clone, PartialEq, Default)]
703#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
704pub struct UInt32Value {
705 pub value: u32,
709 #[doc(hidden)]
710 pub __buffa_unknown_fields: ::buffa::UnknownFields,
711}
712impl ::core::fmt::Debug for UInt32Value {
713 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
714 f.debug_struct("UInt32Value").field("value", &self.value).finish()
715 }
716}
717impl UInt32Value {
718 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
723}
724impl ::buffa::DefaultInstance for UInt32Value {
725 fn default_instance() -> &'static Self {
726 static VALUE: ::buffa::__private::OnceBox<UInt32Value> = ::buffa::__private::OnceBox::new();
727 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
728 }
729}
730impl ::buffa::Message for UInt32Value {
731 #[allow(clippy::let_and_return)]
737 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
738 #[allow(unused_imports)]
739 use ::buffa::Enumeration as _;
740 let mut size = 0u32;
741 if self.value != 0u32 {
742 size += 1u32 + ::buffa::types::uint32_encoded_len(self.value) as u32;
743 }
744 size += self.__buffa_unknown_fields.encoded_len() as u32;
745 size
746 }
747 fn write_to(
748 &self,
749 _cache: &mut ::buffa::SizeCache,
750 buf: &mut impl ::buffa::bytes::BufMut,
751 ) {
752 #[allow(unused_imports)]
753 use ::buffa::Enumeration as _;
754 if self.value != 0u32 {
755 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
756 .encode(buf);
757 ::buffa::types::encode_uint32(self.value, buf);
758 }
759 self.__buffa_unknown_fields.write_to(buf);
760 }
761 fn merge_field(
762 &mut self,
763 tag: ::buffa::encoding::Tag,
764 buf: &mut impl ::buffa::bytes::Buf,
765 depth: u32,
766 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
767 #[allow(unused_imports)]
768 use ::buffa::bytes::Buf as _;
769 #[allow(unused_imports)]
770 use ::buffa::Enumeration as _;
771 match tag.field_number() {
772 1u32 => {
773 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
774 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
775 field_number: 1u32,
776 expected: 0u8,
777 actual: tag.wire_type() as u8,
778 });
779 }
780 self.value = ::buffa::types::decode_uint32(buf)?;
781 }
782 _ => {
783 self.__buffa_unknown_fields
784 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
785 }
786 }
787 ::core::result::Result::Ok(())
788 }
789 fn clear(&mut self) {
790 self.value = 0u32;
791 self.__buffa_unknown_fields.clear();
792 }
793}
794impl ::buffa::ExtensionSet for UInt32Value {
795 const PROTO_FQN: &'static str = "google.protobuf.UInt32Value";
796 fn unknown_fields(&self) -> &::buffa::UnknownFields {
797 &self.__buffa_unknown_fields
798 }
799 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
800 &mut self.__buffa_unknown_fields
801 }
802}
803impl ::buffa::text::TextFormat for UInt32Value {
804 fn encode_text(
805 &self,
806 enc: &mut ::buffa::text::TextEncoder<'_>,
807 ) -> ::core::fmt::Result {
808 #[allow(unused_imports)]
809 use ::buffa::Enumeration as _;
810 if self.value != 0u32 {
811 enc.write_field_name("value")?;
812 enc.write_u32(self.value)?;
813 }
814 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
815 ::core::result::Result::Ok(())
816 }
817 fn merge_text(
818 &mut self,
819 dec: &mut ::buffa::text::TextDecoder<'_>,
820 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
821 #[allow(unused_imports)]
822 use ::buffa::Enumeration as _;
823 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
824 match __name {
825 "value" => self.value = dec.read_u32()?,
826 _ => dec.skip_value()?,
827 }
828 }
829 ::core::result::Result::Ok(())
830 }
831}
832#[doc(hidden)]
833pub const __U_INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
834 type_url: "type.googleapis.com/google.protobuf.UInt32Value",
835 text_encode: ::buffa::type_registry::any_encode_text::<UInt32Value>,
836 text_merge: ::buffa::type_registry::any_merge_text::<UInt32Value>,
837};
838#[derive(Clone, PartialEq, Default)]
842#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
843pub struct BoolValue {
844 pub value: bool,
848 #[doc(hidden)]
849 pub __buffa_unknown_fields: ::buffa::UnknownFields,
850}
851impl ::core::fmt::Debug for BoolValue {
852 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
853 f.debug_struct("BoolValue").field("value", &self.value).finish()
854 }
855}
856impl BoolValue {
857 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
862}
863impl ::buffa::DefaultInstance for BoolValue {
864 fn default_instance() -> &'static Self {
865 static VALUE: ::buffa::__private::OnceBox<BoolValue> = ::buffa::__private::OnceBox::new();
866 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
867 }
868}
869impl ::buffa::Message for BoolValue {
870 #[allow(clippy::let_and_return)]
876 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
877 #[allow(unused_imports)]
878 use ::buffa::Enumeration as _;
879 let mut size = 0u32;
880 if self.value {
881 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
882 }
883 size += self.__buffa_unknown_fields.encoded_len() as u32;
884 size
885 }
886 fn write_to(
887 &self,
888 _cache: &mut ::buffa::SizeCache,
889 buf: &mut impl ::buffa::bytes::BufMut,
890 ) {
891 #[allow(unused_imports)]
892 use ::buffa::Enumeration as _;
893 if self.value {
894 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
895 .encode(buf);
896 ::buffa::types::encode_bool(self.value, buf);
897 }
898 self.__buffa_unknown_fields.write_to(buf);
899 }
900 fn merge_field(
901 &mut self,
902 tag: ::buffa::encoding::Tag,
903 buf: &mut impl ::buffa::bytes::Buf,
904 depth: u32,
905 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
906 #[allow(unused_imports)]
907 use ::buffa::bytes::Buf as _;
908 #[allow(unused_imports)]
909 use ::buffa::Enumeration as _;
910 match tag.field_number() {
911 1u32 => {
912 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
913 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
914 field_number: 1u32,
915 expected: 0u8,
916 actual: tag.wire_type() as u8,
917 });
918 }
919 self.value = ::buffa::types::decode_bool(buf)?;
920 }
921 _ => {
922 self.__buffa_unknown_fields
923 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
924 }
925 }
926 ::core::result::Result::Ok(())
927 }
928 fn clear(&mut self) {
929 self.value = false;
930 self.__buffa_unknown_fields.clear();
931 }
932}
933impl ::buffa::ExtensionSet for BoolValue {
934 const PROTO_FQN: &'static str = "google.protobuf.BoolValue";
935 fn unknown_fields(&self) -> &::buffa::UnknownFields {
936 &self.__buffa_unknown_fields
937 }
938 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
939 &mut self.__buffa_unknown_fields
940 }
941}
942impl ::buffa::text::TextFormat for BoolValue {
943 fn encode_text(
944 &self,
945 enc: &mut ::buffa::text::TextEncoder<'_>,
946 ) -> ::core::fmt::Result {
947 #[allow(unused_imports)]
948 use ::buffa::Enumeration as _;
949 if self.value {
950 enc.write_field_name("value")?;
951 enc.write_bool(self.value)?;
952 }
953 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
954 ::core::result::Result::Ok(())
955 }
956 fn merge_text(
957 &mut self,
958 dec: &mut ::buffa::text::TextDecoder<'_>,
959 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
960 #[allow(unused_imports)]
961 use ::buffa::Enumeration as _;
962 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
963 match __name {
964 "value" => self.value = dec.read_bool()?,
965 _ => dec.skip_value()?,
966 }
967 }
968 ::core::result::Result::Ok(())
969 }
970}
971#[doc(hidden)]
972pub const __BOOL_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
973 type_url: "type.googleapis.com/google.protobuf.BoolValue",
974 text_encode: ::buffa::type_registry::any_encode_text::<BoolValue>,
975 text_merge: ::buffa::type_registry::any_merge_text::<BoolValue>,
976};
977#[derive(Clone, PartialEq, Default)]
981#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
982pub struct StringValue {
983 pub value: ::buffa::alloc::string::String,
987 #[doc(hidden)]
988 pub __buffa_unknown_fields: ::buffa::UnknownFields,
989}
990impl ::core::fmt::Debug for StringValue {
991 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
992 f.debug_struct("StringValue").field("value", &self.value).finish()
993 }
994}
995impl StringValue {
996 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
1001}
1002impl ::buffa::DefaultInstance for StringValue {
1003 fn default_instance() -> &'static Self {
1004 static VALUE: ::buffa::__private::OnceBox<StringValue> = ::buffa::__private::OnceBox::new();
1005 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1006 }
1007}
1008impl ::buffa::Message for StringValue {
1009 #[allow(clippy::let_and_return)]
1015 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1016 #[allow(unused_imports)]
1017 use ::buffa::Enumeration as _;
1018 let mut size = 0u32;
1019 if !self.value.is_empty() {
1020 size += 1u32 + ::buffa::types::string_encoded_len(&self.value) as u32;
1021 }
1022 size += self.__buffa_unknown_fields.encoded_len() as u32;
1023 size
1024 }
1025 fn write_to(
1026 &self,
1027 _cache: &mut ::buffa::SizeCache,
1028 buf: &mut impl ::buffa::bytes::BufMut,
1029 ) {
1030 #[allow(unused_imports)]
1031 use ::buffa::Enumeration as _;
1032 if !self.value.is_empty() {
1033 ::buffa::encoding::Tag::new(
1034 1u32,
1035 ::buffa::encoding::WireType::LengthDelimited,
1036 )
1037 .encode(buf);
1038 ::buffa::types::encode_string(&self.value, buf);
1039 }
1040 self.__buffa_unknown_fields.write_to(buf);
1041 }
1042 fn merge_field(
1043 &mut self,
1044 tag: ::buffa::encoding::Tag,
1045 buf: &mut impl ::buffa::bytes::Buf,
1046 depth: u32,
1047 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1048 #[allow(unused_imports)]
1049 use ::buffa::bytes::Buf as _;
1050 #[allow(unused_imports)]
1051 use ::buffa::Enumeration as _;
1052 match tag.field_number() {
1053 1u32 => {
1054 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1055 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1056 field_number: 1u32,
1057 expected: 2u8,
1058 actual: tag.wire_type() as u8,
1059 });
1060 }
1061 ::buffa::types::merge_string(&mut self.value, buf)?;
1062 }
1063 _ => {
1064 self.__buffa_unknown_fields
1065 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1066 }
1067 }
1068 ::core::result::Result::Ok(())
1069 }
1070 fn clear(&mut self) {
1071 self.value.clear();
1072 self.__buffa_unknown_fields.clear();
1073 }
1074}
1075impl ::buffa::ExtensionSet for StringValue {
1076 const PROTO_FQN: &'static str = "google.protobuf.StringValue";
1077 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1078 &self.__buffa_unknown_fields
1079 }
1080 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1081 &mut self.__buffa_unknown_fields
1082 }
1083}
1084impl ::buffa::text::TextFormat for StringValue {
1085 fn encode_text(
1086 &self,
1087 enc: &mut ::buffa::text::TextEncoder<'_>,
1088 ) -> ::core::fmt::Result {
1089 #[allow(unused_imports)]
1090 use ::buffa::Enumeration as _;
1091 if !self.value.is_empty() {
1092 enc.write_field_name("value")?;
1093 enc.write_string(&self.value)?;
1094 }
1095 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1096 ::core::result::Result::Ok(())
1097 }
1098 fn merge_text(
1099 &mut self,
1100 dec: &mut ::buffa::text::TextDecoder<'_>,
1101 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1102 #[allow(unused_imports)]
1103 use ::buffa::Enumeration as _;
1104 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1105 match __name {
1106 "value" => self.value = dec.read_string()?.into_owned(),
1107 _ => dec.skip_value()?,
1108 }
1109 }
1110 ::core::result::Result::Ok(())
1111 }
1112}
1113#[doc(hidden)]
1114pub const __STRING_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1115 type_url: "type.googleapis.com/google.protobuf.StringValue",
1116 text_encode: ::buffa::type_registry::any_encode_text::<StringValue>,
1117 text_merge: ::buffa::type_registry::any_merge_text::<StringValue>,
1118};
1119#[derive(Clone, PartialEq, Default)]
1123#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1124pub struct BytesValue {
1125 pub value: ::buffa::alloc::vec::Vec<u8>,
1129 #[doc(hidden)]
1130 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1131}
1132impl ::core::fmt::Debug for BytesValue {
1133 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1134 f.debug_struct("BytesValue").field("value", &self.value).finish()
1135 }
1136}
1137impl BytesValue {
1138 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
1143}
1144impl ::buffa::DefaultInstance for BytesValue {
1145 fn default_instance() -> &'static Self {
1146 static VALUE: ::buffa::__private::OnceBox<BytesValue> = ::buffa::__private::OnceBox::new();
1147 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1148 }
1149}
1150impl ::buffa::Message for BytesValue {
1151 #[allow(clippy::let_and_return)]
1157 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1158 #[allow(unused_imports)]
1159 use ::buffa::Enumeration as _;
1160 let mut size = 0u32;
1161 if !self.value.is_empty() {
1162 size += 1u32 + ::buffa::types::bytes_encoded_len(&self.value) as u32;
1163 }
1164 size += self.__buffa_unknown_fields.encoded_len() as u32;
1165 size
1166 }
1167 fn write_to(
1168 &self,
1169 _cache: &mut ::buffa::SizeCache,
1170 buf: &mut impl ::buffa::bytes::BufMut,
1171 ) {
1172 #[allow(unused_imports)]
1173 use ::buffa::Enumeration as _;
1174 if !self.value.is_empty() {
1175 ::buffa::encoding::Tag::new(
1176 1u32,
1177 ::buffa::encoding::WireType::LengthDelimited,
1178 )
1179 .encode(buf);
1180 ::buffa::types::encode_bytes(&self.value, buf);
1181 }
1182 self.__buffa_unknown_fields.write_to(buf);
1183 }
1184 fn merge_field(
1185 &mut self,
1186 tag: ::buffa::encoding::Tag,
1187 buf: &mut impl ::buffa::bytes::Buf,
1188 depth: u32,
1189 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1190 #[allow(unused_imports)]
1191 use ::buffa::bytes::Buf as _;
1192 #[allow(unused_imports)]
1193 use ::buffa::Enumeration as _;
1194 match tag.field_number() {
1195 1u32 => {
1196 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1197 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1198 field_number: 1u32,
1199 expected: 2u8,
1200 actual: tag.wire_type() as u8,
1201 });
1202 }
1203 ::buffa::types::merge_bytes(&mut self.value, buf)?;
1204 }
1205 _ => {
1206 self.__buffa_unknown_fields
1207 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1208 }
1209 }
1210 ::core::result::Result::Ok(())
1211 }
1212 fn clear(&mut self) {
1213 self.value.clear();
1214 self.__buffa_unknown_fields.clear();
1215 }
1216}
1217impl ::buffa::ExtensionSet for BytesValue {
1218 const PROTO_FQN: &'static str = "google.protobuf.BytesValue";
1219 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1220 &self.__buffa_unknown_fields
1221 }
1222 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1223 &mut self.__buffa_unknown_fields
1224 }
1225}
1226impl ::buffa::text::TextFormat for BytesValue {
1227 fn encode_text(
1228 &self,
1229 enc: &mut ::buffa::text::TextEncoder<'_>,
1230 ) -> ::core::fmt::Result {
1231 #[allow(unused_imports)]
1232 use ::buffa::Enumeration as _;
1233 if !self.value.is_empty() {
1234 enc.write_field_name("value")?;
1235 enc.write_bytes(&self.value)?;
1236 }
1237 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1238 ::core::result::Result::Ok(())
1239 }
1240 fn merge_text(
1241 &mut self,
1242 dec: &mut ::buffa::text::TextDecoder<'_>,
1243 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1244 #[allow(unused_imports)]
1245 use ::buffa::Enumeration as _;
1246 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1247 match __name {
1248 "value" => self.value = dec.read_bytes()?,
1249 _ => dec.skip_value()?,
1250 }
1251 }
1252 ::core::result::Result::Ok(())
1253 }
1254}
1255#[doc(hidden)]
1256pub const __BYTES_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1257 type_url: "type.googleapis.com/google.protobuf.BytesValue",
1258 text_encode: ::buffa::type_registry::any_encode_text::<BytesValue>,
1259 text_merge: ::buffa::type_registry::any_merge_text::<BytesValue>,
1260};