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}
35#[cfg(feature = "reflect")]
36const _: () = {
37 impl ::buffa_descriptor::reflect::ReflectMessage for DoubleValue {
38 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
39 __buffa::reflect::descriptor_pool()
40 .message(Self::__buffa_reflect_message_index())
41 }
42 fn pool(
43 &self,
44 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
45 __buffa::reflect::descriptor_pool()
46 }
47 fn unknown_fields(&self) -> &::buffa::UnknownFields {
48 &self.__buffa_unknown_fields
49 }
50 fn get(
51 &self,
52 field: &::buffa_descriptor::FieldDescriptor,
53 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
54 #[allow(unused_imports)]
55 use ::buffa::Enumeration as _;
56 match field.number() {
57 1u32 => ::buffa_descriptor::reflect::ValueRef::F64(self.value),
58 _ => {
59 ::core::debug_assert!(
60 false,
61 "field number {} is not a member of this message's reflect get()",
62 field.number(),
63 );
64 ::buffa_descriptor::reflect::ValueRef::Bool(false)
65 }
66 }
67 }
68 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
69 match field.number() {
70 1u32 => self.value != 0.0,
71 _ => false,
72 }
73 }
74 fn for_each_set(
75 &self,
76 f: &mut dyn ::core::ops::FnMut(
77 &::buffa_descriptor::FieldDescriptor,
78 ::buffa_descriptor::reflect::ValueRef<'_>,
79 ),
80 ) {
81 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
82 self,
83 );
84 for fd in md.fields() {
85 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
86 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
87 }
88 }
89 }
90 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
91 ::buffa_descriptor::reflect::DynamicMessage::from_message(
92 self,
93 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
94 Self::__buffa_reflect_message_index(),
95 )
96 }
97 }
98 impl ::buffa_descriptor::reflect::ReflectElement for DoubleValue {
99 #[inline]
100 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
101 ::buffa_descriptor::reflect::ValueRef::Message(
102 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
103 )
104 }
105 }
106 impl DoubleValue {
107 #[doc(hidden)]
110 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
111 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
112 *IDX
113 .get_or_init(|| {
114 __buffa::reflect::descriptor_pool()
115 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
116 .expect(
117 "generated message is registered in the embedded descriptor pool",
118 )
119 })
120 }
121 }
122 impl ::buffa_descriptor::reflect::Reflectable for DoubleValue {
123 #[inline]
127 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
128 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
129 }
130 }
131};
132impl ::buffa::MessageName for DoubleValue {
133 const PACKAGE: &'static str = "google.protobuf";
134 const NAME: &'static str = "DoubleValue";
135 const FULL_NAME: &'static str = "google.protobuf.DoubleValue";
136 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DoubleValue";
137}
138impl ::buffa::Message for DoubleValue {
139 #[allow(clippy::let_and_return)]
145 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
146 #[allow(unused_imports)]
147 use ::buffa::Enumeration as _;
148 let mut size = 0u32;
149 if self.value.to_bits() != 0u64 {
150 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
151 }
152 size += self.__buffa_unknown_fields.encoded_len() as u32;
153 size
154 }
155 fn write_to(
156 &self,
157 _cache: &mut ::buffa::SizeCache,
158 buf: &mut impl ::buffa::bytes::BufMut,
159 ) {
160 #[allow(unused_imports)]
161 use ::buffa::Enumeration as _;
162 if self.value.to_bits() != 0u64 {
163 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed64)
164 .encode(buf);
165 ::buffa::types::encode_double(self.value, buf);
166 }
167 self.__buffa_unknown_fields.write_to(buf);
168 }
169 fn merge_field(
170 &mut self,
171 tag: ::buffa::encoding::Tag,
172 buf: &mut impl ::buffa::bytes::Buf,
173 depth: u32,
174 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
175 #[allow(unused_imports)]
176 use ::buffa::bytes::Buf as _;
177 #[allow(unused_imports)]
178 use ::buffa::Enumeration as _;
179 match tag.field_number() {
180 1u32 => {
181 if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
182 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
183 field_number: 1u32,
184 expected: 1u8,
185 actual: tag.wire_type() as u8,
186 });
187 }
188 self.value = ::buffa::types::decode_double(buf)?;
189 }
190 _ => {
191 self.__buffa_unknown_fields
192 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
193 }
194 }
195 ::core::result::Result::Ok(())
196 }
197 fn clear(&mut self) {
198 self.value = 0f64;
199 self.__buffa_unknown_fields.clear();
200 }
201}
202impl ::buffa::ExtensionSet for DoubleValue {
203 const PROTO_FQN: &'static str = "google.protobuf.DoubleValue";
204 fn unknown_fields(&self) -> &::buffa::UnknownFields {
205 &self.__buffa_unknown_fields
206 }
207 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
208 &mut self.__buffa_unknown_fields
209 }
210}
211impl ::buffa::text::TextFormat for DoubleValue {
212 fn encode_text(
213 &self,
214 enc: &mut ::buffa::text::TextEncoder<'_>,
215 ) -> ::core::fmt::Result {
216 #[allow(unused_imports)]
217 use ::buffa::Enumeration as _;
218 if self.value.to_bits() != 0u64 {
219 enc.write_field_name("value")?;
220 enc.write_f64(self.value)?;
221 }
222 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
223 ::core::result::Result::Ok(())
224 }
225 fn merge_text(
226 &mut self,
227 dec: &mut ::buffa::text::TextDecoder<'_>,
228 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
229 #[allow(unused_imports)]
230 use ::buffa::Enumeration as _;
231 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
232 match __name {
233 "value" => self.value = dec.read_f64()?,
234 _ => dec.skip_value()?,
235 }
236 }
237 ::core::result::Result::Ok(())
238 }
239}
240#[doc(hidden)]
241pub const __DOUBLE_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
242 type_url: "type.googleapis.com/google.protobuf.DoubleValue",
243 text_encode: ::buffa::type_registry::any_encode_text::<DoubleValue>,
244 text_merge: ::buffa::type_registry::any_merge_text::<DoubleValue>,
245};
246#[derive(Clone, PartialEq, Default)]
250#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
251pub struct FloatValue {
252 pub value: f32,
256 #[doc(hidden)]
257 pub __buffa_unknown_fields: ::buffa::UnknownFields,
258}
259impl ::core::fmt::Debug for FloatValue {
260 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
261 f.debug_struct("FloatValue").field("value", &self.value).finish()
262 }
263}
264impl FloatValue {
265 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
270}
271impl ::buffa::DefaultInstance for FloatValue {
272 fn default_instance() -> &'static Self {
273 static VALUE: ::buffa::__private::OnceBox<FloatValue> = ::buffa::__private::OnceBox::new();
274 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
275 }
276}
277#[cfg(feature = "reflect")]
278const _: () = {
279 impl ::buffa_descriptor::reflect::ReflectMessage for FloatValue {
280 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
281 __buffa::reflect::descriptor_pool()
282 .message(Self::__buffa_reflect_message_index())
283 }
284 fn pool(
285 &self,
286 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
287 __buffa::reflect::descriptor_pool()
288 }
289 fn unknown_fields(&self) -> &::buffa::UnknownFields {
290 &self.__buffa_unknown_fields
291 }
292 fn get(
293 &self,
294 field: &::buffa_descriptor::FieldDescriptor,
295 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
296 #[allow(unused_imports)]
297 use ::buffa::Enumeration as _;
298 match field.number() {
299 1u32 => ::buffa_descriptor::reflect::ValueRef::F32(self.value),
300 _ => {
301 ::core::debug_assert!(
302 false,
303 "field number {} is not a member of this message's reflect get()",
304 field.number(),
305 );
306 ::buffa_descriptor::reflect::ValueRef::Bool(false)
307 }
308 }
309 }
310 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
311 match field.number() {
312 1u32 => self.value != 0.0,
313 _ => false,
314 }
315 }
316 fn for_each_set(
317 &self,
318 f: &mut dyn ::core::ops::FnMut(
319 &::buffa_descriptor::FieldDescriptor,
320 ::buffa_descriptor::reflect::ValueRef<'_>,
321 ),
322 ) {
323 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
324 self,
325 );
326 for fd in md.fields() {
327 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
328 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
329 }
330 }
331 }
332 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
333 ::buffa_descriptor::reflect::DynamicMessage::from_message(
334 self,
335 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
336 Self::__buffa_reflect_message_index(),
337 )
338 }
339 }
340 impl ::buffa_descriptor::reflect::ReflectElement for FloatValue {
341 #[inline]
342 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
343 ::buffa_descriptor::reflect::ValueRef::Message(
344 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
345 )
346 }
347 }
348 impl FloatValue {
349 #[doc(hidden)]
352 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
353 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
354 *IDX
355 .get_or_init(|| {
356 __buffa::reflect::descriptor_pool()
357 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
358 .expect(
359 "generated message is registered in the embedded descriptor pool",
360 )
361 })
362 }
363 }
364 impl ::buffa_descriptor::reflect::Reflectable for FloatValue {
365 #[inline]
369 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
370 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
371 }
372 }
373};
374impl ::buffa::MessageName for FloatValue {
375 const PACKAGE: &'static str = "google.protobuf";
376 const NAME: &'static str = "FloatValue";
377 const FULL_NAME: &'static str = "google.protobuf.FloatValue";
378 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
379}
380impl ::buffa::Message for FloatValue {
381 #[allow(clippy::let_and_return)]
387 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
388 #[allow(unused_imports)]
389 use ::buffa::Enumeration as _;
390 let mut size = 0u32;
391 if self.value.to_bits() != 0u32 {
392 size += 1u32 + ::buffa::types::FIXED32_ENCODED_LEN as u32;
393 }
394 size += self.__buffa_unknown_fields.encoded_len() as u32;
395 size
396 }
397 fn write_to(
398 &self,
399 _cache: &mut ::buffa::SizeCache,
400 buf: &mut impl ::buffa::bytes::BufMut,
401 ) {
402 #[allow(unused_imports)]
403 use ::buffa::Enumeration as _;
404 if self.value.to_bits() != 0u32 {
405 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed32)
406 .encode(buf);
407 ::buffa::types::encode_float(self.value, buf);
408 }
409 self.__buffa_unknown_fields.write_to(buf);
410 }
411 fn merge_field(
412 &mut self,
413 tag: ::buffa::encoding::Tag,
414 buf: &mut impl ::buffa::bytes::Buf,
415 depth: u32,
416 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
417 #[allow(unused_imports)]
418 use ::buffa::bytes::Buf as _;
419 #[allow(unused_imports)]
420 use ::buffa::Enumeration as _;
421 match tag.field_number() {
422 1u32 => {
423 if tag.wire_type() != ::buffa::encoding::WireType::Fixed32 {
424 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
425 field_number: 1u32,
426 expected: 5u8,
427 actual: tag.wire_type() as u8,
428 });
429 }
430 self.value = ::buffa::types::decode_float(buf)?;
431 }
432 _ => {
433 self.__buffa_unknown_fields
434 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
435 }
436 }
437 ::core::result::Result::Ok(())
438 }
439 fn clear(&mut self) {
440 self.value = 0f32;
441 self.__buffa_unknown_fields.clear();
442 }
443}
444impl ::buffa::ExtensionSet for FloatValue {
445 const PROTO_FQN: &'static str = "google.protobuf.FloatValue";
446 fn unknown_fields(&self) -> &::buffa::UnknownFields {
447 &self.__buffa_unknown_fields
448 }
449 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
450 &mut self.__buffa_unknown_fields
451 }
452}
453impl ::buffa::text::TextFormat for FloatValue {
454 fn encode_text(
455 &self,
456 enc: &mut ::buffa::text::TextEncoder<'_>,
457 ) -> ::core::fmt::Result {
458 #[allow(unused_imports)]
459 use ::buffa::Enumeration as _;
460 if self.value.to_bits() != 0u32 {
461 enc.write_field_name("value")?;
462 enc.write_f32(self.value)?;
463 }
464 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
465 ::core::result::Result::Ok(())
466 }
467 fn merge_text(
468 &mut self,
469 dec: &mut ::buffa::text::TextDecoder<'_>,
470 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
471 #[allow(unused_imports)]
472 use ::buffa::Enumeration as _;
473 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
474 match __name {
475 "value" => self.value = dec.read_f32()?,
476 _ => dec.skip_value()?,
477 }
478 }
479 ::core::result::Result::Ok(())
480 }
481}
482#[doc(hidden)]
483pub const __FLOAT_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
484 type_url: "type.googleapis.com/google.protobuf.FloatValue",
485 text_encode: ::buffa::type_registry::any_encode_text::<FloatValue>,
486 text_merge: ::buffa::type_registry::any_merge_text::<FloatValue>,
487};
488#[derive(Clone, PartialEq, Default)]
492#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
493pub struct Int64Value {
494 pub value: i64,
498 #[doc(hidden)]
499 pub __buffa_unknown_fields: ::buffa::UnknownFields,
500}
501impl ::core::fmt::Debug for Int64Value {
502 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
503 f.debug_struct("Int64Value").field("value", &self.value).finish()
504 }
505}
506impl Int64Value {
507 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
512}
513impl ::buffa::DefaultInstance for Int64Value {
514 fn default_instance() -> &'static Self {
515 static VALUE: ::buffa::__private::OnceBox<Int64Value> = ::buffa::__private::OnceBox::new();
516 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
517 }
518}
519#[cfg(feature = "reflect")]
520const _: () = {
521 impl ::buffa_descriptor::reflect::ReflectMessage for Int64Value {
522 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
523 __buffa::reflect::descriptor_pool()
524 .message(Self::__buffa_reflect_message_index())
525 }
526 fn pool(
527 &self,
528 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
529 __buffa::reflect::descriptor_pool()
530 }
531 fn unknown_fields(&self) -> &::buffa::UnknownFields {
532 &self.__buffa_unknown_fields
533 }
534 fn get(
535 &self,
536 field: &::buffa_descriptor::FieldDescriptor,
537 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
538 #[allow(unused_imports)]
539 use ::buffa::Enumeration as _;
540 match field.number() {
541 1u32 => ::buffa_descriptor::reflect::ValueRef::I64(self.value),
542 _ => {
543 ::core::debug_assert!(
544 false,
545 "field number {} is not a member of this message's reflect get()",
546 field.number(),
547 );
548 ::buffa_descriptor::reflect::ValueRef::Bool(false)
549 }
550 }
551 }
552 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
553 match field.number() {
554 1u32 => self.value != 0,
555 _ => false,
556 }
557 }
558 fn for_each_set(
559 &self,
560 f: &mut dyn ::core::ops::FnMut(
561 &::buffa_descriptor::FieldDescriptor,
562 ::buffa_descriptor::reflect::ValueRef<'_>,
563 ),
564 ) {
565 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
566 self,
567 );
568 for fd in md.fields() {
569 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
570 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
571 }
572 }
573 }
574 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
575 ::buffa_descriptor::reflect::DynamicMessage::from_message(
576 self,
577 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
578 Self::__buffa_reflect_message_index(),
579 )
580 }
581 }
582 impl ::buffa_descriptor::reflect::ReflectElement for Int64Value {
583 #[inline]
584 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
585 ::buffa_descriptor::reflect::ValueRef::Message(
586 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
587 )
588 }
589 }
590 impl Int64Value {
591 #[doc(hidden)]
594 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
595 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
596 *IDX
597 .get_or_init(|| {
598 __buffa::reflect::descriptor_pool()
599 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
600 .expect(
601 "generated message is registered in the embedded descriptor pool",
602 )
603 })
604 }
605 }
606 impl ::buffa_descriptor::reflect::Reflectable for Int64Value {
607 #[inline]
611 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
612 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
613 }
614 }
615};
616impl ::buffa::MessageName for Int64Value {
617 const PACKAGE: &'static str = "google.protobuf";
618 const NAME: &'static str = "Int64Value";
619 const FULL_NAME: &'static str = "google.protobuf.Int64Value";
620 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
621}
622impl ::buffa::Message for Int64Value {
623 #[allow(clippy::let_and_return)]
629 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
630 #[allow(unused_imports)]
631 use ::buffa::Enumeration as _;
632 let mut size = 0u32;
633 if self.value != 0i64 {
634 size += 1u32 + ::buffa::types::int64_encoded_len(self.value) as u32;
635 }
636 size += self.__buffa_unknown_fields.encoded_len() as u32;
637 size
638 }
639 fn write_to(
640 &self,
641 _cache: &mut ::buffa::SizeCache,
642 buf: &mut impl ::buffa::bytes::BufMut,
643 ) {
644 #[allow(unused_imports)]
645 use ::buffa::Enumeration as _;
646 if self.value != 0i64 {
647 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
648 .encode(buf);
649 ::buffa::types::encode_int64(self.value, buf);
650 }
651 self.__buffa_unknown_fields.write_to(buf);
652 }
653 fn merge_field(
654 &mut self,
655 tag: ::buffa::encoding::Tag,
656 buf: &mut impl ::buffa::bytes::Buf,
657 depth: u32,
658 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
659 #[allow(unused_imports)]
660 use ::buffa::bytes::Buf as _;
661 #[allow(unused_imports)]
662 use ::buffa::Enumeration as _;
663 match tag.field_number() {
664 1u32 => {
665 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
666 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
667 field_number: 1u32,
668 expected: 0u8,
669 actual: tag.wire_type() as u8,
670 });
671 }
672 self.value = ::buffa::types::decode_int64(buf)?;
673 }
674 _ => {
675 self.__buffa_unknown_fields
676 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
677 }
678 }
679 ::core::result::Result::Ok(())
680 }
681 fn clear(&mut self) {
682 self.value = 0i64;
683 self.__buffa_unknown_fields.clear();
684 }
685}
686impl ::buffa::ExtensionSet for Int64Value {
687 const PROTO_FQN: &'static str = "google.protobuf.Int64Value";
688 fn unknown_fields(&self) -> &::buffa::UnknownFields {
689 &self.__buffa_unknown_fields
690 }
691 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
692 &mut self.__buffa_unknown_fields
693 }
694}
695impl ::buffa::text::TextFormat for Int64Value {
696 fn encode_text(
697 &self,
698 enc: &mut ::buffa::text::TextEncoder<'_>,
699 ) -> ::core::fmt::Result {
700 #[allow(unused_imports)]
701 use ::buffa::Enumeration as _;
702 if self.value != 0i64 {
703 enc.write_field_name("value")?;
704 enc.write_i64(self.value)?;
705 }
706 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
707 ::core::result::Result::Ok(())
708 }
709 fn merge_text(
710 &mut self,
711 dec: &mut ::buffa::text::TextDecoder<'_>,
712 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
713 #[allow(unused_imports)]
714 use ::buffa::Enumeration as _;
715 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
716 match __name {
717 "value" => self.value = dec.read_i64()?,
718 _ => dec.skip_value()?,
719 }
720 }
721 ::core::result::Result::Ok(())
722 }
723}
724#[doc(hidden)]
725pub const __INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
726 type_url: "type.googleapis.com/google.protobuf.Int64Value",
727 text_encode: ::buffa::type_registry::any_encode_text::<Int64Value>,
728 text_merge: ::buffa::type_registry::any_merge_text::<Int64Value>,
729};
730#[derive(Clone, PartialEq, Default)]
734#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
735pub struct UInt64Value {
736 pub value: u64,
740 #[doc(hidden)]
741 pub __buffa_unknown_fields: ::buffa::UnknownFields,
742}
743impl ::core::fmt::Debug for UInt64Value {
744 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
745 f.debug_struct("UInt64Value").field("value", &self.value).finish()
746 }
747}
748impl UInt64Value {
749 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
754}
755impl ::buffa::DefaultInstance for UInt64Value {
756 fn default_instance() -> &'static Self {
757 static VALUE: ::buffa::__private::OnceBox<UInt64Value> = ::buffa::__private::OnceBox::new();
758 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
759 }
760}
761#[cfg(feature = "reflect")]
762const _: () = {
763 impl ::buffa_descriptor::reflect::ReflectMessage for UInt64Value {
764 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
765 __buffa::reflect::descriptor_pool()
766 .message(Self::__buffa_reflect_message_index())
767 }
768 fn pool(
769 &self,
770 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
771 __buffa::reflect::descriptor_pool()
772 }
773 fn unknown_fields(&self) -> &::buffa::UnknownFields {
774 &self.__buffa_unknown_fields
775 }
776 fn get(
777 &self,
778 field: &::buffa_descriptor::FieldDescriptor,
779 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
780 #[allow(unused_imports)]
781 use ::buffa::Enumeration as _;
782 match field.number() {
783 1u32 => ::buffa_descriptor::reflect::ValueRef::U64(self.value),
784 _ => {
785 ::core::debug_assert!(
786 false,
787 "field number {} is not a member of this message's reflect get()",
788 field.number(),
789 );
790 ::buffa_descriptor::reflect::ValueRef::Bool(false)
791 }
792 }
793 }
794 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
795 match field.number() {
796 1u32 => self.value != 0,
797 _ => false,
798 }
799 }
800 fn for_each_set(
801 &self,
802 f: &mut dyn ::core::ops::FnMut(
803 &::buffa_descriptor::FieldDescriptor,
804 ::buffa_descriptor::reflect::ValueRef<'_>,
805 ),
806 ) {
807 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
808 self,
809 );
810 for fd in md.fields() {
811 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
812 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
813 }
814 }
815 }
816 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
817 ::buffa_descriptor::reflect::DynamicMessage::from_message(
818 self,
819 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
820 Self::__buffa_reflect_message_index(),
821 )
822 }
823 }
824 impl ::buffa_descriptor::reflect::ReflectElement for UInt64Value {
825 #[inline]
826 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
827 ::buffa_descriptor::reflect::ValueRef::Message(
828 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
829 )
830 }
831 }
832 impl UInt64Value {
833 #[doc(hidden)]
836 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
837 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
838 *IDX
839 .get_or_init(|| {
840 __buffa::reflect::descriptor_pool()
841 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
842 .expect(
843 "generated message is registered in the embedded descriptor pool",
844 )
845 })
846 }
847 }
848 impl ::buffa_descriptor::reflect::Reflectable for UInt64Value {
849 #[inline]
853 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
854 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
855 }
856 }
857};
858impl ::buffa::MessageName for UInt64Value {
859 const PACKAGE: &'static str = "google.protobuf";
860 const NAME: &'static str = "UInt64Value";
861 const FULL_NAME: &'static str = "google.protobuf.UInt64Value";
862 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
863}
864impl ::buffa::Message for UInt64Value {
865 #[allow(clippy::let_and_return)]
871 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
872 #[allow(unused_imports)]
873 use ::buffa::Enumeration as _;
874 let mut size = 0u32;
875 if self.value != 0u64 {
876 size += 1u32 + ::buffa::types::uint64_encoded_len(self.value) as u32;
877 }
878 size += self.__buffa_unknown_fields.encoded_len() as u32;
879 size
880 }
881 fn write_to(
882 &self,
883 _cache: &mut ::buffa::SizeCache,
884 buf: &mut impl ::buffa::bytes::BufMut,
885 ) {
886 #[allow(unused_imports)]
887 use ::buffa::Enumeration as _;
888 if self.value != 0u64 {
889 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
890 .encode(buf);
891 ::buffa::types::encode_uint64(self.value, buf);
892 }
893 self.__buffa_unknown_fields.write_to(buf);
894 }
895 fn merge_field(
896 &mut self,
897 tag: ::buffa::encoding::Tag,
898 buf: &mut impl ::buffa::bytes::Buf,
899 depth: u32,
900 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
901 #[allow(unused_imports)]
902 use ::buffa::bytes::Buf as _;
903 #[allow(unused_imports)]
904 use ::buffa::Enumeration as _;
905 match tag.field_number() {
906 1u32 => {
907 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
908 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
909 field_number: 1u32,
910 expected: 0u8,
911 actual: tag.wire_type() as u8,
912 });
913 }
914 self.value = ::buffa::types::decode_uint64(buf)?;
915 }
916 _ => {
917 self.__buffa_unknown_fields
918 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
919 }
920 }
921 ::core::result::Result::Ok(())
922 }
923 fn clear(&mut self) {
924 self.value = 0u64;
925 self.__buffa_unknown_fields.clear();
926 }
927}
928impl ::buffa::ExtensionSet for UInt64Value {
929 const PROTO_FQN: &'static str = "google.protobuf.UInt64Value";
930 fn unknown_fields(&self) -> &::buffa::UnknownFields {
931 &self.__buffa_unknown_fields
932 }
933 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
934 &mut self.__buffa_unknown_fields
935 }
936}
937impl ::buffa::text::TextFormat for UInt64Value {
938 fn encode_text(
939 &self,
940 enc: &mut ::buffa::text::TextEncoder<'_>,
941 ) -> ::core::fmt::Result {
942 #[allow(unused_imports)]
943 use ::buffa::Enumeration as _;
944 if self.value != 0u64 {
945 enc.write_field_name("value")?;
946 enc.write_u64(self.value)?;
947 }
948 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
949 ::core::result::Result::Ok(())
950 }
951 fn merge_text(
952 &mut self,
953 dec: &mut ::buffa::text::TextDecoder<'_>,
954 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
955 #[allow(unused_imports)]
956 use ::buffa::Enumeration as _;
957 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
958 match __name {
959 "value" => self.value = dec.read_u64()?,
960 _ => dec.skip_value()?,
961 }
962 }
963 ::core::result::Result::Ok(())
964 }
965}
966#[doc(hidden)]
967pub const __U_INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
968 type_url: "type.googleapis.com/google.protobuf.UInt64Value",
969 text_encode: ::buffa::type_registry::any_encode_text::<UInt64Value>,
970 text_merge: ::buffa::type_registry::any_merge_text::<UInt64Value>,
971};
972#[derive(Clone, PartialEq, Default)]
976#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
977pub struct Int32Value {
978 pub value: i32,
982 #[doc(hidden)]
983 pub __buffa_unknown_fields: ::buffa::UnknownFields,
984}
985impl ::core::fmt::Debug for Int32Value {
986 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
987 f.debug_struct("Int32Value").field("value", &self.value).finish()
988 }
989}
990impl Int32Value {
991 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
996}
997impl ::buffa::DefaultInstance for Int32Value {
998 fn default_instance() -> &'static Self {
999 static VALUE: ::buffa::__private::OnceBox<Int32Value> = ::buffa::__private::OnceBox::new();
1000 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1001 }
1002}
1003#[cfg(feature = "reflect")]
1004const _: () = {
1005 impl ::buffa_descriptor::reflect::ReflectMessage for Int32Value {
1006 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1007 __buffa::reflect::descriptor_pool()
1008 .message(Self::__buffa_reflect_message_index())
1009 }
1010 fn pool(
1011 &self,
1012 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1013 __buffa::reflect::descriptor_pool()
1014 }
1015 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1016 &self.__buffa_unknown_fields
1017 }
1018 fn get(
1019 &self,
1020 field: &::buffa_descriptor::FieldDescriptor,
1021 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1022 #[allow(unused_imports)]
1023 use ::buffa::Enumeration as _;
1024 match field.number() {
1025 1u32 => ::buffa_descriptor::reflect::ValueRef::I32(self.value),
1026 _ => {
1027 ::core::debug_assert!(
1028 false,
1029 "field number {} is not a member of this message's reflect get()",
1030 field.number(),
1031 );
1032 ::buffa_descriptor::reflect::ValueRef::Bool(false)
1033 }
1034 }
1035 }
1036 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1037 match field.number() {
1038 1u32 => self.value != 0,
1039 _ => false,
1040 }
1041 }
1042 fn for_each_set(
1043 &self,
1044 f: &mut dyn ::core::ops::FnMut(
1045 &::buffa_descriptor::FieldDescriptor,
1046 ::buffa_descriptor::reflect::ValueRef<'_>,
1047 ),
1048 ) {
1049 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1050 self,
1051 );
1052 for fd in md.fields() {
1053 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1054 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1055 }
1056 }
1057 }
1058 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1059 ::buffa_descriptor::reflect::DynamicMessage::from_message(
1060 self,
1061 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
1062 Self::__buffa_reflect_message_index(),
1063 )
1064 }
1065 }
1066 impl ::buffa_descriptor::reflect::ReflectElement for Int32Value {
1067 #[inline]
1068 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1069 ::buffa_descriptor::reflect::ValueRef::Message(
1070 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1071 )
1072 }
1073 }
1074 impl Int32Value {
1075 #[doc(hidden)]
1078 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1079 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1080 *IDX
1081 .get_or_init(|| {
1082 __buffa::reflect::descriptor_pool()
1083 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1084 .expect(
1085 "generated message is registered in the embedded descriptor pool",
1086 )
1087 })
1088 }
1089 }
1090 impl ::buffa_descriptor::reflect::Reflectable for Int32Value {
1091 #[inline]
1095 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
1096 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
1097 }
1098 }
1099};
1100impl ::buffa::MessageName for Int32Value {
1101 const PACKAGE: &'static str = "google.protobuf";
1102 const NAME: &'static str = "Int32Value";
1103 const FULL_NAME: &'static str = "google.protobuf.Int32Value";
1104 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
1105}
1106impl ::buffa::Message for Int32Value {
1107 #[allow(clippy::let_and_return)]
1113 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1114 #[allow(unused_imports)]
1115 use ::buffa::Enumeration as _;
1116 let mut size = 0u32;
1117 if self.value != 0i32 {
1118 size += 1u32 + ::buffa::types::int32_encoded_len(self.value) as u32;
1119 }
1120 size += self.__buffa_unknown_fields.encoded_len() as u32;
1121 size
1122 }
1123 fn write_to(
1124 &self,
1125 _cache: &mut ::buffa::SizeCache,
1126 buf: &mut impl ::buffa::bytes::BufMut,
1127 ) {
1128 #[allow(unused_imports)]
1129 use ::buffa::Enumeration as _;
1130 if self.value != 0i32 {
1131 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1132 .encode(buf);
1133 ::buffa::types::encode_int32(self.value, buf);
1134 }
1135 self.__buffa_unknown_fields.write_to(buf);
1136 }
1137 fn merge_field(
1138 &mut self,
1139 tag: ::buffa::encoding::Tag,
1140 buf: &mut impl ::buffa::bytes::Buf,
1141 depth: u32,
1142 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1143 #[allow(unused_imports)]
1144 use ::buffa::bytes::Buf as _;
1145 #[allow(unused_imports)]
1146 use ::buffa::Enumeration as _;
1147 match tag.field_number() {
1148 1u32 => {
1149 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1150 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1151 field_number: 1u32,
1152 expected: 0u8,
1153 actual: tag.wire_type() as u8,
1154 });
1155 }
1156 self.value = ::buffa::types::decode_int32(buf)?;
1157 }
1158 _ => {
1159 self.__buffa_unknown_fields
1160 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1161 }
1162 }
1163 ::core::result::Result::Ok(())
1164 }
1165 fn clear(&mut self) {
1166 self.value = 0i32;
1167 self.__buffa_unknown_fields.clear();
1168 }
1169}
1170impl ::buffa::ExtensionSet for Int32Value {
1171 const PROTO_FQN: &'static str = "google.protobuf.Int32Value";
1172 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1173 &self.__buffa_unknown_fields
1174 }
1175 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1176 &mut self.__buffa_unknown_fields
1177 }
1178}
1179impl ::buffa::text::TextFormat for Int32Value {
1180 fn encode_text(
1181 &self,
1182 enc: &mut ::buffa::text::TextEncoder<'_>,
1183 ) -> ::core::fmt::Result {
1184 #[allow(unused_imports)]
1185 use ::buffa::Enumeration as _;
1186 if self.value != 0i32 {
1187 enc.write_field_name("value")?;
1188 enc.write_i32(self.value)?;
1189 }
1190 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1191 ::core::result::Result::Ok(())
1192 }
1193 fn merge_text(
1194 &mut self,
1195 dec: &mut ::buffa::text::TextDecoder<'_>,
1196 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1197 #[allow(unused_imports)]
1198 use ::buffa::Enumeration as _;
1199 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1200 match __name {
1201 "value" => self.value = dec.read_i32()?,
1202 _ => dec.skip_value()?,
1203 }
1204 }
1205 ::core::result::Result::Ok(())
1206 }
1207}
1208#[doc(hidden)]
1209pub const __INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1210 type_url: "type.googleapis.com/google.protobuf.Int32Value",
1211 text_encode: ::buffa::type_registry::any_encode_text::<Int32Value>,
1212 text_merge: ::buffa::type_registry::any_merge_text::<Int32Value>,
1213};
1214#[derive(Clone, PartialEq, Default)]
1218#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1219pub struct UInt32Value {
1220 pub value: u32,
1224 #[doc(hidden)]
1225 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1226}
1227impl ::core::fmt::Debug for UInt32Value {
1228 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1229 f.debug_struct("UInt32Value").field("value", &self.value).finish()
1230 }
1231}
1232impl UInt32Value {
1233 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
1238}
1239impl ::buffa::DefaultInstance for UInt32Value {
1240 fn default_instance() -> &'static Self {
1241 static VALUE: ::buffa::__private::OnceBox<UInt32Value> = ::buffa::__private::OnceBox::new();
1242 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1243 }
1244}
1245#[cfg(feature = "reflect")]
1246const _: () = {
1247 impl ::buffa_descriptor::reflect::ReflectMessage for UInt32Value {
1248 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1249 __buffa::reflect::descriptor_pool()
1250 .message(Self::__buffa_reflect_message_index())
1251 }
1252 fn pool(
1253 &self,
1254 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1255 __buffa::reflect::descriptor_pool()
1256 }
1257 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1258 &self.__buffa_unknown_fields
1259 }
1260 fn get(
1261 &self,
1262 field: &::buffa_descriptor::FieldDescriptor,
1263 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1264 #[allow(unused_imports)]
1265 use ::buffa::Enumeration as _;
1266 match field.number() {
1267 1u32 => ::buffa_descriptor::reflect::ValueRef::U32(self.value),
1268 _ => {
1269 ::core::debug_assert!(
1270 false,
1271 "field number {} is not a member of this message's reflect get()",
1272 field.number(),
1273 );
1274 ::buffa_descriptor::reflect::ValueRef::Bool(false)
1275 }
1276 }
1277 }
1278 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1279 match field.number() {
1280 1u32 => self.value != 0,
1281 _ => false,
1282 }
1283 }
1284 fn for_each_set(
1285 &self,
1286 f: &mut dyn ::core::ops::FnMut(
1287 &::buffa_descriptor::FieldDescriptor,
1288 ::buffa_descriptor::reflect::ValueRef<'_>,
1289 ),
1290 ) {
1291 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1292 self,
1293 );
1294 for fd in md.fields() {
1295 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1296 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1297 }
1298 }
1299 }
1300 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1301 ::buffa_descriptor::reflect::DynamicMessage::from_message(
1302 self,
1303 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
1304 Self::__buffa_reflect_message_index(),
1305 )
1306 }
1307 }
1308 impl ::buffa_descriptor::reflect::ReflectElement for UInt32Value {
1309 #[inline]
1310 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1311 ::buffa_descriptor::reflect::ValueRef::Message(
1312 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1313 )
1314 }
1315 }
1316 impl UInt32Value {
1317 #[doc(hidden)]
1320 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1321 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1322 *IDX
1323 .get_or_init(|| {
1324 __buffa::reflect::descriptor_pool()
1325 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1326 .expect(
1327 "generated message is registered in the embedded descriptor pool",
1328 )
1329 })
1330 }
1331 }
1332 impl ::buffa_descriptor::reflect::Reflectable for UInt32Value {
1333 #[inline]
1337 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
1338 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
1339 }
1340 }
1341};
1342impl ::buffa::MessageName for UInt32Value {
1343 const PACKAGE: &'static str = "google.protobuf";
1344 const NAME: &'static str = "UInt32Value";
1345 const FULL_NAME: &'static str = "google.protobuf.UInt32Value";
1346 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
1347}
1348impl ::buffa::Message for UInt32Value {
1349 #[allow(clippy::let_and_return)]
1355 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1356 #[allow(unused_imports)]
1357 use ::buffa::Enumeration as _;
1358 let mut size = 0u32;
1359 if self.value != 0u32 {
1360 size += 1u32 + ::buffa::types::uint32_encoded_len(self.value) as u32;
1361 }
1362 size += self.__buffa_unknown_fields.encoded_len() as u32;
1363 size
1364 }
1365 fn write_to(
1366 &self,
1367 _cache: &mut ::buffa::SizeCache,
1368 buf: &mut impl ::buffa::bytes::BufMut,
1369 ) {
1370 #[allow(unused_imports)]
1371 use ::buffa::Enumeration as _;
1372 if self.value != 0u32 {
1373 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1374 .encode(buf);
1375 ::buffa::types::encode_uint32(self.value, buf);
1376 }
1377 self.__buffa_unknown_fields.write_to(buf);
1378 }
1379 fn merge_field(
1380 &mut self,
1381 tag: ::buffa::encoding::Tag,
1382 buf: &mut impl ::buffa::bytes::Buf,
1383 depth: u32,
1384 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1385 #[allow(unused_imports)]
1386 use ::buffa::bytes::Buf as _;
1387 #[allow(unused_imports)]
1388 use ::buffa::Enumeration as _;
1389 match tag.field_number() {
1390 1u32 => {
1391 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1392 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1393 field_number: 1u32,
1394 expected: 0u8,
1395 actual: tag.wire_type() as u8,
1396 });
1397 }
1398 self.value = ::buffa::types::decode_uint32(buf)?;
1399 }
1400 _ => {
1401 self.__buffa_unknown_fields
1402 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1403 }
1404 }
1405 ::core::result::Result::Ok(())
1406 }
1407 fn clear(&mut self) {
1408 self.value = 0u32;
1409 self.__buffa_unknown_fields.clear();
1410 }
1411}
1412impl ::buffa::ExtensionSet for UInt32Value {
1413 const PROTO_FQN: &'static str = "google.protobuf.UInt32Value";
1414 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1415 &self.__buffa_unknown_fields
1416 }
1417 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1418 &mut self.__buffa_unknown_fields
1419 }
1420}
1421impl ::buffa::text::TextFormat for UInt32Value {
1422 fn encode_text(
1423 &self,
1424 enc: &mut ::buffa::text::TextEncoder<'_>,
1425 ) -> ::core::fmt::Result {
1426 #[allow(unused_imports)]
1427 use ::buffa::Enumeration as _;
1428 if self.value != 0u32 {
1429 enc.write_field_name("value")?;
1430 enc.write_u32(self.value)?;
1431 }
1432 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1433 ::core::result::Result::Ok(())
1434 }
1435 fn merge_text(
1436 &mut self,
1437 dec: &mut ::buffa::text::TextDecoder<'_>,
1438 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1439 #[allow(unused_imports)]
1440 use ::buffa::Enumeration as _;
1441 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1442 match __name {
1443 "value" => self.value = dec.read_u32()?,
1444 _ => dec.skip_value()?,
1445 }
1446 }
1447 ::core::result::Result::Ok(())
1448 }
1449}
1450#[doc(hidden)]
1451pub const __U_INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1452 type_url: "type.googleapis.com/google.protobuf.UInt32Value",
1453 text_encode: ::buffa::type_registry::any_encode_text::<UInt32Value>,
1454 text_merge: ::buffa::type_registry::any_merge_text::<UInt32Value>,
1455};
1456#[derive(Clone, PartialEq, Default)]
1460#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1461pub struct BoolValue {
1462 pub value: bool,
1466 #[doc(hidden)]
1467 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1468}
1469impl ::core::fmt::Debug for BoolValue {
1470 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1471 f.debug_struct("BoolValue").field("value", &self.value).finish()
1472 }
1473}
1474impl BoolValue {
1475 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
1480}
1481impl ::buffa::DefaultInstance for BoolValue {
1482 fn default_instance() -> &'static Self {
1483 static VALUE: ::buffa::__private::OnceBox<BoolValue> = ::buffa::__private::OnceBox::new();
1484 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1485 }
1486}
1487#[cfg(feature = "reflect")]
1488const _: () = {
1489 impl ::buffa_descriptor::reflect::ReflectMessage for BoolValue {
1490 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1491 __buffa::reflect::descriptor_pool()
1492 .message(Self::__buffa_reflect_message_index())
1493 }
1494 fn pool(
1495 &self,
1496 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1497 __buffa::reflect::descriptor_pool()
1498 }
1499 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1500 &self.__buffa_unknown_fields
1501 }
1502 fn get(
1503 &self,
1504 field: &::buffa_descriptor::FieldDescriptor,
1505 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1506 #[allow(unused_imports)]
1507 use ::buffa::Enumeration as _;
1508 match field.number() {
1509 1u32 => ::buffa_descriptor::reflect::ValueRef::Bool(self.value),
1510 _ => {
1511 ::core::debug_assert!(
1512 false,
1513 "field number {} is not a member of this message's reflect get()",
1514 field.number(),
1515 );
1516 ::buffa_descriptor::reflect::ValueRef::Bool(false)
1517 }
1518 }
1519 }
1520 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1521 match field.number() {
1522 1u32 => self.value,
1523 _ => false,
1524 }
1525 }
1526 fn for_each_set(
1527 &self,
1528 f: &mut dyn ::core::ops::FnMut(
1529 &::buffa_descriptor::FieldDescriptor,
1530 ::buffa_descriptor::reflect::ValueRef<'_>,
1531 ),
1532 ) {
1533 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1534 self,
1535 );
1536 for fd in md.fields() {
1537 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1538 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1539 }
1540 }
1541 }
1542 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1543 ::buffa_descriptor::reflect::DynamicMessage::from_message(
1544 self,
1545 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
1546 Self::__buffa_reflect_message_index(),
1547 )
1548 }
1549 }
1550 impl ::buffa_descriptor::reflect::ReflectElement for BoolValue {
1551 #[inline]
1552 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1553 ::buffa_descriptor::reflect::ValueRef::Message(
1554 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1555 )
1556 }
1557 }
1558 impl BoolValue {
1559 #[doc(hidden)]
1562 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1563 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1564 *IDX
1565 .get_or_init(|| {
1566 __buffa::reflect::descriptor_pool()
1567 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1568 .expect(
1569 "generated message is registered in the embedded descriptor pool",
1570 )
1571 })
1572 }
1573 }
1574 impl ::buffa_descriptor::reflect::Reflectable for BoolValue {
1575 #[inline]
1579 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
1580 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
1581 }
1582 }
1583};
1584impl ::buffa::MessageName for BoolValue {
1585 const PACKAGE: &'static str = "google.protobuf";
1586 const NAME: &'static str = "BoolValue";
1587 const FULL_NAME: &'static str = "google.protobuf.BoolValue";
1588 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
1589}
1590impl ::buffa::Message for BoolValue {
1591 #[allow(clippy::let_and_return)]
1597 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1598 #[allow(unused_imports)]
1599 use ::buffa::Enumeration as _;
1600 let mut size = 0u32;
1601 if self.value {
1602 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1603 }
1604 size += self.__buffa_unknown_fields.encoded_len() as u32;
1605 size
1606 }
1607 fn write_to(
1608 &self,
1609 _cache: &mut ::buffa::SizeCache,
1610 buf: &mut impl ::buffa::bytes::BufMut,
1611 ) {
1612 #[allow(unused_imports)]
1613 use ::buffa::Enumeration as _;
1614 if self.value {
1615 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1616 .encode(buf);
1617 ::buffa::types::encode_bool(self.value, buf);
1618 }
1619 self.__buffa_unknown_fields.write_to(buf);
1620 }
1621 fn merge_field(
1622 &mut self,
1623 tag: ::buffa::encoding::Tag,
1624 buf: &mut impl ::buffa::bytes::Buf,
1625 depth: u32,
1626 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1627 #[allow(unused_imports)]
1628 use ::buffa::bytes::Buf as _;
1629 #[allow(unused_imports)]
1630 use ::buffa::Enumeration as _;
1631 match tag.field_number() {
1632 1u32 => {
1633 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1634 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1635 field_number: 1u32,
1636 expected: 0u8,
1637 actual: tag.wire_type() as u8,
1638 });
1639 }
1640 self.value = ::buffa::types::decode_bool(buf)?;
1641 }
1642 _ => {
1643 self.__buffa_unknown_fields
1644 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1645 }
1646 }
1647 ::core::result::Result::Ok(())
1648 }
1649 fn clear(&mut self) {
1650 self.value = false;
1651 self.__buffa_unknown_fields.clear();
1652 }
1653}
1654impl ::buffa::ExtensionSet for BoolValue {
1655 const PROTO_FQN: &'static str = "google.protobuf.BoolValue";
1656 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1657 &self.__buffa_unknown_fields
1658 }
1659 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1660 &mut self.__buffa_unknown_fields
1661 }
1662}
1663impl ::buffa::text::TextFormat for BoolValue {
1664 fn encode_text(
1665 &self,
1666 enc: &mut ::buffa::text::TextEncoder<'_>,
1667 ) -> ::core::fmt::Result {
1668 #[allow(unused_imports)]
1669 use ::buffa::Enumeration as _;
1670 if self.value {
1671 enc.write_field_name("value")?;
1672 enc.write_bool(self.value)?;
1673 }
1674 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1675 ::core::result::Result::Ok(())
1676 }
1677 fn merge_text(
1678 &mut self,
1679 dec: &mut ::buffa::text::TextDecoder<'_>,
1680 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1681 #[allow(unused_imports)]
1682 use ::buffa::Enumeration as _;
1683 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1684 match __name {
1685 "value" => self.value = dec.read_bool()?,
1686 _ => dec.skip_value()?,
1687 }
1688 }
1689 ::core::result::Result::Ok(())
1690 }
1691}
1692#[doc(hidden)]
1693pub const __BOOL_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1694 type_url: "type.googleapis.com/google.protobuf.BoolValue",
1695 text_encode: ::buffa::type_registry::any_encode_text::<BoolValue>,
1696 text_merge: ::buffa::type_registry::any_merge_text::<BoolValue>,
1697};
1698#[derive(Clone, PartialEq, Default)]
1702#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1703pub struct StringValue {
1704 pub value: ::buffa::alloc::string::String,
1708 #[doc(hidden)]
1709 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1710}
1711impl ::core::fmt::Debug for StringValue {
1712 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1713 f.debug_struct("StringValue").field("value", &self.value).finish()
1714 }
1715}
1716impl StringValue {
1717 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
1722}
1723impl ::buffa::DefaultInstance for StringValue {
1724 fn default_instance() -> &'static Self {
1725 static VALUE: ::buffa::__private::OnceBox<StringValue> = ::buffa::__private::OnceBox::new();
1726 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1727 }
1728}
1729#[cfg(feature = "reflect")]
1730const _: () = {
1731 impl ::buffa_descriptor::reflect::ReflectMessage for StringValue {
1732 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1733 __buffa::reflect::descriptor_pool()
1734 .message(Self::__buffa_reflect_message_index())
1735 }
1736 fn pool(
1737 &self,
1738 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1739 __buffa::reflect::descriptor_pool()
1740 }
1741 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1742 &self.__buffa_unknown_fields
1743 }
1744 fn get(
1745 &self,
1746 field: &::buffa_descriptor::FieldDescriptor,
1747 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1748 #[allow(unused_imports)]
1749 use ::buffa::Enumeration as _;
1750 match field.number() {
1751 1u32 => ::buffa_descriptor::reflect::ValueRef::String(&self.value),
1752 _ => {
1753 ::core::debug_assert!(
1754 false,
1755 "field number {} is not a member of this message's reflect get()",
1756 field.number(),
1757 );
1758 ::buffa_descriptor::reflect::ValueRef::Bool(false)
1759 }
1760 }
1761 }
1762 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1763 match field.number() {
1764 1u32 => !self.value.is_empty(),
1765 _ => false,
1766 }
1767 }
1768 fn for_each_set(
1769 &self,
1770 f: &mut dyn ::core::ops::FnMut(
1771 &::buffa_descriptor::FieldDescriptor,
1772 ::buffa_descriptor::reflect::ValueRef<'_>,
1773 ),
1774 ) {
1775 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1776 self,
1777 );
1778 for fd in md.fields() {
1779 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1780 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1781 }
1782 }
1783 }
1784 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1785 ::buffa_descriptor::reflect::DynamicMessage::from_message(
1786 self,
1787 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
1788 Self::__buffa_reflect_message_index(),
1789 )
1790 }
1791 }
1792 impl ::buffa_descriptor::reflect::ReflectElement for StringValue {
1793 #[inline]
1794 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1795 ::buffa_descriptor::reflect::ValueRef::Message(
1796 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1797 )
1798 }
1799 }
1800 impl StringValue {
1801 #[doc(hidden)]
1804 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1805 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1806 *IDX
1807 .get_or_init(|| {
1808 __buffa::reflect::descriptor_pool()
1809 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1810 .expect(
1811 "generated message is registered in the embedded descriptor pool",
1812 )
1813 })
1814 }
1815 }
1816 impl ::buffa_descriptor::reflect::Reflectable for StringValue {
1817 #[inline]
1821 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
1822 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
1823 }
1824 }
1825};
1826impl ::buffa::MessageName for StringValue {
1827 const PACKAGE: &'static str = "google.protobuf";
1828 const NAME: &'static str = "StringValue";
1829 const FULL_NAME: &'static str = "google.protobuf.StringValue";
1830 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
1831}
1832impl ::buffa::Message for StringValue {
1833 #[allow(clippy::let_and_return)]
1839 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1840 #[allow(unused_imports)]
1841 use ::buffa::Enumeration as _;
1842 let mut size = 0u32;
1843 if !self.value.is_empty() {
1844 size += 1u32 + ::buffa::types::string_encoded_len(&self.value) as u32;
1845 }
1846 size += self.__buffa_unknown_fields.encoded_len() as u32;
1847 size
1848 }
1849 fn write_to(
1850 &self,
1851 _cache: &mut ::buffa::SizeCache,
1852 buf: &mut impl ::buffa::bytes::BufMut,
1853 ) {
1854 #[allow(unused_imports)]
1855 use ::buffa::Enumeration as _;
1856 if !self.value.is_empty() {
1857 ::buffa::encoding::Tag::new(
1858 1u32,
1859 ::buffa::encoding::WireType::LengthDelimited,
1860 )
1861 .encode(buf);
1862 ::buffa::types::encode_string(&self.value, buf);
1863 }
1864 self.__buffa_unknown_fields.write_to(buf);
1865 }
1866 fn merge_field(
1867 &mut self,
1868 tag: ::buffa::encoding::Tag,
1869 buf: &mut impl ::buffa::bytes::Buf,
1870 depth: u32,
1871 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1872 #[allow(unused_imports)]
1873 use ::buffa::bytes::Buf as _;
1874 #[allow(unused_imports)]
1875 use ::buffa::Enumeration as _;
1876 match tag.field_number() {
1877 1u32 => {
1878 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1879 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1880 field_number: 1u32,
1881 expected: 2u8,
1882 actual: tag.wire_type() as u8,
1883 });
1884 }
1885 ::buffa::types::merge_string(&mut self.value, buf)?;
1886 }
1887 _ => {
1888 self.__buffa_unknown_fields
1889 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1890 }
1891 }
1892 ::core::result::Result::Ok(())
1893 }
1894 fn clear(&mut self) {
1895 self.value.clear();
1896 self.__buffa_unknown_fields.clear();
1897 }
1898}
1899impl ::buffa::ExtensionSet for StringValue {
1900 const PROTO_FQN: &'static str = "google.protobuf.StringValue";
1901 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1902 &self.__buffa_unknown_fields
1903 }
1904 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1905 &mut self.__buffa_unknown_fields
1906 }
1907}
1908impl ::buffa::text::TextFormat for StringValue {
1909 fn encode_text(
1910 &self,
1911 enc: &mut ::buffa::text::TextEncoder<'_>,
1912 ) -> ::core::fmt::Result {
1913 #[allow(unused_imports)]
1914 use ::buffa::Enumeration as _;
1915 if !self.value.is_empty() {
1916 enc.write_field_name("value")?;
1917 enc.write_string(&self.value)?;
1918 }
1919 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1920 ::core::result::Result::Ok(())
1921 }
1922 fn merge_text(
1923 &mut self,
1924 dec: &mut ::buffa::text::TextDecoder<'_>,
1925 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1926 #[allow(unused_imports)]
1927 use ::buffa::Enumeration as _;
1928 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1929 match __name {
1930 "value" => self.value = dec.read_string()?.into_owned(),
1931 _ => dec.skip_value()?,
1932 }
1933 }
1934 ::core::result::Result::Ok(())
1935 }
1936}
1937#[doc(hidden)]
1938pub const __STRING_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1939 type_url: "type.googleapis.com/google.protobuf.StringValue",
1940 text_encode: ::buffa::type_registry::any_encode_text::<StringValue>,
1941 text_merge: ::buffa::type_registry::any_merge_text::<StringValue>,
1942};
1943#[derive(Clone, PartialEq, Default)]
1947#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1948pub struct BytesValue {
1949 pub value: ::buffa::alloc::vec::Vec<u8>,
1953 #[doc(hidden)]
1954 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1955}
1956impl ::core::fmt::Debug for BytesValue {
1957 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1958 f.debug_struct("BytesValue").field("value", &self.value).finish()
1959 }
1960}
1961impl BytesValue {
1962 pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
1967}
1968impl ::buffa::DefaultInstance for BytesValue {
1969 fn default_instance() -> &'static Self {
1970 static VALUE: ::buffa::__private::OnceBox<BytesValue> = ::buffa::__private::OnceBox::new();
1971 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1972 }
1973}
1974#[cfg(feature = "reflect")]
1975const _: () = {
1976 impl ::buffa_descriptor::reflect::ReflectMessage for BytesValue {
1977 fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1978 __buffa::reflect::descriptor_pool()
1979 .message(Self::__buffa_reflect_message_index())
1980 }
1981 fn pool(
1982 &self,
1983 ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1984 __buffa::reflect::descriptor_pool()
1985 }
1986 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1987 &self.__buffa_unknown_fields
1988 }
1989 fn get(
1990 &self,
1991 field: &::buffa_descriptor::FieldDescriptor,
1992 ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1993 #[allow(unused_imports)]
1994 use ::buffa::Enumeration as _;
1995 match field.number() {
1996 1u32 => ::buffa_descriptor::reflect::ValueRef::Bytes(&self.value[..]),
1997 _ => {
1998 ::core::debug_assert!(
1999 false,
2000 "field number {} is not a member of this message's reflect get()",
2001 field.number(),
2002 );
2003 ::buffa_descriptor::reflect::ValueRef::Bool(false)
2004 }
2005 }
2006 }
2007 fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
2008 match field.number() {
2009 1u32 => !self.value.is_empty(),
2010 _ => false,
2011 }
2012 }
2013 fn for_each_set(
2014 &self,
2015 f: &mut dyn ::core::ops::FnMut(
2016 &::buffa_descriptor::FieldDescriptor,
2017 ::buffa_descriptor::reflect::ValueRef<'_>,
2018 ),
2019 ) {
2020 let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
2021 self,
2022 );
2023 for fd in md.fields() {
2024 if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
2025 f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
2026 }
2027 }
2028 }
2029 fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
2030 ::buffa_descriptor::reflect::DynamicMessage::from_message(
2031 self,
2032 ::buffa::alloc::sync::Arc::clone(__buffa::reflect::descriptor_pool()),
2033 Self::__buffa_reflect_message_index(),
2034 )
2035 }
2036 }
2037 impl ::buffa_descriptor::reflect::ReflectElement for BytesValue {
2038 #[inline]
2039 fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2040 ::buffa_descriptor::reflect::ValueRef::Message(
2041 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
2042 )
2043 }
2044 }
2045 impl BytesValue {
2046 #[doc(hidden)]
2049 fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
2050 static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
2051 *IDX
2052 .get_or_init(|| {
2053 __buffa::reflect::descriptor_pool()
2054 .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
2055 .expect(
2056 "generated message is registered in the embedded descriptor pool",
2057 )
2058 })
2059 }
2060 }
2061 impl ::buffa_descriptor::reflect::Reflectable for BytesValue {
2062 #[inline]
2066 fn reflect(&self) -> ::buffa_descriptor::reflect::ReflectCow<'_> {
2067 ::buffa_descriptor::reflect::ReflectCow::Borrowed(self)
2068 }
2069 }
2070};
2071impl ::buffa::MessageName for BytesValue {
2072 const PACKAGE: &'static str = "google.protobuf";
2073 const NAME: &'static str = "BytesValue";
2074 const FULL_NAME: &'static str = "google.protobuf.BytesValue";
2075 const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
2076}
2077impl ::buffa::Message for BytesValue {
2078 #[allow(clippy::let_and_return)]
2084 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2085 #[allow(unused_imports)]
2086 use ::buffa::Enumeration as _;
2087 let mut size = 0u32;
2088 if !self.value.is_empty() {
2089 size += 1u32 + ::buffa::types::bytes_encoded_len(&self.value) as u32;
2090 }
2091 size += self.__buffa_unknown_fields.encoded_len() as u32;
2092 size
2093 }
2094 fn write_to(
2095 &self,
2096 _cache: &mut ::buffa::SizeCache,
2097 buf: &mut impl ::buffa::bytes::BufMut,
2098 ) {
2099 #[allow(unused_imports)]
2100 use ::buffa::Enumeration as _;
2101 if !self.value.is_empty() {
2102 ::buffa::encoding::Tag::new(
2103 1u32,
2104 ::buffa::encoding::WireType::LengthDelimited,
2105 )
2106 .encode(buf);
2107 ::buffa::types::encode_bytes(&self.value, buf);
2108 }
2109 self.__buffa_unknown_fields.write_to(buf);
2110 }
2111 fn merge_field(
2112 &mut self,
2113 tag: ::buffa::encoding::Tag,
2114 buf: &mut impl ::buffa::bytes::Buf,
2115 depth: u32,
2116 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2117 #[allow(unused_imports)]
2118 use ::buffa::bytes::Buf as _;
2119 #[allow(unused_imports)]
2120 use ::buffa::Enumeration as _;
2121 match tag.field_number() {
2122 1u32 => {
2123 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2124 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2125 field_number: 1u32,
2126 expected: 2u8,
2127 actual: tag.wire_type() as u8,
2128 });
2129 }
2130 ::buffa::types::merge_bytes(&mut self.value, buf)?;
2131 }
2132 _ => {
2133 self.__buffa_unknown_fields
2134 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2135 }
2136 }
2137 ::core::result::Result::Ok(())
2138 }
2139 fn clear(&mut self) {
2140 self.value.clear();
2141 self.__buffa_unknown_fields.clear();
2142 }
2143}
2144impl ::buffa::ExtensionSet for BytesValue {
2145 const PROTO_FQN: &'static str = "google.protobuf.BytesValue";
2146 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2147 &self.__buffa_unknown_fields
2148 }
2149 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2150 &mut self.__buffa_unknown_fields
2151 }
2152}
2153impl ::buffa::text::TextFormat for BytesValue {
2154 fn encode_text(
2155 &self,
2156 enc: &mut ::buffa::text::TextEncoder<'_>,
2157 ) -> ::core::fmt::Result {
2158 #[allow(unused_imports)]
2159 use ::buffa::Enumeration as _;
2160 if !self.value.is_empty() {
2161 enc.write_field_name("value")?;
2162 enc.write_bytes(&self.value)?;
2163 }
2164 enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
2165 ::core::result::Result::Ok(())
2166 }
2167 fn merge_text(
2168 &mut self,
2169 dec: &mut ::buffa::text::TextDecoder<'_>,
2170 ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
2171 #[allow(unused_imports)]
2172 use ::buffa::Enumeration as _;
2173 while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
2174 match __name {
2175 "value" => self.value = dec.read_bytes()?,
2176 _ => dec.skip_value()?,
2177 }
2178 }
2179 ::core::result::Result::Ok(())
2180 }
2181}
2182#[doc(hidden)]
2183pub const __BYTES_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
2184 type_url: "type.googleapis.com/google.protobuf.BytesValue",
2185 text_encode: ::buffa::type_registry::any_encode_text::<BytesValue>,
2186 text_merge: ::buffa::type_registry::any_merge_text::<BytesValue>,
2187};