1#[derive(Clone, PartialEq, Default)]
5#[derive(::serde::Serialize, ::serde::Deserialize)]
6#[serde(default)]
7pub struct Schema {
8 #[serde(
12 rename = "name",
13 with = "::buffa::json_helpers::proto_string",
14 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
15 )]
16 pub name: ::buffa::alloc::string::String,
17 #[serde(
21 rename = "catalog_name",
22 alias = "catalogName",
23 with = "::buffa::json_helpers::proto_string",
24 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
25 )]
26 pub catalog_name: ::buffa::alloc::string::String,
27 #[serde(
31 rename = "full_name",
32 alias = "fullName",
33 with = "::buffa::json_helpers::proto_string",
34 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
35 )]
36 pub full_name: ::buffa::alloc::string::String,
37 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
41 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
42 #[serde(
46 rename = "properties",
47 skip_serializing_if = "::buffa::__private::HashMap::is_empty",
48 deserialize_with = "::buffa::json_helpers::null_as_default"
49 )]
50 pub properties: ::buffa::__private::HashMap<
51 ::buffa::alloc::string::String,
52 ::buffa::alloc::string::String,
53 >,
54 #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
58 pub owner: ::core::option::Option<::buffa::alloc::string::String>,
59 #[serde(
63 rename = "created_at",
64 alias = "createdAt",
65 with = "::buffa::json_helpers::opt_int64",
66 skip_serializing_if = "::core::option::Option::is_none"
67 )]
68 pub created_at: ::core::option::Option<i64>,
69 #[serde(
73 rename = "created_by",
74 alias = "createdBy",
75 skip_serializing_if = "::core::option::Option::is_none"
76 )]
77 pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
78 #[serde(
82 rename = "updated_at",
83 alias = "updatedAt",
84 with = "::buffa::json_helpers::opt_int64",
85 skip_serializing_if = "::core::option::Option::is_none"
86 )]
87 pub updated_at: ::core::option::Option<i64>,
88 #[serde(
92 rename = "updated_by",
93 alias = "updatedBy",
94 skip_serializing_if = "::core::option::Option::is_none"
95 )]
96 pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
97 #[serde(
101 rename = "schema_id",
102 alias = "schemaId",
103 skip_serializing_if = "::core::option::Option::is_none"
104 )]
105 pub schema_id: ::core::option::Option<::buffa::alloc::string::String>,
106 #[serde(
114 rename = "storage_root",
115 alias = "storageRoot",
116 skip_serializing_if = "::core::option::Option::is_none"
117 )]
118 pub storage_root: ::core::option::Option<::buffa::alloc::string::String>,
119 #[serde(
128 rename = "storage_location",
129 alias = "storageLocation",
130 skip_serializing_if = "::core::option::Option::is_none"
131 )]
132 pub storage_location: ::core::option::Option<::buffa::alloc::string::String>,
133 #[serde(skip)]
134 #[doc(hidden)]
135 pub __buffa_unknown_fields: ::buffa::UnknownFields,
136}
137impl ::core::fmt::Debug for Schema {
138 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
139 f.debug_struct("Schema")
140 .field("name", &self.name)
141 .field("catalog_name", &self.catalog_name)
142 .field("full_name", &self.full_name)
143 .field("comment", &self.comment)
144 .field("properties", &self.properties)
145 .field("owner", &self.owner)
146 .field("created_at", &self.created_at)
147 .field("created_by", &self.created_by)
148 .field("updated_at", &self.updated_at)
149 .field("updated_by", &self.updated_by)
150 .field("schema_id", &self.schema_id)
151 .field("storage_root", &self.storage_root)
152 .field("storage_location", &self.storage_location)
153 .finish()
154 }
155}
156impl Schema {
157 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.Schema";
162}
163impl Schema {
164 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
165 #[inline]
166 pub fn with_comment(
168 mut self,
169 value: impl Into<::buffa::alloc::string::String>,
170 ) -> Self {
171 self.comment = Some(value.into());
172 self
173 }
174 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
175 #[inline]
176 pub fn with_owner(
178 mut self,
179 value: impl Into<::buffa::alloc::string::String>,
180 ) -> Self {
181 self.owner = Some(value.into());
182 self
183 }
184 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
185 #[inline]
186 pub fn with_created_at(mut self, value: i64) -> Self {
188 self.created_at = Some(value);
189 self
190 }
191 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
192 #[inline]
193 pub fn with_created_by(
195 mut self,
196 value: impl Into<::buffa::alloc::string::String>,
197 ) -> Self {
198 self.created_by = Some(value.into());
199 self
200 }
201 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
202 #[inline]
203 pub fn with_updated_at(mut self, value: i64) -> Self {
205 self.updated_at = Some(value);
206 self
207 }
208 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
209 #[inline]
210 pub fn with_updated_by(
212 mut self,
213 value: impl Into<::buffa::alloc::string::String>,
214 ) -> Self {
215 self.updated_by = Some(value.into());
216 self
217 }
218 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
219 #[inline]
220 pub fn with_schema_id(
222 mut self,
223 value: impl Into<::buffa::alloc::string::String>,
224 ) -> Self {
225 self.schema_id = Some(value.into());
226 self
227 }
228 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
229 #[inline]
230 pub fn with_storage_root(
232 mut self,
233 value: impl Into<::buffa::alloc::string::String>,
234 ) -> Self {
235 self.storage_root = Some(value.into());
236 self
237 }
238 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
239 #[inline]
240 pub fn with_storage_location(
242 mut self,
243 value: impl Into<::buffa::alloc::string::String>,
244 ) -> Self {
245 self.storage_location = Some(value.into());
246 self
247 }
248}
249impl ::buffa::DefaultInstance for Schema {
250 fn default_instance() -> &'static Self {
251 static VALUE: ::buffa::__private::OnceBox<Schema> = ::buffa::__private::OnceBox::new();
252 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
253 }
254}
255impl ::buffa::MessageName for Schema {
256 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
257 const NAME: &'static str = "Schema";
258 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.Schema";
259 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.Schema";
260}
261impl ::buffa::Message for Schema {
262 #[allow(clippy::let_and_return)]
268 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
269 #[allow(unused_imports)]
270 use ::buffa::Enumeration as _;
271 let mut size = 0u32;
272 if !self.name.is_empty() {
273 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
274 }
275 if !self.catalog_name.is_empty() {
276 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
277 }
278 if !self.full_name.is_empty() {
279 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
280 }
281 if let Some(ref v) = self.comment {
282 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
283 }
284 #[allow(clippy::for_kv_map)]
285 for (k, v) in &self.properties {
286 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
287 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
288 size
289 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
290 + entry_size;
291 }
292 if let Some(ref v) = self.owner {
293 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
294 }
295 if let Some(v) = self.created_at {
296 size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
297 }
298 if let Some(ref v) = self.created_by {
299 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
300 }
301 if let Some(v) = self.updated_at {
302 size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
303 }
304 if let Some(ref v) = self.updated_by {
305 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
306 }
307 if let Some(ref v) = self.schema_id {
308 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
309 }
310 if let Some(ref v) = self.storage_root {
311 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
312 }
313 if let Some(ref v) = self.storage_location {
314 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
315 }
316 size += self.__buffa_unknown_fields.encoded_len() as u32;
317 size
318 }
319 fn write_to(
320 &self,
321 _cache: &mut ::buffa::SizeCache,
322 buf: &mut impl ::buffa::bytes::BufMut,
323 ) {
324 #[allow(unused_imports)]
325 use ::buffa::Enumeration as _;
326 if !self.name.is_empty() {
327 ::buffa::encoding::Tag::new(
328 1u32,
329 ::buffa::encoding::WireType::LengthDelimited,
330 )
331 .encode(buf);
332 ::buffa::types::encode_string(&self.name, buf);
333 }
334 if !self.catalog_name.is_empty() {
335 ::buffa::encoding::Tag::new(
336 2u32,
337 ::buffa::encoding::WireType::LengthDelimited,
338 )
339 .encode(buf);
340 ::buffa::types::encode_string(&self.catalog_name, buf);
341 }
342 if !self.full_name.is_empty() {
343 ::buffa::encoding::Tag::new(
344 3u32,
345 ::buffa::encoding::WireType::LengthDelimited,
346 )
347 .encode(buf);
348 ::buffa::types::encode_string(&self.full_name, buf);
349 }
350 if let Some(ref v) = self.comment {
351 ::buffa::encoding::Tag::new(
352 4u32,
353 ::buffa::encoding::WireType::LengthDelimited,
354 )
355 .encode(buf);
356 ::buffa::types::encode_string(v, buf);
357 }
358 for (k, v) in &self.properties {
359 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
360 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
361 ::buffa::encoding::Tag::new(
362 5u32,
363 ::buffa::encoding::WireType::LengthDelimited,
364 )
365 .encode(buf);
366 ::buffa::encoding::encode_varint(entry_size as u64, buf);
367 ::buffa::encoding::Tag::new(
368 1u32,
369 ::buffa::encoding::WireType::LengthDelimited,
370 )
371 .encode(buf);
372 ::buffa::types::encode_string(k, buf);
373 ::buffa::encoding::Tag::new(
374 2u32,
375 ::buffa::encoding::WireType::LengthDelimited,
376 )
377 .encode(buf);
378 ::buffa::types::encode_string(v, buf);
379 }
380 if let Some(ref v) = self.owner {
381 ::buffa::encoding::Tag::new(
382 6u32,
383 ::buffa::encoding::WireType::LengthDelimited,
384 )
385 .encode(buf);
386 ::buffa::types::encode_string(v, buf);
387 }
388 if let Some(v) = self.created_at {
389 ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
390 .encode(buf);
391 ::buffa::types::encode_int64(v, buf);
392 }
393 if let Some(ref v) = self.created_by {
394 ::buffa::encoding::Tag::new(
395 8u32,
396 ::buffa::encoding::WireType::LengthDelimited,
397 )
398 .encode(buf);
399 ::buffa::types::encode_string(v, buf);
400 }
401 if let Some(v) = self.updated_at {
402 ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
403 .encode(buf);
404 ::buffa::types::encode_int64(v, buf);
405 }
406 if let Some(ref v) = self.updated_by {
407 ::buffa::encoding::Tag::new(
408 10u32,
409 ::buffa::encoding::WireType::LengthDelimited,
410 )
411 .encode(buf);
412 ::buffa::types::encode_string(v, buf);
413 }
414 if let Some(ref v) = self.schema_id {
415 ::buffa::encoding::Tag::new(
416 11u32,
417 ::buffa::encoding::WireType::LengthDelimited,
418 )
419 .encode(buf);
420 ::buffa::types::encode_string(v, buf);
421 }
422 if let Some(ref v) = self.storage_root {
423 ::buffa::encoding::Tag::new(
424 12u32,
425 ::buffa::encoding::WireType::LengthDelimited,
426 )
427 .encode(buf);
428 ::buffa::types::encode_string(v, buf);
429 }
430 if let Some(ref v) = self.storage_location {
431 ::buffa::encoding::Tag::new(
432 13u32,
433 ::buffa::encoding::WireType::LengthDelimited,
434 )
435 .encode(buf);
436 ::buffa::types::encode_string(v, buf);
437 }
438 self.__buffa_unknown_fields.write_to(buf);
439 }
440 fn merge_field(
441 &mut self,
442 tag: ::buffa::encoding::Tag,
443 buf: &mut impl ::buffa::bytes::Buf,
444 depth: u32,
445 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
446 #[allow(unused_imports)]
447 use ::buffa::bytes::Buf as _;
448 #[allow(unused_imports)]
449 use ::buffa::Enumeration as _;
450 match tag.field_number() {
451 1u32 => {
452 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
453 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
454 field_number: 1u32,
455 expected: 2u8,
456 actual: tag.wire_type() as u8,
457 });
458 }
459 ::buffa::types::merge_string(&mut self.name, buf)?;
460 }
461 2u32 => {
462 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
463 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
464 field_number: 2u32,
465 expected: 2u8,
466 actual: tag.wire_type() as u8,
467 });
468 }
469 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
470 }
471 3u32 => {
472 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
473 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
474 field_number: 3u32,
475 expected: 2u8,
476 actual: tag.wire_type() as u8,
477 });
478 }
479 ::buffa::types::merge_string(&mut self.full_name, buf)?;
480 }
481 4u32 => {
482 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
483 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
484 field_number: 4u32,
485 expected: 2u8,
486 actual: tag.wire_type() as u8,
487 });
488 }
489 ::buffa::types::merge_string(
490 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
491 buf,
492 )?;
493 }
494 5u32 => {
495 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
496 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
497 field_number: 5u32,
498 expected: 2u8,
499 actual: tag.wire_type() as u8,
500 });
501 }
502 let entry_len = ::buffa::encoding::decode_varint(buf)?;
503 let entry_len = usize::try_from(entry_len)
504 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
505 if buf.remaining() < entry_len {
506 return ::core::result::Result::Err(
507 ::buffa::DecodeError::UnexpectedEof,
508 );
509 }
510 let entry_limit = buf.remaining() - entry_len;
511 let mut key = ::core::default::Default::default();
512 let mut val = ::core::default::Default::default();
513 while buf.remaining() > entry_limit {
514 let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
515 match entry_tag.field_number() {
516 1 => {
517 if entry_tag.wire_type()
518 != ::buffa::encoding::WireType::LengthDelimited
519 {
520 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
521 field_number: entry_tag.field_number(),
522 expected: 2u8,
523 actual: entry_tag.wire_type() as u8,
524 });
525 }
526 key = ::buffa::types::decode_string(buf)?;
527 }
528 2 => {
529 if entry_tag.wire_type()
530 != ::buffa::encoding::WireType::LengthDelimited
531 {
532 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
533 field_number: entry_tag.field_number(),
534 expected: 2u8,
535 actual: entry_tag.wire_type() as u8,
536 });
537 }
538 val = ::buffa::types::decode_string(buf)?;
539 }
540 _ => {
541 ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
542 }
543 }
544 }
545 if buf.remaining() != entry_limit {
546 let remaining = buf.remaining();
547 if remaining > entry_limit {
548 buf.advance(remaining - entry_limit);
549 } else {
550 return ::core::result::Result::Err(
551 ::buffa::DecodeError::UnexpectedEof,
552 );
553 }
554 }
555 self.properties.insert(key, val);
556 }
557 6u32 => {
558 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
559 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
560 field_number: 6u32,
561 expected: 2u8,
562 actual: tag.wire_type() as u8,
563 });
564 }
565 ::buffa::types::merge_string(
566 self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
567 buf,
568 )?;
569 }
570 7u32 => {
571 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
572 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
573 field_number: 7u32,
574 expected: 0u8,
575 actual: tag.wire_type() as u8,
576 });
577 }
578 self.created_at = ::core::option::Option::Some(
579 ::buffa::types::decode_int64(buf)?,
580 );
581 }
582 8u32 => {
583 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
584 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
585 field_number: 8u32,
586 expected: 2u8,
587 actual: tag.wire_type() as u8,
588 });
589 }
590 ::buffa::types::merge_string(
591 self
592 .created_by
593 .get_or_insert_with(::buffa::alloc::string::String::new),
594 buf,
595 )?;
596 }
597 9u32 => {
598 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
599 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
600 field_number: 9u32,
601 expected: 0u8,
602 actual: tag.wire_type() as u8,
603 });
604 }
605 self.updated_at = ::core::option::Option::Some(
606 ::buffa::types::decode_int64(buf)?,
607 );
608 }
609 10u32 => {
610 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
611 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
612 field_number: 10u32,
613 expected: 2u8,
614 actual: tag.wire_type() as u8,
615 });
616 }
617 ::buffa::types::merge_string(
618 self
619 .updated_by
620 .get_or_insert_with(::buffa::alloc::string::String::new),
621 buf,
622 )?;
623 }
624 11u32 => {
625 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
626 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
627 field_number: 11u32,
628 expected: 2u8,
629 actual: tag.wire_type() as u8,
630 });
631 }
632 ::buffa::types::merge_string(
633 self
634 .schema_id
635 .get_or_insert_with(::buffa::alloc::string::String::new),
636 buf,
637 )?;
638 }
639 12u32 => {
640 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
641 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
642 field_number: 12u32,
643 expected: 2u8,
644 actual: tag.wire_type() as u8,
645 });
646 }
647 ::buffa::types::merge_string(
648 self
649 .storage_root
650 .get_or_insert_with(::buffa::alloc::string::String::new),
651 buf,
652 )?;
653 }
654 13u32 => {
655 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
656 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
657 field_number: 13u32,
658 expected: 2u8,
659 actual: tag.wire_type() as u8,
660 });
661 }
662 ::buffa::types::merge_string(
663 self
664 .storage_location
665 .get_or_insert_with(::buffa::alloc::string::String::new),
666 buf,
667 )?;
668 }
669 _ => {
670 self.__buffa_unknown_fields
671 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
672 }
673 }
674 ::core::result::Result::Ok(())
675 }
676 fn clear(&mut self) {
677 self.name.clear();
678 self.catalog_name.clear();
679 self.full_name.clear();
680 self.comment = ::core::option::Option::None;
681 self.properties.clear();
682 self.owner = ::core::option::Option::None;
683 self.created_at = ::core::option::Option::None;
684 self.created_by = ::core::option::Option::None;
685 self.updated_at = ::core::option::Option::None;
686 self.updated_by = ::core::option::Option::None;
687 self.schema_id = ::core::option::Option::None;
688 self.storage_root = ::core::option::Option::None;
689 self.storage_location = ::core::option::Option::None;
690 self.__buffa_unknown_fields.clear();
691 }
692}
693impl ::buffa::ExtensionSet for Schema {
694 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.Schema";
695 fn unknown_fields(&self) -> &::buffa::UnknownFields {
696 &self.__buffa_unknown_fields
697 }
698 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
699 &mut self.__buffa_unknown_fields
700 }
701}
702impl ::buffa::json_helpers::ProtoElemJson for Schema {
703 fn serialize_proto_json<S: ::serde::Serializer>(
704 v: &Self,
705 s: S,
706 ) -> ::core::result::Result<S::Ok, S::Error> {
707 ::serde::Serialize::serialize(v, s)
708 }
709 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
710 d: D,
711 ) -> ::core::result::Result<Self, D::Error> {
712 <Self as ::serde::Deserialize>::deserialize(d)
713 }
714}
715#[doc(hidden)]
716pub const __SCHEMA_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
717 type_url: "type.googleapis.com/unitycatalog.schemas.v1.Schema",
718 to_json: ::buffa::type_registry::any_to_json::<Schema>,
719 from_json: ::buffa::type_registry::any_from_json::<Schema>,
720 is_wkt: false,
721};
722#[derive(Clone, PartialEq, Default)]
724#[derive(::serde::Serialize, ::serde::Deserialize)]
725#[serde(default)]
726pub struct ListSchemasRequest {
727 #[serde(
731 rename = "catalog_name",
732 alias = "catalogName",
733 with = "::buffa::json_helpers::proto_string",
734 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
735 )]
736 pub catalog_name: ::buffa::alloc::string::String,
737 #[serde(
741 rename = "max_results",
742 alias = "maxResults",
743 with = "::buffa::json_helpers::opt_int32",
744 skip_serializing_if = "::core::option::Option::is_none"
745 )]
746 pub max_results: ::core::option::Option<i32>,
747 #[serde(
751 rename = "page_token",
752 alias = "pageToken",
753 skip_serializing_if = "::core::option::Option::is_none"
754 )]
755 pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
756 #[serde(
760 rename = "include_browse",
761 alias = "includeBrowse",
762 skip_serializing_if = "::core::option::Option::is_none"
763 )]
764 pub include_browse: ::core::option::Option<bool>,
765 #[serde(skip)]
766 #[doc(hidden)]
767 pub __buffa_unknown_fields: ::buffa::UnknownFields,
768}
769impl ::core::fmt::Debug for ListSchemasRequest {
770 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
771 f.debug_struct("ListSchemasRequest")
772 .field("catalog_name", &self.catalog_name)
773 .field("max_results", &self.max_results)
774 .field("page_token", &self.page_token)
775 .field("include_browse", &self.include_browse)
776 .finish()
777 }
778}
779impl ListSchemasRequest {
780 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasRequest";
785}
786impl ListSchemasRequest {
787 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
788 #[inline]
789 pub fn with_max_results(mut self, value: i32) -> Self {
791 self.max_results = Some(value);
792 self
793 }
794 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
795 #[inline]
796 pub fn with_page_token(
798 mut self,
799 value: impl Into<::buffa::alloc::string::String>,
800 ) -> Self {
801 self.page_token = Some(value.into());
802 self
803 }
804 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
805 #[inline]
806 pub fn with_include_browse(mut self, value: bool) -> Self {
808 self.include_browse = Some(value);
809 self
810 }
811}
812impl ::buffa::DefaultInstance for ListSchemasRequest {
813 fn default_instance() -> &'static Self {
814 static VALUE: ::buffa::__private::OnceBox<ListSchemasRequest> = ::buffa::__private::OnceBox::new();
815 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
816 }
817}
818impl ::buffa::MessageName for ListSchemasRequest {
819 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
820 const NAME: &'static str = "ListSchemasRequest";
821 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.ListSchemasRequest";
822 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasRequest";
823}
824impl ::buffa::Message for ListSchemasRequest {
825 #[allow(clippy::let_and_return)]
831 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
832 #[allow(unused_imports)]
833 use ::buffa::Enumeration as _;
834 let mut size = 0u32;
835 if !self.catalog_name.is_empty() {
836 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
837 }
838 if let Some(v) = self.max_results {
839 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
840 }
841 if let Some(ref v) = self.page_token {
842 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
843 }
844 if self.include_browse.is_some() {
845 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
846 }
847 size += self.__buffa_unknown_fields.encoded_len() as u32;
848 size
849 }
850 fn write_to(
851 &self,
852 _cache: &mut ::buffa::SizeCache,
853 buf: &mut impl ::buffa::bytes::BufMut,
854 ) {
855 #[allow(unused_imports)]
856 use ::buffa::Enumeration as _;
857 if !self.catalog_name.is_empty() {
858 ::buffa::encoding::Tag::new(
859 1u32,
860 ::buffa::encoding::WireType::LengthDelimited,
861 )
862 .encode(buf);
863 ::buffa::types::encode_string(&self.catalog_name, buf);
864 }
865 if let Some(v) = self.max_results {
866 ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
867 .encode(buf);
868 ::buffa::types::encode_int32(v, buf);
869 }
870 if let Some(ref v) = self.page_token {
871 ::buffa::encoding::Tag::new(
872 3u32,
873 ::buffa::encoding::WireType::LengthDelimited,
874 )
875 .encode(buf);
876 ::buffa::types::encode_string(v, buf);
877 }
878 if let Some(v) = self.include_browse {
879 ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
880 .encode(buf);
881 ::buffa::types::encode_bool(v, buf);
882 }
883 self.__buffa_unknown_fields.write_to(buf);
884 }
885 fn merge_field(
886 &mut self,
887 tag: ::buffa::encoding::Tag,
888 buf: &mut impl ::buffa::bytes::Buf,
889 depth: u32,
890 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
891 #[allow(unused_imports)]
892 use ::buffa::bytes::Buf as _;
893 #[allow(unused_imports)]
894 use ::buffa::Enumeration as _;
895 match tag.field_number() {
896 1u32 => {
897 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
898 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
899 field_number: 1u32,
900 expected: 2u8,
901 actual: tag.wire_type() as u8,
902 });
903 }
904 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
905 }
906 2u32 => {
907 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
908 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
909 field_number: 2u32,
910 expected: 0u8,
911 actual: tag.wire_type() as u8,
912 });
913 }
914 self.max_results = ::core::option::Option::Some(
915 ::buffa::types::decode_int32(buf)?,
916 );
917 }
918 3u32 => {
919 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
920 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
921 field_number: 3u32,
922 expected: 2u8,
923 actual: tag.wire_type() as u8,
924 });
925 }
926 ::buffa::types::merge_string(
927 self
928 .page_token
929 .get_or_insert_with(::buffa::alloc::string::String::new),
930 buf,
931 )?;
932 }
933 4u32 => {
934 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
935 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
936 field_number: 4u32,
937 expected: 0u8,
938 actual: tag.wire_type() as u8,
939 });
940 }
941 self.include_browse = ::core::option::Option::Some(
942 ::buffa::types::decode_bool(buf)?,
943 );
944 }
945 _ => {
946 self.__buffa_unknown_fields
947 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
948 }
949 }
950 ::core::result::Result::Ok(())
951 }
952 fn clear(&mut self) {
953 self.catalog_name.clear();
954 self.max_results = ::core::option::Option::None;
955 self.page_token = ::core::option::Option::None;
956 self.include_browse = ::core::option::Option::None;
957 self.__buffa_unknown_fields.clear();
958 }
959}
960impl ::buffa::ExtensionSet for ListSchemasRequest {
961 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.ListSchemasRequest";
962 fn unknown_fields(&self) -> &::buffa::UnknownFields {
963 &self.__buffa_unknown_fields
964 }
965 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
966 &mut self.__buffa_unknown_fields
967 }
968}
969impl ::buffa::json_helpers::ProtoElemJson for ListSchemasRequest {
970 fn serialize_proto_json<S: ::serde::Serializer>(
971 v: &Self,
972 s: S,
973 ) -> ::core::result::Result<S::Ok, S::Error> {
974 ::serde::Serialize::serialize(v, s)
975 }
976 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
977 d: D,
978 ) -> ::core::result::Result<Self, D::Error> {
979 <Self as ::serde::Deserialize>::deserialize(d)
980 }
981}
982#[doc(hidden)]
983pub const __LIST_SCHEMAS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
984 type_url: "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasRequest",
985 to_json: ::buffa::type_registry::any_to_json::<ListSchemasRequest>,
986 from_json: ::buffa::type_registry::any_from_json::<ListSchemasRequest>,
987 is_wkt: false,
988};
989#[derive(Clone, PartialEq, Default)]
991#[derive(::serde::Serialize, ::serde::Deserialize)]
992#[serde(default)]
993pub struct ListSchemasResponse {
994 #[serde(
998 rename = "schemas",
999 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1000 deserialize_with = "::buffa::json_helpers::null_as_default"
1001 )]
1002 pub schemas: ::buffa::alloc::vec::Vec<Schema>,
1003 #[serde(
1007 rename = "next_page_token",
1008 alias = "nextPageToken",
1009 skip_serializing_if = "::core::option::Option::is_none"
1010 )]
1011 pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
1012 #[serde(skip)]
1013 #[doc(hidden)]
1014 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1015}
1016impl ::core::fmt::Debug for ListSchemasResponse {
1017 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1018 f.debug_struct("ListSchemasResponse")
1019 .field("schemas", &self.schemas)
1020 .field("next_page_token", &self.next_page_token)
1021 .finish()
1022 }
1023}
1024impl ListSchemasResponse {
1025 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasResponse";
1030}
1031impl ListSchemasResponse {
1032 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1033 #[inline]
1034 pub fn with_next_page_token(
1036 mut self,
1037 value: impl Into<::buffa::alloc::string::String>,
1038 ) -> Self {
1039 self.next_page_token = Some(value.into());
1040 self
1041 }
1042}
1043impl ::buffa::DefaultInstance for ListSchemasResponse {
1044 fn default_instance() -> &'static Self {
1045 static VALUE: ::buffa::__private::OnceBox<ListSchemasResponse> = ::buffa::__private::OnceBox::new();
1046 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1047 }
1048}
1049impl ::buffa::MessageName for ListSchemasResponse {
1050 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
1051 const NAME: &'static str = "ListSchemasResponse";
1052 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.ListSchemasResponse";
1053 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasResponse";
1054}
1055impl ::buffa::Message for ListSchemasResponse {
1056 #[allow(clippy::let_and_return)]
1062 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1063 #[allow(unused_imports)]
1064 use ::buffa::Enumeration as _;
1065 let mut size = 0u32;
1066 for v in &self.schemas {
1067 let __slot = __cache.reserve();
1068 let inner_size = v.compute_size(__cache);
1069 __cache.set(__slot, inner_size);
1070 size
1071 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1072 + inner_size;
1073 }
1074 if let Some(ref v) = self.next_page_token {
1075 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1076 }
1077 size += self.__buffa_unknown_fields.encoded_len() as u32;
1078 size
1079 }
1080 fn write_to(
1081 &self,
1082 __cache: &mut ::buffa::SizeCache,
1083 buf: &mut impl ::buffa::bytes::BufMut,
1084 ) {
1085 #[allow(unused_imports)]
1086 use ::buffa::Enumeration as _;
1087 for v in &self.schemas {
1088 ::buffa::encoding::Tag::new(
1089 1u32,
1090 ::buffa::encoding::WireType::LengthDelimited,
1091 )
1092 .encode(buf);
1093 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1094 v.write_to(__cache, buf);
1095 }
1096 if let Some(ref v) = self.next_page_token {
1097 ::buffa::encoding::Tag::new(
1098 2u32,
1099 ::buffa::encoding::WireType::LengthDelimited,
1100 )
1101 .encode(buf);
1102 ::buffa::types::encode_string(v, buf);
1103 }
1104 self.__buffa_unknown_fields.write_to(buf);
1105 }
1106 fn merge_field(
1107 &mut self,
1108 tag: ::buffa::encoding::Tag,
1109 buf: &mut impl ::buffa::bytes::Buf,
1110 depth: u32,
1111 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1112 #[allow(unused_imports)]
1113 use ::buffa::bytes::Buf as _;
1114 #[allow(unused_imports)]
1115 use ::buffa::Enumeration as _;
1116 match tag.field_number() {
1117 1u32 => {
1118 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1119 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1120 field_number: 1u32,
1121 expected: 2u8,
1122 actual: tag.wire_type() as u8,
1123 });
1124 }
1125 let mut elem = ::core::default::Default::default();
1126 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1127 self.schemas.push(elem);
1128 }
1129 2u32 => {
1130 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1131 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1132 field_number: 2u32,
1133 expected: 2u8,
1134 actual: tag.wire_type() as u8,
1135 });
1136 }
1137 ::buffa::types::merge_string(
1138 self
1139 .next_page_token
1140 .get_or_insert_with(::buffa::alloc::string::String::new),
1141 buf,
1142 )?;
1143 }
1144 _ => {
1145 self.__buffa_unknown_fields
1146 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1147 }
1148 }
1149 ::core::result::Result::Ok(())
1150 }
1151 fn clear(&mut self) {
1152 self.schemas.clear();
1153 self.next_page_token = ::core::option::Option::None;
1154 self.__buffa_unknown_fields.clear();
1155 }
1156}
1157impl ::buffa::ExtensionSet for ListSchemasResponse {
1158 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.ListSchemasResponse";
1159 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1160 &self.__buffa_unknown_fields
1161 }
1162 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1163 &mut self.__buffa_unknown_fields
1164 }
1165}
1166impl ::buffa::json_helpers::ProtoElemJson for ListSchemasResponse {
1167 fn serialize_proto_json<S: ::serde::Serializer>(
1168 v: &Self,
1169 s: S,
1170 ) -> ::core::result::Result<S::Ok, S::Error> {
1171 ::serde::Serialize::serialize(v, s)
1172 }
1173 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1174 d: D,
1175 ) -> ::core::result::Result<Self, D::Error> {
1176 <Self as ::serde::Deserialize>::deserialize(d)
1177 }
1178}
1179#[doc(hidden)]
1180pub const __LIST_SCHEMAS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1181 type_url: "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasResponse",
1182 to_json: ::buffa::type_registry::any_to_json::<ListSchemasResponse>,
1183 from_json: ::buffa::type_registry::any_from_json::<ListSchemasResponse>,
1184 is_wkt: false,
1185};
1186#[derive(Clone, PartialEq, Default)]
1188#[derive(::serde::Serialize, ::serde::Deserialize)]
1189#[serde(default)]
1190pub struct CreateSchemaRequest {
1191 #[serde(
1195 rename = "name",
1196 with = "::buffa::json_helpers::proto_string",
1197 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1198 )]
1199 pub name: ::buffa::alloc::string::String,
1200 #[serde(
1204 rename = "catalog_name",
1205 alias = "catalogName",
1206 with = "::buffa::json_helpers::proto_string",
1207 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1208 )]
1209 pub catalog_name: ::buffa::alloc::string::String,
1210 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1214 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1215 #[serde(
1219 rename = "properties",
1220 skip_serializing_if = "::buffa::__private::HashMap::is_empty",
1221 deserialize_with = "::buffa::json_helpers::null_as_default"
1222 )]
1223 pub properties: ::buffa::__private::HashMap<
1224 ::buffa::alloc::string::String,
1225 ::buffa::alloc::string::String,
1226 >,
1227 #[serde(
1234 rename = "storage_root",
1235 alias = "storageRoot",
1236 skip_serializing_if = "::core::option::Option::is_none"
1237 )]
1238 pub storage_root: ::core::option::Option<::buffa::alloc::string::String>,
1239 #[serde(skip)]
1240 #[doc(hidden)]
1241 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1242}
1243impl ::core::fmt::Debug for CreateSchemaRequest {
1244 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1245 f.debug_struct("CreateSchemaRequest")
1246 .field("name", &self.name)
1247 .field("catalog_name", &self.catalog_name)
1248 .field("comment", &self.comment)
1249 .field("properties", &self.properties)
1250 .field("storage_root", &self.storage_root)
1251 .finish()
1252 }
1253}
1254impl CreateSchemaRequest {
1255 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.CreateSchemaRequest";
1260}
1261impl CreateSchemaRequest {
1262 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1263 #[inline]
1264 pub fn with_comment(
1266 mut self,
1267 value: impl Into<::buffa::alloc::string::String>,
1268 ) -> Self {
1269 self.comment = Some(value.into());
1270 self
1271 }
1272 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1273 #[inline]
1274 pub fn with_storage_root(
1276 mut self,
1277 value: impl Into<::buffa::alloc::string::String>,
1278 ) -> Self {
1279 self.storage_root = Some(value.into());
1280 self
1281 }
1282}
1283impl ::buffa::DefaultInstance for CreateSchemaRequest {
1284 fn default_instance() -> &'static Self {
1285 static VALUE: ::buffa::__private::OnceBox<CreateSchemaRequest> = ::buffa::__private::OnceBox::new();
1286 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1287 }
1288}
1289impl ::buffa::MessageName for CreateSchemaRequest {
1290 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
1291 const NAME: &'static str = "CreateSchemaRequest";
1292 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.CreateSchemaRequest";
1293 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.CreateSchemaRequest";
1294}
1295impl ::buffa::Message for CreateSchemaRequest {
1296 #[allow(clippy::let_and_return)]
1302 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1303 #[allow(unused_imports)]
1304 use ::buffa::Enumeration as _;
1305 let mut size = 0u32;
1306 if !self.name.is_empty() {
1307 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1308 }
1309 if !self.catalog_name.is_empty() {
1310 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
1311 }
1312 if let Some(ref v) = self.comment {
1313 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1314 }
1315 #[allow(clippy::for_kv_map)]
1316 for (k, v) in &self.properties {
1317 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1318 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1319 size
1320 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
1321 + entry_size;
1322 }
1323 if let Some(ref v) = self.storage_root {
1324 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1325 }
1326 size += self.__buffa_unknown_fields.encoded_len() as u32;
1327 size
1328 }
1329 fn write_to(
1330 &self,
1331 _cache: &mut ::buffa::SizeCache,
1332 buf: &mut impl ::buffa::bytes::BufMut,
1333 ) {
1334 #[allow(unused_imports)]
1335 use ::buffa::Enumeration as _;
1336 if !self.name.is_empty() {
1337 ::buffa::encoding::Tag::new(
1338 1u32,
1339 ::buffa::encoding::WireType::LengthDelimited,
1340 )
1341 .encode(buf);
1342 ::buffa::types::encode_string(&self.name, buf);
1343 }
1344 if !self.catalog_name.is_empty() {
1345 ::buffa::encoding::Tag::new(
1346 2u32,
1347 ::buffa::encoding::WireType::LengthDelimited,
1348 )
1349 .encode(buf);
1350 ::buffa::types::encode_string(&self.catalog_name, buf);
1351 }
1352 if let Some(ref v) = self.comment {
1353 ::buffa::encoding::Tag::new(
1354 3u32,
1355 ::buffa::encoding::WireType::LengthDelimited,
1356 )
1357 .encode(buf);
1358 ::buffa::types::encode_string(v, buf);
1359 }
1360 for (k, v) in &self.properties {
1361 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1362 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1363 ::buffa::encoding::Tag::new(
1364 4u32,
1365 ::buffa::encoding::WireType::LengthDelimited,
1366 )
1367 .encode(buf);
1368 ::buffa::encoding::encode_varint(entry_size as u64, buf);
1369 ::buffa::encoding::Tag::new(
1370 1u32,
1371 ::buffa::encoding::WireType::LengthDelimited,
1372 )
1373 .encode(buf);
1374 ::buffa::types::encode_string(k, buf);
1375 ::buffa::encoding::Tag::new(
1376 2u32,
1377 ::buffa::encoding::WireType::LengthDelimited,
1378 )
1379 .encode(buf);
1380 ::buffa::types::encode_string(v, buf);
1381 }
1382 if let Some(ref v) = self.storage_root {
1383 ::buffa::encoding::Tag::new(
1384 5u32,
1385 ::buffa::encoding::WireType::LengthDelimited,
1386 )
1387 .encode(buf);
1388 ::buffa::types::encode_string(v, buf);
1389 }
1390 self.__buffa_unknown_fields.write_to(buf);
1391 }
1392 fn merge_field(
1393 &mut self,
1394 tag: ::buffa::encoding::Tag,
1395 buf: &mut impl ::buffa::bytes::Buf,
1396 depth: u32,
1397 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1398 #[allow(unused_imports)]
1399 use ::buffa::bytes::Buf as _;
1400 #[allow(unused_imports)]
1401 use ::buffa::Enumeration as _;
1402 match tag.field_number() {
1403 1u32 => {
1404 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1405 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1406 field_number: 1u32,
1407 expected: 2u8,
1408 actual: tag.wire_type() as u8,
1409 });
1410 }
1411 ::buffa::types::merge_string(&mut self.name, buf)?;
1412 }
1413 2u32 => {
1414 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1415 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1416 field_number: 2u32,
1417 expected: 2u8,
1418 actual: tag.wire_type() as u8,
1419 });
1420 }
1421 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
1422 }
1423 3u32 => {
1424 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1425 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1426 field_number: 3u32,
1427 expected: 2u8,
1428 actual: tag.wire_type() as u8,
1429 });
1430 }
1431 ::buffa::types::merge_string(
1432 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1433 buf,
1434 )?;
1435 }
1436 4u32 => {
1437 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1438 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1439 field_number: 4u32,
1440 expected: 2u8,
1441 actual: tag.wire_type() as u8,
1442 });
1443 }
1444 let entry_len = ::buffa::encoding::decode_varint(buf)?;
1445 let entry_len = usize::try_from(entry_len)
1446 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
1447 if buf.remaining() < entry_len {
1448 return ::core::result::Result::Err(
1449 ::buffa::DecodeError::UnexpectedEof,
1450 );
1451 }
1452 let entry_limit = buf.remaining() - entry_len;
1453 let mut key = ::core::default::Default::default();
1454 let mut val = ::core::default::Default::default();
1455 while buf.remaining() > entry_limit {
1456 let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
1457 match entry_tag.field_number() {
1458 1 => {
1459 if entry_tag.wire_type()
1460 != ::buffa::encoding::WireType::LengthDelimited
1461 {
1462 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1463 field_number: entry_tag.field_number(),
1464 expected: 2u8,
1465 actual: entry_tag.wire_type() as u8,
1466 });
1467 }
1468 key = ::buffa::types::decode_string(buf)?;
1469 }
1470 2 => {
1471 if entry_tag.wire_type()
1472 != ::buffa::encoding::WireType::LengthDelimited
1473 {
1474 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1475 field_number: entry_tag.field_number(),
1476 expected: 2u8,
1477 actual: entry_tag.wire_type() as u8,
1478 });
1479 }
1480 val = ::buffa::types::decode_string(buf)?;
1481 }
1482 _ => {
1483 ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
1484 }
1485 }
1486 }
1487 if buf.remaining() != entry_limit {
1488 let remaining = buf.remaining();
1489 if remaining > entry_limit {
1490 buf.advance(remaining - entry_limit);
1491 } else {
1492 return ::core::result::Result::Err(
1493 ::buffa::DecodeError::UnexpectedEof,
1494 );
1495 }
1496 }
1497 self.properties.insert(key, val);
1498 }
1499 5u32 => {
1500 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1501 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1502 field_number: 5u32,
1503 expected: 2u8,
1504 actual: tag.wire_type() as u8,
1505 });
1506 }
1507 ::buffa::types::merge_string(
1508 self
1509 .storage_root
1510 .get_or_insert_with(::buffa::alloc::string::String::new),
1511 buf,
1512 )?;
1513 }
1514 _ => {
1515 self.__buffa_unknown_fields
1516 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1517 }
1518 }
1519 ::core::result::Result::Ok(())
1520 }
1521 fn clear(&mut self) {
1522 self.name.clear();
1523 self.catalog_name.clear();
1524 self.comment = ::core::option::Option::None;
1525 self.properties.clear();
1526 self.storage_root = ::core::option::Option::None;
1527 self.__buffa_unknown_fields.clear();
1528 }
1529}
1530impl ::buffa::ExtensionSet for CreateSchemaRequest {
1531 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.CreateSchemaRequest";
1532 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1533 &self.__buffa_unknown_fields
1534 }
1535 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1536 &mut self.__buffa_unknown_fields
1537 }
1538}
1539impl ::buffa::json_helpers::ProtoElemJson for CreateSchemaRequest {
1540 fn serialize_proto_json<S: ::serde::Serializer>(
1541 v: &Self,
1542 s: S,
1543 ) -> ::core::result::Result<S::Ok, S::Error> {
1544 ::serde::Serialize::serialize(v, s)
1545 }
1546 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1547 d: D,
1548 ) -> ::core::result::Result<Self, D::Error> {
1549 <Self as ::serde::Deserialize>::deserialize(d)
1550 }
1551}
1552#[doc(hidden)]
1553pub const __CREATE_SCHEMA_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1554 type_url: "type.googleapis.com/unitycatalog.schemas.v1.CreateSchemaRequest",
1555 to_json: ::buffa::type_registry::any_to_json::<CreateSchemaRequest>,
1556 from_json: ::buffa::type_registry::any_from_json::<CreateSchemaRequest>,
1557 is_wkt: false,
1558};
1559#[derive(Clone, PartialEq, Default)]
1561#[derive(::serde::Serialize, ::serde::Deserialize)]
1562#[serde(default)]
1563pub struct GetSchemaRequest {
1564 #[serde(
1570 rename = "full_name",
1571 alias = "fullName",
1572 with = "::buffa::json_helpers::proto_string",
1573 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1574 )]
1575 pub full_name: ::buffa::alloc::string::String,
1576 #[serde(skip)]
1577 #[doc(hidden)]
1578 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1579}
1580impl ::core::fmt::Debug for GetSchemaRequest {
1581 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1582 f.debug_struct("GetSchemaRequest").field("full_name", &self.full_name).finish()
1583 }
1584}
1585impl GetSchemaRequest {
1586 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.GetSchemaRequest";
1591}
1592impl ::buffa::DefaultInstance for GetSchemaRequest {
1593 fn default_instance() -> &'static Self {
1594 static VALUE: ::buffa::__private::OnceBox<GetSchemaRequest> = ::buffa::__private::OnceBox::new();
1595 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1596 }
1597}
1598impl ::buffa::MessageName for GetSchemaRequest {
1599 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
1600 const NAME: &'static str = "GetSchemaRequest";
1601 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.GetSchemaRequest";
1602 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.GetSchemaRequest";
1603}
1604impl ::buffa::Message for GetSchemaRequest {
1605 #[allow(clippy::let_and_return)]
1611 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1612 #[allow(unused_imports)]
1613 use ::buffa::Enumeration as _;
1614 let mut size = 0u32;
1615 if !self.full_name.is_empty() {
1616 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
1617 }
1618 size += self.__buffa_unknown_fields.encoded_len() as u32;
1619 size
1620 }
1621 fn write_to(
1622 &self,
1623 _cache: &mut ::buffa::SizeCache,
1624 buf: &mut impl ::buffa::bytes::BufMut,
1625 ) {
1626 #[allow(unused_imports)]
1627 use ::buffa::Enumeration as _;
1628 if !self.full_name.is_empty() {
1629 ::buffa::encoding::Tag::new(
1630 1u32,
1631 ::buffa::encoding::WireType::LengthDelimited,
1632 )
1633 .encode(buf);
1634 ::buffa::types::encode_string(&self.full_name, buf);
1635 }
1636 self.__buffa_unknown_fields.write_to(buf);
1637 }
1638 fn merge_field(
1639 &mut self,
1640 tag: ::buffa::encoding::Tag,
1641 buf: &mut impl ::buffa::bytes::Buf,
1642 depth: u32,
1643 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1644 #[allow(unused_imports)]
1645 use ::buffa::bytes::Buf as _;
1646 #[allow(unused_imports)]
1647 use ::buffa::Enumeration as _;
1648 match tag.field_number() {
1649 1u32 => {
1650 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1651 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1652 field_number: 1u32,
1653 expected: 2u8,
1654 actual: tag.wire_type() as u8,
1655 });
1656 }
1657 ::buffa::types::merge_string(&mut self.full_name, buf)?;
1658 }
1659 _ => {
1660 self.__buffa_unknown_fields
1661 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1662 }
1663 }
1664 ::core::result::Result::Ok(())
1665 }
1666 fn clear(&mut self) {
1667 self.full_name.clear();
1668 self.__buffa_unknown_fields.clear();
1669 }
1670}
1671impl ::buffa::ExtensionSet for GetSchemaRequest {
1672 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.GetSchemaRequest";
1673 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1674 &self.__buffa_unknown_fields
1675 }
1676 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1677 &mut self.__buffa_unknown_fields
1678 }
1679}
1680impl ::buffa::json_helpers::ProtoElemJson for GetSchemaRequest {
1681 fn serialize_proto_json<S: ::serde::Serializer>(
1682 v: &Self,
1683 s: S,
1684 ) -> ::core::result::Result<S::Ok, S::Error> {
1685 ::serde::Serialize::serialize(v, s)
1686 }
1687 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1688 d: D,
1689 ) -> ::core::result::Result<Self, D::Error> {
1690 <Self as ::serde::Deserialize>::deserialize(d)
1691 }
1692}
1693#[doc(hidden)]
1694pub const __GET_SCHEMA_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1695 type_url: "type.googleapis.com/unitycatalog.schemas.v1.GetSchemaRequest",
1696 to_json: ::buffa::type_registry::any_to_json::<GetSchemaRequest>,
1697 from_json: ::buffa::type_registry::any_from_json::<GetSchemaRequest>,
1698 is_wkt: false,
1699};
1700#[derive(Clone, PartialEq, Default)]
1702#[derive(::serde::Serialize, ::serde::Deserialize)]
1703#[serde(default)]
1704pub struct UpdateSchemaRequest {
1705 #[serde(
1709 rename = "full_name",
1710 alias = "fullName",
1711 with = "::buffa::json_helpers::proto_string",
1712 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1713 )]
1714 pub full_name: ::buffa::alloc::string::String,
1715 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1719 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1720 #[serde(
1727 rename = "properties",
1728 skip_serializing_if = "::buffa::__private::HashMap::is_empty",
1729 deserialize_with = "::buffa::json_helpers::null_as_default"
1730 )]
1731 pub properties: ::buffa::__private::HashMap<
1732 ::buffa::alloc::string::String,
1733 ::buffa::alloc::string::String,
1734 >,
1735 #[serde(
1739 rename = "new_name",
1740 alias = "newName",
1741 skip_serializing_if = "::core::option::Option::is_none"
1742 )]
1743 pub new_name: ::core::option::Option<::buffa::alloc::string::String>,
1744 #[serde(skip)]
1745 #[doc(hidden)]
1746 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1747}
1748impl ::core::fmt::Debug for UpdateSchemaRequest {
1749 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1750 f.debug_struct("UpdateSchemaRequest")
1751 .field("full_name", &self.full_name)
1752 .field("comment", &self.comment)
1753 .field("properties", &self.properties)
1754 .field("new_name", &self.new_name)
1755 .finish()
1756 }
1757}
1758impl UpdateSchemaRequest {
1759 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.UpdateSchemaRequest";
1764}
1765impl UpdateSchemaRequest {
1766 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1767 #[inline]
1768 pub fn with_comment(
1770 mut self,
1771 value: impl Into<::buffa::alloc::string::String>,
1772 ) -> Self {
1773 self.comment = Some(value.into());
1774 self
1775 }
1776 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1777 #[inline]
1778 pub fn with_new_name(
1780 mut self,
1781 value: impl Into<::buffa::alloc::string::String>,
1782 ) -> Self {
1783 self.new_name = Some(value.into());
1784 self
1785 }
1786}
1787impl ::buffa::DefaultInstance for UpdateSchemaRequest {
1788 fn default_instance() -> &'static Self {
1789 static VALUE: ::buffa::__private::OnceBox<UpdateSchemaRequest> = ::buffa::__private::OnceBox::new();
1790 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1791 }
1792}
1793impl ::buffa::MessageName for UpdateSchemaRequest {
1794 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
1795 const NAME: &'static str = "UpdateSchemaRequest";
1796 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.UpdateSchemaRequest";
1797 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.UpdateSchemaRequest";
1798}
1799impl ::buffa::Message for UpdateSchemaRequest {
1800 #[allow(clippy::let_and_return)]
1806 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1807 #[allow(unused_imports)]
1808 use ::buffa::Enumeration as _;
1809 let mut size = 0u32;
1810 if !self.full_name.is_empty() {
1811 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
1812 }
1813 if let Some(ref v) = self.comment {
1814 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1815 }
1816 #[allow(clippy::for_kv_map)]
1817 for (k, v) in &self.properties {
1818 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1819 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1820 size
1821 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
1822 + entry_size;
1823 }
1824 if let Some(ref v) = self.new_name {
1825 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1826 }
1827 size += self.__buffa_unknown_fields.encoded_len() as u32;
1828 size
1829 }
1830 fn write_to(
1831 &self,
1832 _cache: &mut ::buffa::SizeCache,
1833 buf: &mut impl ::buffa::bytes::BufMut,
1834 ) {
1835 #[allow(unused_imports)]
1836 use ::buffa::Enumeration as _;
1837 if !self.full_name.is_empty() {
1838 ::buffa::encoding::Tag::new(
1839 1u32,
1840 ::buffa::encoding::WireType::LengthDelimited,
1841 )
1842 .encode(buf);
1843 ::buffa::types::encode_string(&self.full_name, buf);
1844 }
1845 if let Some(ref v) = self.comment {
1846 ::buffa::encoding::Tag::new(
1847 2u32,
1848 ::buffa::encoding::WireType::LengthDelimited,
1849 )
1850 .encode(buf);
1851 ::buffa::types::encode_string(v, buf);
1852 }
1853 for (k, v) in &self.properties {
1854 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1855 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1856 ::buffa::encoding::Tag::new(
1857 3u32,
1858 ::buffa::encoding::WireType::LengthDelimited,
1859 )
1860 .encode(buf);
1861 ::buffa::encoding::encode_varint(entry_size as u64, buf);
1862 ::buffa::encoding::Tag::new(
1863 1u32,
1864 ::buffa::encoding::WireType::LengthDelimited,
1865 )
1866 .encode(buf);
1867 ::buffa::types::encode_string(k, buf);
1868 ::buffa::encoding::Tag::new(
1869 2u32,
1870 ::buffa::encoding::WireType::LengthDelimited,
1871 )
1872 .encode(buf);
1873 ::buffa::types::encode_string(v, buf);
1874 }
1875 if let Some(ref v) = self.new_name {
1876 ::buffa::encoding::Tag::new(
1877 4u32,
1878 ::buffa::encoding::WireType::LengthDelimited,
1879 )
1880 .encode(buf);
1881 ::buffa::types::encode_string(v, buf);
1882 }
1883 self.__buffa_unknown_fields.write_to(buf);
1884 }
1885 fn merge_field(
1886 &mut self,
1887 tag: ::buffa::encoding::Tag,
1888 buf: &mut impl ::buffa::bytes::Buf,
1889 depth: u32,
1890 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1891 #[allow(unused_imports)]
1892 use ::buffa::bytes::Buf as _;
1893 #[allow(unused_imports)]
1894 use ::buffa::Enumeration as _;
1895 match tag.field_number() {
1896 1u32 => {
1897 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1898 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1899 field_number: 1u32,
1900 expected: 2u8,
1901 actual: tag.wire_type() as u8,
1902 });
1903 }
1904 ::buffa::types::merge_string(&mut self.full_name, buf)?;
1905 }
1906 2u32 => {
1907 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1908 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1909 field_number: 2u32,
1910 expected: 2u8,
1911 actual: tag.wire_type() as u8,
1912 });
1913 }
1914 ::buffa::types::merge_string(
1915 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1916 buf,
1917 )?;
1918 }
1919 3u32 => {
1920 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1921 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1922 field_number: 3u32,
1923 expected: 2u8,
1924 actual: tag.wire_type() as u8,
1925 });
1926 }
1927 let entry_len = ::buffa::encoding::decode_varint(buf)?;
1928 let entry_len = usize::try_from(entry_len)
1929 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
1930 if buf.remaining() < entry_len {
1931 return ::core::result::Result::Err(
1932 ::buffa::DecodeError::UnexpectedEof,
1933 );
1934 }
1935 let entry_limit = buf.remaining() - entry_len;
1936 let mut key = ::core::default::Default::default();
1937 let mut val = ::core::default::Default::default();
1938 while buf.remaining() > entry_limit {
1939 let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
1940 match entry_tag.field_number() {
1941 1 => {
1942 if entry_tag.wire_type()
1943 != ::buffa::encoding::WireType::LengthDelimited
1944 {
1945 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1946 field_number: entry_tag.field_number(),
1947 expected: 2u8,
1948 actual: entry_tag.wire_type() as u8,
1949 });
1950 }
1951 key = ::buffa::types::decode_string(buf)?;
1952 }
1953 2 => {
1954 if entry_tag.wire_type()
1955 != ::buffa::encoding::WireType::LengthDelimited
1956 {
1957 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1958 field_number: entry_tag.field_number(),
1959 expected: 2u8,
1960 actual: entry_tag.wire_type() as u8,
1961 });
1962 }
1963 val = ::buffa::types::decode_string(buf)?;
1964 }
1965 _ => {
1966 ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
1967 }
1968 }
1969 }
1970 if buf.remaining() != entry_limit {
1971 let remaining = buf.remaining();
1972 if remaining > entry_limit {
1973 buf.advance(remaining - entry_limit);
1974 } else {
1975 return ::core::result::Result::Err(
1976 ::buffa::DecodeError::UnexpectedEof,
1977 );
1978 }
1979 }
1980 self.properties.insert(key, val);
1981 }
1982 4u32 => {
1983 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1984 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1985 field_number: 4u32,
1986 expected: 2u8,
1987 actual: tag.wire_type() as u8,
1988 });
1989 }
1990 ::buffa::types::merge_string(
1991 self
1992 .new_name
1993 .get_or_insert_with(::buffa::alloc::string::String::new),
1994 buf,
1995 )?;
1996 }
1997 _ => {
1998 self.__buffa_unknown_fields
1999 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2000 }
2001 }
2002 ::core::result::Result::Ok(())
2003 }
2004 fn clear(&mut self) {
2005 self.full_name.clear();
2006 self.comment = ::core::option::Option::None;
2007 self.properties.clear();
2008 self.new_name = ::core::option::Option::None;
2009 self.__buffa_unknown_fields.clear();
2010 }
2011}
2012impl ::buffa::ExtensionSet for UpdateSchemaRequest {
2013 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.UpdateSchemaRequest";
2014 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2015 &self.__buffa_unknown_fields
2016 }
2017 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2018 &mut self.__buffa_unknown_fields
2019 }
2020}
2021impl ::buffa::json_helpers::ProtoElemJson for UpdateSchemaRequest {
2022 fn serialize_proto_json<S: ::serde::Serializer>(
2023 v: &Self,
2024 s: S,
2025 ) -> ::core::result::Result<S::Ok, S::Error> {
2026 ::serde::Serialize::serialize(v, s)
2027 }
2028 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2029 d: D,
2030 ) -> ::core::result::Result<Self, D::Error> {
2031 <Self as ::serde::Deserialize>::deserialize(d)
2032 }
2033}
2034#[doc(hidden)]
2035pub const __UPDATE_SCHEMA_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2036 type_url: "type.googleapis.com/unitycatalog.schemas.v1.UpdateSchemaRequest",
2037 to_json: ::buffa::type_registry::any_to_json::<UpdateSchemaRequest>,
2038 from_json: ::buffa::type_registry::any_from_json::<UpdateSchemaRequest>,
2039 is_wkt: false,
2040};
2041#[derive(Clone, PartialEq, Default)]
2043#[derive(::serde::Serialize, ::serde::Deserialize)]
2044#[serde(default)]
2045pub struct DeleteSchemaRequest {
2046 #[serde(
2052 rename = "full_name",
2053 alias = "fullName",
2054 with = "::buffa::json_helpers::proto_string",
2055 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2056 )]
2057 pub full_name: ::buffa::alloc::string::String,
2058 #[serde(rename = "force", skip_serializing_if = "::core::option::Option::is_none")]
2062 pub force: ::core::option::Option<bool>,
2063 #[serde(skip)]
2064 #[doc(hidden)]
2065 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2066}
2067impl ::core::fmt::Debug for DeleteSchemaRequest {
2068 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2069 f.debug_struct("DeleteSchemaRequest")
2070 .field("full_name", &self.full_name)
2071 .field("force", &self.force)
2072 .finish()
2073 }
2074}
2075impl DeleteSchemaRequest {
2076 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.DeleteSchemaRequest";
2081}
2082impl DeleteSchemaRequest {
2083 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2084 #[inline]
2085 pub fn with_force(mut self, value: bool) -> Self {
2087 self.force = Some(value);
2088 self
2089 }
2090}
2091impl ::buffa::DefaultInstance for DeleteSchemaRequest {
2092 fn default_instance() -> &'static Self {
2093 static VALUE: ::buffa::__private::OnceBox<DeleteSchemaRequest> = ::buffa::__private::OnceBox::new();
2094 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2095 }
2096}
2097impl ::buffa::MessageName for DeleteSchemaRequest {
2098 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
2099 const NAME: &'static str = "DeleteSchemaRequest";
2100 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.DeleteSchemaRequest";
2101 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.DeleteSchemaRequest";
2102}
2103impl ::buffa::Message for DeleteSchemaRequest {
2104 #[allow(clippy::let_and_return)]
2110 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2111 #[allow(unused_imports)]
2112 use ::buffa::Enumeration as _;
2113 let mut size = 0u32;
2114 if !self.full_name.is_empty() {
2115 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
2116 }
2117 if self.force.is_some() {
2118 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2119 }
2120 size += self.__buffa_unknown_fields.encoded_len() as u32;
2121 size
2122 }
2123 fn write_to(
2124 &self,
2125 _cache: &mut ::buffa::SizeCache,
2126 buf: &mut impl ::buffa::bytes::BufMut,
2127 ) {
2128 #[allow(unused_imports)]
2129 use ::buffa::Enumeration as _;
2130 if !self.full_name.is_empty() {
2131 ::buffa::encoding::Tag::new(
2132 1u32,
2133 ::buffa::encoding::WireType::LengthDelimited,
2134 )
2135 .encode(buf);
2136 ::buffa::types::encode_string(&self.full_name, buf);
2137 }
2138 if let Some(v) = self.force {
2139 ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2140 .encode(buf);
2141 ::buffa::types::encode_bool(v, buf);
2142 }
2143 self.__buffa_unknown_fields.write_to(buf);
2144 }
2145 fn merge_field(
2146 &mut self,
2147 tag: ::buffa::encoding::Tag,
2148 buf: &mut impl ::buffa::bytes::Buf,
2149 depth: u32,
2150 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2151 #[allow(unused_imports)]
2152 use ::buffa::bytes::Buf as _;
2153 #[allow(unused_imports)]
2154 use ::buffa::Enumeration as _;
2155 match tag.field_number() {
2156 1u32 => {
2157 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2158 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2159 field_number: 1u32,
2160 expected: 2u8,
2161 actual: tag.wire_type() as u8,
2162 });
2163 }
2164 ::buffa::types::merge_string(&mut self.full_name, buf)?;
2165 }
2166 2u32 => {
2167 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2168 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2169 field_number: 2u32,
2170 expected: 0u8,
2171 actual: tag.wire_type() as u8,
2172 });
2173 }
2174 self.force = ::core::option::Option::Some(
2175 ::buffa::types::decode_bool(buf)?,
2176 );
2177 }
2178 _ => {
2179 self.__buffa_unknown_fields
2180 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2181 }
2182 }
2183 ::core::result::Result::Ok(())
2184 }
2185 fn clear(&mut self) {
2186 self.full_name.clear();
2187 self.force = ::core::option::Option::None;
2188 self.__buffa_unknown_fields.clear();
2189 }
2190}
2191impl ::buffa::ExtensionSet for DeleteSchemaRequest {
2192 const PROTO_FQN: &'static str = "unitycatalog.schemas.v1.DeleteSchemaRequest";
2193 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2194 &self.__buffa_unknown_fields
2195 }
2196 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2197 &mut self.__buffa_unknown_fields
2198 }
2199}
2200impl ::buffa::json_helpers::ProtoElemJson for DeleteSchemaRequest {
2201 fn serialize_proto_json<S: ::serde::Serializer>(
2202 v: &Self,
2203 s: S,
2204 ) -> ::core::result::Result<S::Ok, S::Error> {
2205 ::serde::Serialize::serialize(v, s)
2206 }
2207 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2208 d: D,
2209 ) -> ::core::result::Result<Self, D::Error> {
2210 <Self as ::serde::Deserialize>::deserialize(d)
2211 }
2212}
2213#[doc(hidden)]
2214pub const __DELETE_SCHEMA_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2215 type_url: "type.googleapis.com/unitycatalog.schemas.v1.DeleteSchemaRequest",
2216 to_json: ::buffa::type_registry::any_to_json::<DeleteSchemaRequest>,
2217 from_json: ::buffa::type_registry::any_from_json::<DeleteSchemaRequest>,
2218 is_wkt: false,
2219};
2220#[allow(
2221 non_camel_case_types,
2222 dead_code,
2223 unused_imports,
2224 unused_qualifications,
2225 clippy::derivable_impls,
2226 clippy::match_single_binding,
2227 clippy::uninlined_format_args,
2228 clippy::doc_lazy_continuation,
2229 clippy::module_inception
2230)]
2231pub mod __buffa {
2232 #[allow(unused_imports)]
2233 use super::*;
2234 pub mod view {
2235 #[allow(unused_imports)]
2236 use super::*;
2237 #[derive(Clone, Debug, Default)]
2239 pub struct SchemaView<'a> {
2240 pub name: &'a str,
2244 pub catalog_name: &'a str,
2248 pub full_name: &'a str,
2252 pub comment: ::core::option::Option<&'a str>,
2256 pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
2260 pub owner: ::core::option::Option<&'a str>,
2264 pub created_at: ::core::option::Option<i64>,
2268 pub created_by: ::core::option::Option<&'a str>,
2272 pub updated_at: ::core::option::Option<i64>,
2276 pub updated_by: ::core::option::Option<&'a str>,
2280 pub schema_id: ::core::option::Option<&'a str>,
2284 pub storage_root: ::core::option::Option<&'a str>,
2292 pub storage_location: ::core::option::Option<&'a str>,
2301 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2302 }
2303 impl<'a> SchemaView<'a> {
2304 #[doc(hidden)]
2312 pub fn _decode_depth(
2313 buf: &'a [u8],
2314 depth: u32,
2315 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2316 let mut view = Self::default();
2317 view._merge_into_view(buf, depth)?;
2318 ::core::result::Result::Ok(view)
2319 }
2320 #[doc(hidden)]
2328 pub fn _merge_into_view(
2329 &mut self,
2330 buf: &'a [u8],
2331 depth: u32,
2332 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2333 let _ = depth;
2334 #[allow(unused_variables)]
2335 let view = self;
2336 let mut cur: &'a [u8] = buf;
2337 while !cur.is_empty() {
2338 let before_tag = cur;
2339 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
2340 match tag.field_number() {
2341 1u32 => {
2342 if tag.wire_type()
2343 != ::buffa::encoding::WireType::LengthDelimited
2344 {
2345 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2346 field_number: 1u32,
2347 expected: 2u8,
2348 actual: tag.wire_type() as u8,
2349 });
2350 }
2351 view.name = ::buffa::types::borrow_str(&mut cur)?;
2352 }
2353 2u32 => {
2354 if tag.wire_type()
2355 != ::buffa::encoding::WireType::LengthDelimited
2356 {
2357 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2358 field_number: 2u32,
2359 expected: 2u8,
2360 actual: tag.wire_type() as u8,
2361 });
2362 }
2363 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
2364 }
2365 3u32 => {
2366 if tag.wire_type()
2367 != ::buffa::encoding::WireType::LengthDelimited
2368 {
2369 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2370 field_number: 3u32,
2371 expected: 2u8,
2372 actual: tag.wire_type() as u8,
2373 });
2374 }
2375 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
2376 }
2377 4u32 => {
2378 if tag.wire_type()
2379 != ::buffa::encoding::WireType::LengthDelimited
2380 {
2381 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2382 field_number: 4u32,
2383 expected: 2u8,
2384 actual: tag.wire_type() as u8,
2385 });
2386 }
2387 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
2388 }
2389 6u32 => {
2390 if tag.wire_type()
2391 != ::buffa::encoding::WireType::LengthDelimited
2392 {
2393 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2394 field_number: 6u32,
2395 expected: 2u8,
2396 actual: tag.wire_type() as u8,
2397 });
2398 }
2399 view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
2400 }
2401 7u32 => {
2402 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2403 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2404 field_number: 7u32,
2405 expected: 0u8,
2406 actual: tag.wire_type() as u8,
2407 });
2408 }
2409 view.created_at = Some(
2410 ::buffa::types::decode_int64(&mut cur)?,
2411 );
2412 }
2413 8u32 => {
2414 if tag.wire_type()
2415 != ::buffa::encoding::WireType::LengthDelimited
2416 {
2417 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2418 field_number: 8u32,
2419 expected: 2u8,
2420 actual: tag.wire_type() as u8,
2421 });
2422 }
2423 view.created_by = Some(
2424 ::buffa::types::borrow_str(&mut cur)?,
2425 );
2426 }
2427 9u32 => {
2428 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2429 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2430 field_number: 9u32,
2431 expected: 0u8,
2432 actual: tag.wire_type() as u8,
2433 });
2434 }
2435 view.updated_at = Some(
2436 ::buffa::types::decode_int64(&mut cur)?,
2437 );
2438 }
2439 10u32 => {
2440 if tag.wire_type()
2441 != ::buffa::encoding::WireType::LengthDelimited
2442 {
2443 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2444 field_number: 10u32,
2445 expected: 2u8,
2446 actual: tag.wire_type() as u8,
2447 });
2448 }
2449 view.updated_by = Some(
2450 ::buffa::types::borrow_str(&mut cur)?,
2451 );
2452 }
2453 11u32 => {
2454 if tag.wire_type()
2455 != ::buffa::encoding::WireType::LengthDelimited
2456 {
2457 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2458 field_number: 11u32,
2459 expected: 2u8,
2460 actual: tag.wire_type() as u8,
2461 });
2462 }
2463 view.schema_id = Some(::buffa::types::borrow_str(&mut cur)?);
2464 }
2465 12u32 => {
2466 if tag.wire_type()
2467 != ::buffa::encoding::WireType::LengthDelimited
2468 {
2469 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2470 field_number: 12u32,
2471 expected: 2u8,
2472 actual: tag.wire_type() as u8,
2473 });
2474 }
2475 view.storage_root = Some(
2476 ::buffa::types::borrow_str(&mut cur)?,
2477 );
2478 }
2479 13u32 => {
2480 if tag.wire_type()
2481 != ::buffa::encoding::WireType::LengthDelimited
2482 {
2483 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2484 field_number: 13u32,
2485 expected: 2u8,
2486 actual: tag.wire_type() as u8,
2487 });
2488 }
2489 view.storage_location = Some(
2490 ::buffa::types::borrow_str(&mut cur)?,
2491 );
2492 }
2493 5u32 => {
2494 if tag.wire_type()
2495 != ::buffa::encoding::WireType::LengthDelimited
2496 {
2497 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2498 field_number: 5u32,
2499 expected: 2u8,
2500 actual: tag.wire_type() as u8,
2501 });
2502 }
2503 let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
2504 let mut entry_cur: &'a [u8] = entry_bytes;
2505 let mut key = "";
2506 let mut val = "";
2507 while !entry_cur.is_empty() {
2508 let entry_tag = ::buffa::encoding::Tag::decode(
2509 &mut entry_cur,
2510 )?;
2511 match entry_tag.field_number() {
2512 1 => {
2513 if entry_tag.wire_type()
2514 != ::buffa::encoding::WireType::LengthDelimited
2515 {
2516 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2517 field_number: entry_tag.field_number(),
2518 expected: 2u8,
2519 actual: entry_tag.wire_type() as u8,
2520 });
2521 }
2522 key = ::buffa::types::borrow_str(&mut entry_cur)?;
2523 }
2524 2 => {
2525 if entry_tag.wire_type()
2526 != ::buffa::encoding::WireType::LengthDelimited
2527 {
2528 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2529 field_number: entry_tag.field_number(),
2530 expected: 2u8,
2531 actual: entry_tag.wire_type() as u8,
2532 });
2533 }
2534 val = ::buffa::types::borrow_str(&mut entry_cur)?;
2535 }
2536 _ => {
2537 ::buffa::encoding::skip_field_depth(
2538 entry_tag,
2539 &mut entry_cur,
2540 depth,
2541 )?;
2542 }
2543 }
2544 }
2545 view.properties.push(key, val);
2546 }
2547 _ => {
2548 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
2549 let span_len = before_tag.len() - cur.len();
2550 view.__buffa_unknown_fields
2551 .push_raw(&before_tag[..span_len]);
2552 }
2553 }
2554 }
2555 ::core::result::Result::Ok(())
2556 }
2557 }
2558 impl<'a> ::buffa::MessageView<'a> for SchemaView<'a> {
2559 type Owned = super::super::Schema;
2560 fn decode_view(
2561 buf: &'a [u8],
2562 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2563 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
2564 }
2565 fn decode_view_with_limit(
2566 buf: &'a [u8],
2567 depth: u32,
2568 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2569 Self::_decode_depth(buf, depth)
2570 }
2571 fn to_owned_message(&self) -> super::super::Schema {
2572 self.to_owned_from_source(None)
2573 }
2574 #[allow(clippy::useless_conversion, clippy::needless_update)]
2575 fn to_owned_from_source(
2576 &self,
2577 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2578 ) -> super::super::Schema {
2579 #[allow(unused_imports)]
2580 use ::buffa::alloc::string::ToString as _;
2581 let _ = __buffa_src;
2582 super::super::Schema {
2583 name: self.name.to_string(),
2584 catalog_name: self.catalog_name.to_string(),
2585 full_name: self.full_name.to_string(),
2586 comment: self.comment.map(|s| s.to_string()),
2587 properties: self
2588 .properties
2589 .iter()
2590 .map(|(k, v)| (k.to_string(), v.to_string()))
2591 .collect(),
2592 owner: self.owner.map(|s| s.to_string()),
2593 created_at: self.created_at,
2594 created_by: self.created_by.map(|s| s.to_string()),
2595 updated_at: self.updated_at,
2596 updated_by: self.updated_by.map(|s| s.to_string()),
2597 schema_id: self.schema_id.map(|s| s.to_string()),
2598 storage_root: self.storage_root.map(|s| s.to_string()),
2599 storage_location: self.storage_location.map(|s| s.to_string()),
2600 __buffa_unknown_fields: self
2601 .__buffa_unknown_fields
2602 .to_owned()
2603 .unwrap_or_default()
2604 .into(),
2605 ..::core::default::Default::default()
2606 }
2607 }
2608 }
2609 impl<'a> ::buffa::ViewEncode<'a> for SchemaView<'a> {
2610 #[allow(clippy::needless_borrow, clippy::let_and_return)]
2611 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2612 #[allow(unused_imports)]
2613 use ::buffa::Enumeration as _;
2614 let mut size = 0u32;
2615 if !self.name.is_empty() {
2616 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2617 }
2618 if !self.catalog_name.is_empty() {
2619 size
2620 += 1u32
2621 + ::buffa::types::string_encoded_len(&self.catalog_name)
2622 as u32;
2623 }
2624 if !self.full_name.is_empty() {
2625 size
2626 += 1u32
2627 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
2628 }
2629 if let Some(ref v) = self.comment {
2630 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2631 }
2632 #[allow(clippy::for_kv_map)]
2633 for (k, v) in &self.properties {
2634 let entry_size: u32 = 1u32
2635 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
2636 + ::buffa::types::string_encoded_len(v) as u32;
2637 size
2638 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
2639 + entry_size;
2640 }
2641 if let Some(ref v) = self.owner {
2642 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2643 }
2644 if let Some(v) = self.created_at {
2645 size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
2646 }
2647 if let Some(ref v) = self.created_by {
2648 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2649 }
2650 if let Some(v) = self.updated_at {
2651 size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
2652 }
2653 if let Some(ref v) = self.updated_by {
2654 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2655 }
2656 if let Some(ref v) = self.schema_id {
2657 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2658 }
2659 if let Some(ref v) = self.storage_root {
2660 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2661 }
2662 if let Some(ref v) = self.storage_location {
2663 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2664 }
2665 size += self.__buffa_unknown_fields.encoded_len() as u32;
2666 size
2667 }
2668 #[allow(clippy::needless_borrow)]
2669 fn write_to(
2670 &self,
2671 _cache: &mut ::buffa::SizeCache,
2672 buf: &mut impl ::buffa::bytes::BufMut,
2673 ) {
2674 #[allow(unused_imports)]
2675 use ::buffa::Enumeration as _;
2676 if !self.name.is_empty() {
2677 ::buffa::encoding::Tag::new(
2678 1u32,
2679 ::buffa::encoding::WireType::LengthDelimited,
2680 )
2681 .encode(buf);
2682 ::buffa::types::encode_string(&self.name, buf);
2683 }
2684 if !self.catalog_name.is_empty() {
2685 ::buffa::encoding::Tag::new(
2686 2u32,
2687 ::buffa::encoding::WireType::LengthDelimited,
2688 )
2689 .encode(buf);
2690 ::buffa::types::encode_string(&self.catalog_name, buf);
2691 }
2692 if !self.full_name.is_empty() {
2693 ::buffa::encoding::Tag::new(
2694 3u32,
2695 ::buffa::encoding::WireType::LengthDelimited,
2696 )
2697 .encode(buf);
2698 ::buffa::types::encode_string(&self.full_name, buf);
2699 }
2700 if let Some(ref v) = self.comment {
2701 ::buffa::encoding::Tag::new(
2702 4u32,
2703 ::buffa::encoding::WireType::LengthDelimited,
2704 )
2705 .encode(buf);
2706 ::buffa::types::encode_string(v, buf);
2707 }
2708 for (k, v) in &self.properties {
2709 let entry_size: u32 = 1u32
2710 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
2711 + ::buffa::types::string_encoded_len(v) as u32;
2712 ::buffa::encoding::Tag::new(
2713 5u32,
2714 ::buffa::encoding::WireType::LengthDelimited,
2715 )
2716 .encode(buf);
2717 ::buffa::encoding::encode_varint(entry_size as u64, buf);
2718 ::buffa::encoding::Tag::new(
2719 1u32,
2720 ::buffa::encoding::WireType::LengthDelimited,
2721 )
2722 .encode(buf);
2723 ::buffa::types::encode_string(k, buf);
2724 ::buffa::encoding::Tag::new(
2725 2u32,
2726 ::buffa::encoding::WireType::LengthDelimited,
2727 )
2728 .encode(buf);
2729 ::buffa::types::encode_string(v, buf);
2730 }
2731 if let Some(ref v) = self.owner {
2732 ::buffa::encoding::Tag::new(
2733 6u32,
2734 ::buffa::encoding::WireType::LengthDelimited,
2735 )
2736 .encode(buf);
2737 ::buffa::types::encode_string(v, buf);
2738 }
2739 if let Some(v) = self.created_at {
2740 ::buffa::encoding::Tag::new(
2741 7u32,
2742 ::buffa::encoding::WireType::Varint,
2743 )
2744 .encode(buf);
2745 ::buffa::types::encode_int64(v, buf);
2746 }
2747 if let Some(ref v) = self.created_by {
2748 ::buffa::encoding::Tag::new(
2749 8u32,
2750 ::buffa::encoding::WireType::LengthDelimited,
2751 )
2752 .encode(buf);
2753 ::buffa::types::encode_string(v, buf);
2754 }
2755 if let Some(v) = self.updated_at {
2756 ::buffa::encoding::Tag::new(
2757 9u32,
2758 ::buffa::encoding::WireType::Varint,
2759 )
2760 .encode(buf);
2761 ::buffa::types::encode_int64(v, buf);
2762 }
2763 if let Some(ref v) = self.updated_by {
2764 ::buffa::encoding::Tag::new(
2765 10u32,
2766 ::buffa::encoding::WireType::LengthDelimited,
2767 )
2768 .encode(buf);
2769 ::buffa::types::encode_string(v, buf);
2770 }
2771 if let Some(ref v) = self.schema_id {
2772 ::buffa::encoding::Tag::new(
2773 11u32,
2774 ::buffa::encoding::WireType::LengthDelimited,
2775 )
2776 .encode(buf);
2777 ::buffa::types::encode_string(v, buf);
2778 }
2779 if let Some(ref v) = self.storage_root {
2780 ::buffa::encoding::Tag::new(
2781 12u32,
2782 ::buffa::encoding::WireType::LengthDelimited,
2783 )
2784 .encode(buf);
2785 ::buffa::types::encode_string(v, buf);
2786 }
2787 if let Some(ref v) = self.storage_location {
2788 ::buffa::encoding::Tag::new(
2789 13u32,
2790 ::buffa::encoding::WireType::LengthDelimited,
2791 )
2792 .encode(buf);
2793 ::buffa::types::encode_string(v, buf);
2794 }
2795 self.__buffa_unknown_fields.write_to(buf);
2796 }
2797 }
2798 impl<'__a> ::serde::Serialize for SchemaView<'__a> {
2810 fn serialize<__S: ::serde::Serializer>(
2811 &self,
2812 __s: __S,
2813 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2814 use ::serde::ser::SerializeMap as _;
2815 let mut __map = __s.serialize_map(::core::option::Option::None)?;
2816 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
2817 __map.serialize_entry("name", self.name)?;
2818 }
2819 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
2820 __map.serialize_entry("catalog_name", self.catalog_name)?;
2821 }
2822 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
2823 __map.serialize_entry("full_name", self.full_name)?;
2824 }
2825 if let ::core::option::Option::Some(__v) = self.comment {
2826 __map.serialize_entry("comment", __v)?;
2827 }
2828 if !self.properties.is_empty() {
2829 struct _WM<'__a, '__x>(
2830 &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
2831 );
2832 impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
2833 fn serialize<__S: ::serde::Serializer>(
2834 &self,
2835 __s: __S,
2836 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2837 use ::serde::ser::SerializeMap as _;
2838 let mut __m = __s
2839 .serialize_map(::core::option::Option::Some(self.0.len()))?;
2840 for (k, v) in self.0.iter_unique() {
2841 __m.serialize_entry(k, v)?;
2842 }
2843 __m.end()
2844 }
2845 }
2846 __map.serialize_entry("properties", &_WM(&self.properties))?;
2847 }
2848 if let ::core::option::Option::Some(__v) = self.owner {
2849 __map.serialize_entry("owner", __v)?;
2850 }
2851 if let ::core::option::Option::Some(__v) = self.created_at {
2852 struct _W(i64);
2853 impl ::serde::Serialize for _W {
2854 fn serialize<__S: ::serde::Serializer>(
2855 &self,
2856 __s: __S,
2857 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2858 ::buffa::json_helpers::int64::serialize(&self.0, __s)
2859 }
2860 }
2861 __map.serialize_entry("created_at", &_W(__v))?;
2862 }
2863 if let ::core::option::Option::Some(__v) = self.created_by {
2864 __map.serialize_entry("created_by", __v)?;
2865 }
2866 if let ::core::option::Option::Some(__v) = self.updated_at {
2867 struct _W(i64);
2868 impl ::serde::Serialize for _W {
2869 fn serialize<__S: ::serde::Serializer>(
2870 &self,
2871 __s: __S,
2872 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2873 ::buffa::json_helpers::int64::serialize(&self.0, __s)
2874 }
2875 }
2876 __map.serialize_entry("updated_at", &_W(__v))?;
2877 }
2878 if let ::core::option::Option::Some(__v) = self.updated_by {
2879 __map.serialize_entry("updated_by", __v)?;
2880 }
2881 if let ::core::option::Option::Some(__v) = self.schema_id {
2882 __map.serialize_entry("schema_id", __v)?;
2883 }
2884 if let ::core::option::Option::Some(__v) = self.storage_root {
2885 __map.serialize_entry("storage_root", __v)?;
2886 }
2887 if let ::core::option::Option::Some(__v) = self.storage_location {
2888 __map.serialize_entry("storage_location", __v)?;
2889 }
2890 __map.end()
2891 }
2892 }
2893 impl<'a> ::buffa::MessageName for SchemaView<'a> {
2894 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
2895 const NAME: &'static str = "Schema";
2896 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.Schema";
2897 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.Schema";
2898 }
2899 impl<'v> ::buffa::DefaultViewInstance for SchemaView<'v> {
2900 fn default_view_instance<'a>() -> &'a Self
2901 where
2902 Self: 'a,
2903 {
2904 static VALUE: ::buffa::__private::OnceBox<SchemaView<'static>> = ::buffa::__private::OnceBox::new();
2905 VALUE
2906 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
2907 <SchemaView<'static>>::default(),
2908 ))
2909 }
2910 }
2911 impl ::buffa::ViewReborrow for SchemaView<'static> {
2912 type Reborrowed<'b> = SchemaView<'b>;
2913 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
2914 this
2915 }
2916 }
2917 #[derive(Clone, Debug)]
2923 pub struct SchemaOwnedView(::buffa::OwnedView<SchemaView<'static>>);
2924 impl SchemaOwnedView {
2925 pub fn decode(
2935 bytes: ::buffa::bytes::Bytes,
2936 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2937 ::core::result::Result::Ok(
2938 SchemaOwnedView(::buffa::OwnedView::decode(bytes)?),
2939 )
2940 }
2941 pub fn decode_with_options(
2949 bytes: ::buffa::bytes::Bytes,
2950 opts: &::buffa::DecodeOptions,
2951 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2952 ::core::result::Result::Ok(
2953 SchemaOwnedView(
2954 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
2955 ),
2956 )
2957 }
2958 pub fn from_owned(
2965 msg: &super::super::Schema,
2966 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2967 ::core::result::Result::Ok(
2968 SchemaOwnedView(::buffa::OwnedView::from_owned(msg)?),
2969 )
2970 }
2971 #[must_use]
2973 pub fn view(&self) -> &SchemaView<'_> {
2974 self.0.reborrow()
2975 }
2976 #[must_use]
2978 pub fn to_owned_message(&self) -> super::super::Schema {
2979 self.0.to_owned_message()
2980 }
2981 #[must_use]
2983 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2984 self.0.bytes()
2985 }
2986 #[must_use]
2988 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2989 self.0.into_bytes()
2990 }
2991 #[must_use]
2995 pub fn name(&self) -> &'_ str {
2996 self.0.reborrow().name
2997 }
2998 #[must_use]
3002 pub fn catalog_name(&self) -> &'_ str {
3003 self.0.reborrow().catalog_name
3004 }
3005 #[must_use]
3009 pub fn full_name(&self) -> &'_ str {
3010 self.0.reborrow().full_name
3011 }
3012 #[must_use]
3016 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
3017 self.0.reborrow().comment
3018 }
3019 #[must_use]
3023 pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
3024 &self.0.reborrow().properties
3025 }
3026 #[must_use]
3030 pub fn owner(&self) -> ::core::option::Option<&'_ str> {
3031 self.0.reborrow().owner
3032 }
3033 #[must_use]
3037 pub fn created_at(&self) -> ::core::option::Option<i64> {
3038 self.0.reborrow().created_at
3039 }
3040 #[must_use]
3044 pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
3045 self.0.reborrow().created_by
3046 }
3047 #[must_use]
3051 pub fn updated_at(&self) -> ::core::option::Option<i64> {
3052 self.0.reborrow().updated_at
3053 }
3054 #[must_use]
3058 pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
3059 self.0.reborrow().updated_by
3060 }
3061 #[must_use]
3065 pub fn schema_id(&self) -> ::core::option::Option<&'_ str> {
3066 self.0.reborrow().schema_id
3067 }
3068 #[must_use]
3076 pub fn storage_root(&self) -> ::core::option::Option<&'_ str> {
3077 self.0.reborrow().storage_root
3078 }
3079 #[must_use]
3088 pub fn storage_location(&self) -> ::core::option::Option<&'_ str> {
3089 self.0.reborrow().storage_location
3090 }
3091 }
3092 impl ::core::convert::From<::buffa::OwnedView<SchemaView<'static>>>
3093 for SchemaOwnedView {
3094 fn from(inner: ::buffa::OwnedView<SchemaView<'static>>) -> Self {
3095 SchemaOwnedView(inner)
3096 }
3097 }
3098 impl ::core::convert::From<SchemaOwnedView>
3099 for ::buffa::OwnedView<SchemaView<'static>> {
3100 fn from(wrapper: SchemaOwnedView) -> Self {
3101 wrapper.0
3102 }
3103 }
3104 impl ::core::convert::AsRef<::buffa::OwnedView<SchemaView<'static>>>
3105 for SchemaOwnedView {
3106 fn as_ref(&self) -> &::buffa::OwnedView<SchemaView<'static>> {
3107 &self.0
3108 }
3109 }
3110 impl ::buffa::HasMessageView for super::super::Schema {
3111 type View<'a> = SchemaView<'a>;
3112 type ViewHandle = SchemaOwnedView;
3113 }
3114 impl ::serde::Serialize for SchemaOwnedView {
3115 fn serialize<__S: ::serde::Serializer>(
3116 &self,
3117 __s: __S,
3118 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3119 ::serde::Serialize::serialize(&self.0, __s)
3120 }
3121 }
3122 #[derive(Clone, Debug, Default)]
3124 pub struct ListSchemasRequestView<'a> {
3125 pub catalog_name: &'a str,
3129 pub max_results: ::core::option::Option<i32>,
3133 pub page_token: ::core::option::Option<&'a str>,
3137 pub include_browse: ::core::option::Option<bool>,
3141 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3142 }
3143 impl<'a> ListSchemasRequestView<'a> {
3144 #[doc(hidden)]
3152 pub fn _decode_depth(
3153 buf: &'a [u8],
3154 depth: u32,
3155 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3156 let mut view = Self::default();
3157 view._merge_into_view(buf, depth)?;
3158 ::core::result::Result::Ok(view)
3159 }
3160 #[doc(hidden)]
3168 pub fn _merge_into_view(
3169 &mut self,
3170 buf: &'a [u8],
3171 depth: u32,
3172 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3173 let _ = depth;
3174 #[allow(unused_variables)]
3175 let view = self;
3176 let mut cur: &'a [u8] = buf;
3177 while !cur.is_empty() {
3178 let before_tag = cur;
3179 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3180 match tag.field_number() {
3181 1u32 => {
3182 if tag.wire_type()
3183 != ::buffa::encoding::WireType::LengthDelimited
3184 {
3185 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3186 field_number: 1u32,
3187 expected: 2u8,
3188 actual: tag.wire_type() as u8,
3189 });
3190 }
3191 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
3192 }
3193 2u32 => {
3194 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3195 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3196 field_number: 2u32,
3197 expected: 0u8,
3198 actual: tag.wire_type() as u8,
3199 });
3200 }
3201 view.max_results = Some(
3202 ::buffa::types::decode_int32(&mut cur)?,
3203 );
3204 }
3205 3u32 => {
3206 if tag.wire_type()
3207 != ::buffa::encoding::WireType::LengthDelimited
3208 {
3209 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3210 field_number: 3u32,
3211 expected: 2u8,
3212 actual: tag.wire_type() as u8,
3213 });
3214 }
3215 view.page_token = Some(
3216 ::buffa::types::borrow_str(&mut cur)?,
3217 );
3218 }
3219 4u32 => {
3220 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3221 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3222 field_number: 4u32,
3223 expected: 0u8,
3224 actual: tag.wire_type() as u8,
3225 });
3226 }
3227 view.include_browse = Some(
3228 ::buffa::types::decode_bool(&mut cur)?,
3229 );
3230 }
3231 _ => {
3232 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3233 let span_len = before_tag.len() - cur.len();
3234 view.__buffa_unknown_fields
3235 .push_raw(&before_tag[..span_len]);
3236 }
3237 }
3238 }
3239 ::core::result::Result::Ok(())
3240 }
3241 }
3242 impl<'a> ::buffa::MessageView<'a> for ListSchemasRequestView<'a> {
3243 type Owned = super::super::ListSchemasRequest;
3244 fn decode_view(
3245 buf: &'a [u8],
3246 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3247 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3248 }
3249 fn decode_view_with_limit(
3250 buf: &'a [u8],
3251 depth: u32,
3252 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3253 Self::_decode_depth(buf, depth)
3254 }
3255 fn to_owned_message(&self) -> super::super::ListSchemasRequest {
3256 self.to_owned_from_source(None)
3257 }
3258 #[allow(clippy::useless_conversion, clippy::needless_update)]
3259 fn to_owned_from_source(
3260 &self,
3261 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3262 ) -> super::super::ListSchemasRequest {
3263 #[allow(unused_imports)]
3264 use ::buffa::alloc::string::ToString as _;
3265 let _ = __buffa_src;
3266 super::super::ListSchemasRequest {
3267 catalog_name: self.catalog_name.to_string(),
3268 max_results: self.max_results,
3269 page_token: self.page_token.map(|s| s.to_string()),
3270 include_browse: self.include_browse,
3271 __buffa_unknown_fields: self
3272 .__buffa_unknown_fields
3273 .to_owned()
3274 .unwrap_or_default()
3275 .into(),
3276 ..::core::default::Default::default()
3277 }
3278 }
3279 }
3280 impl<'a> ::buffa::ViewEncode<'a> for ListSchemasRequestView<'a> {
3281 #[allow(clippy::needless_borrow, clippy::let_and_return)]
3282 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3283 #[allow(unused_imports)]
3284 use ::buffa::Enumeration as _;
3285 let mut size = 0u32;
3286 if !self.catalog_name.is_empty() {
3287 size
3288 += 1u32
3289 + ::buffa::types::string_encoded_len(&self.catalog_name)
3290 as u32;
3291 }
3292 if let Some(v) = self.max_results {
3293 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3294 }
3295 if let Some(ref v) = self.page_token {
3296 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3297 }
3298 if self.include_browse.is_some() {
3299 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3300 }
3301 size += self.__buffa_unknown_fields.encoded_len() as u32;
3302 size
3303 }
3304 #[allow(clippy::needless_borrow)]
3305 fn write_to(
3306 &self,
3307 _cache: &mut ::buffa::SizeCache,
3308 buf: &mut impl ::buffa::bytes::BufMut,
3309 ) {
3310 #[allow(unused_imports)]
3311 use ::buffa::Enumeration as _;
3312 if !self.catalog_name.is_empty() {
3313 ::buffa::encoding::Tag::new(
3314 1u32,
3315 ::buffa::encoding::WireType::LengthDelimited,
3316 )
3317 .encode(buf);
3318 ::buffa::types::encode_string(&self.catalog_name, buf);
3319 }
3320 if let Some(v) = self.max_results {
3321 ::buffa::encoding::Tag::new(
3322 2u32,
3323 ::buffa::encoding::WireType::Varint,
3324 )
3325 .encode(buf);
3326 ::buffa::types::encode_int32(v, buf);
3327 }
3328 if let Some(ref v) = self.page_token {
3329 ::buffa::encoding::Tag::new(
3330 3u32,
3331 ::buffa::encoding::WireType::LengthDelimited,
3332 )
3333 .encode(buf);
3334 ::buffa::types::encode_string(v, buf);
3335 }
3336 if let Some(v) = self.include_browse {
3337 ::buffa::encoding::Tag::new(
3338 4u32,
3339 ::buffa::encoding::WireType::Varint,
3340 )
3341 .encode(buf);
3342 ::buffa::types::encode_bool(v, buf);
3343 }
3344 self.__buffa_unknown_fields.write_to(buf);
3345 }
3346 }
3347 impl<'__a> ::serde::Serialize for ListSchemasRequestView<'__a> {
3359 fn serialize<__S: ::serde::Serializer>(
3360 &self,
3361 __s: __S,
3362 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3363 use ::serde::ser::SerializeMap as _;
3364 let mut __map = __s.serialize_map(::core::option::Option::None)?;
3365 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
3366 __map.serialize_entry("catalog_name", self.catalog_name)?;
3367 }
3368 if let ::core::option::Option::Some(__v) = self.max_results {
3369 struct _W(i32);
3370 impl ::serde::Serialize for _W {
3371 fn serialize<__S: ::serde::Serializer>(
3372 &self,
3373 __s: __S,
3374 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3375 ::buffa::json_helpers::int32::serialize(&self.0, __s)
3376 }
3377 }
3378 __map.serialize_entry("max_results", &_W(__v))?;
3379 }
3380 if let ::core::option::Option::Some(__v) = self.page_token {
3381 __map.serialize_entry("page_token", __v)?;
3382 }
3383 if let ::core::option::Option::Some(__v) = self.include_browse {
3384 __map.serialize_entry("include_browse", &__v)?;
3385 }
3386 __map.end()
3387 }
3388 }
3389 impl<'a> ::buffa::MessageName for ListSchemasRequestView<'a> {
3390 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
3391 const NAME: &'static str = "ListSchemasRequest";
3392 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.ListSchemasRequest";
3393 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasRequest";
3394 }
3395 impl<'v> ::buffa::DefaultViewInstance for ListSchemasRequestView<'v> {
3396 fn default_view_instance<'a>() -> &'a Self
3397 where
3398 Self: 'a,
3399 {
3400 static VALUE: ::buffa::__private::OnceBox<
3401 ListSchemasRequestView<'static>,
3402 > = ::buffa::__private::OnceBox::new();
3403 VALUE
3404 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3405 <ListSchemasRequestView<'static>>::default(),
3406 ))
3407 }
3408 }
3409 impl ::buffa::ViewReborrow for ListSchemasRequestView<'static> {
3410 type Reborrowed<'b> = ListSchemasRequestView<'b>;
3411 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3412 this
3413 }
3414 }
3415 #[derive(Clone, Debug)]
3421 pub struct ListSchemasRequestOwnedView(
3422 ::buffa::OwnedView<ListSchemasRequestView<'static>>,
3423 );
3424 impl ListSchemasRequestOwnedView {
3425 pub fn decode(
3435 bytes: ::buffa::bytes::Bytes,
3436 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3437 ::core::result::Result::Ok(
3438 ListSchemasRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
3439 )
3440 }
3441 pub fn decode_with_options(
3449 bytes: ::buffa::bytes::Bytes,
3450 opts: &::buffa::DecodeOptions,
3451 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3452 ::core::result::Result::Ok(
3453 ListSchemasRequestOwnedView(
3454 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3455 ),
3456 )
3457 }
3458 pub fn from_owned(
3465 msg: &super::super::ListSchemasRequest,
3466 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3467 ::core::result::Result::Ok(
3468 ListSchemasRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
3469 )
3470 }
3471 #[must_use]
3473 pub fn view(&self) -> &ListSchemasRequestView<'_> {
3474 self.0.reborrow()
3475 }
3476 #[must_use]
3478 pub fn to_owned_message(&self) -> super::super::ListSchemasRequest {
3479 self.0.to_owned_message()
3480 }
3481 #[must_use]
3483 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3484 self.0.bytes()
3485 }
3486 #[must_use]
3488 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3489 self.0.into_bytes()
3490 }
3491 #[must_use]
3495 pub fn catalog_name(&self) -> &'_ str {
3496 self.0.reborrow().catalog_name
3497 }
3498 #[must_use]
3502 pub fn max_results(&self) -> ::core::option::Option<i32> {
3503 self.0.reborrow().max_results
3504 }
3505 #[must_use]
3509 pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
3510 self.0.reborrow().page_token
3511 }
3512 #[must_use]
3516 pub fn include_browse(&self) -> ::core::option::Option<bool> {
3517 self.0.reborrow().include_browse
3518 }
3519 }
3520 impl ::core::convert::From<::buffa::OwnedView<ListSchemasRequestView<'static>>>
3521 for ListSchemasRequestOwnedView {
3522 fn from(inner: ::buffa::OwnedView<ListSchemasRequestView<'static>>) -> Self {
3523 ListSchemasRequestOwnedView(inner)
3524 }
3525 }
3526 impl ::core::convert::From<ListSchemasRequestOwnedView>
3527 for ::buffa::OwnedView<ListSchemasRequestView<'static>> {
3528 fn from(wrapper: ListSchemasRequestOwnedView) -> Self {
3529 wrapper.0
3530 }
3531 }
3532 impl ::core::convert::AsRef<::buffa::OwnedView<ListSchemasRequestView<'static>>>
3533 for ListSchemasRequestOwnedView {
3534 fn as_ref(&self) -> &::buffa::OwnedView<ListSchemasRequestView<'static>> {
3535 &self.0
3536 }
3537 }
3538 impl ::buffa::HasMessageView for super::super::ListSchemasRequest {
3539 type View<'a> = ListSchemasRequestView<'a>;
3540 type ViewHandle = ListSchemasRequestOwnedView;
3541 }
3542 impl ::serde::Serialize for ListSchemasRequestOwnedView {
3543 fn serialize<__S: ::serde::Serializer>(
3544 &self,
3545 __s: __S,
3546 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3547 ::serde::Serialize::serialize(&self.0, __s)
3548 }
3549 }
3550 #[derive(Clone, Debug, Default)]
3552 pub struct ListSchemasResponseView<'a> {
3553 pub schemas: ::buffa::RepeatedView<
3557 'a,
3558 super::super::__buffa::view::SchemaView<'a>,
3559 >,
3560 pub next_page_token: ::core::option::Option<&'a str>,
3564 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3565 }
3566 impl<'a> ListSchemasResponseView<'a> {
3567 #[doc(hidden)]
3575 pub fn _decode_depth(
3576 buf: &'a [u8],
3577 depth: u32,
3578 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3579 let mut view = Self::default();
3580 view._merge_into_view(buf, depth)?;
3581 ::core::result::Result::Ok(view)
3582 }
3583 #[doc(hidden)]
3591 pub fn _merge_into_view(
3592 &mut self,
3593 buf: &'a [u8],
3594 depth: u32,
3595 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3596 let _ = depth;
3597 #[allow(unused_variables)]
3598 let view = self;
3599 let mut cur: &'a [u8] = buf;
3600 while !cur.is_empty() {
3601 let before_tag = cur;
3602 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3603 match tag.field_number() {
3604 2u32 => {
3605 if tag.wire_type()
3606 != ::buffa::encoding::WireType::LengthDelimited
3607 {
3608 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3609 field_number: 2u32,
3610 expected: 2u8,
3611 actual: tag.wire_type() as u8,
3612 });
3613 }
3614 view.next_page_token = Some(
3615 ::buffa::types::borrow_str(&mut cur)?,
3616 );
3617 }
3618 1u32 => {
3619 if tag.wire_type()
3620 != ::buffa::encoding::WireType::LengthDelimited
3621 {
3622 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3623 field_number: 1u32,
3624 expected: 2u8,
3625 actual: tag.wire_type() as u8,
3626 });
3627 }
3628 if depth == 0 {
3629 return Err(::buffa::DecodeError::RecursionLimitExceeded);
3630 }
3631 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3632 view.schemas
3633 .push(
3634 super::super::__buffa::view::SchemaView::_decode_depth(
3635 sub,
3636 depth - 1,
3637 )?,
3638 );
3639 }
3640 _ => {
3641 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3642 let span_len = before_tag.len() - cur.len();
3643 view.__buffa_unknown_fields
3644 .push_raw(&before_tag[..span_len]);
3645 }
3646 }
3647 }
3648 ::core::result::Result::Ok(())
3649 }
3650 }
3651 impl<'a> ::buffa::MessageView<'a> for ListSchemasResponseView<'a> {
3652 type Owned = super::super::ListSchemasResponse;
3653 fn decode_view(
3654 buf: &'a [u8],
3655 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3656 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3657 }
3658 fn decode_view_with_limit(
3659 buf: &'a [u8],
3660 depth: u32,
3661 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3662 Self::_decode_depth(buf, depth)
3663 }
3664 fn to_owned_message(&self) -> super::super::ListSchemasResponse {
3665 self.to_owned_from_source(None)
3666 }
3667 #[allow(clippy::useless_conversion, clippy::needless_update)]
3668 fn to_owned_from_source(
3669 &self,
3670 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3671 ) -> super::super::ListSchemasResponse {
3672 #[allow(unused_imports)]
3673 use ::buffa::alloc::string::ToString as _;
3674 let _ = __buffa_src;
3675 super::super::ListSchemasResponse {
3676 schemas: self
3677 .schemas
3678 .iter()
3679 .map(|v| v.to_owned_from_source(__buffa_src))
3680 .collect(),
3681 next_page_token: self.next_page_token.map(|s| s.to_string()),
3682 __buffa_unknown_fields: self
3683 .__buffa_unknown_fields
3684 .to_owned()
3685 .unwrap_or_default()
3686 .into(),
3687 ..::core::default::Default::default()
3688 }
3689 }
3690 }
3691 impl<'a> ::buffa::ViewEncode<'a> for ListSchemasResponseView<'a> {
3692 #[allow(clippy::needless_borrow, clippy::let_and_return)]
3693 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3694 #[allow(unused_imports)]
3695 use ::buffa::Enumeration as _;
3696 let mut size = 0u32;
3697 for v in &self.schemas {
3698 let __slot = __cache.reserve();
3699 let inner_size = v.compute_size(__cache);
3700 __cache.set(__slot, inner_size);
3701 size
3702 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3703 + inner_size;
3704 }
3705 if let Some(ref v) = self.next_page_token {
3706 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3707 }
3708 size += self.__buffa_unknown_fields.encoded_len() as u32;
3709 size
3710 }
3711 #[allow(clippy::needless_borrow)]
3712 fn write_to(
3713 &self,
3714 __cache: &mut ::buffa::SizeCache,
3715 buf: &mut impl ::buffa::bytes::BufMut,
3716 ) {
3717 #[allow(unused_imports)]
3718 use ::buffa::Enumeration as _;
3719 for v in &self.schemas {
3720 ::buffa::encoding::Tag::new(
3721 1u32,
3722 ::buffa::encoding::WireType::LengthDelimited,
3723 )
3724 .encode(buf);
3725 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3726 v.write_to(__cache, buf);
3727 }
3728 if let Some(ref v) = self.next_page_token {
3729 ::buffa::encoding::Tag::new(
3730 2u32,
3731 ::buffa::encoding::WireType::LengthDelimited,
3732 )
3733 .encode(buf);
3734 ::buffa::types::encode_string(v, buf);
3735 }
3736 self.__buffa_unknown_fields.write_to(buf);
3737 }
3738 }
3739 impl<'__a> ::serde::Serialize for ListSchemasResponseView<'__a> {
3751 fn serialize<__S: ::serde::Serializer>(
3752 &self,
3753 __s: __S,
3754 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3755 use ::serde::ser::SerializeMap as _;
3756 let mut __map = __s.serialize_map(::core::option::Option::None)?;
3757 if !self.schemas.is_empty() {
3758 __map.serialize_entry("schemas", &*self.schemas)?;
3759 }
3760 if let ::core::option::Option::Some(__v) = self.next_page_token {
3761 __map.serialize_entry("next_page_token", __v)?;
3762 }
3763 __map.end()
3764 }
3765 }
3766 impl<'a> ::buffa::MessageName for ListSchemasResponseView<'a> {
3767 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
3768 const NAME: &'static str = "ListSchemasResponse";
3769 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.ListSchemasResponse";
3770 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.ListSchemasResponse";
3771 }
3772 impl<'v> ::buffa::DefaultViewInstance for ListSchemasResponseView<'v> {
3773 fn default_view_instance<'a>() -> &'a Self
3774 where
3775 Self: 'a,
3776 {
3777 static VALUE: ::buffa::__private::OnceBox<
3778 ListSchemasResponseView<'static>,
3779 > = ::buffa::__private::OnceBox::new();
3780 VALUE
3781 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3782 <ListSchemasResponseView<'static>>::default(),
3783 ))
3784 }
3785 }
3786 impl ::buffa::ViewReborrow for ListSchemasResponseView<'static> {
3787 type Reborrowed<'b> = ListSchemasResponseView<'b>;
3788 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3789 this
3790 }
3791 }
3792 #[derive(Clone, Debug)]
3798 pub struct ListSchemasResponseOwnedView(
3799 ::buffa::OwnedView<ListSchemasResponseView<'static>>,
3800 );
3801 impl ListSchemasResponseOwnedView {
3802 pub fn decode(
3812 bytes: ::buffa::bytes::Bytes,
3813 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3814 ::core::result::Result::Ok(
3815 ListSchemasResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
3816 )
3817 }
3818 pub fn decode_with_options(
3826 bytes: ::buffa::bytes::Bytes,
3827 opts: &::buffa::DecodeOptions,
3828 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3829 ::core::result::Result::Ok(
3830 ListSchemasResponseOwnedView(
3831 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3832 ),
3833 )
3834 }
3835 pub fn from_owned(
3842 msg: &super::super::ListSchemasResponse,
3843 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3844 ::core::result::Result::Ok(
3845 ListSchemasResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
3846 )
3847 }
3848 #[must_use]
3850 pub fn view(&self) -> &ListSchemasResponseView<'_> {
3851 self.0.reborrow()
3852 }
3853 #[must_use]
3855 pub fn to_owned_message(&self) -> super::super::ListSchemasResponse {
3856 self.0.to_owned_message()
3857 }
3858 #[must_use]
3860 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3861 self.0.bytes()
3862 }
3863 #[must_use]
3865 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3866 self.0.into_bytes()
3867 }
3868 #[must_use]
3872 pub fn schemas(
3873 &self,
3874 ) -> &::buffa::RepeatedView<
3875 '_,
3876 super::super::__buffa::view::SchemaView<'_>,
3877 > {
3878 &self.0.reborrow().schemas
3879 }
3880 #[must_use]
3884 pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
3885 self.0.reborrow().next_page_token
3886 }
3887 }
3888 impl ::core::convert::From<::buffa::OwnedView<ListSchemasResponseView<'static>>>
3889 for ListSchemasResponseOwnedView {
3890 fn from(
3891 inner: ::buffa::OwnedView<ListSchemasResponseView<'static>>,
3892 ) -> Self {
3893 ListSchemasResponseOwnedView(inner)
3894 }
3895 }
3896 impl ::core::convert::From<ListSchemasResponseOwnedView>
3897 for ::buffa::OwnedView<ListSchemasResponseView<'static>> {
3898 fn from(wrapper: ListSchemasResponseOwnedView) -> Self {
3899 wrapper.0
3900 }
3901 }
3902 impl ::core::convert::AsRef<::buffa::OwnedView<ListSchemasResponseView<'static>>>
3903 for ListSchemasResponseOwnedView {
3904 fn as_ref(&self) -> &::buffa::OwnedView<ListSchemasResponseView<'static>> {
3905 &self.0
3906 }
3907 }
3908 impl ::buffa::HasMessageView for super::super::ListSchemasResponse {
3909 type View<'a> = ListSchemasResponseView<'a>;
3910 type ViewHandle = ListSchemasResponseOwnedView;
3911 }
3912 impl ::serde::Serialize for ListSchemasResponseOwnedView {
3913 fn serialize<__S: ::serde::Serializer>(
3914 &self,
3915 __s: __S,
3916 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3917 ::serde::Serialize::serialize(&self.0, __s)
3918 }
3919 }
3920 #[derive(Clone, Debug, Default)]
3922 pub struct CreateSchemaRequestView<'a> {
3923 pub name: &'a str,
3927 pub catalog_name: &'a str,
3931 pub comment: ::core::option::Option<&'a str>,
3935 pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
3939 pub storage_root: ::core::option::Option<&'a str>,
3946 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3947 }
3948 impl<'a> CreateSchemaRequestView<'a> {
3949 #[doc(hidden)]
3957 pub fn _decode_depth(
3958 buf: &'a [u8],
3959 depth: u32,
3960 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3961 let mut view = Self::default();
3962 view._merge_into_view(buf, depth)?;
3963 ::core::result::Result::Ok(view)
3964 }
3965 #[doc(hidden)]
3973 pub fn _merge_into_view(
3974 &mut self,
3975 buf: &'a [u8],
3976 depth: u32,
3977 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3978 let _ = depth;
3979 #[allow(unused_variables)]
3980 let view = self;
3981 let mut cur: &'a [u8] = buf;
3982 while !cur.is_empty() {
3983 let before_tag = cur;
3984 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3985 match tag.field_number() {
3986 1u32 => {
3987 if tag.wire_type()
3988 != ::buffa::encoding::WireType::LengthDelimited
3989 {
3990 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3991 field_number: 1u32,
3992 expected: 2u8,
3993 actual: tag.wire_type() as u8,
3994 });
3995 }
3996 view.name = ::buffa::types::borrow_str(&mut cur)?;
3997 }
3998 2u32 => {
3999 if tag.wire_type()
4000 != ::buffa::encoding::WireType::LengthDelimited
4001 {
4002 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4003 field_number: 2u32,
4004 expected: 2u8,
4005 actual: tag.wire_type() as u8,
4006 });
4007 }
4008 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
4009 }
4010 3u32 => {
4011 if tag.wire_type()
4012 != ::buffa::encoding::WireType::LengthDelimited
4013 {
4014 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4015 field_number: 3u32,
4016 expected: 2u8,
4017 actual: tag.wire_type() as u8,
4018 });
4019 }
4020 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4021 }
4022 5u32 => {
4023 if tag.wire_type()
4024 != ::buffa::encoding::WireType::LengthDelimited
4025 {
4026 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4027 field_number: 5u32,
4028 expected: 2u8,
4029 actual: tag.wire_type() as u8,
4030 });
4031 }
4032 view.storage_root = Some(
4033 ::buffa::types::borrow_str(&mut cur)?,
4034 );
4035 }
4036 4u32 => {
4037 if tag.wire_type()
4038 != ::buffa::encoding::WireType::LengthDelimited
4039 {
4040 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4041 field_number: 4u32,
4042 expected: 2u8,
4043 actual: tag.wire_type() as u8,
4044 });
4045 }
4046 let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
4047 let mut entry_cur: &'a [u8] = entry_bytes;
4048 let mut key = "";
4049 let mut val = "";
4050 while !entry_cur.is_empty() {
4051 let entry_tag = ::buffa::encoding::Tag::decode(
4052 &mut entry_cur,
4053 )?;
4054 match entry_tag.field_number() {
4055 1 => {
4056 if entry_tag.wire_type()
4057 != ::buffa::encoding::WireType::LengthDelimited
4058 {
4059 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4060 field_number: entry_tag.field_number(),
4061 expected: 2u8,
4062 actual: entry_tag.wire_type() as u8,
4063 });
4064 }
4065 key = ::buffa::types::borrow_str(&mut entry_cur)?;
4066 }
4067 2 => {
4068 if entry_tag.wire_type()
4069 != ::buffa::encoding::WireType::LengthDelimited
4070 {
4071 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4072 field_number: entry_tag.field_number(),
4073 expected: 2u8,
4074 actual: entry_tag.wire_type() as u8,
4075 });
4076 }
4077 val = ::buffa::types::borrow_str(&mut entry_cur)?;
4078 }
4079 _ => {
4080 ::buffa::encoding::skip_field_depth(
4081 entry_tag,
4082 &mut entry_cur,
4083 depth,
4084 )?;
4085 }
4086 }
4087 }
4088 view.properties.push(key, val);
4089 }
4090 _ => {
4091 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4092 let span_len = before_tag.len() - cur.len();
4093 view.__buffa_unknown_fields
4094 .push_raw(&before_tag[..span_len]);
4095 }
4096 }
4097 }
4098 ::core::result::Result::Ok(())
4099 }
4100 }
4101 impl<'a> ::buffa::MessageView<'a> for CreateSchemaRequestView<'a> {
4102 type Owned = super::super::CreateSchemaRequest;
4103 fn decode_view(
4104 buf: &'a [u8],
4105 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4106 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4107 }
4108 fn decode_view_with_limit(
4109 buf: &'a [u8],
4110 depth: u32,
4111 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4112 Self::_decode_depth(buf, depth)
4113 }
4114 fn to_owned_message(&self) -> super::super::CreateSchemaRequest {
4115 self.to_owned_from_source(None)
4116 }
4117 #[allow(clippy::useless_conversion, clippy::needless_update)]
4118 fn to_owned_from_source(
4119 &self,
4120 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4121 ) -> super::super::CreateSchemaRequest {
4122 #[allow(unused_imports)]
4123 use ::buffa::alloc::string::ToString as _;
4124 let _ = __buffa_src;
4125 super::super::CreateSchemaRequest {
4126 name: self.name.to_string(),
4127 catalog_name: self.catalog_name.to_string(),
4128 comment: self.comment.map(|s| s.to_string()),
4129 properties: self
4130 .properties
4131 .iter()
4132 .map(|(k, v)| (k.to_string(), v.to_string()))
4133 .collect(),
4134 storage_root: self.storage_root.map(|s| s.to_string()),
4135 __buffa_unknown_fields: self
4136 .__buffa_unknown_fields
4137 .to_owned()
4138 .unwrap_or_default()
4139 .into(),
4140 ..::core::default::Default::default()
4141 }
4142 }
4143 }
4144 impl<'a> ::buffa::ViewEncode<'a> for CreateSchemaRequestView<'a> {
4145 #[allow(clippy::needless_borrow, clippy::let_and_return)]
4146 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4147 #[allow(unused_imports)]
4148 use ::buffa::Enumeration as _;
4149 let mut size = 0u32;
4150 if !self.name.is_empty() {
4151 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4152 }
4153 if !self.catalog_name.is_empty() {
4154 size
4155 += 1u32
4156 + ::buffa::types::string_encoded_len(&self.catalog_name)
4157 as u32;
4158 }
4159 if let Some(ref v) = self.comment {
4160 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4161 }
4162 #[allow(clippy::for_kv_map)]
4163 for (k, v) in &self.properties {
4164 let entry_size: u32 = 1u32
4165 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
4166 + ::buffa::types::string_encoded_len(v) as u32;
4167 size
4168 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
4169 + entry_size;
4170 }
4171 if let Some(ref v) = self.storage_root {
4172 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4173 }
4174 size += self.__buffa_unknown_fields.encoded_len() as u32;
4175 size
4176 }
4177 #[allow(clippy::needless_borrow)]
4178 fn write_to(
4179 &self,
4180 _cache: &mut ::buffa::SizeCache,
4181 buf: &mut impl ::buffa::bytes::BufMut,
4182 ) {
4183 #[allow(unused_imports)]
4184 use ::buffa::Enumeration as _;
4185 if !self.name.is_empty() {
4186 ::buffa::encoding::Tag::new(
4187 1u32,
4188 ::buffa::encoding::WireType::LengthDelimited,
4189 )
4190 .encode(buf);
4191 ::buffa::types::encode_string(&self.name, buf);
4192 }
4193 if !self.catalog_name.is_empty() {
4194 ::buffa::encoding::Tag::new(
4195 2u32,
4196 ::buffa::encoding::WireType::LengthDelimited,
4197 )
4198 .encode(buf);
4199 ::buffa::types::encode_string(&self.catalog_name, buf);
4200 }
4201 if let Some(ref v) = self.comment {
4202 ::buffa::encoding::Tag::new(
4203 3u32,
4204 ::buffa::encoding::WireType::LengthDelimited,
4205 )
4206 .encode(buf);
4207 ::buffa::types::encode_string(v, buf);
4208 }
4209 for (k, v) in &self.properties {
4210 let entry_size: u32 = 1u32
4211 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
4212 + ::buffa::types::string_encoded_len(v) as u32;
4213 ::buffa::encoding::Tag::new(
4214 4u32,
4215 ::buffa::encoding::WireType::LengthDelimited,
4216 )
4217 .encode(buf);
4218 ::buffa::encoding::encode_varint(entry_size as u64, buf);
4219 ::buffa::encoding::Tag::new(
4220 1u32,
4221 ::buffa::encoding::WireType::LengthDelimited,
4222 )
4223 .encode(buf);
4224 ::buffa::types::encode_string(k, buf);
4225 ::buffa::encoding::Tag::new(
4226 2u32,
4227 ::buffa::encoding::WireType::LengthDelimited,
4228 )
4229 .encode(buf);
4230 ::buffa::types::encode_string(v, buf);
4231 }
4232 if let Some(ref v) = self.storage_root {
4233 ::buffa::encoding::Tag::new(
4234 5u32,
4235 ::buffa::encoding::WireType::LengthDelimited,
4236 )
4237 .encode(buf);
4238 ::buffa::types::encode_string(v, buf);
4239 }
4240 self.__buffa_unknown_fields.write_to(buf);
4241 }
4242 }
4243 impl<'__a> ::serde::Serialize for CreateSchemaRequestView<'__a> {
4255 fn serialize<__S: ::serde::Serializer>(
4256 &self,
4257 __s: __S,
4258 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4259 use ::serde::ser::SerializeMap as _;
4260 let mut __map = __s.serialize_map(::core::option::Option::None)?;
4261 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
4262 __map.serialize_entry("name", self.name)?;
4263 }
4264 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
4265 __map.serialize_entry("catalog_name", self.catalog_name)?;
4266 }
4267 if let ::core::option::Option::Some(__v) = self.comment {
4268 __map.serialize_entry("comment", __v)?;
4269 }
4270 if !self.properties.is_empty() {
4271 struct _WM<'__a, '__x>(
4272 &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
4273 );
4274 impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
4275 fn serialize<__S: ::serde::Serializer>(
4276 &self,
4277 __s: __S,
4278 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4279 use ::serde::ser::SerializeMap as _;
4280 let mut __m = __s
4281 .serialize_map(::core::option::Option::Some(self.0.len()))?;
4282 for (k, v) in self.0.iter_unique() {
4283 __m.serialize_entry(k, v)?;
4284 }
4285 __m.end()
4286 }
4287 }
4288 __map.serialize_entry("properties", &_WM(&self.properties))?;
4289 }
4290 if let ::core::option::Option::Some(__v) = self.storage_root {
4291 __map.serialize_entry("storage_root", __v)?;
4292 }
4293 __map.end()
4294 }
4295 }
4296 impl<'a> ::buffa::MessageName for CreateSchemaRequestView<'a> {
4297 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
4298 const NAME: &'static str = "CreateSchemaRequest";
4299 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.CreateSchemaRequest";
4300 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.CreateSchemaRequest";
4301 }
4302 impl<'v> ::buffa::DefaultViewInstance for CreateSchemaRequestView<'v> {
4303 fn default_view_instance<'a>() -> &'a Self
4304 where
4305 Self: 'a,
4306 {
4307 static VALUE: ::buffa::__private::OnceBox<
4308 CreateSchemaRequestView<'static>,
4309 > = ::buffa::__private::OnceBox::new();
4310 VALUE
4311 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4312 <CreateSchemaRequestView<'static>>::default(),
4313 ))
4314 }
4315 }
4316 impl ::buffa::ViewReborrow for CreateSchemaRequestView<'static> {
4317 type Reborrowed<'b> = CreateSchemaRequestView<'b>;
4318 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4319 this
4320 }
4321 }
4322 #[derive(Clone, Debug)]
4328 pub struct CreateSchemaRequestOwnedView(
4329 ::buffa::OwnedView<CreateSchemaRequestView<'static>>,
4330 );
4331 impl CreateSchemaRequestOwnedView {
4332 pub fn decode(
4342 bytes: ::buffa::bytes::Bytes,
4343 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4344 ::core::result::Result::Ok(
4345 CreateSchemaRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
4346 )
4347 }
4348 pub fn decode_with_options(
4356 bytes: ::buffa::bytes::Bytes,
4357 opts: &::buffa::DecodeOptions,
4358 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4359 ::core::result::Result::Ok(
4360 CreateSchemaRequestOwnedView(
4361 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4362 ),
4363 )
4364 }
4365 pub fn from_owned(
4372 msg: &super::super::CreateSchemaRequest,
4373 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4374 ::core::result::Result::Ok(
4375 CreateSchemaRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
4376 )
4377 }
4378 #[must_use]
4380 pub fn view(&self) -> &CreateSchemaRequestView<'_> {
4381 self.0.reborrow()
4382 }
4383 #[must_use]
4385 pub fn to_owned_message(&self) -> super::super::CreateSchemaRequest {
4386 self.0.to_owned_message()
4387 }
4388 #[must_use]
4390 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4391 self.0.bytes()
4392 }
4393 #[must_use]
4395 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4396 self.0.into_bytes()
4397 }
4398 #[must_use]
4402 pub fn name(&self) -> &'_ str {
4403 self.0.reborrow().name
4404 }
4405 #[must_use]
4409 pub fn catalog_name(&self) -> &'_ str {
4410 self.0.reborrow().catalog_name
4411 }
4412 #[must_use]
4416 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
4417 self.0.reborrow().comment
4418 }
4419 #[must_use]
4423 pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
4424 &self.0.reborrow().properties
4425 }
4426 #[must_use]
4433 pub fn storage_root(&self) -> ::core::option::Option<&'_ str> {
4434 self.0.reborrow().storage_root
4435 }
4436 }
4437 impl ::core::convert::From<::buffa::OwnedView<CreateSchemaRequestView<'static>>>
4438 for CreateSchemaRequestOwnedView {
4439 fn from(
4440 inner: ::buffa::OwnedView<CreateSchemaRequestView<'static>>,
4441 ) -> Self {
4442 CreateSchemaRequestOwnedView(inner)
4443 }
4444 }
4445 impl ::core::convert::From<CreateSchemaRequestOwnedView>
4446 for ::buffa::OwnedView<CreateSchemaRequestView<'static>> {
4447 fn from(wrapper: CreateSchemaRequestOwnedView) -> Self {
4448 wrapper.0
4449 }
4450 }
4451 impl ::core::convert::AsRef<::buffa::OwnedView<CreateSchemaRequestView<'static>>>
4452 for CreateSchemaRequestOwnedView {
4453 fn as_ref(&self) -> &::buffa::OwnedView<CreateSchemaRequestView<'static>> {
4454 &self.0
4455 }
4456 }
4457 impl ::buffa::HasMessageView for super::super::CreateSchemaRequest {
4458 type View<'a> = CreateSchemaRequestView<'a>;
4459 type ViewHandle = CreateSchemaRequestOwnedView;
4460 }
4461 impl ::serde::Serialize for CreateSchemaRequestOwnedView {
4462 fn serialize<__S: ::serde::Serializer>(
4463 &self,
4464 __s: __S,
4465 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4466 ::serde::Serialize::serialize(&self.0, __s)
4467 }
4468 }
4469 #[derive(Clone, Debug, Default)]
4471 pub struct GetSchemaRequestView<'a> {
4472 pub full_name: &'a str,
4478 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4479 }
4480 impl<'a> GetSchemaRequestView<'a> {
4481 #[doc(hidden)]
4489 pub fn _decode_depth(
4490 buf: &'a [u8],
4491 depth: u32,
4492 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4493 let mut view = Self::default();
4494 view._merge_into_view(buf, depth)?;
4495 ::core::result::Result::Ok(view)
4496 }
4497 #[doc(hidden)]
4505 pub fn _merge_into_view(
4506 &mut self,
4507 buf: &'a [u8],
4508 depth: u32,
4509 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4510 let _ = depth;
4511 #[allow(unused_variables)]
4512 let view = self;
4513 let mut cur: &'a [u8] = buf;
4514 while !cur.is_empty() {
4515 let before_tag = cur;
4516 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4517 match tag.field_number() {
4518 1u32 => {
4519 if tag.wire_type()
4520 != ::buffa::encoding::WireType::LengthDelimited
4521 {
4522 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4523 field_number: 1u32,
4524 expected: 2u8,
4525 actual: tag.wire_type() as u8,
4526 });
4527 }
4528 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
4529 }
4530 _ => {
4531 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4532 let span_len = before_tag.len() - cur.len();
4533 view.__buffa_unknown_fields
4534 .push_raw(&before_tag[..span_len]);
4535 }
4536 }
4537 }
4538 ::core::result::Result::Ok(())
4539 }
4540 }
4541 impl<'a> ::buffa::MessageView<'a> for GetSchemaRequestView<'a> {
4542 type Owned = super::super::GetSchemaRequest;
4543 fn decode_view(
4544 buf: &'a [u8],
4545 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4546 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4547 }
4548 fn decode_view_with_limit(
4549 buf: &'a [u8],
4550 depth: u32,
4551 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4552 Self::_decode_depth(buf, depth)
4553 }
4554 fn to_owned_message(&self) -> super::super::GetSchemaRequest {
4555 self.to_owned_from_source(None)
4556 }
4557 #[allow(clippy::useless_conversion, clippy::needless_update)]
4558 fn to_owned_from_source(
4559 &self,
4560 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4561 ) -> super::super::GetSchemaRequest {
4562 #[allow(unused_imports)]
4563 use ::buffa::alloc::string::ToString as _;
4564 let _ = __buffa_src;
4565 super::super::GetSchemaRequest {
4566 full_name: self.full_name.to_string(),
4567 __buffa_unknown_fields: self
4568 .__buffa_unknown_fields
4569 .to_owned()
4570 .unwrap_or_default()
4571 .into(),
4572 ..::core::default::Default::default()
4573 }
4574 }
4575 }
4576 impl<'a> ::buffa::ViewEncode<'a> for GetSchemaRequestView<'a> {
4577 #[allow(clippy::needless_borrow, clippy::let_and_return)]
4578 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4579 #[allow(unused_imports)]
4580 use ::buffa::Enumeration as _;
4581 let mut size = 0u32;
4582 if !self.full_name.is_empty() {
4583 size
4584 += 1u32
4585 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
4586 }
4587 size += self.__buffa_unknown_fields.encoded_len() as u32;
4588 size
4589 }
4590 #[allow(clippy::needless_borrow)]
4591 fn write_to(
4592 &self,
4593 _cache: &mut ::buffa::SizeCache,
4594 buf: &mut impl ::buffa::bytes::BufMut,
4595 ) {
4596 #[allow(unused_imports)]
4597 use ::buffa::Enumeration as _;
4598 if !self.full_name.is_empty() {
4599 ::buffa::encoding::Tag::new(
4600 1u32,
4601 ::buffa::encoding::WireType::LengthDelimited,
4602 )
4603 .encode(buf);
4604 ::buffa::types::encode_string(&self.full_name, buf);
4605 }
4606 self.__buffa_unknown_fields.write_to(buf);
4607 }
4608 }
4609 impl<'__a> ::serde::Serialize for GetSchemaRequestView<'__a> {
4621 fn serialize<__S: ::serde::Serializer>(
4622 &self,
4623 __s: __S,
4624 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4625 use ::serde::ser::SerializeMap as _;
4626 let mut __map = __s.serialize_map(::core::option::Option::None)?;
4627 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
4628 __map.serialize_entry("full_name", self.full_name)?;
4629 }
4630 __map.end()
4631 }
4632 }
4633 impl<'a> ::buffa::MessageName for GetSchemaRequestView<'a> {
4634 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
4635 const NAME: &'static str = "GetSchemaRequest";
4636 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.GetSchemaRequest";
4637 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.GetSchemaRequest";
4638 }
4639 impl<'v> ::buffa::DefaultViewInstance for GetSchemaRequestView<'v> {
4640 fn default_view_instance<'a>() -> &'a Self
4641 where
4642 Self: 'a,
4643 {
4644 static VALUE: ::buffa::__private::OnceBox<
4645 GetSchemaRequestView<'static>,
4646 > = ::buffa::__private::OnceBox::new();
4647 VALUE
4648 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4649 <GetSchemaRequestView<'static>>::default(),
4650 ))
4651 }
4652 }
4653 impl ::buffa::ViewReborrow for GetSchemaRequestView<'static> {
4654 type Reborrowed<'b> = GetSchemaRequestView<'b>;
4655 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4656 this
4657 }
4658 }
4659 #[derive(Clone, Debug)]
4665 pub struct GetSchemaRequestOwnedView(
4666 ::buffa::OwnedView<GetSchemaRequestView<'static>>,
4667 );
4668 impl GetSchemaRequestOwnedView {
4669 pub fn decode(
4679 bytes: ::buffa::bytes::Bytes,
4680 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4681 ::core::result::Result::Ok(
4682 GetSchemaRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
4683 )
4684 }
4685 pub fn decode_with_options(
4693 bytes: ::buffa::bytes::Bytes,
4694 opts: &::buffa::DecodeOptions,
4695 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4696 ::core::result::Result::Ok(
4697 GetSchemaRequestOwnedView(
4698 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4699 ),
4700 )
4701 }
4702 pub fn from_owned(
4709 msg: &super::super::GetSchemaRequest,
4710 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4711 ::core::result::Result::Ok(
4712 GetSchemaRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
4713 )
4714 }
4715 #[must_use]
4717 pub fn view(&self) -> &GetSchemaRequestView<'_> {
4718 self.0.reborrow()
4719 }
4720 #[must_use]
4722 pub fn to_owned_message(&self) -> super::super::GetSchemaRequest {
4723 self.0.to_owned_message()
4724 }
4725 #[must_use]
4727 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4728 self.0.bytes()
4729 }
4730 #[must_use]
4732 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4733 self.0.into_bytes()
4734 }
4735 #[must_use]
4741 pub fn full_name(&self) -> &'_ str {
4742 self.0.reborrow().full_name
4743 }
4744 }
4745 impl ::core::convert::From<::buffa::OwnedView<GetSchemaRequestView<'static>>>
4746 for GetSchemaRequestOwnedView {
4747 fn from(inner: ::buffa::OwnedView<GetSchemaRequestView<'static>>) -> Self {
4748 GetSchemaRequestOwnedView(inner)
4749 }
4750 }
4751 impl ::core::convert::From<GetSchemaRequestOwnedView>
4752 for ::buffa::OwnedView<GetSchemaRequestView<'static>> {
4753 fn from(wrapper: GetSchemaRequestOwnedView) -> Self {
4754 wrapper.0
4755 }
4756 }
4757 impl ::core::convert::AsRef<::buffa::OwnedView<GetSchemaRequestView<'static>>>
4758 for GetSchemaRequestOwnedView {
4759 fn as_ref(&self) -> &::buffa::OwnedView<GetSchemaRequestView<'static>> {
4760 &self.0
4761 }
4762 }
4763 impl ::buffa::HasMessageView for super::super::GetSchemaRequest {
4764 type View<'a> = GetSchemaRequestView<'a>;
4765 type ViewHandle = GetSchemaRequestOwnedView;
4766 }
4767 impl ::serde::Serialize for GetSchemaRequestOwnedView {
4768 fn serialize<__S: ::serde::Serializer>(
4769 &self,
4770 __s: __S,
4771 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4772 ::serde::Serialize::serialize(&self.0, __s)
4773 }
4774 }
4775 #[derive(Clone, Debug, Default)]
4777 pub struct UpdateSchemaRequestView<'a> {
4778 pub full_name: &'a str,
4782 pub comment: ::core::option::Option<&'a str>,
4786 pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
4793 pub new_name: ::core::option::Option<&'a str>,
4797 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4798 }
4799 impl<'a> UpdateSchemaRequestView<'a> {
4800 #[doc(hidden)]
4808 pub fn _decode_depth(
4809 buf: &'a [u8],
4810 depth: u32,
4811 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4812 let mut view = Self::default();
4813 view._merge_into_view(buf, depth)?;
4814 ::core::result::Result::Ok(view)
4815 }
4816 #[doc(hidden)]
4824 pub fn _merge_into_view(
4825 &mut self,
4826 buf: &'a [u8],
4827 depth: u32,
4828 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4829 let _ = depth;
4830 #[allow(unused_variables)]
4831 let view = self;
4832 let mut cur: &'a [u8] = buf;
4833 while !cur.is_empty() {
4834 let before_tag = cur;
4835 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4836 match tag.field_number() {
4837 1u32 => {
4838 if tag.wire_type()
4839 != ::buffa::encoding::WireType::LengthDelimited
4840 {
4841 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4842 field_number: 1u32,
4843 expected: 2u8,
4844 actual: tag.wire_type() as u8,
4845 });
4846 }
4847 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
4848 }
4849 2u32 => {
4850 if tag.wire_type()
4851 != ::buffa::encoding::WireType::LengthDelimited
4852 {
4853 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4854 field_number: 2u32,
4855 expected: 2u8,
4856 actual: tag.wire_type() as u8,
4857 });
4858 }
4859 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4860 }
4861 4u32 => {
4862 if tag.wire_type()
4863 != ::buffa::encoding::WireType::LengthDelimited
4864 {
4865 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4866 field_number: 4u32,
4867 expected: 2u8,
4868 actual: tag.wire_type() as u8,
4869 });
4870 }
4871 view.new_name = Some(::buffa::types::borrow_str(&mut cur)?);
4872 }
4873 3u32 => {
4874 if tag.wire_type()
4875 != ::buffa::encoding::WireType::LengthDelimited
4876 {
4877 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4878 field_number: 3u32,
4879 expected: 2u8,
4880 actual: tag.wire_type() as u8,
4881 });
4882 }
4883 let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
4884 let mut entry_cur: &'a [u8] = entry_bytes;
4885 let mut key = "";
4886 let mut val = "";
4887 while !entry_cur.is_empty() {
4888 let entry_tag = ::buffa::encoding::Tag::decode(
4889 &mut entry_cur,
4890 )?;
4891 match entry_tag.field_number() {
4892 1 => {
4893 if entry_tag.wire_type()
4894 != ::buffa::encoding::WireType::LengthDelimited
4895 {
4896 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4897 field_number: entry_tag.field_number(),
4898 expected: 2u8,
4899 actual: entry_tag.wire_type() as u8,
4900 });
4901 }
4902 key = ::buffa::types::borrow_str(&mut entry_cur)?;
4903 }
4904 2 => {
4905 if entry_tag.wire_type()
4906 != ::buffa::encoding::WireType::LengthDelimited
4907 {
4908 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4909 field_number: entry_tag.field_number(),
4910 expected: 2u8,
4911 actual: entry_tag.wire_type() as u8,
4912 });
4913 }
4914 val = ::buffa::types::borrow_str(&mut entry_cur)?;
4915 }
4916 _ => {
4917 ::buffa::encoding::skip_field_depth(
4918 entry_tag,
4919 &mut entry_cur,
4920 depth,
4921 )?;
4922 }
4923 }
4924 }
4925 view.properties.push(key, val);
4926 }
4927 _ => {
4928 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4929 let span_len = before_tag.len() - cur.len();
4930 view.__buffa_unknown_fields
4931 .push_raw(&before_tag[..span_len]);
4932 }
4933 }
4934 }
4935 ::core::result::Result::Ok(())
4936 }
4937 }
4938 impl<'a> ::buffa::MessageView<'a> for UpdateSchemaRequestView<'a> {
4939 type Owned = super::super::UpdateSchemaRequest;
4940 fn decode_view(
4941 buf: &'a [u8],
4942 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4943 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4944 }
4945 fn decode_view_with_limit(
4946 buf: &'a [u8],
4947 depth: u32,
4948 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4949 Self::_decode_depth(buf, depth)
4950 }
4951 fn to_owned_message(&self) -> super::super::UpdateSchemaRequest {
4952 self.to_owned_from_source(None)
4953 }
4954 #[allow(clippy::useless_conversion, clippy::needless_update)]
4955 fn to_owned_from_source(
4956 &self,
4957 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4958 ) -> super::super::UpdateSchemaRequest {
4959 #[allow(unused_imports)]
4960 use ::buffa::alloc::string::ToString as _;
4961 let _ = __buffa_src;
4962 super::super::UpdateSchemaRequest {
4963 full_name: self.full_name.to_string(),
4964 comment: self.comment.map(|s| s.to_string()),
4965 properties: self
4966 .properties
4967 .iter()
4968 .map(|(k, v)| (k.to_string(), v.to_string()))
4969 .collect(),
4970 new_name: self.new_name.map(|s| s.to_string()),
4971 __buffa_unknown_fields: self
4972 .__buffa_unknown_fields
4973 .to_owned()
4974 .unwrap_or_default()
4975 .into(),
4976 ..::core::default::Default::default()
4977 }
4978 }
4979 }
4980 impl<'a> ::buffa::ViewEncode<'a> for UpdateSchemaRequestView<'a> {
4981 #[allow(clippy::needless_borrow, clippy::let_and_return)]
4982 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4983 #[allow(unused_imports)]
4984 use ::buffa::Enumeration as _;
4985 let mut size = 0u32;
4986 if !self.full_name.is_empty() {
4987 size
4988 += 1u32
4989 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
4990 }
4991 if let Some(ref v) = self.comment {
4992 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4993 }
4994 #[allow(clippy::for_kv_map)]
4995 for (k, v) in &self.properties {
4996 let entry_size: u32 = 1u32
4997 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
4998 + ::buffa::types::string_encoded_len(v) as u32;
4999 size
5000 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
5001 + entry_size;
5002 }
5003 if let Some(ref v) = self.new_name {
5004 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5005 }
5006 size += self.__buffa_unknown_fields.encoded_len() as u32;
5007 size
5008 }
5009 #[allow(clippy::needless_borrow)]
5010 fn write_to(
5011 &self,
5012 _cache: &mut ::buffa::SizeCache,
5013 buf: &mut impl ::buffa::bytes::BufMut,
5014 ) {
5015 #[allow(unused_imports)]
5016 use ::buffa::Enumeration as _;
5017 if !self.full_name.is_empty() {
5018 ::buffa::encoding::Tag::new(
5019 1u32,
5020 ::buffa::encoding::WireType::LengthDelimited,
5021 )
5022 .encode(buf);
5023 ::buffa::types::encode_string(&self.full_name, buf);
5024 }
5025 if let Some(ref v) = self.comment {
5026 ::buffa::encoding::Tag::new(
5027 2u32,
5028 ::buffa::encoding::WireType::LengthDelimited,
5029 )
5030 .encode(buf);
5031 ::buffa::types::encode_string(v, buf);
5032 }
5033 for (k, v) in &self.properties {
5034 let entry_size: u32 = 1u32
5035 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
5036 + ::buffa::types::string_encoded_len(v) as u32;
5037 ::buffa::encoding::Tag::new(
5038 3u32,
5039 ::buffa::encoding::WireType::LengthDelimited,
5040 )
5041 .encode(buf);
5042 ::buffa::encoding::encode_varint(entry_size as u64, buf);
5043 ::buffa::encoding::Tag::new(
5044 1u32,
5045 ::buffa::encoding::WireType::LengthDelimited,
5046 )
5047 .encode(buf);
5048 ::buffa::types::encode_string(k, buf);
5049 ::buffa::encoding::Tag::new(
5050 2u32,
5051 ::buffa::encoding::WireType::LengthDelimited,
5052 )
5053 .encode(buf);
5054 ::buffa::types::encode_string(v, buf);
5055 }
5056 if let Some(ref v) = self.new_name {
5057 ::buffa::encoding::Tag::new(
5058 4u32,
5059 ::buffa::encoding::WireType::LengthDelimited,
5060 )
5061 .encode(buf);
5062 ::buffa::types::encode_string(v, buf);
5063 }
5064 self.__buffa_unknown_fields.write_to(buf);
5065 }
5066 }
5067 impl<'__a> ::serde::Serialize for UpdateSchemaRequestView<'__a> {
5079 fn serialize<__S: ::serde::Serializer>(
5080 &self,
5081 __s: __S,
5082 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5083 use ::serde::ser::SerializeMap as _;
5084 let mut __map = __s.serialize_map(::core::option::Option::None)?;
5085 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
5086 __map.serialize_entry("full_name", self.full_name)?;
5087 }
5088 if let ::core::option::Option::Some(__v) = self.comment {
5089 __map.serialize_entry("comment", __v)?;
5090 }
5091 if !self.properties.is_empty() {
5092 struct _WM<'__a, '__x>(
5093 &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
5094 );
5095 impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
5096 fn serialize<__S: ::serde::Serializer>(
5097 &self,
5098 __s: __S,
5099 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5100 use ::serde::ser::SerializeMap as _;
5101 let mut __m = __s
5102 .serialize_map(::core::option::Option::Some(self.0.len()))?;
5103 for (k, v) in self.0.iter_unique() {
5104 __m.serialize_entry(k, v)?;
5105 }
5106 __m.end()
5107 }
5108 }
5109 __map.serialize_entry("properties", &_WM(&self.properties))?;
5110 }
5111 if let ::core::option::Option::Some(__v) = self.new_name {
5112 __map.serialize_entry("new_name", __v)?;
5113 }
5114 __map.end()
5115 }
5116 }
5117 impl<'a> ::buffa::MessageName for UpdateSchemaRequestView<'a> {
5118 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
5119 const NAME: &'static str = "UpdateSchemaRequest";
5120 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.UpdateSchemaRequest";
5121 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.UpdateSchemaRequest";
5122 }
5123 impl<'v> ::buffa::DefaultViewInstance for UpdateSchemaRequestView<'v> {
5124 fn default_view_instance<'a>() -> &'a Self
5125 where
5126 Self: 'a,
5127 {
5128 static VALUE: ::buffa::__private::OnceBox<
5129 UpdateSchemaRequestView<'static>,
5130 > = ::buffa::__private::OnceBox::new();
5131 VALUE
5132 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5133 <UpdateSchemaRequestView<'static>>::default(),
5134 ))
5135 }
5136 }
5137 impl ::buffa::ViewReborrow for UpdateSchemaRequestView<'static> {
5138 type Reborrowed<'b> = UpdateSchemaRequestView<'b>;
5139 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5140 this
5141 }
5142 }
5143 #[derive(Clone, Debug)]
5149 pub struct UpdateSchemaRequestOwnedView(
5150 ::buffa::OwnedView<UpdateSchemaRequestView<'static>>,
5151 );
5152 impl UpdateSchemaRequestOwnedView {
5153 pub fn decode(
5163 bytes: ::buffa::bytes::Bytes,
5164 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5165 ::core::result::Result::Ok(
5166 UpdateSchemaRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5167 )
5168 }
5169 pub fn decode_with_options(
5177 bytes: ::buffa::bytes::Bytes,
5178 opts: &::buffa::DecodeOptions,
5179 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5180 ::core::result::Result::Ok(
5181 UpdateSchemaRequestOwnedView(
5182 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5183 ),
5184 )
5185 }
5186 pub fn from_owned(
5193 msg: &super::super::UpdateSchemaRequest,
5194 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5195 ::core::result::Result::Ok(
5196 UpdateSchemaRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5197 )
5198 }
5199 #[must_use]
5201 pub fn view(&self) -> &UpdateSchemaRequestView<'_> {
5202 self.0.reborrow()
5203 }
5204 #[must_use]
5206 pub fn to_owned_message(&self) -> super::super::UpdateSchemaRequest {
5207 self.0.to_owned_message()
5208 }
5209 #[must_use]
5211 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5212 self.0.bytes()
5213 }
5214 #[must_use]
5216 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5217 self.0.into_bytes()
5218 }
5219 #[must_use]
5223 pub fn full_name(&self) -> &'_ str {
5224 self.0.reborrow().full_name
5225 }
5226 #[must_use]
5230 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
5231 self.0.reborrow().comment
5232 }
5233 #[must_use]
5240 pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
5241 &self.0.reborrow().properties
5242 }
5243 #[must_use]
5247 pub fn new_name(&self) -> ::core::option::Option<&'_ str> {
5248 self.0.reborrow().new_name
5249 }
5250 }
5251 impl ::core::convert::From<::buffa::OwnedView<UpdateSchemaRequestView<'static>>>
5252 for UpdateSchemaRequestOwnedView {
5253 fn from(
5254 inner: ::buffa::OwnedView<UpdateSchemaRequestView<'static>>,
5255 ) -> Self {
5256 UpdateSchemaRequestOwnedView(inner)
5257 }
5258 }
5259 impl ::core::convert::From<UpdateSchemaRequestOwnedView>
5260 for ::buffa::OwnedView<UpdateSchemaRequestView<'static>> {
5261 fn from(wrapper: UpdateSchemaRequestOwnedView) -> Self {
5262 wrapper.0
5263 }
5264 }
5265 impl ::core::convert::AsRef<::buffa::OwnedView<UpdateSchemaRequestView<'static>>>
5266 for UpdateSchemaRequestOwnedView {
5267 fn as_ref(&self) -> &::buffa::OwnedView<UpdateSchemaRequestView<'static>> {
5268 &self.0
5269 }
5270 }
5271 impl ::buffa::HasMessageView for super::super::UpdateSchemaRequest {
5272 type View<'a> = UpdateSchemaRequestView<'a>;
5273 type ViewHandle = UpdateSchemaRequestOwnedView;
5274 }
5275 impl ::serde::Serialize for UpdateSchemaRequestOwnedView {
5276 fn serialize<__S: ::serde::Serializer>(
5277 &self,
5278 __s: __S,
5279 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5280 ::serde::Serialize::serialize(&self.0, __s)
5281 }
5282 }
5283 #[derive(Clone, Debug, Default)]
5285 pub struct DeleteSchemaRequestView<'a> {
5286 pub full_name: &'a str,
5292 pub force: ::core::option::Option<bool>,
5296 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5297 }
5298 impl<'a> DeleteSchemaRequestView<'a> {
5299 #[doc(hidden)]
5307 pub fn _decode_depth(
5308 buf: &'a [u8],
5309 depth: u32,
5310 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5311 let mut view = Self::default();
5312 view._merge_into_view(buf, depth)?;
5313 ::core::result::Result::Ok(view)
5314 }
5315 #[doc(hidden)]
5323 pub fn _merge_into_view(
5324 &mut self,
5325 buf: &'a [u8],
5326 depth: u32,
5327 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5328 let _ = depth;
5329 #[allow(unused_variables)]
5330 let view = self;
5331 let mut cur: &'a [u8] = buf;
5332 while !cur.is_empty() {
5333 let before_tag = cur;
5334 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5335 match tag.field_number() {
5336 1u32 => {
5337 if tag.wire_type()
5338 != ::buffa::encoding::WireType::LengthDelimited
5339 {
5340 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5341 field_number: 1u32,
5342 expected: 2u8,
5343 actual: tag.wire_type() as u8,
5344 });
5345 }
5346 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
5347 }
5348 2u32 => {
5349 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5350 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5351 field_number: 2u32,
5352 expected: 0u8,
5353 actual: tag.wire_type() as u8,
5354 });
5355 }
5356 view.force = Some(::buffa::types::decode_bool(&mut cur)?);
5357 }
5358 _ => {
5359 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5360 let span_len = before_tag.len() - cur.len();
5361 view.__buffa_unknown_fields
5362 .push_raw(&before_tag[..span_len]);
5363 }
5364 }
5365 }
5366 ::core::result::Result::Ok(())
5367 }
5368 }
5369 impl<'a> ::buffa::MessageView<'a> for DeleteSchemaRequestView<'a> {
5370 type Owned = super::super::DeleteSchemaRequest;
5371 fn decode_view(
5372 buf: &'a [u8],
5373 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5374 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5375 }
5376 fn decode_view_with_limit(
5377 buf: &'a [u8],
5378 depth: u32,
5379 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5380 Self::_decode_depth(buf, depth)
5381 }
5382 fn to_owned_message(&self) -> super::super::DeleteSchemaRequest {
5383 self.to_owned_from_source(None)
5384 }
5385 #[allow(clippy::useless_conversion, clippy::needless_update)]
5386 fn to_owned_from_source(
5387 &self,
5388 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5389 ) -> super::super::DeleteSchemaRequest {
5390 #[allow(unused_imports)]
5391 use ::buffa::alloc::string::ToString as _;
5392 let _ = __buffa_src;
5393 super::super::DeleteSchemaRequest {
5394 full_name: self.full_name.to_string(),
5395 force: self.force,
5396 __buffa_unknown_fields: self
5397 .__buffa_unknown_fields
5398 .to_owned()
5399 .unwrap_or_default()
5400 .into(),
5401 ..::core::default::Default::default()
5402 }
5403 }
5404 }
5405 impl<'a> ::buffa::ViewEncode<'a> for DeleteSchemaRequestView<'a> {
5406 #[allow(clippy::needless_borrow, clippy::let_and_return)]
5407 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5408 #[allow(unused_imports)]
5409 use ::buffa::Enumeration as _;
5410 let mut size = 0u32;
5411 if !self.full_name.is_empty() {
5412 size
5413 += 1u32
5414 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
5415 }
5416 if self.force.is_some() {
5417 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5418 }
5419 size += self.__buffa_unknown_fields.encoded_len() as u32;
5420 size
5421 }
5422 #[allow(clippy::needless_borrow)]
5423 fn write_to(
5424 &self,
5425 _cache: &mut ::buffa::SizeCache,
5426 buf: &mut impl ::buffa::bytes::BufMut,
5427 ) {
5428 #[allow(unused_imports)]
5429 use ::buffa::Enumeration as _;
5430 if !self.full_name.is_empty() {
5431 ::buffa::encoding::Tag::new(
5432 1u32,
5433 ::buffa::encoding::WireType::LengthDelimited,
5434 )
5435 .encode(buf);
5436 ::buffa::types::encode_string(&self.full_name, buf);
5437 }
5438 if let Some(v) = self.force {
5439 ::buffa::encoding::Tag::new(
5440 2u32,
5441 ::buffa::encoding::WireType::Varint,
5442 )
5443 .encode(buf);
5444 ::buffa::types::encode_bool(v, buf);
5445 }
5446 self.__buffa_unknown_fields.write_to(buf);
5447 }
5448 }
5449 impl<'__a> ::serde::Serialize for DeleteSchemaRequestView<'__a> {
5461 fn serialize<__S: ::serde::Serializer>(
5462 &self,
5463 __s: __S,
5464 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5465 use ::serde::ser::SerializeMap as _;
5466 let mut __map = __s.serialize_map(::core::option::Option::None)?;
5467 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
5468 __map.serialize_entry("full_name", self.full_name)?;
5469 }
5470 if let ::core::option::Option::Some(__v) = self.force {
5471 __map.serialize_entry("force", &__v)?;
5472 }
5473 __map.end()
5474 }
5475 }
5476 impl<'a> ::buffa::MessageName for DeleteSchemaRequestView<'a> {
5477 const PACKAGE: &'static str = "unitycatalog.schemas.v1";
5478 const NAME: &'static str = "DeleteSchemaRequest";
5479 const FULL_NAME: &'static str = "unitycatalog.schemas.v1.DeleteSchemaRequest";
5480 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.schemas.v1.DeleteSchemaRequest";
5481 }
5482 impl<'v> ::buffa::DefaultViewInstance for DeleteSchemaRequestView<'v> {
5483 fn default_view_instance<'a>() -> &'a Self
5484 where
5485 Self: 'a,
5486 {
5487 static VALUE: ::buffa::__private::OnceBox<
5488 DeleteSchemaRequestView<'static>,
5489 > = ::buffa::__private::OnceBox::new();
5490 VALUE
5491 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5492 <DeleteSchemaRequestView<'static>>::default(),
5493 ))
5494 }
5495 }
5496 impl ::buffa::ViewReborrow for DeleteSchemaRequestView<'static> {
5497 type Reborrowed<'b> = DeleteSchemaRequestView<'b>;
5498 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5499 this
5500 }
5501 }
5502 #[derive(Clone, Debug)]
5508 pub struct DeleteSchemaRequestOwnedView(
5509 ::buffa::OwnedView<DeleteSchemaRequestView<'static>>,
5510 );
5511 impl DeleteSchemaRequestOwnedView {
5512 pub fn decode(
5522 bytes: ::buffa::bytes::Bytes,
5523 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5524 ::core::result::Result::Ok(
5525 DeleteSchemaRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5526 )
5527 }
5528 pub fn decode_with_options(
5536 bytes: ::buffa::bytes::Bytes,
5537 opts: &::buffa::DecodeOptions,
5538 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5539 ::core::result::Result::Ok(
5540 DeleteSchemaRequestOwnedView(
5541 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5542 ),
5543 )
5544 }
5545 pub fn from_owned(
5552 msg: &super::super::DeleteSchemaRequest,
5553 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5554 ::core::result::Result::Ok(
5555 DeleteSchemaRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5556 )
5557 }
5558 #[must_use]
5560 pub fn view(&self) -> &DeleteSchemaRequestView<'_> {
5561 self.0.reborrow()
5562 }
5563 #[must_use]
5565 pub fn to_owned_message(&self) -> super::super::DeleteSchemaRequest {
5566 self.0.to_owned_message()
5567 }
5568 #[must_use]
5570 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5571 self.0.bytes()
5572 }
5573 #[must_use]
5575 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5576 self.0.into_bytes()
5577 }
5578 #[must_use]
5584 pub fn full_name(&self) -> &'_ str {
5585 self.0.reborrow().full_name
5586 }
5587 #[must_use]
5591 pub fn force(&self) -> ::core::option::Option<bool> {
5592 self.0.reborrow().force
5593 }
5594 }
5595 impl ::core::convert::From<::buffa::OwnedView<DeleteSchemaRequestView<'static>>>
5596 for DeleteSchemaRequestOwnedView {
5597 fn from(
5598 inner: ::buffa::OwnedView<DeleteSchemaRequestView<'static>>,
5599 ) -> Self {
5600 DeleteSchemaRequestOwnedView(inner)
5601 }
5602 }
5603 impl ::core::convert::From<DeleteSchemaRequestOwnedView>
5604 for ::buffa::OwnedView<DeleteSchemaRequestView<'static>> {
5605 fn from(wrapper: DeleteSchemaRequestOwnedView) -> Self {
5606 wrapper.0
5607 }
5608 }
5609 impl ::core::convert::AsRef<::buffa::OwnedView<DeleteSchemaRequestView<'static>>>
5610 for DeleteSchemaRequestOwnedView {
5611 fn as_ref(&self) -> &::buffa::OwnedView<DeleteSchemaRequestView<'static>> {
5612 &self.0
5613 }
5614 }
5615 impl ::buffa::HasMessageView for super::super::DeleteSchemaRequest {
5616 type View<'a> = DeleteSchemaRequestView<'a>;
5617 type ViewHandle = DeleteSchemaRequestOwnedView;
5618 }
5619 impl ::serde::Serialize for DeleteSchemaRequestOwnedView {
5620 fn serialize<__S: ::serde::Serializer>(
5621 &self,
5622 __s: __S,
5623 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5624 ::serde::Serialize::serialize(&self.0, __s)
5625 }
5626 }
5627 }
5628 pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
5630 reg.register_json_any(super::__SCHEMA_JSON_ANY);
5631 reg.register_json_any(super::__LIST_SCHEMAS_REQUEST_JSON_ANY);
5632 reg.register_json_any(super::__LIST_SCHEMAS_RESPONSE_JSON_ANY);
5633 reg.register_json_any(super::__CREATE_SCHEMA_REQUEST_JSON_ANY);
5634 reg.register_json_any(super::__GET_SCHEMA_REQUEST_JSON_ANY);
5635 reg.register_json_any(super::__UPDATE_SCHEMA_REQUEST_JSON_ANY);
5636 reg.register_json_any(super::__DELETE_SCHEMA_REQUEST_JSON_ANY);
5637 }
5638}
5639#[doc(inline)]
5640pub use self::__buffa::view::SchemaView;
5641#[doc(inline)]
5642pub use self::__buffa::view::SchemaOwnedView;
5643#[doc(inline)]
5644pub use self::__buffa::view::ListSchemasRequestView;
5645#[doc(inline)]
5646pub use self::__buffa::view::ListSchemasRequestOwnedView;
5647#[doc(inline)]
5648pub use self::__buffa::view::ListSchemasResponseView;
5649#[doc(inline)]
5650pub use self::__buffa::view::ListSchemasResponseOwnedView;
5651#[doc(inline)]
5652pub use self::__buffa::view::CreateSchemaRequestView;
5653#[doc(inline)]
5654pub use self::__buffa::view::CreateSchemaRequestOwnedView;
5655#[doc(inline)]
5656pub use self::__buffa::view::GetSchemaRequestView;
5657#[doc(inline)]
5658pub use self::__buffa::view::GetSchemaRequestOwnedView;
5659#[doc(inline)]
5660pub use self::__buffa::view::UpdateSchemaRequestView;
5661#[doc(inline)]
5662pub use self::__buffa::view::UpdateSchemaRequestOwnedView;
5663#[doc(inline)]
5664pub use self::__buffa::view::DeleteSchemaRequestView;
5665#[doc(inline)]
5666pub use self::__buffa::view::DeleteSchemaRequestOwnedView;
5667#[doc(inline)]
5668pub use self::__buffa::register_types;