1#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
4#[repr(i32)]
5pub enum VolumeType {
6 VOLUME_TYPE_UNSPECIFIED = 0i32,
7 EXTERNAL = 1i32,
8 MANAGED = 2i32,
9}
10impl VolumeType {
11 #[allow(non_upper_case_globals)]
13 pub const VolumeTypeUnspecified: Self = Self::VOLUME_TYPE_UNSPECIFIED;
14 #[allow(non_upper_case_globals)]
16 pub const External: Self = Self::EXTERNAL;
17 #[allow(non_upper_case_globals)]
19 pub const Managed: Self = Self::MANAGED;
20}
21impl ::core::default::Default for VolumeType {
22 fn default() -> Self {
23 Self::VOLUME_TYPE_UNSPECIFIED
24 }
25}
26impl ::serde::Serialize for VolumeType {
27 fn serialize<S: ::serde::Serializer>(
28 &self,
29 s: S,
30 ) -> ::core::result::Result<S::Ok, S::Error> {
31 s.serialize_str(::buffa::Enumeration::proto_name(self))
32 }
33}
34impl<'de> ::serde::Deserialize<'de> for VolumeType {
35 fn deserialize<D: ::serde::Deserializer<'de>>(
36 d: D,
37 ) -> ::core::result::Result<Self, D::Error> {
38 struct _V;
39 impl ::serde::de::Visitor<'_> for _V {
40 type Value = VolumeType;
41 fn expecting(
42 &self,
43 f: &mut ::core::fmt::Formatter<'_>,
44 ) -> ::core::fmt::Result {
45 f.write_str(
46 concat!("a string, integer, or null for ", stringify!(VolumeType)),
47 )
48 }
49 fn visit_str<E: ::serde::de::Error>(
50 self,
51 v: &str,
52 ) -> ::core::result::Result<VolumeType, E> {
53 <VolumeType as ::buffa::Enumeration>::from_proto_name(v)
54 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
55 }
56 fn visit_i64<E: ::serde::de::Error>(
57 self,
58 v: i64,
59 ) -> ::core::result::Result<VolumeType, E> {
60 let v32 = i32::try_from(v)
61 .map_err(|_| {
62 ::serde::de::Error::custom(
63 ::buffa::alloc::format!("enum value {v} out of i32 range"),
64 )
65 })?;
66 <VolumeType as ::buffa::Enumeration>::from_i32(v32)
67 .ok_or_else(|| {
68 ::serde::de::Error::custom(
69 ::buffa::alloc::format!("unknown enum value {v32}"),
70 )
71 })
72 }
73 fn visit_u64<E: ::serde::de::Error>(
74 self,
75 v: u64,
76 ) -> ::core::result::Result<VolumeType, E> {
77 let v32 = i32::try_from(v)
78 .map_err(|_| {
79 ::serde::de::Error::custom(
80 ::buffa::alloc::format!("enum value {v} out of i32 range"),
81 )
82 })?;
83 <VolumeType as ::buffa::Enumeration>::from_i32(v32)
84 .ok_or_else(|| {
85 ::serde::de::Error::custom(
86 ::buffa::alloc::format!("unknown enum value {v32}"),
87 )
88 })
89 }
90 fn visit_unit<E: ::serde::de::Error>(
91 self,
92 ) -> ::core::result::Result<VolumeType, E> {
93 ::core::result::Result::Ok(::core::default::Default::default())
94 }
95 }
96 d.deserialize_any(_V)
97 }
98}
99impl ::buffa::json_helpers::ProtoElemJson for VolumeType {
100 fn serialize_proto_json<S: ::serde::Serializer>(
101 v: &Self,
102 s: S,
103 ) -> ::core::result::Result<S::Ok, S::Error> {
104 ::serde::Serialize::serialize(v, s)
105 }
106 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
107 d: D,
108 ) -> ::core::result::Result<Self, D::Error> {
109 <Self as ::serde::Deserialize>::deserialize(d)
110 }
111}
112impl ::buffa::Enumeration for VolumeType {
113 fn from_i32(value: i32) -> ::core::option::Option<Self> {
114 match value {
115 0i32 => ::core::option::Option::Some(Self::VOLUME_TYPE_UNSPECIFIED),
116 1i32 => ::core::option::Option::Some(Self::EXTERNAL),
117 2i32 => ::core::option::Option::Some(Self::MANAGED),
118 _ => ::core::option::Option::None,
119 }
120 }
121 fn to_i32(&self) -> i32 {
122 *self as i32
123 }
124 fn proto_name(&self) -> &'static str {
125 match self {
126 Self::VOLUME_TYPE_UNSPECIFIED => "VOLUME_TYPE_UNSPECIFIED",
127 Self::EXTERNAL => "EXTERNAL",
128 Self::MANAGED => "MANAGED",
129 }
130 }
131 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
132 match name {
133 "VOLUME_TYPE_UNSPECIFIED" => {
134 ::core::option::Option::Some(Self::VOLUME_TYPE_UNSPECIFIED)
135 }
136 "EXTERNAL" => ::core::option::Option::Some(Self::EXTERNAL),
137 "MANAGED" => ::core::option::Option::Some(Self::MANAGED),
138 _ => ::core::option::Option::None,
139 }
140 }
141 fn values() -> &'static [Self] {
142 &[Self::VOLUME_TYPE_UNSPECIFIED, Self::EXTERNAL, Self::MANAGED]
143 }
144}
145#[derive(Clone, PartialEq, Default)]
146#[derive(::serde::Serialize, ::serde::Deserialize)]
147#[serde(default)]
148pub struct Volume {
149 #[serde(
153 rename = "name",
154 with = "::buffa::json_helpers::proto_string",
155 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
156 )]
157 pub name: ::buffa::alloc::string::String,
158 #[serde(
162 rename = "catalog_name",
163 alias = "catalogName",
164 with = "::buffa::json_helpers::proto_string",
165 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
166 )]
167 pub catalog_name: ::buffa::alloc::string::String,
168 #[serde(
172 rename = "schema_name",
173 alias = "schemaName",
174 with = "::buffa::json_helpers::proto_string",
175 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
176 )]
177 pub schema_name: ::buffa::alloc::string::String,
178 #[serde(
182 rename = "full_name",
183 alias = "fullName",
184 with = "::buffa::json_helpers::proto_string",
185 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
186 )]
187 pub full_name: ::buffa::alloc::string::String,
188 #[serde(
192 rename = "storage_location",
193 alias = "storageLocation",
194 with = "::buffa::json_helpers::proto_string",
195 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
196 )]
197 pub storage_location: ::buffa::alloc::string::String,
198 #[serde(
202 rename = "volume_id",
203 alias = "volumeId",
204 with = "::buffa::json_helpers::proto_string",
205 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
206 )]
207 pub volume_id: ::buffa::alloc::string::String,
208 #[serde(
216 rename = "volume_type",
217 alias = "volumeType",
218 with = "::buffa::json_helpers::proto_enum",
219 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
220 )]
221 pub volume_type: ::buffa::EnumValue<VolumeType>,
222 #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
226 pub owner: ::core::option::Option<::buffa::alloc::string::String>,
227 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
231 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
232 #[serde(
236 rename = "created_at",
237 alias = "createdAt",
238 with = "::buffa::json_helpers::opt_int64",
239 skip_serializing_if = "::core::option::Option::is_none"
240 )]
241 pub created_at: ::core::option::Option<i64>,
242 #[serde(
246 rename = "created_by",
247 alias = "createdBy",
248 skip_serializing_if = "::core::option::Option::is_none"
249 )]
250 pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
251 #[serde(
255 rename = "updated_at",
256 alias = "updatedAt",
257 with = "::buffa::json_helpers::opt_int64",
258 skip_serializing_if = "::core::option::Option::is_none"
259 )]
260 pub updated_at: ::core::option::Option<i64>,
261 #[serde(
265 rename = "updated_by",
266 alias = "updatedBy",
267 skip_serializing_if = "::core::option::Option::is_none"
268 )]
269 pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
270 #[serde(
276 rename = "browse_only",
277 alias = "browseOnly",
278 skip_serializing_if = "::core::option::Option::is_none"
279 )]
280 pub browse_only: ::core::option::Option<bool>,
281 #[serde(
285 rename = "metastore_id",
286 alias = "metastoreId",
287 skip_serializing_if = "::core::option::Option::is_none"
288 )]
289 pub metastore_id: ::core::option::Option<::buffa::alloc::string::String>,
290 #[serde(skip)]
291 #[doc(hidden)]
292 pub __buffa_unknown_fields: ::buffa::UnknownFields,
293}
294impl ::core::fmt::Debug for Volume {
295 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
296 f.debug_struct("Volume")
297 .field("name", &self.name)
298 .field("catalog_name", &self.catalog_name)
299 .field("schema_name", &self.schema_name)
300 .field("full_name", &self.full_name)
301 .field("storage_location", &self.storage_location)
302 .field("volume_id", &self.volume_id)
303 .field("volume_type", &self.volume_type)
304 .field("owner", &self.owner)
305 .field("comment", &self.comment)
306 .field("created_at", &self.created_at)
307 .field("created_by", &self.created_by)
308 .field("updated_at", &self.updated_at)
309 .field("updated_by", &self.updated_by)
310 .field("browse_only", &self.browse_only)
311 .field("metastore_id", &self.metastore_id)
312 .finish()
313 }
314}
315impl Volume {
316 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.Volume";
321}
322impl Volume {
323 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
324 #[inline]
325 pub fn with_owner(
327 mut self,
328 value: impl Into<::buffa::alloc::string::String>,
329 ) -> Self {
330 self.owner = Some(value.into());
331 self
332 }
333 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
334 #[inline]
335 pub fn with_comment(
337 mut self,
338 value: impl Into<::buffa::alloc::string::String>,
339 ) -> Self {
340 self.comment = Some(value.into());
341 self
342 }
343 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
344 #[inline]
345 pub fn with_created_at(mut self, value: i64) -> Self {
347 self.created_at = Some(value);
348 self
349 }
350 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
351 #[inline]
352 pub fn with_created_by(
354 mut self,
355 value: impl Into<::buffa::alloc::string::String>,
356 ) -> Self {
357 self.created_by = Some(value.into());
358 self
359 }
360 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
361 #[inline]
362 pub fn with_updated_at(mut self, value: i64) -> Self {
364 self.updated_at = Some(value);
365 self
366 }
367 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
368 #[inline]
369 pub fn with_updated_by(
371 mut self,
372 value: impl Into<::buffa::alloc::string::String>,
373 ) -> Self {
374 self.updated_by = Some(value.into());
375 self
376 }
377 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
378 #[inline]
379 pub fn with_browse_only(mut self, value: bool) -> Self {
381 self.browse_only = Some(value);
382 self
383 }
384 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
385 #[inline]
386 pub fn with_metastore_id(
388 mut self,
389 value: impl Into<::buffa::alloc::string::String>,
390 ) -> Self {
391 self.metastore_id = Some(value.into());
392 self
393 }
394}
395impl ::buffa::DefaultInstance for Volume {
396 fn default_instance() -> &'static Self {
397 static VALUE: ::buffa::__private::OnceBox<Volume> = ::buffa::__private::OnceBox::new();
398 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
399 }
400}
401impl ::buffa::MessageName for Volume {
402 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
403 const NAME: &'static str = "Volume";
404 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.Volume";
405 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.Volume";
406}
407impl ::buffa::Message for Volume {
408 #[allow(clippy::let_and_return)]
414 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
415 #[allow(unused_imports)]
416 use ::buffa::Enumeration as _;
417 let mut size = 0u32;
418 if !self.name.is_empty() {
419 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
420 }
421 if !self.catalog_name.is_empty() {
422 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
423 }
424 if !self.schema_name.is_empty() {
425 size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
426 }
427 if !self.full_name.is_empty() {
428 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
429 }
430 if !self.storage_location.is_empty() {
431 size
432 += 1u32
433 + ::buffa::types::string_encoded_len(&self.storage_location) as u32;
434 }
435 if !self.volume_id.is_empty() {
436 size += 1u32 + ::buffa::types::string_encoded_len(&self.volume_id) as u32;
437 }
438 {
439 let val = self.volume_type.to_i32();
440 if val != 0 {
441 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
442 }
443 }
444 if let Some(ref v) = self.owner {
445 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
446 }
447 if let Some(ref v) = self.comment {
448 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
449 }
450 if let Some(v) = self.created_at {
451 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
452 }
453 if let Some(ref v) = self.created_by {
454 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
455 }
456 if let Some(v) = self.updated_at {
457 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
458 }
459 if let Some(ref v) = self.updated_by {
460 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
461 }
462 if self.browse_only.is_some() {
463 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
464 }
465 if let Some(ref v) = self.metastore_id {
466 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
467 }
468 size += self.__buffa_unknown_fields.encoded_len() as u32;
469 size
470 }
471 fn write_to(
472 &self,
473 _cache: &mut ::buffa::SizeCache,
474 buf: &mut impl ::buffa::bytes::BufMut,
475 ) {
476 #[allow(unused_imports)]
477 use ::buffa::Enumeration as _;
478 if !self.name.is_empty() {
479 ::buffa::encoding::Tag::new(
480 1u32,
481 ::buffa::encoding::WireType::LengthDelimited,
482 )
483 .encode(buf);
484 ::buffa::types::encode_string(&self.name, buf);
485 }
486 if !self.catalog_name.is_empty() {
487 ::buffa::encoding::Tag::new(
488 2u32,
489 ::buffa::encoding::WireType::LengthDelimited,
490 )
491 .encode(buf);
492 ::buffa::types::encode_string(&self.catalog_name, buf);
493 }
494 if !self.schema_name.is_empty() {
495 ::buffa::encoding::Tag::new(
496 3u32,
497 ::buffa::encoding::WireType::LengthDelimited,
498 )
499 .encode(buf);
500 ::buffa::types::encode_string(&self.schema_name, buf);
501 }
502 if !self.full_name.is_empty() {
503 ::buffa::encoding::Tag::new(
504 4u32,
505 ::buffa::encoding::WireType::LengthDelimited,
506 )
507 .encode(buf);
508 ::buffa::types::encode_string(&self.full_name, buf);
509 }
510 if !self.storage_location.is_empty() {
511 ::buffa::encoding::Tag::new(
512 5u32,
513 ::buffa::encoding::WireType::LengthDelimited,
514 )
515 .encode(buf);
516 ::buffa::types::encode_string(&self.storage_location, buf);
517 }
518 if !self.volume_id.is_empty() {
519 ::buffa::encoding::Tag::new(
520 6u32,
521 ::buffa::encoding::WireType::LengthDelimited,
522 )
523 .encode(buf);
524 ::buffa::types::encode_string(&self.volume_id, buf);
525 }
526 {
527 let val = self.volume_type.to_i32();
528 if val != 0 {
529 ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
530 .encode(buf);
531 ::buffa::types::encode_int32(val, buf);
532 }
533 }
534 if let Some(ref v) = self.owner {
535 ::buffa::encoding::Tag::new(
536 8u32,
537 ::buffa::encoding::WireType::LengthDelimited,
538 )
539 .encode(buf);
540 ::buffa::types::encode_string(v, buf);
541 }
542 if let Some(ref v) = self.comment {
543 ::buffa::encoding::Tag::new(
544 9u32,
545 ::buffa::encoding::WireType::LengthDelimited,
546 )
547 .encode(buf);
548 ::buffa::types::encode_string(v, buf);
549 }
550 if let Some(v) = self.created_at {
551 ::buffa::encoding::Tag::new(1000u32, ::buffa::encoding::WireType::Varint)
552 .encode(buf);
553 ::buffa::types::encode_int64(v, buf);
554 }
555 if let Some(ref v) = self.created_by {
556 ::buffa::encoding::Tag::new(
557 1001u32,
558 ::buffa::encoding::WireType::LengthDelimited,
559 )
560 .encode(buf);
561 ::buffa::types::encode_string(v, buf);
562 }
563 if let Some(v) = self.updated_at {
564 ::buffa::encoding::Tag::new(1002u32, ::buffa::encoding::WireType::Varint)
565 .encode(buf);
566 ::buffa::types::encode_int64(v, buf);
567 }
568 if let Some(ref v) = self.updated_by {
569 ::buffa::encoding::Tag::new(
570 1003u32,
571 ::buffa::encoding::WireType::LengthDelimited,
572 )
573 .encode(buf);
574 ::buffa::types::encode_string(v, buf);
575 }
576 if let Some(v) = self.browse_only {
577 ::buffa::encoding::Tag::new(1004u32, ::buffa::encoding::WireType::Varint)
578 .encode(buf);
579 ::buffa::types::encode_bool(v, buf);
580 }
581 if let Some(ref v) = self.metastore_id {
582 ::buffa::encoding::Tag::new(
583 1005u32,
584 ::buffa::encoding::WireType::LengthDelimited,
585 )
586 .encode(buf);
587 ::buffa::types::encode_string(v, buf);
588 }
589 self.__buffa_unknown_fields.write_to(buf);
590 }
591 fn merge_field(
592 &mut self,
593 tag: ::buffa::encoding::Tag,
594 buf: &mut impl ::buffa::bytes::Buf,
595 depth: u32,
596 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
597 #[allow(unused_imports)]
598 use ::buffa::bytes::Buf as _;
599 #[allow(unused_imports)]
600 use ::buffa::Enumeration as _;
601 match tag.field_number() {
602 1u32 => {
603 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
604 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
605 field_number: 1u32,
606 expected: 2u8,
607 actual: tag.wire_type() as u8,
608 });
609 }
610 ::buffa::types::merge_string(&mut self.name, buf)?;
611 }
612 2u32 => {
613 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
614 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
615 field_number: 2u32,
616 expected: 2u8,
617 actual: tag.wire_type() as u8,
618 });
619 }
620 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
621 }
622 3u32 => {
623 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
624 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
625 field_number: 3u32,
626 expected: 2u8,
627 actual: tag.wire_type() as u8,
628 });
629 }
630 ::buffa::types::merge_string(&mut self.schema_name, buf)?;
631 }
632 4u32 => {
633 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
634 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
635 field_number: 4u32,
636 expected: 2u8,
637 actual: tag.wire_type() as u8,
638 });
639 }
640 ::buffa::types::merge_string(&mut self.full_name, buf)?;
641 }
642 5u32 => {
643 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
644 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
645 field_number: 5u32,
646 expected: 2u8,
647 actual: tag.wire_type() as u8,
648 });
649 }
650 ::buffa::types::merge_string(&mut self.storage_location, buf)?;
651 }
652 6u32 => {
653 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
654 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
655 field_number: 6u32,
656 expected: 2u8,
657 actual: tag.wire_type() as u8,
658 });
659 }
660 ::buffa::types::merge_string(&mut self.volume_id, buf)?;
661 }
662 7u32 => {
663 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
664 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
665 field_number: 7u32,
666 expected: 0u8,
667 actual: tag.wire_type() as u8,
668 });
669 }
670 self.volume_type = ::buffa::EnumValue::from(
671 ::buffa::types::decode_int32(buf)?,
672 );
673 }
674 8u32 => {
675 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
676 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
677 field_number: 8u32,
678 expected: 2u8,
679 actual: tag.wire_type() as u8,
680 });
681 }
682 ::buffa::types::merge_string(
683 self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
684 buf,
685 )?;
686 }
687 9u32 => {
688 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
689 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
690 field_number: 9u32,
691 expected: 2u8,
692 actual: tag.wire_type() as u8,
693 });
694 }
695 ::buffa::types::merge_string(
696 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
697 buf,
698 )?;
699 }
700 1000u32 => {
701 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
702 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
703 field_number: 1000u32,
704 expected: 0u8,
705 actual: tag.wire_type() as u8,
706 });
707 }
708 self.created_at = ::core::option::Option::Some(
709 ::buffa::types::decode_int64(buf)?,
710 );
711 }
712 1001u32 => {
713 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
714 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
715 field_number: 1001u32,
716 expected: 2u8,
717 actual: tag.wire_type() as u8,
718 });
719 }
720 ::buffa::types::merge_string(
721 self
722 .created_by
723 .get_or_insert_with(::buffa::alloc::string::String::new),
724 buf,
725 )?;
726 }
727 1002u32 => {
728 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
729 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
730 field_number: 1002u32,
731 expected: 0u8,
732 actual: tag.wire_type() as u8,
733 });
734 }
735 self.updated_at = ::core::option::Option::Some(
736 ::buffa::types::decode_int64(buf)?,
737 );
738 }
739 1003u32 => {
740 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
741 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
742 field_number: 1003u32,
743 expected: 2u8,
744 actual: tag.wire_type() as u8,
745 });
746 }
747 ::buffa::types::merge_string(
748 self
749 .updated_by
750 .get_or_insert_with(::buffa::alloc::string::String::new),
751 buf,
752 )?;
753 }
754 1004u32 => {
755 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
756 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
757 field_number: 1004u32,
758 expected: 0u8,
759 actual: tag.wire_type() as u8,
760 });
761 }
762 self.browse_only = ::core::option::Option::Some(
763 ::buffa::types::decode_bool(buf)?,
764 );
765 }
766 1005u32 => {
767 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
768 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
769 field_number: 1005u32,
770 expected: 2u8,
771 actual: tag.wire_type() as u8,
772 });
773 }
774 ::buffa::types::merge_string(
775 self
776 .metastore_id
777 .get_or_insert_with(::buffa::alloc::string::String::new),
778 buf,
779 )?;
780 }
781 _ => {
782 self.__buffa_unknown_fields
783 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
784 }
785 }
786 ::core::result::Result::Ok(())
787 }
788 fn clear(&mut self) {
789 self.name.clear();
790 self.catalog_name.clear();
791 self.schema_name.clear();
792 self.full_name.clear();
793 self.storage_location.clear();
794 self.volume_id.clear();
795 self.volume_type = ::buffa::EnumValue::from(0);
796 self.owner = ::core::option::Option::None;
797 self.comment = ::core::option::Option::None;
798 self.created_at = ::core::option::Option::None;
799 self.created_by = ::core::option::Option::None;
800 self.updated_at = ::core::option::Option::None;
801 self.updated_by = ::core::option::Option::None;
802 self.browse_only = ::core::option::Option::None;
803 self.metastore_id = ::core::option::Option::None;
804 self.__buffa_unknown_fields.clear();
805 }
806}
807impl ::buffa::ExtensionSet for Volume {
808 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.Volume";
809 fn unknown_fields(&self) -> &::buffa::UnknownFields {
810 &self.__buffa_unknown_fields
811 }
812 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
813 &mut self.__buffa_unknown_fields
814 }
815}
816impl ::buffa::json_helpers::ProtoElemJson for Volume {
817 fn serialize_proto_json<S: ::serde::Serializer>(
818 v: &Self,
819 s: S,
820 ) -> ::core::result::Result<S::Ok, S::Error> {
821 ::serde::Serialize::serialize(v, s)
822 }
823 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
824 d: D,
825 ) -> ::core::result::Result<Self, D::Error> {
826 <Self as ::serde::Deserialize>::deserialize(d)
827 }
828}
829#[doc(hidden)]
830pub const __VOLUME_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
831 type_url: "type.googleapis.com/unitycatalog.volumes.v1.Volume",
832 to_json: ::buffa::type_registry::any_to_json::<Volume>,
833 from_json: ::buffa::type_registry::any_from_json::<Volume>,
834 is_wkt: false,
835};
836#[derive(Clone, PartialEq, Default)]
838#[derive(::serde::Serialize, ::serde::Deserialize)]
839#[serde(default)]
840pub struct ListVolumesRequest {
841 #[serde(
845 rename = "catalog_name",
846 alias = "catalogName",
847 with = "::buffa::json_helpers::proto_string",
848 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
849 )]
850 pub catalog_name: ::buffa::alloc::string::String,
851 #[serde(
855 rename = "schema_name",
856 alias = "schemaName",
857 with = "::buffa::json_helpers::proto_string",
858 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
859 )]
860 pub schema_name: ::buffa::alloc::string::String,
861 #[serde(
865 rename = "max_results",
866 alias = "maxResults",
867 with = "::buffa::json_helpers::opt_int32",
868 skip_serializing_if = "::core::option::Option::is_none"
869 )]
870 pub max_results: ::core::option::Option<i32>,
871 #[serde(
875 rename = "page_token",
876 alias = "pageToken",
877 skip_serializing_if = "::core::option::Option::is_none"
878 )]
879 pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
880 #[serde(
884 rename = "include_browse",
885 alias = "includeBrowse",
886 skip_serializing_if = "::core::option::Option::is_none"
887 )]
888 pub include_browse: ::core::option::Option<bool>,
889 #[serde(skip)]
890 #[doc(hidden)]
891 pub __buffa_unknown_fields: ::buffa::UnknownFields,
892}
893impl ::core::fmt::Debug for ListVolumesRequest {
894 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
895 f.debug_struct("ListVolumesRequest")
896 .field("catalog_name", &self.catalog_name)
897 .field("schema_name", &self.schema_name)
898 .field("max_results", &self.max_results)
899 .field("page_token", &self.page_token)
900 .field("include_browse", &self.include_browse)
901 .finish()
902 }
903}
904impl ListVolumesRequest {
905 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesRequest";
910}
911impl ListVolumesRequest {
912 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
913 #[inline]
914 pub fn with_max_results(mut self, value: i32) -> Self {
916 self.max_results = Some(value);
917 self
918 }
919 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
920 #[inline]
921 pub fn with_page_token(
923 mut self,
924 value: impl Into<::buffa::alloc::string::String>,
925 ) -> Self {
926 self.page_token = Some(value.into());
927 self
928 }
929 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
930 #[inline]
931 pub fn with_include_browse(mut self, value: bool) -> Self {
933 self.include_browse = Some(value);
934 self
935 }
936}
937impl ::buffa::DefaultInstance for ListVolumesRequest {
938 fn default_instance() -> &'static Self {
939 static VALUE: ::buffa::__private::OnceBox<ListVolumesRequest> = ::buffa::__private::OnceBox::new();
940 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
941 }
942}
943impl ::buffa::MessageName for ListVolumesRequest {
944 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
945 const NAME: &'static str = "ListVolumesRequest";
946 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.ListVolumesRequest";
947 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesRequest";
948}
949impl ::buffa::Message for ListVolumesRequest {
950 #[allow(clippy::let_and_return)]
956 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
957 #[allow(unused_imports)]
958 use ::buffa::Enumeration as _;
959 let mut size = 0u32;
960 if !self.catalog_name.is_empty() {
961 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
962 }
963 if !self.schema_name.is_empty() {
964 size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
965 }
966 if let Some(v) = self.max_results {
967 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
968 }
969 if let Some(ref v) = self.page_token {
970 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
971 }
972 if self.include_browse.is_some() {
973 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
974 }
975 size += self.__buffa_unknown_fields.encoded_len() as u32;
976 size
977 }
978 fn write_to(
979 &self,
980 _cache: &mut ::buffa::SizeCache,
981 buf: &mut impl ::buffa::bytes::BufMut,
982 ) {
983 #[allow(unused_imports)]
984 use ::buffa::Enumeration as _;
985 if !self.catalog_name.is_empty() {
986 ::buffa::encoding::Tag::new(
987 1u32,
988 ::buffa::encoding::WireType::LengthDelimited,
989 )
990 .encode(buf);
991 ::buffa::types::encode_string(&self.catalog_name, buf);
992 }
993 if !self.schema_name.is_empty() {
994 ::buffa::encoding::Tag::new(
995 2u32,
996 ::buffa::encoding::WireType::LengthDelimited,
997 )
998 .encode(buf);
999 ::buffa::types::encode_string(&self.schema_name, buf);
1000 }
1001 if let Some(v) = self.max_results {
1002 ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
1003 .encode(buf);
1004 ::buffa::types::encode_int32(v, buf);
1005 }
1006 if let Some(ref v) = self.page_token {
1007 ::buffa::encoding::Tag::new(
1008 4u32,
1009 ::buffa::encoding::WireType::LengthDelimited,
1010 )
1011 .encode(buf);
1012 ::buffa::types::encode_string(v, buf);
1013 }
1014 if let Some(v) = self.include_browse {
1015 ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
1016 .encode(buf);
1017 ::buffa::types::encode_bool(v, buf);
1018 }
1019 self.__buffa_unknown_fields.write_to(buf);
1020 }
1021 fn merge_field(
1022 &mut self,
1023 tag: ::buffa::encoding::Tag,
1024 buf: &mut impl ::buffa::bytes::Buf,
1025 depth: u32,
1026 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1027 #[allow(unused_imports)]
1028 use ::buffa::bytes::Buf as _;
1029 #[allow(unused_imports)]
1030 use ::buffa::Enumeration as _;
1031 match tag.field_number() {
1032 1u32 => {
1033 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1034 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1035 field_number: 1u32,
1036 expected: 2u8,
1037 actual: tag.wire_type() as u8,
1038 });
1039 }
1040 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
1041 }
1042 2u32 => {
1043 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1044 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1045 field_number: 2u32,
1046 expected: 2u8,
1047 actual: tag.wire_type() as u8,
1048 });
1049 }
1050 ::buffa::types::merge_string(&mut self.schema_name, buf)?;
1051 }
1052 3u32 => {
1053 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1054 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1055 field_number: 3u32,
1056 expected: 0u8,
1057 actual: tag.wire_type() as u8,
1058 });
1059 }
1060 self.max_results = ::core::option::Option::Some(
1061 ::buffa::types::decode_int32(buf)?,
1062 );
1063 }
1064 4u32 => {
1065 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1066 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1067 field_number: 4u32,
1068 expected: 2u8,
1069 actual: tag.wire_type() as u8,
1070 });
1071 }
1072 ::buffa::types::merge_string(
1073 self
1074 .page_token
1075 .get_or_insert_with(::buffa::alloc::string::String::new),
1076 buf,
1077 )?;
1078 }
1079 5u32 => {
1080 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1081 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1082 field_number: 5u32,
1083 expected: 0u8,
1084 actual: tag.wire_type() as u8,
1085 });
1086 }
1087 self.include_browse = ::core::option::Option::Some(
1088 ::buffa::types::decode_bool(buf)?,
1089 );
1090 }
1091 _ => {
1092 self.__buffa_unknown_fields
1093 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1094 }
1095 }
1096 ::core::result::Result::Ok(())
1097 }
1098 fn clear(&mut self) {
1099 self.catalog_name.clear();
1100 self.schema_name.clear();
1101 self.max_results = ::core::option::Option::None;
1102 self.page_token = ::core::option::Option::None;
1103 self.include_browse = ::core::option::Option::None;
1104 self.__buffa_unknown_fields.clear();
1105 }
1106}
1107impl ::buffa::ExtensionSet for ListVolumesRequest {
1108 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.ListVolumesRequest";
1109 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1110 &self.__buffa_unknown_fields
1111 }
1112 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1113 &mut self.__buffa_unknown_fields
1114 }
1115}
1116impl ::buffa::json_helpers::ProtoElemJson for ListVolumesRequest {
1117 fn serialize_proto_json<S: ::serde::Serializer>(
1118 v: &Self,
1119 s: S,
1120 ) -> ::core::result::Result<S::Ok, S::Error> {
1121 ::serde::Serialize::serialize(v, s)
1122 }
1123 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1124 d: D,
1125 ) -> ::core::result::Result<Self, D::Error> {
1126 <Self as ::serde::Deserialize>::deserialize(d)
1127 }
1128}
1129#[doc(hidden)]
1130pub const __LIST_VOLUMES_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1131 type_url: "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesRequest",
1132 to_json: ::buffa::type_registry::any_to_json::<ListVolumesRequest>,
1133 from_json: ::buffa::type_registry::any_from_json::<ListVolumesRequest>,
1134 is_wkt: false,
1135};
1136#[derive(Clone, PartialEq, Default)]
1138#[derive(::serde::Serialize, ::serde::Deserialize)]
1139#[serde(default)]
1140pub struct ListVolumesResponse {
1141 #[serde(
1145 rename = "volumes",
1146 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1147 deserialize_with = "::buffa::json_helpers::null_as_default"
1148 )]
1149 pub volumes: ::buffa::alloc::vec::Vec<Volume>,
1150 #[serde(
1157 rename = "next_page_token",
1158 alias = "nextPageToken",
1159 skip_serializing_if = "::core::option::Option::is_none"
1160 )]
1161 pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
1162 #[serde(skip)]
1163 #[doc(hidden)]
1164 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1165}
1166impl ::core::fmt::Debug for ListVolumesResponse {
1167 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1168 f.debug_struct("ListVolumesResponse")
1169 .field("volumes", &self.volumes)
1170 .field("next_page_token", &self.next_page_token)
1171 .finish()
1172 }
1173}
1174impl ListVolumesResponse {
1175 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesResponse";
1180}
1181impl ListVolumesResponse {
1182 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1183 #[inline]
1184 pub fn with_next_page_token(
1186 mut self,
1187 value: impl Into<::buffa::alloc::string::String>,
1188 ) -> Self {
1189 self.next_page_token = Some(value.into());
1190 self
1191 }
1192}
1193impl ::buffa::DefaultInstance for ListVolumesResponse {
1194 fn default_instance() -> &'static Self {
1195 static VALUE: ::buffa::__private::OnceBox<ListVolumesResponse> = ::buffa::__private::OnceBox::new();
1196 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1197 }
1198}
1199impl ::buffa::MessageName for ListVolumesResponse {
1200 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
1201 const NAME: &'static str = "ListVolumesResponse";
1202 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.ListVolumesResponse";
1203 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesResponse";
1204}
1205impl ::buffa::Message for ListVolumesResponse {
1206 #[allow(clippy::let_and_return)]
1212 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1213 #[allow(unused_imports)]
1214 use ::buffa::Enumeration as _;
1215 let mut size = 0u32;
1216 for v in &self.volumes {
1217 let __slot = __cache.reserve();
1218 let inner_size = v.compute_size(__cache);
1219 __cache.set(__slot, inner_size);
1220 size
1221 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1222 + inner_size;
1223 }
1224 if let Some(ref v) = self.next_page_token {
1225 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1226 }
1227 size += self.__buffa_unknown_fields.encoded_len() as u32;
1228 size
1229 }
1230 fn write_to(
1231 &self,
1232 __cache: &mut ::buffa::SizeCache,
1233 buf: &mut impl ::buffa::bytes::BufMut,
1234 ) {
1235 #[allow(unused_imports)]
1236 use ::buffa::Enumeration as _;
1237 for v in &self.volumes {
1238 ::buffa::encoding::Tag::new(
1239 1u32,
1240 ::buffa::encoding::WireType::LengthDelimited,
1241 )
1242 .encode(buf);
1243 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1244 v.write_to(__cache, buf);
1245 }
1246 if let Some(ref v) = self.next_page_token {
1247 ::buffa::encoding::Tag::new(
1248 2u32,
1249 ::buffa::encoding::WireType::LengthDelimited,
1250 )
1251 .encode(buf);
1252 ::buffa::types::encode_string(v, buf);
1253 }
1254 self.__buffa_unknown_fields.write_to(buf);
1255 }
1256 fn merge_field(
1257 &mut self,
1258 tag: ::buffa::encoding::Tag,
1259 buf: &mut impl ::buffa::bytes::Buf,
1260 depth: u32,
1261 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1262 #[allow(unused_imports)]
1263 use ::buffa::bytes::Buf as _;
1264 #[allow(unused_imports)]
1265 use ::buffa::Enumeration as _;
1266 match tag.field_number() {
1267 1u32 => {
1268 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1269 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1270 field_number: 1u32,
1271 expected: 2u8,
1272 actual: tag.wire_type() as u8,
1273 });
1274 }
1275 let mut elem = ::core::default::Default::default();
1276 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1277 self.volumes.push(elem);
1278 }
1279 2u32 => {
1280 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1281 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1282 field_number: 2u32,
1283 expected: 2u8,
1284 actual: tag.wire_type() as u8,
1285 });
1286 }
1287 ::buffa::types::merge_string(
1288 self
1289 .next_page_token
1290 .get_or_insert_with(::buffa::alloc::string::String::new),
1291 buf,
1292 )?;
1293 }
1294 _ => {
1295 self.__buffa_unknown_fields
1296 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1297 }
1298 }
1299 ::core::result::Result::Ok(())
1300 }
1301 fn clear(&mut self) {
1302 self.volumes.clear();
1303 self.next_page_token = ::core::option::Option::None;
1304 self.__buffa_unknown_fields.clear();
1305 }
1306}
1307impl ::buffa::ExtensionSet for ListVolumesResponse {
1308 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.ListVolumesResponse";
1309 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1310 &self.__buffa_unknown_fields
1311 }
1312 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1313 &mut self.__buffa_unknown_fields
1314 }
1315}
1316impl ::buffa::json_helpers::ProtoElemJson for ListVolumesResponse {
1317 fn serialize_proto_json<S: ::serde::Serializer>(
1318 v: &Self,
1319 s: S,
1320 ) -> ::core::result::Result<S::Ok, S::Error> {
1321 ::serde::Serialize::serialize(v, s)
1322 }
1323 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1324 d: D,
1325 ) -> ::core::result::Result<Self, D::Error> {
1326 <Self as ::serde::Deserialize>::deserialize(d)
1327 }
1328}
1329#[doc(hidden)]
1330pub const __LIST_VOLUMES_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1331 type_url: "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesResponse",
1332 to_json: ::buffa::type_registry::any_to_json::<ListVolumesResponse>,
1333 from_json: ::buffa::type_registry::any_from_json::<ListVolumesResponse>,
1334 is_wkt: false,
1335};
1336#[derive(Clone, PartialEq, Default)]
1338#[derive(::serde::Serialize, ::serde::Deserialize)]
1339#[serde(default)]
1340pub struct CreateVolumeRequest {
1341 #[serde(
1345 rename = "catalog_name",
1346 alias = "catalogName",
1347 with = "::buffa::json_helpers::proto_string",
1348 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1349 )]
1350 pub catalog_name: ::buffa::alloc::string::String,
1351 #[serde(
1355 rename = "schema_name",
1356 alias = "schemaName",
1357 with = "::buffa::json_helpers::proto_string",
1358 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1359 )]
1360 pub schema_name: ::buffa::alloc::string::String,
1361 #[serde(
1365 rename = "name",
1366 with = "::buffa::json_helpers::proto_string",
1367 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1368 )]
1369 pub name: ::buffa::alloc::string::String,
1370 #[serde(
1378 rename = "volume_type",
1379 alias = "volumeType",
1380 with = "::buffa::json_helpers::proto_enum",
1381 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1382 )]
1383 pub volume_type: ::buffa::EnumValue<VolumeType>,
1384 #[serde(
1388 rename = "storage_location",
1389 alias = "storageLocation",
1390 skip_serializing_if = "::core::option::Option::is_none"
1391 )]
1392 pub storage_location: ::core::option::Option<::buffa::alloc::string::String>,
1393 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1397 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1398 #[serde(skip)]
1399 #[doc(hidden)]
1400 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1401}
1402impl ::core::fmt::Debug for CreateVolumeRequest {
1403 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1404 f.debug_struct("CreateVolumeRequest")
1405 .field("catalog_name", &self.catalog_name)
1406 .field("schema_name", &self.schema_name)
1407 .field("name", &self.name)
1408 .field("volume_type", &self.volume_type)
1409 .field("storage_location", &self.storage_location)
1410 .field("comment", &self.comment)
1411 .finish()
1412 }
1413}
1414impl CreateVolumeRequest {
1415 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.CreateVolumeRequest";
1420}
1421impl CreateVolumeRequest {
1422 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1423 #[inline]
1424 pub fn with_storage_location(
1426 mut self,
1427 value: impl Into<::buffa::alloc::string::String>,
1428 ) -> Self {
1429 self.storage_location = Some(value.into());
1430 self
1431 }
1432 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1433 #[inline]
1434 pub fn with_comment(
1436 mut self,
1437 value: impl Into<::buffa::alloc::string::String>,
1438 ) -> Self {
1439 self.comment = Some(value.into());
1440 self
1441 }
1442}
1443impl ::buffa::DefaultInstance for CreateVolumeRequest {
1444 fn default_instance() -> &'static Self {
1445 static VALUE: ::buffa::__private::OnceBox<CreateVolumeRequest> = ::buffa::__private::OnceBox::new();
1446 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1447 }
1448}
1449impl ::buffa::MessageName for CreateVolumeRequest {
1450 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
1451 const NAME: &'static str = "CreateVolumeRequest";
1452 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.CreateVolumeRequest";
1453 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.CreateVolumeRequest";
1454}
1455impl ::buffa::Message for CreateVolumeRequest {
1456 #[allow(clippy::let_and_return)]
1462 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1463 #[allow(unused_imports)]
1464 use ::buffa::Enumeration as _;
1465 let mut size = 0u32;
1466 if !self.catalog_name.is_empty() {
1467 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
1468 }
1469 if !self.schema_name.is_empty() {
1470 size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
1471 }
1472 if !self.name.is_empty() {
1473 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1474 }
1475 {
1476 let val = self.volume_type.to_i32();
1477 if val != 0 {
1478 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1479 }
1480 }
1481 if let Some(ref v) = self.storage_location {
1482 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1483 }
1484 if let Some(ref v) = self.comment {
1485 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1486 }
1487 size += self.__buffa_unknown_fields.encoded_len() as u32;
1488 size
1489 }
1490 fn write_to(
1491 &self,
1492 _cache: &mut ::buffa::SizeCache,
1493 buf: &mut impl ::buffa::bytes::BufMut,
1494 ) {
1495 #[allow(unused_imports)]
1496 use ::buffa::Enumeration as _;
1497 if !self.catalog_name.is_empty() {
1498 ::buffa::encoding::Tag::new(
1499 1u32,
1500 ::buffa::encoding::WireType::LengthDelimited,
1501 )
1502 .encode(buf);
1503 ::buffa::types::encode_string(&self.catalog_name, buf);
1504 }
1505 if !self.schema_name.is_empty() {
1506 ::buffa::encoding::Tag::new(
1507 2u32,
1508 ::buffa::encoding::WireType::LengthDelimited,
1509 )
1510 .encode(buf);
1511 ::buffa::types::encode_string(&self.schema_name, buf);
1512 }
1513 if !self.name.is_empty() {
1514 ::buffa::encoding::Tag::new(
1515 3u32,
1516 ::buffa::encoding::WireType::LengthDelimited,
1517 )
1518 .encode(buf);
1519 ::buffa::types::encode_string(&self.name, buf);
1520 }
1521 {
1522 let val = self.volume_type.to_i32();
1523 if val != 0 {
1524 ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
1525 .encode(buf);
1526 ::buffa::types::encode_int32(val, buf);
1527 }
1528 }
1529 if let Some(ref v) = self.storage_location {
1530 ::buffa::encoding::Tag::new(
1531 5u32,
1532 ::buffa::encoding::WireType::LengthDelimited,
1533 )
1534 .encode(buf);
1535 ::buffa::types::encode_string(v, buf);
1536 }
1537 if let Some(ref v) = self.comment {
1538 ::buffa::encoding::Tag::new(
1539 6u32,
1540 ::buffa::encoding::WireType::LengthDelimited,
1541 )
1542 .encode(buf);
1543 ::buffa::types::encode_string(v, buf);
1544 }
1545 self.__buffa_unknown_fields.write_to(buf);
1546 }
1547 fn merge_field(
1548 &mut self,
1549 tag: ::buffa::encoding::Tag,
1550 buf: &mut impl ::buffa::bytes::Buf,
1551 depth: u32,
1552 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1553 #[allow(unused_imports)]
1554 use ::buffa::bytes::Buf as _;
1555 #[allow(unused_imports)]
1556 use ::buffa::Enumeration as _;
1557 match tag.field_number() {
1558 1u32 => {
1559 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1560 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1561 field_number: 1u32,
1562 expected: 2u8,
1563 actual: tag.wire_type() as u8,
1564 });
1565 }
1566 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
1567 }
1568 2u32 => {
1569 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1570 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1571 field_number: 2u32,
1572 expected: 2u8,
1573 actual: tag.wire_type() as u8,
1574 });
1575 }
1576 ::buffa::types::merge_string(&mut self.schema_name, buf)?;
1577 }
1578 3u32 => {
1579 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1580 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1581 field_number: 3u32,
1582 expected: 2u8,
1583 actual: tag.wire_type() as u8,
1584 });
1585 }
1586 ::buffa::types::merge_string(&mut self.name, buf)?;
1587 }
1588 4u32 => {
1589 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1590 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1591 field_number: 4u32,
1592 expected: 0u8,
1593 actual: tag.wire_type() as u8,
1594 });
1595 }
1596 self.volume_type = ::buffa::EnumValue::from(
1597 ::buffa::types::decode_int32(buf)?,
1598 );
1599 }
1600 5u32 => {
1601 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1602 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1603 field_number: 5u32,
1604 expected: 2u8,
1605 actual: tag.wire_type() as u8,
1606 });
1607 }
1608 ::buffa::types::merge_string(
1609 self
1610 .storage_location
1611 .get_or_insert_with(::buffa::alloc::string::String::new),
1612 buf,
1613 )?;
1614 }
1615 6u32 => {
1616 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1617 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1618 field_number: 6u32,
1619 expected: 2u8,
1620 actual: tag.wire_type() as u8,
1621 });
1622 }
1623 ::buffa::types::merge_string(
1624 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1625 buf,
1626 )?;
1627 }
1628 _ => {
1629 self.__buffa_unknown_fields
1630 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1631 }
1632 }
1633 ::core::result::Result::Ok(())
1634 }
1635 fn clear(&mut self) {
1636 self.catalog_name.clear();
1637 self.schema_name.clear();
1638 self.name.clear();
1639 self.volume_type = ::buffa::EnumValue::from(0);
1640 self.storage_location = ::core::option::Option::None;
1641 self.comment = ::core::option::Option::None;
1642 self.__buffa_unknown_fields.clear();
1643 }
1644}
1645impl ::buffa::ExtensionSet for CreateVolumeRequest {
1646 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.CreateVolumeRequest";
1647 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1648 &self.__buffa_unknown_fields
1649 }
1650 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1651 &mut self.__buffa_unknown_fields
1652 }
1653}
1654impl ::buffa::json_helpers::ProtoElemJson for CreateVolumeRequest {
1655 fn serialize_proto_json<S: ::serde::Serializer>(
1656 v: &Self,
1657 s: S,
1658 ) -> ::core::result::Result<S::Ok, S::Error> {
1659 ::serde::Serialize::serialize(v, s)
1660 }
1661 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1662 d: D,
1663 ) -> ::core::result::Result<Self, D::Error> {
1664 <Self as ::serde::Deserialize>::deserialize(d)
1665 }
1666}
1667#[doc(hidden)]
1668pub const __CREATE_VOLUME_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1669 type_url: "type.googleapis.com/unitycatalog.volumes.v1.CreateVolumeRequest",
1670 to_json: ::buffa::type_registry::any_to_json::<CreateVolumeRequest>,
1671 from_json: ::buffa::type_registry::any_from_json::<CreateVolumeRequest>,
1672 is_wkt: false,
1673};
1674#[derive(Clone, PartialEq, Default)]
1675#[derive(::serde::Serialize, ::serde::Deserialize)]
1676#[serde(default)]
1677pub struct GetVolumeRequest {
1678 #[serde(
1682 rename = "name",
1683 with = "::buffa::json_helpers::proto_string",
1684 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1685 )]
1686 pub name: ::buffa::alloc::string::String,
1687 #[serde(
1691 rename = "include_browse",
1692 alias = "includeBrowse",
1693 skip_serializing_if = "::core::option::Option::is_none"
1694 )]
1695 pub include_browse: ::core::option::Option<bool>,
1696 #[serde(skip)]
1697 #[doc(hidden)]
1698 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1699}
1700impl ::core::fmt::Debug for GetVolumeRequest {
1701 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1702 f.debug_struct("GetVolumeRequest")
1703 .field("name", &self.name)
1704 .field("include_browse", &self.include_browse)
1705 .finish()
1706 }
1707}
1708impl GetVolumeRequest {
1709 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.GetVolumeRequest";
1714}
1715impl GetVolumeRequest {
1716 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1717 #[inline]
1718 pub fn with_include_browse(mut self, value: bool) -> Self {
1720 self.include_browse = Some(value);
1721 self
1722 }
1723}
1724impl ::buffa::DefaultInstance for GetVolumeRequest {
1725 fn default_instance() -> &'static Self {
1726 static VALUE: ::buffa::__private::OnceBox<GetVolumeRequest> = ::buffa::__private::OnceBox::new();
1727 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1728 }
1729}
1730impl ::buffa::MessageName for GetVolumeRequest {
1731 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
1732 const NAME: &'static str = "GetVolumeRequest";
1733 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.GetVolumeRequest";
1734 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.GetVolumeRequest";
1735}
1736impl ::buffa::Message for GetVolumeRequest {
1737 #[allow(clippy::let_and_return)]
1743 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1744 #[allow(unused_imports)]
1745 use ::buffa::Enumeration as _;
1746 let mut size = 0u32;
1747 if !self.name.is_empty() {
1748 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1749 }
1750 if self.include_browse.is_some() {
1751 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1752 }
1753 size += self.__buffa_unknown_fields.encoded_len() as u32;
1754 size
1755 }
1756 fn write_to(
1757 &self,
1758 _cache: &mut ::buffa::SizeCache,
1759 buf: &mut impl ::buffa::bytes::BufMut,
1760 ) {
1761 #[allow(unused_imports)]
1762 use ::buffa::Enumeration as _;
1763 if !self.name.is_empty() {
1764 ::buffa::encoding::Tag::new(
1765 1u32,
1766 ::buffa::encoding::WireType::LengthDelimited,
1767 )
1768 .encode(buf);
1769 ::buffa::types::encode_string(&self.name, buf);
1770 }
1771 if let Some(v) = self.include_browse {
1772 ::buffa::encoding::Tag::new(1005u32, ::buffa::encoding::WireType::Varint)
1773 .encode(buf);
1774 ::buffa::types::encode_bool(v, buf);
1775 }
1776 self.__buffa_unknown_fields.write_to(buf);
1777 }
1778 fn merge_field(
1779 &mut self,
1780 tag: ::buffa::encoding::Tag,
1781 buf: &mut impl ::buffa::bytes::Buf,
1782 depth: u32,
1783 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1784 #[allow(unused_imports)]
1785 use ::buffa::bytes::Buf as _;
1786 #[allow(unused_imports)]
1787 use ::buffa::Enumeration as _;
1788 match tag.field_number() {
1789 1u32 => {
1790 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1791 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1792 field_number: 1u32,
1793 expected: 2u8,
1794 actual: tag.wire_type() as u8,
1795 });
1796 }
1797 ::buffa::types::merge_string(&mut self.name, buf)?;
1798 }
1799 1005u32 => {
1800 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1801 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1802 field_number: 1005u32,
1803 expected: 0u8,
1804 actual: tag.wire_type() as u8,
1805 });
1806 }
1807 self.include_browse = ::core::option::Option::Some(
1808 ::buffa::types::decode_bool(buf)?,
1809 );
1810 }
1811 _ => {
1812 self.__buffa_unknown_fields
1813 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1814 }
1815 }
1816 ::core::result::Result::Ok(())
1817 }
1818 fn clear(&mut self) {
1819 self.name.clear();
1820 self.include_browse = ::core::option::Option::None;
1821 self.__buffa_unknown_fields.clear();
1822 }
1823}
1824impl ::buffa::ExtensionSet for GetVolumeRequest {
1825 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.GetVolumeRequest";
1826 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1827 &self.__buffa_unknown_fields
1828 }
1829 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1830 &mut self.__buffa_unknown_fields
1831 }
1832}
1833impl ::buffa::json_helpers::ProtoElemJson for GetVolumeRequest {
1834 fn serialize_proto_json<S: ::serde::Serializer>(
1835 v: &Self,
1836 s: S,
1837 ) -> ::core::result::Result<S::Ok, S::Error> {
1838 ::serde::Serialize::serialize(v, s)
1839 }
1840 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1841 d: D,
1842 ) -> ::core::result::Result<Self, D::Error> {
1843 <Self as ::serde::Deserialize>::deserialize(d)
1844 }
1845}
1846#[doc(hidden)]
1847pub const __GET_VOLUME_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1848 type_url: "type.googleapis.com/unitycatalog.volumes.v1.GetVolumeRequest",
1849 to_json: ::buffa::type_registry::any_to_json::<GetVolumeRequest>,
1850 from_json: ::buffa::type_registry::any_from_json::<GetVolumeRequest>,
1851 is_wkt: false,
1852};
1853#[derive(Clone, PartialEq, Default)]
1854#[derive(::serde::Serialize, ::serde::Deserialize)]
1855#[serde(default)]
1856pub struct UpdateVolumeRequest {
1857 #[serde(
1861 rename = "name",
1862 with = "::buffa::json_helpers::proto_string",
1863 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1864 )]
1865 pub name: ::buffa::alloc::string::String,
1866 #[serde(
1870 rename = "new_name",
1871 alias = "newName",
1872 skip_serializing_if = "::core::option::Option::is_none"
1873 )]
1874 pub new_name: ::core::option::Option<::buffa::alloc::string::String>,
1875 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1879 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1880 #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
1884 pub owner: ::core::option::Option<::buffa::alloc::string::String>,
1885 #[serde(skip)]
1886 #[doc(hidden)]
1887 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1888}
1889impl ::core::fmt::Debug for UpdateVolumeRequest {
1890 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1891 f.debug_struct("UpdateVolumeRequest")
1892 .field("name", &self.name)
1893 .field("new_name", &self.new_name)
1894 .field("comment", &self.comment)
1895 .field("owner", &self.owner)
1896 .finish()
1897 }
1898}
1899impl UpdateVolumeRequest {
1900 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.UpdateVolumeRequest";
1905}
1906impl UpdateVolumeRequest {
1907 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1908 #[inline]
1909 pub fn with_new_name(
1911 mut self,
1912 value: impl Into<::buffa::alloc::string::String>,
1913 ) -> Self {
1914 self.new_name = Some(value.into());
1915 self
1916 }
1917 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1918 #[inline]
1919 pub fn with_comment(
1921 mut self,
1922 value: impl Into<::buffa::alloc::string::String>,
1923 ) -> Self {
1924 self.comment = Some(value.into());
1925 self
1926 }
1927 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1928 #[inline]
1929 pub fn with_owner(
1931 mut self,
1932 value: impl Into<::buffa::alloc::string::String>,
1933 ) -> Self {
1934 self.owner = Some(value.into());
1935 self
1936 }
1937}
1938impl ::buffa::DefaultInstance for UpdateVolumeRequest {
1939 fn default_instance() -> &'static Self {
1940 static VALUE: ::buffa::__private::OnceBox<UpdateVolumeRequest> = ::buffa::__private::OnceBox::new();
1941 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1942 }
1943}
1944impl ::buffa::MessageName for UpdateVolumeRequest {
1945 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
1946 const NAME: &'static str = "UpdateVolumeRequest";
1947 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.UpdateVolumeRequest";
1948 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.UpdateVolumeRequest";
1949}
1950impl ::buffa::Message for UpdateVolumeRequest {
1951 #[allow(clippy::let_and_return)]
1957 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1958 #[allow(unused_imports)]
1959 use ::buffa::Enumeration as _;
1960 let mut size = 0u32;
1961 if !self.name.is_empty() {
1962 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1963 }
1964 if let Some(ref v) = self.new_name {
1965 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1966 }
1967 if let Some(ref v) = self.comment {
1968 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1969 }
1970 if let Some(ref v) = self.owner {
1971 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1972 }
1973 size += self.__buffa_unknown_fields.encoded_len() as u32;
1974 size
1975 }
1976 fn write_to(
1977 &self,
1978 _cache: &mut ::buffa::SizeCache,
1979 buf: &mut impl ::buffa::bytes::BufMut,
1980 ) {
1981 #[allow(unused_imports)]
1982 use ::buffa::Enumeration as _;
1983 if !self.name.is_empty() {
1984 ::buffa::encoding::Tag::new(
1985 1u32,
1986 ::buffa::encoding::WireType::LengthDelimited,
1987 )
1988 .encode(buf);
1989 ::buffa::types::encode_string(&self.name, buf);
1990 }
1991 if let Some(ref v) = self.new_name {
1992 ::buffa::encoding::Tag::new(
1993 2u32,
1994 ::buffa::encoding::WireType::LengthDelimited,
1995 )
1996 .encode(buf);
1997 ::buffa::types::encode_string(v, buf);
1998 }
1999 if let Some(ref v) = self.comment {
2000 ::buffa::encoding::Tag::new(
2001 3u32,
2002 ::buffa::encoding::WireType::LengthDelimited,
2003 )
2004 .encode(buf);
2005 ::buffa::types::encode_string(v, buf);
2006 }
2007 if let Some(ref v) = self.owner {
2008 ::buffa::encoding::Tag::new(
2009 4u32,
2010 ::buffa::encoding::WireType::LengthDelimited,
2011 )
2012 .encode(buf);
2013 ::buffa::types::encode_string(v, buf);
2014 }
2015 self.__buffa_unknown_fields.write_to(buf);
2016 }
2017 fn merge_field(
2018 &mut self,
2019 tag: ::buffa::encoding::Tag,
2020 buf: &mut impl ::buffa::bytes::Buf,
2021 depth: u32,
2022 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2023 #[allow(unused_imports)]
2024 use ::buffa::bytes::Buf as _;
2025 #[allow(unused_imports)]
2026 use ::buffa::Enumeration as _;
2027 match tag.field_number() {
2028 1u32 => {
2029 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2030 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2031 field_number: 1u32,
2032 expected: 2u8,
2033 actual: tag.wire_type() as u8,
2034 });
2035 }
2036 ::buffa::types::merge_string(&mut self.name, buf)?;
2037 }
2038 2u32 => {
2039 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2040 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2041 field_number: 2u32,
2042 expected: 2u8,
2043 actual: tag.wire_type() as u8,
2044 });
2045 }
2046 ::buffa::types::merge_string(
2047 self
2048 .new_name
2049 .get_or_insert_with(::buffa::alloc::string::String::new),
2050 buf,
2051 )?;
2052 }
2053 3u32 => {
2054 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2055 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2056 field_number: 3u32,
2057 expected: 2u8,
2058 actual: tag.wire_type() as u8,
2059 });
2060 }
2061 ::buffa::types::merge_string(
2062 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
2063 buf,
2064 )?;
2065 }
2066 4u32 => {
2067 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2068 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2069 field_number: 4u32,
2070 expected: 2u8,
2071 actual: tag.wire_type() as u8,
2072 });
2073 }
2074 ::buffa::types::merge_string(
2075 self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
2076 buf,
2077 )?;
2078 }
2079 _ => {
2080 self.__buffa_unknown_fields
2081 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2082 }
2083 }
2084 ::core::result::Result::Ok(())
2085 }
2086 fn clear(&mut self) {
2087 self.name.clear();
2088 self.new_name = ::core::option::Option::None;
2089 self.comment = ::core::option::Option::None;
2090 self.owner = ::core::option::Option::None;
2091 self.__buffa_unknown_fields.clear();
2092 }
2093}
2094impl ::buffa::ExtensionSet for UpdateVolumeRequest {
2095 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.UpdateVolumeRequest";
2096 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2097 &self.__buffa_unknown_fields
2098 }
2099 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2100 &mut self.__buffa_unknown_fields
2101 }
2102}
2103impl ::buffa::json_helpers::ProtoElemJson for UpdateVolumeRequest {
2104 fn serialize_proto_json<S: ::serde::Serializer>(
2105 v: &Self,
2106 s: S,
2107 ) -> ::core::result::Result<S::Ok, S::Error> {
2108 ::serde::Serialize::serialize(v, s)
2109 }
2110 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2111 d: D,
2112 ) -> ::core::result::Result<Self, D::Error> {
2113 <Self as ::serde::Deserialize>::deserialize(d)
2114 }
2115}
2116#[doc(hidden)]
2117pub const __UPDATE_VOLUME_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2118 type_url: "type.googleapis.com/unitycatalog.volumes.v1.UpdateVolumeRequest",
2119 to_json: ::buffa::type_registry::any_to_json::<UpdateVolumeRequest>,
2120 from_json: ::buffa::type_registry::any_from_json::<UpdateVolumeRequest>,
2121 is_wkt: false,
2122};
2123#[derive(Clone, PartialEq, Default)]
2124#[derive(::serde::Serialize, ::serde::Deserialize)]
2125#[serde(default)]
2126pub struct DeleteVolumeRequest {
2127 #[serde(
2131 rename = "name",
2132 with = "::buffa::json_helpers::proto_string",
2133 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2134 )]
2135 pub name: ::buffa::alloc::string::String,
2136 #[serde(skip)]
2137 #[doc(hidden)]
2138 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2139}
2140impl ::core::fmt::Debug for DeleteVolumeRequest {
2141 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2142 f.debug_struct("DeleteVolumeRequest").field("name", &self.name).finish()
2143 }
2144}
2145impl DeleteVolumeRequest {
2146 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.DeleteVolumeRequest";
2151}
2152impl ::buffa::DefaultInstance for DeleteVolumeRequest {
2153 fn default_instance() -> &'static Self {
2154 static VALUE: ::buffa::__private::OnceBox<DeleteVolumeRequest> = ::buffa::__private::OnceBox::new();
2155 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2156 }
2157}
2158impl ::buffa::MessageName for DeleteVolumeRequest {
2159 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
2160 const NAME: &'static str = "DeleteVolumeRequest";
2161 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.DeleteVolumeRequest";
2162 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.DeleteVolumeRequest";
2163}
2164impl ::buffa::Message for DeleteVolumeRequest {
2165 #[allow(clippy::let_and_return)]
2171 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2172 #[allow(unused_imports)]
2173 use ::buffa::Enumeration as _;
2174 let mut size = 0u32;
2175 if !self.name.is_empty() {
2176 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2177 }
2178 size += self.__buffa_unknown_fields.encoded_len() as u32;
2179 size
2180 }
2181 fn write_to(
2182 &self,
2183 _cache: &mut ::buffa::SizeCache,
2184 buf: &mut impl ::buffa::bytes::BufMut,
2185 ) {
2186 #[allow(unused_imports)]
2187 use ::buffa::Enumeration as _;
2188 if !self.name.is_empty() {
2189 ::buffa::encoding::Tag::new(
2190 1u32,
2191 ::buffa::encoding::WireType::LengthDelimited,
2192 )
2193 .encode(buf);
2194 ::buffa::types::encode_string(&self.name, buf);
2195 }
2196 self.__buffa_unknown_fields.write_to(buf);
2197 }
2198 fn merge_field(
2199 &mut self,
2200 tag: ::buffa::encoding::Tag,
2201 buf: &mut impl ::buffa::bytes::Buf,
2202 depth: u32,
2203 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2204 #[allow(unused_imports)]
2205 use ::buffa::bytes::Buf as _;
2206 #[allow(unused_imports)]
2207 use ::buffa::Enumeration as _;
2208 match tag.field_number() {
2209 1u32 => {
2210 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2211 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2212 field_number: 1u32,
2213 expected: 2u8,
2214 actual: tag.wire_type() as u8,
2215 });
2216 }
2217 ::buffa::types::merge_string(&mut self.name, buf)?;
2218 }
2219 _ => {
2220 self.__buffa_unknown_fields
2221 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2222 }
2223 }
2224 ::core::result::Result::Ok(())
2225 }
2226 fn clear(&mut self) {
2227 self.name.clear();
2228 self.__buffa_unknown_fields.clear();
2229 }
2230}
2231impl ::buffa::ExtensionSet for DeleteVolumeRequest {
2232 const PROTO_FQN: &'static str = "unitycatalog.volumes.v1.DeleteVolumeRequest";
2233 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2234 &self.__buffa_unknown_fields
2235 }
2236 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2237 &mut self.__buffa_unknown_fields
2238 }
2239}
2240impl ::buffa::json_helpers::ProtoElemJson for DeleteVolumeRequest {
2241 fn serialize_proto_json<S: ::serde::Serializer>(
2242 v: &Self,
2243 s: S,
2244 ) -> ::core::result::Result<S::Ok, S::Error> {
2245 ::serde::Serialize::serialize(v, s)
2246 }
2247 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2248 d: D,
2249 ) -> ::core::result::Result<Self, D::Error> {
2250 <Self as ::serde::Deserialize>::deserialize(d)
2251 }
2252}
2253#[doc(hidden)]
2254pub const __DELETE_VOLUME_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2255 type_url: "type.googleapis.com/unitycatalog.volumes.v1.DeleteVolumeRequest",
2256 to_json: ::buffa::type_registry::any_to_json::<DeleteVolumeRequest>,
2257 from_json: ::buffa::type_registry::any_from_json::<DeleteVolumeRequest>,
2258 is_wkt: false,
2259};
2260#[allow(
2261 non_camel_case_types,
2262 dead_code,
2263 unused_imports,
2264 unused_qualifications,
2265 clippy::derivable_impls,
2266 clippy::match_single_binding,
2267 clippy::uninlined_format_args,
2268 clippy::doc_lazy_continuation,
2269 clippy::module_inception
2270)]
2271pub mod __buffa {
2272 #[allow(unused_imports)]
2273 use super::*;
2274 pub mod view {
2275 #[allow(unused_imports)]
2276 use super::*;
2277 #[derive(Clone, Debug, Default)]
2278 pub struct VolumeView<'a> {
2279 pub name: &'a str,
2283 pub catalog_name: &'a str,
2287 pub schema_name: &'a str,
2291 pub full_name: &'a str,
2295 pub storage_location: &'a str,
2299 pub volume_id: &'a str,
2303 pub volume_type: ::buffa::EnumValue<super::super::VolumeType>,
2311 pub owner: ::core::option::Option<&'a str>,
2315 pub comment: ::core::option::Option<&'a str>,
2319 pub created_at: ::core::option::Option<i64>,
2323 pub created_by: ::core::option::Option<&'a str>,
2327 pub updated_at: ::core::option::Option<i64>,
2331 pub updated_by: ::core::option::Option<&'a str>,
2335 pub browse_only: ::core::option::Option<bool>,
2341 pub metastore_id: ::core::option::Option<&'a str>,
2345 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2346 }
2347 impl<'a> VolumeView<'a> {
2348 #[doc(hidden)]
2356 pub fn _decode_depth(
2357 buf: &'a [u8],
2358 depth: u32,
2359 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2360 let mut view = Self::default();
2361 view._merge_into_view(buf, depth)?;
2362 ::core::result::Result::Ok(view)
2363 }
2364 #[doc(hidden)]
2372 pub fn _merge_into_view(
2373 &mut self,
2374 buf: &'a [u8],
2375 depth: u32,
2376 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2377 let _ = depth;
2378 #[allow(unused_variables)]
2379 let view = self;
2380 let mut cur: &'a [u8] = buf;
2381 while !cur.is_empty() {
2382 let before_tag = cur;
2383 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
2384 match tag.field_number() {
2385 1u32 => {
2386 if tag.wire_type()
2387 != ::buffa::encoding::WireType::LengthDelimited
2388 {
2389 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2390 field_number: 1u32,
2391 expected: 2u8,
2392 actual: tag.wire_type() as u8,
2393 });
2394 }
2395 view.name = ::buffa::types::borrow_str(&mut cur)?;
2396 }
2397 2u32 => {
2398 if tag.wire_type()
2399 != ::buffa::encoding::WireType::LengthDelimited
2400 {
2401 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2402 field_number: 2u32,
2403 expected: 2u8,
2404 actual: tag.wire_type() as u8,
2405 });
2406 }
2407 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
2408 }
2409 3u32 => {
2410 if tag.wire_type()
2411 != ::buffa::encoding::WireType::LengthDelimited
2412 {
2413 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2414 field_number: 3u32,
2415 expected: 2u8,
2416 actual: tag.wire_type() as u8,
2417 });
2418 }
2419 view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
2420 }
2421 4u32 => {
2422 if tag.wire_type()
2423 != ::buffa::encoding::WireType::LengthDelimited
2424 {
2425 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2426 field_number: 4u32,
2427 expected: 2u8,
2428 actual: tag.wire_type() as u8,
2429 });
2430 }
2431 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
2432 }
2433 5u32 => {
2434 if tag.wire_type()
2435 != ::buffa::encoding::WireType::LengthDelimited
2436 {
2437 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2438 field_number: 5u32,
2439 expected: 2u8,
2440 actual: tag.wire_type() as u8,
2441 });
2442 }
2443 view.storage_location = ::buffa::types::borrow_str(
2444 &mut cur,
2445 )?;
2446 }
2447 6u32 => {
2448 if tag.wire_type()
2449 != ::buffa::encoding::WireType::LengthDelimited
2450 {
2451 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2452 field_number: 6u32,
2453 expected: 2u8,
2454 actual: tag.wire_type() as u8,
2455 });
2456 }
2457 view.volume_id = ::buffa::types::borrow_str(&mut cur)?;
2458 }
2459 7u32 => {
2460 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2461 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2462 field_number: 7u32,
2463 expected: 0u8,
2464 actual: tag.wire_type() as u8,
2465 });
2466 }
2467 view.volume_type = ::buffa::EnumValue::from(
2468 ::buffa::types::decode_int32(&mut cur)?,
2469 );
2470 }
2471 8u32 => {
2472 if tag.wire_type()
2473 != ::buffa::encoding::WireType::LengthDelimited
2474 {
2475 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2476 field_number: 8u32,
2477 expected: 2u8,
2478 actual: tag.wire_type() as u8,
2479 });
2480 }
2481 view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
2482 }
2483 9u32 => {
2484 if tag.wire_type()
2485 != ::buffa::encoding::WireType::LengthDelimited
2486 {
2487 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2488 field_number: 9u32,
2489 expected: 2u8,
2490 actual: tag.wire_type() as u8,
2491 });
2492 }
2493 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
2494 }
2495 1000u32 => {
2496 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2497 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2498 field_number: 1000u32,
2499 expected: 0u8,
2500 actual: tag.wire_type() as u8,
2501 });
2502 }
2503 view.created_at = Some(
2504 ::buffa::types::decode_int64(&mut cur)?,
2505 );
2506 }
2507 1001u32 => {
2508 if tag.wire_type()
2509 != ::buffa::encoding::WireType::LengthDelimited
2510 {
2511 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2512 field_number: 1001u32,
2513 expected: 2u8,
2514 actual: tag.wire_type() as u8,
2515 });
2516 }
2517 view.created_by = Some(
2518 ::buffa::types::borrow_str(&mut cur)?,
2519 );
2520 }
2521 1002u32 => {
2522 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2523 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2524 field_number: 1002u32,
2525 expected: 0u8,
2526 actual: tag.wire_type() as u8,
2527 });
2528 }
2529 view.updated_at = Some(
2530 ::buffa::types::decode_int64(&mut cur)?,
2531 );
2532 }
2533 1003u32 => {
2534 if tag.wire_type()
2535 != ::buffa::encoding::WireType::LengthDelimited
2536 {
2537 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2538 field_number: 1003u32,
2539 expected: 2u8,
2540 actual: tag.wire_type() as u8,
2541 });
2542 }
2543 view.updated_by = Some(
2544 ::buffa::types::borrow_str(&mut cur)?,
2545 );
2546 }
2547 1004u32 => {
2548 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2549 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2550 field_number: 1004u32,
2551 expected: 0u8,
2552 actual: tag.wire_type() as u8,
2553 });
2554 }
2555 view.browse_only = Some(
2556 ::buffa::types::decode_bool(&mut cur)?,
2557 );
2558 }
2559 1005u32 => {
2560 if tag.wire_type()
2561 != ::buffa::encoding::WireType::LengthDelimited
2562 {
2563 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2564 field_number: 1005u32,
2565 expected: 2u8,
2566 actual: tag.wire_type() as u8,
2567 });
2568 }
2569 view.metastore_id = Some(
2570 ::buffa::types::borrow_str(&mut cur)?,
2571 );
2572 }
2573 _ => {
2574 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
2575 let span_len = before_tag.len() - cur.len();
2576 view.__buffa_unknown_fields
2577 .push_raw(&before_tag[..span_len]);
2578 }
2579 }
2580 }
2581 ::core::result::Result::Ok(())
2582 }
2583 }
2584 impl<'a> ::buffa::MessageView<'a> for VolumeView<'a> {
2585 type Owned = super::super::Volume;
2586 fn decode_view(
2587 buf: &'a [u8],
2588 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2589 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
2590 }
2591 fn decode_view_with_limit(
2592 buf: &'a [u8],
2593 depth: u32,
2594 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2595 Self::_decode_depth(buf, depth)
2596 }
2597 fn to_owned_message(&self) -> super::super::Volume {
2598 self.to_owned_from_source(None)
2599 }
2600 #[allow(clippy::useless_conversion, clippy::needless_update)]
2601 fn to_owned_from_source(
2602 &self,
2603 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2604 ) -> super::super::Volume {
2605 #[allow(unused_imports)]
2606 use ::buffa::alloc::string::ToString as _;
2607 let _ = __buffa_src;
2608 super::super::Volume {
2609 name: self.name.to_string(),
2610 catalog_name: self.catalog_name.to_string(),
2611 schema_name: self.schema_name.to_string(),
2612 full_name: self.full_name.to_string(),
2613 storage_location: self.storage_location.to_string(),
2614 volume_id: self.volume_id.to_string(),
2615 volume_type: self.volume_type,
2616 owner: self.owner.map(|s| s.to_string()),
2617 comment: self.comment.map(|s| s.to_string()),
2618 created_at: self.created_at,
2619 created_by: self.created_by.map(|s| s.to_string()),
2620 updated_at: self.updated_at,
2621 updated_by: self.updated_by.map(|s| s.to_string()),
2622 browse_only: self.browse_only,
2623 metastore_id: self.metastore_id.map(|s| s.to_string()),
2624 __buffa_unknown_fields: self
2625 .__buffa_unknown_fields
2626 .to_owned()
2627 .unwrap_or_default()
2628 .into(),
2629 ..::core::default::Default::default()
2630 }
2631 }
2632 }
2633 impl<'a> ::buffa::ViewEncode<'a> for VolumeView<'a> {
2634 #[allow(clippy::needless_borrow, clippy::let_and_return)]
2635 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2636 #[allow(unused_imports)]
2637 use ::buffa::Enumeration as _;
2638 let mut size = 0u32;
2639 if !self.name.is_empty() {
2640 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2641 }
2642 if !self.catalog_name.is_empty() {
2643 size
2644 += 1u32
2645 + ::buffa::types::string_encoded_len(&self.catalog_name)
2646 as u32;
2647 }
2648 if !self.schema_name.is_empty() {
2649 size
2650 += 1u32
2651 + ::buffa::types::string_encoded_len(&self.schema_name)
2652 as u32;
2653 }
2654 if !self.full_name.is_empty() {
2655 size
2656 += 1u32
2657 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
2658 }
2659 if !self.storage_location.is_empty() {
2660 size
2661 += 1u32
2662 + ::buffa::types::string_encoded_len(&self.storage_location)
2663 as u32;
2664 }
2665 if !self.volume_id.is_empty() {
2666 size
2667 += 1u32
2668 + ::buffa::types::string_encoded_len(&self.volume_id) as u32;
2669 }
2670 {
2671 let val = self.volume_type.to_i32();
2672 if val != 0 {
2673 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2674 }
2675 }
2676 if let Some(ref v) = self.owner {
2677 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2678 }
2679 if let Some(ref v) = self.comment {
2680 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2681 }
2682 if let Some(v) = self.created_at {
2683 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2684 }
2685 if let Some(ref v) = self.created_by {
2686 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2687 }
2688 if let Some(v) = self.updated_at {
2689 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2690 }
2691 if let Some(ref v) = self.updated_by {
2692 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2693 }
2694 if self.browse_only.is_some() {
2695 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2696 }
2697 if let Some(ref v) = self.metastore_id {
2698 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2699 }
2700 size += self.__buffa_unknown_fields.encoded_len() as u32;
2701 size
2702 }
2703 #[allow(clippy::needless_borrow)]
2704 fn write_to(
2705 &self,
2706 _cache: &mut ::buffa::SizeCache,
2707 buf: &mut impl ::buffa::bytes::BufMut,
2708 ) {
2709 #[allow(unused_imports)]
2710 use ::buffa::Enumeration as _;
2711 if !self.name.is_empty() {
2712 ::buffa::encoding::Tag::new(
2713 1u32,
2714 ::buffa::encoding::WireType::LengthDelimited,
2715 )
2716 .encode(buf);
2717 ::buffa::types::encode_string(&self.name, buf);
2718 }
2719 if !self.catalog_name.is_empty() {
2720 ::buffa::encoding::Tag::new(
2721 2u32,
2722 ::buffa::encoding::WireType::LengthDelimited,
2723 )
2724 .encode(buf);
2725 ::buffa::types::encode_string(&self.catalog_name, buf);
2726 }
2727 if !self.schema_name.is_empty() {
2728 ::buffa::encoding::Tag::new(
2729 3u32,
2730 ::buffa::encoding::WireType::LengthDelimited,
2731 )
2732 .encode(buf);
2733 ::buffa::types::encode_string(&self.schema_name, buf);
2734 }
2735 if !self.full_name.is_empty() {
2736 ::buffa::encoding::Tag::new(
2737 4u32,
2738 ::buffa::encoding::WireType::LengthDelimited,
2739 )
2740 .encode(buf);
2741 ::buffa::types::encode_string(&self.full_name, buf);
2742 }
2743 if !self.storage_location.is_empty() {
2744 ::buffa::encoding::Tag::new(
2745 5u32,
2746 ::buffa::encoding::WireType::LengthDelimited,
2747 )
2748 .encode(buf);
2749 ::buffa::types::encode_string(&self.storage_location, buf);
2750 }
2751 if !self.volume_id.is_empty() {
2752 ::buffa::encoding::Tag::new(
2753 6u32,
2754 ::buffa::encoding::WireType::LengthDelimited,
2755 )
2756 .encode(buf);
2757 ::buffa::types::encode_string(&self.volume_id, buf);
2758 }
2759 {
2760 let val = self.volume_type.to_i32();
2761 if val != 0 {
2762 ::buffa::encoding::Tag::new(
2763 7u32,
2764 ::buffa::encoding::WireType::Varint,
2765 )
2766 .encode(buf);
2767 ::buffa::types::encode_int32(val, buf);
2768 }
2769 }
2770 if let Some(ref v) = self.owner {
2771 ::buffa::encoding::Tag::new(
2772 8u32,
2773 ::buffa::encoding::WireType::LengthDelimited,
2774 )
2775 .encode(buf);
2776 ::buffa::types::encode_string(v, buf);
2777 }
2778 if let Some(ref v) = self.comment {
2779 ::buffa::encoding::Tag::new(
2780 9u32,
2781 ::buffa::encoding::WireType::LengthDelimited,
2782 )
2783 .encode(buf);
2784 ::buffa::types::encode_string(v, buf);
2785 }
2786 if let Some(v) = self.created_at {
2787 ::buffa::encoding::Tag::new(
2788 1000u32,
2789 ::buffa::encoding::WireType::Varint,
2790 )
2791 .encode(buf);
2792 ::buffa::types::encode_int64(v, buf);
2793 }
2794 if let Some(ref v) = self.created_by {
2795 ::buffa::encoding::Tag::new(
2796 1001u32,
2797 ::buffa::encoding::WireType::LengthDelimited,
2798 )
2799 .encode(buf);
2800 ::buffa::types::encode_string(v, buf);
2801 }
2802 if let Some(v) = self.updated_at {
2803 ::buffa::encoding::Tag::new(
2804 1002u32,
2805 ::buffa::encoding::WireType::Varint,
2806 )
2807 .encode(buf);
2808 ::buffa::types::encode_int64(v, buf);
2809 }
2810 if let Some(ref v) = self.updated_by {
2811 ::buffa::encoding::Tag::new(
2812 1003u32,
2813 ::buffa::encoding::WireType::LengthDelimited,
2814 )
2815 .encode(buf);
2816 ::buffa::types::encode_string(v, buf);
2817 }
2818 if let Some(v) = self.browse_only {
2819 ::buffa::encoding::Tag::new(
2820 1004u32,
2821 ::buffa::encoding::WireType::Varint,
2822 )
2823 .encode(buf);
2824 ::buffa::types::encode_bool(v, buf);
2825 }
2826 if let Some(ref v) = self.metastore_id {
2827 ::buffa::encoding::Tag::new(
2828 1005u32,
2829 ::buffa::encoding::WireType::LengthDelimited,
2830 )
2831 .encode(buf);
2832 ::buffa::types::encode_string(v, buf);
2833 }
2834 self.__buffa_unknown_fields.write_to(buf);
2835 }
2836 }
2837 impl<'__a> ::serde::Serialize for VolumeView<'__a> {
2849 fn serialize<__S: ::serde::Serializer>(
2850 &self,
2851 __s: __S,
2852 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2853 use ::serde::ser::SerializeMap as _;
2854 let mut __map = __s.serialize_map(::core::option::Option::None)?;
2855 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
2856 __map.serialize_entry("name", self.name)?;
2857 }
2858 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
2859 __map.serialize_entry("catalog_name", self.catalog_name)?;
2860 }
2861 if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
2862 __map.serialize_entry("schema_name", self.schema_name)?;
2863 }
2864 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
2865 __map.serialize_entry("full_name", self.full_name)?;
2866 }
2867 if !::buffa::json_helpers::skip_if::is_empty_str(self.storage_location) {
2868 __map.serialize_entry("storage_location", self.storage_location)?;
2869 }
2870 if !::buffa::json_helpers::skip_if::is_empty_str(self.volume_id) {
2871 __map.serialize_entry("volume_id", self.volume_id)?;
2872 }
2873 if !::buffa::json_helpers::skip_if::is_default_enum_value(
2874 &self.volume_type,
2875 ) {
2876 __map.serialize_entry("volume_type", &self.volume_type)?;
2877 }
2878 if let ::core::option::Option::Some(__v) = self.owner {
2879 __map.serialize_entry("owner", __v)?;
2880 }
2881 if let ::core::option::Option::Some(__v) = self.comment {
2882 __map.serialize_entry("comment", __v)?;
2883 }
2884 if let ::core::option::Option::Some(__v) = self.created_at {
2885 struct _W(i64);
2886 impl ::serde::Serialize for _W {
2887 fn serialize<__S: ::serde::Serializer>(
2888 &self,
2889 __s: __S,
2890 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2891 ::buffa::json_helpers::int64::serialize(&self.0, __s)
2892 }
2893 }
2894 __map.serialize_entry("created_at", &_W(__v))?;
2895 }
2896 if let ::core::option::Option::Some(__v) = self.created_by {
2897 __map.serialize_entry("created_by", __v)?;
2898 }
2899 if let ::core::option::Option::Some(__v) = self.updated_at {
2900 struct _W(i64);
2901 impl ::serde::Serialize for _W {
2902 fn serialize<__S: ::serde::Serializer>(
2903 &self,
2904 __s: __S,
2905 ) -> ::core::result::Result<__S::Ok, __S::Error> {
2906 ::buffa::json_helpers::int64::serialize(&self.0, __s)
2907 }
2908 }
2909 __map.serialize_entry("updated_at", &_W(__v))?;
2910 }
2911 if let ::core::option::Option::Some(__v) = self.updated_by {
2912 __map.serialize_entry("updated_by", __v)?;
2913 }
2914 if let ::core::option::Option::Some(__v) = self.browse_only {
2915 __map.serialize_entry("browse_only", &__v)?;
2916 }
2917 if let ::core::option::Option::Some(__v) = self.metastore_id {
2918 __map.serialize_entry("metastore_id", __v)?;
2919 }
2920 __map.end()
2921 }
2922 }
2923 impl<'a> ::buffa::MessageName for VolumeView<'a> {
2924 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
2925 const NAME: &'static str = "Volume";
2926 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.Volume";
2927 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.Volume";
2928 }
2929 impl<'v> ::buffa::DefaultViewInstance for VolumeView<'v> {
2930 fn default_view_instance<'a>() -> &'a Self
2931 where
2932 Self: 'a,
2933 {
2934 static VALUE: ::buffa::__private::OnceBox<VolumeView<'static>> = ::buffa::__private::OnceBox::new();
2935 VALUE
2936 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
2937 <VolumeView<'static>>::default(),
2938 ))
2939 }
2940 }
2941 impl ::buffa::ViewReborrow for VolumeView<'static> {
2942 type Reborrowed<'b> = VolumeView<'b>;
2943 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
2944 this
2945 }
2946 }
2947 #[derive(Clone, Debug)]
2953 pub struct VolumeOwnedView(::buffa::OwnedView<VolumeView<'static>>);
2954 impl VolumeOwnedView {
2955 pub fn decode(
2965 bytes: ::buffa::bytes::Bytes,
2966 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2967 ::core::result::Result::Ok(
2968 VolumeOwnedView(::buffa::OwnedView::decode(bytes)?),
2969 )
2970 }
2971 pub fn decode_with_options(
2979 bytes: ::buffa::bytes::Bytes,
2980 opts: &::buffa::DecodeOptions,
2981 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2982 ::core::result::Result::Ok(
2983 VolumeOwnedView(
2984 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
2985 ),
2986 )
2987 }
2988 pub fn from_owned(
2995 msg: &super::super::Volume,
2996 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2997 ::core::result::Result::Ok(
2998 VolumeOwnedView(::buffa::OwnedView::from_owned(msg)?),
2999 )
3000 }
3001 #[must_use]
3003 pub fn view(&self) -> &VolumeView<'_> {
3004 self.0.reborrow()
3005 }
3006 #[must_use]
3008 pub fn to_owned_message(&self) -> super::super::Volume {
3009 self.0.to_owned_message()
3010 }
3011 #[must_use]
3013 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3014 self.0.bytes()
3015 }
3016 #[must_use]
3018 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3019 self.0.into_bytes()
3020 }
3021 #[must_use]
3025 pub fn name(&self) -> &'_ str {
3026 self.0.reborrow().name
3027 }
3028 #[must_use]
3032 pub fn catalog_name(&self) -> &'_ str {
3033 self.0.reborrow().catalog_name
3034 }
3035 #[must_use]
3039 pub fn schema_name(&self) -> &'_ str {
3040 self.0.reborrow().schema_name
3041 }
3042 #[must_use]
3046 pub fn full_name(&self) -> &'_ str {
3047 self.0.reborrow().full_name
3048 }
3049 #[must_use]
3053 pub fn storage_location(&self) -> &'_ str {
3054 self.0.reborrow().storage_location
3055 }
3056 #[must_use]
3060 pub fn volume_id(&self) -> &'_ str {
3061 self.0.reborrow().volume_id
3062 }
3063 #[must_use]
3071 pub fn volume_type(&self) -> ::buffa::EnumValue<super::super::VolumeType> {
3072 self.0.reborrow().volume_type
3073 }
3074 #[must_use]
3078 pub fn owner(&self) -> ::core::option::Option<&'_ str> {
3079 self.0.reborrow().owner
3080 }
3081 #[must_use]
3085 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
3086 self.0.reborrow().comment
3087 }
3088 #[must_use]
3092 pub fn created_at(&self) -> ::core::option::Option<i64> {
3093 self.0.reborrow().created_at
3094 }
3095 #[must_use]
3099 pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
3100 self.0.reborrow().created_by
3101 }
3102 #[must_use]
3106 pub fn updated_at(&self) -> ::core::option::Option<i64> {
3107 self.0.reborrow().updated_at
3108 }
3109 #[must_use]
3113 pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
3114 self.0.reborrow().updated_by
3115 }
3116 #[must_use]
3122 pub fn browse_only(&self) -> ::core::option::Option<bool> {
3123 self.0.reborrow().browse_only
3124 }
3125 #[must_use]
3129 pub fn metastore_id(&self) -> ::core::option::Option<&'_ str> {
3130 self.0.reborrow().metastore_id
3131 }
3132 }
3133 impl ::core::convert::From<::buffa::OwnedView<VolumeView<'static>>>
3134 for VolumeOwnedView {
3135 fn from(inner: ::buffa::OwnedView<VolumeView<'static>>) -> Self {
3136 VolumeOwnedView(inner)
3137 }
3138 }
3139 impl ::core::convert::From<VolumeOwnedView>
3140 for ::buffa::OwnedView<VolumeView<'static>> {
3141 fn from(wrapper: VolumeOwnedView) -> Self {
3142 wrapper.0
3143 }
3144 }
3145 impl ::core::convert::AsRef<::buffa::OwnedView<VolumeView<'static>>>
3146 for VolumeOwnedView {
3147 fn as_ref(&self) -> &::buffa::OwnedView<VolumeView<'static>> {
3148 &self.0
3149 }
3150 }
3151 impl ::buffa::HasMessageView for super::super::Volume {
3152 type View<'a> = VolumeView<'a>;
3153 type ViewHandle = VolumeOwnedView;
3154 }
3155 impl ::serde::Serialize for VolumeOwnedView {
3156 fn serialize<__S: ::serde::Serializer>(
3157 &self,
3158 __s: __S,
3159 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3160 ::serde::Serialize::serialize(&self.0, __s)
3161 }
3162 }
3163 #[derive(Clone, Debug, Default)]
3165 pub struct ListVolumesRequestView<'a> {
3166 pub catalog_name: &'a str,
3170 pub schema_name: &'a str,
3174 pub max_results: ::core::option::Option<i32>,
3178 pub page_token: ::core::option::Option<&'a str>,
3182 pub include_browse: ::core::option::Option<bool>,
3186 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3187 }
3188 impl<'a> ListVolumesRequestView<'a> {
3189 #[doc(hidden)]
3197 pub fn _decode_depth(
3198 buf: &'a [u8],
3199 depth: u32,
3200 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3201 let mut view = Self::default();
3202 view._merge_into_view(buf, depth)?;
3203 ::core::result::Result::Ok(view)
3204 }
3205 #[doc(hidden)]
3213 pub fn _merge_into_view(
3214 &mut self,
3215 buf: &'a [u8],
3216 depth: u32,
3217 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3218 let _ = depth;
3219 #[allow(unused_variables)]
3220 let view = self;
3221 let mut cur: &'a [u8] = buf;
3222 while !cur.is_empty() {
3223 let before_tag = cur;
3224 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3225 match tag.field_number() {
3226 1u32 => {
3227 if tag.wire_type()
3228 != ::buffa::encoding::WireType::LengthDelimited
3229 {
3230 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3231 field_number: 1u32,
3232 expected: 2u8,
3233 actual: tag.wire_type() as u8,
3234 });
3235 }
3236 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
3237 }
3238 2u32 => {
3239 if tag.wire_type()
3240 != ::buffa::encoding::WireType::LengthDelimited
3241 {
3242 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3243 field_number: 2u32,
3244 expected: 2u8,
3245 actual: tag.wire_type() as u8,
3246 });
3247 }
3248 view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
3249 }
3250 3u32 => {
3251 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3252 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3253 field_number: 3u32,
3254 expected: 0u8,
3255 actual: tag.wire_type() as u8,
3256 });
3257 }
3258 view.max_results = Some(
3259 ::buffa::types::decode_int32(&mut cur)?,
3260 );
3261 }
3262 4u32 => {
3263 if tag.wire_type()
3264 != ::buffa::encoding::WireType::LengthDelimited
3265 {
3266 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3267 field_number: 4u32,
3268 expected: 2u8,
3269 actual: tag.wire_type() as u8,
3270 });
3271 }
3272 view.page_token = Some(
3273 ::buffa::types::borrow_str(&mut cur)?,
3274 );
3275 }
3276 5u32 => {
3277 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3278 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3279 field_number: 5u32,
3280 expected: 0u8,
3281 actual: tag.wire_type() as u8,
3282 });
3283 }
3284 view.include_browse = Some(
3285 ::buffa::types::decode_bool(&mut cur)?,
3286 );
3287 }
3288 _ => {
3289 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3290 let span_len = before_tag.len() - cur.len();
3291 view.__buffa_unknown_fields
3292 .push_raw(&before_tag[..span_len]);
3293 }
3294 }
3295 }
3296 ::core::result::Result::Ok(())
3297 }
3298 }
3299 impl<'a> ::buffa::MessageView<'a> for ListVolumesRequestView<'a> {
3300 type Owned = super::super::ListVolumesRequest;
3301 fn decode_view(
3302 buf: &'a [u8],
3303 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3304 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3305 }
3306 fn decode_view_with_limit(
3307 buf: &'a [u8],
3308 depth: u32,
3309 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3310 Self::_decode_depth(buf, depth)
3311 }
3312 fn to_owned_message(&self) -> super::super::ListVolumesRequest {
3313 self.to_owned_from_source(None)
3314 }
3315 #[allow(clippy::useless_conversion, clippy::needless_update)]
3316 fn to_owned_from_source(
3317 &self,
3318 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3319 ) -> super::super::ListVolumesRequest {
3320 #[allow(unused_imports)]
3321 use ::buffa::alloc::string::ToString as _;
3322 let _ = __buffa_src;
3323 super::super::ListVolumesRequest {
3324 catalog_name: self.catalog_name.to_string(),
3325 schema_name: self.schema_name.to_string(),
3326 max_results: self.max_results,
3327 page_token: self.page_token.map(|s| s.to_string()),
3328 include_browse: self.include_browse,
3329 __buffa_unknown_fields: self
3330 .__buffa_unknown_fields
3331 .to_owned()
3332 .unwrap_or_default()
3333 .into(),
3334 ..::core::default::Default::default()
3335 }
3336 }
3337 }
3338 impl<'a> ::buffa::ViewEncode<'a> for ListVolumesRequestView<'a> {
3339 #[allow(clippy::needless_borrow, clippy::let_and_return)]
3340 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3341 #[allow(unused_imports)]
3342 use ::buffa::Enumeration as _;
3343 let mut size = 0u32;
3344 if !self.catalog_name.is_empty() {
3345 size
3346 += 1u32
3347 + ::buffa::types::string_encoded_len(&self.catalog_name)
3348 as u32;
3349 }
3350 if !self.schema_name.is_empty() {
3351 size
3352 += 1u32
3353 + ::buffa::types::string_encoded_len(&self.schema_name)
3354 as u32;
3355 }
3356 if let Some(v) = self.max_results {
3357 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3358 }
3359 if let Some(ref v) = self.page_token {
3360 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3361 }
3362 if self.include_browse.is_some() {
3363 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3364 }
3365 size += self.__buffa_unknown_fields.encoded_len() as u32;
3366 size
3367 }
3368 #[allow(clippy::needless_borrow)]
3369 fn write_to(
3370 &self,
3371 _cache: &mut ::buffa::SizeCache,
3372 buf: &mut impl ::buffa::bytes::BufMut,
3373 ) {
3374 #[allow(unused_imports)]
3375 use ::buffa::Enumeration as _;
3376 if !self.catalog_name.is_empty() {
3377 ::buffa::encoding::Tag::new(
3378 1u32,
3379 ::buffa::encoding::WireType::LengthDelimited,
3380 )
3381 .encode(buf);
3382 ::buffa::types::encode_string(&self.catalog_name, buf);
3383 }
3384 if !self.schema_name.is_empty() {
3385 ::buffa::encoding::Tag::new(
3386 2u32,
3387 ::buffa::encoding::WireType::LengthDelimited,
3388 )
3389 .encode(buf);
3390 ::buffa::types::encode_string(&self.schema_name, buf);
3391 }
3392 if let Some(v) = self.max_results {
3393 ::buffa::encoding::Tag::new(
3394 3u32,
3395 ::buffa::encoding::WireType::Varint,
3396 )
3397 .encode(buf);
3398 ::buffa::types::encode_int32(v, buf);
3399 }
3400 if let Some(ref v) = self.page_token {
3401 ::buffa::encoding::Tag::new(
3402 4u32,
3403 ::buffa::encoding::WireType::LengthDelimited,
3404 )
3405 .encode(buf);
3406 ::buffa::types::encode_string(v, buf);
3407 }
3408 if let Some(v) = self.include_browse {
3409 ::buffa::encoding::Tag::new(
3410 5u32,
3411 ::buffa::encoding::WireType::Varint,
3412 )
3413 .encode(buf);
3414 ::buffa::types::encode_bool(v, buf);
3415 }
3416 self.__buffa_unknown_fields.write_to(buf);
3417 }
3418 }
3419 impl<'__a> ::serde::Serialize for ListVolumesRequestView<'__a> {
3431 fn serialize<__S: ::serde::Serializer>(
3432 &self,
3433 __s: __S,
3434 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3435 use ::serde::ser::SerializeMap as _;
3436 let mut __map = __s.serialize_map(::core::option::Option::None)?;
3437 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
3438 __map.serialize_entry("catalog_name", self.catalog_name)?;
3439 }
3440 if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
3441 __map.serialize_entry("schema_name", self.schema_name)?;
3442 }
3443 if let ::core::option::Option::Some(__v) = self.max_results {
3444 struct _W(i32);
3445 impl ::serde::Serialize for _W {
3446 fn serialize<__S: ::serde::Serializer>(
3447 &self,
3448 __s: __S,
3449 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3450 ::buffa::json_helpers::int32::serialize(&self.0, __s)
3451 }
3452 }
3453 __map.serialize_entry("max_results", &_W(__v))?;
3454 }
3455 if let ::core::option::Option::Some(__v) = self.page_token {
3456 __map.serialize_entry("page_token", __v)?;
3457 }
3458 if let ::core::option::Option::Some(__v) = self.include_browse {
3459 __map.serialize_entry("include_browse", &__v)?;
3460 }
3461 __map.end()
3462 }
3463 }
3464 impl<'a> ::buffa::MessageName for ListVolumesRequestView<'a> {
3465 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
3466 const NAME: &'static str = "ListVolumesRequest";
3467 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.ListVolumesRequest";
3468 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesRequest";
3469 }
3470 impl<'v> ::buffa::DefaultViewInstance for ListVolumesRequestView<'v> {
3471 fn default_view_instance<'a>() -> &'a Self
3472 where
3473 Self: 'a,
3474 {
3475 static VALUE: ::buffa::__private::OnceBox<
3476 ListVolumesRequestView<'static>,
3477 > = ::buffa::__private::OnceBox::new();
3478 VALUE
3479 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3480 <ListVolumesRequestView<'static>>::default(),
3481 ))
3482 }
3483 }
3484 impl ::buffa::ViewReborrow for ListVolumesRequestView<'static> {
3485 type Reborrowed<'b> = ListVolumesRequestView<'b>;
3486 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3487 this
3488 }
3489 }
3490 #[derive(Clone, Debug)]
3496 pub struct ListVolumesRequestOwnedView(
3497 ::buffa::OwnedView<ListVolumesRequestView<'static>>,
3498 );
3499 impl ListVolumesRequestOwnedView {
3500 pub fn decode(
3510 bytes: ::buffa::bytes::Bytes,
3511 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3512 ::core::result::Result::Ok(
3513 ListVolumesRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
3514 )
3515 }
3516 pub fn decode_with_options(
3524 bytes: ::buffa::bytes::Bytes,
3525 opts: &::buffa::DecodeOptions,
3526 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3527 ::core::result::Result::Ok(
3528 ListVolumesRequestOwnedView(
3529 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3530 ),
3531 )
3532 }
3533 pub fn from_owned(
3540 msg: &super::super::ListVolumesRequest,
3541 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3542 ::core::result::Result::Ok(
3543 ListVolumesRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
3544 )
3545 }
3546 #[must_use]
3548 pub fn view(&self) -> &ListVolumesRequestView<'_> {
3549 self.0.reborrow()
3550 }
3551 #[must_use]
3553 pub fn to_owned_message(&self) -> super::super::ListVolumesRequest {
3554 self.0.to_owned_message()
3555 }
3556 #[must_use]
3558 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3559 self.0.bytes()
3560 }
3561 #[must_use]
3563 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3564 self.0.into_bytes()
3565 }
3566 #[must_use]
3570 pub fn catalog_name(&self) -> &'_ str {
3571 self.0.reborrow().catalog_name
3572 }
3573 #[must_use]
3577 pub fn schema_name(&self) -> &'_ str {
3578 self.0.reborrow().schema_name
3579 }
3580 #[must_use]
3584 pub fn max_results(&self) -> ::core::option::Option<i32> {
3585 self.0.reborrow().max_results
3586 }
3587 #[must_use]
3591 pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
3592 self.0.reborrow().page_token
3593 }
3594 #[must_use]
3598 pub fn include_browse(&self) -> ::core::option::Option<bool> {
3599 self.0.reborrow().include_browse
3600 }
3601 }
3602 impl ::core::convert::From<::buffa::OwnedView<ListVolumesRequestView<'static>>>
3603 for ListVolumesRequestOwnedView {
3604 fn from(inner: ::buffa::OwnedView<ListVolumesRequestView<'static>>) -> Self {
3605 ListVolumesRequestOwnedView(inner)
3606 }
3607 }
3608 impl ::core::convert::From<ListVolumesRequestOwnedView>
3609 for ::buffa::OwnedView<ListVolumesRequestView<'static>> {
3610 fn from(wrapper: ListVolumesRequestOwnedView) -> Self {
3611 wrapper.0
3612 }
3613 }
3614 impl ::core::convert::AsRef<::buffa::OwnedView<ListVolumesRequestView<'static>>>
3615 for ListVolumesRequestOwnedView {
3616 fn as_ref(&self) -> &::buffa::OwnedView<ListVolumesRequestView<'static>> {
3617 &self.0
3618 }
3619 }
3620 impl ::buffa::HasMessageView for super::super::ListVolumesRequest {
3621 type View<'a> = ListVolumesRequestView<'a>;
3622 type ViewHandle = ListVolumesRequestOwnedView;
3623 }
3624 impl ::serde::Serialize for ListVolumesRequestOwnedView {
3625 fn serialize<__S: ::serde::Serializer>(
3626 &self,
3627 __s: __S,
3628 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3629 ::serde::Serialize::serialize(&self.0, __s)
3630 }
3631 }
3632 #[derive(Clone, Debug, Default)]
3634 pub struct ListVolumesResponseView<'a> {
3635 pub volumes: ::buffa::RepeatedView<
3639 'a,
3640 super::super::__buffa::view::VolumeView<'a>,
3641 >,
3642 pub next_page_token: ::core::option::Option<&'a str>,
3649 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3650 }
3651 impl<'a> ListVolumesResponseView<'a> {
3652 #[doc(hidden)]
3660 pub fn _decode_depth(
3661 buf: &'a [u8],
3662 depth: u32,
3663 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3664 let mut view = Self::default();
3665 view._merge_into_view(buf, depth)?;
3666 ::core::result::Result::Ok(view)
3667 }
3668 #[doc(hidden)]
3676 pub fn _merge_into_view(
3677 &mut self,
3678 buf: &'a [u8],
3679 depth: u32,
3680 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3681 let _ = depth;
3682 #[allow(unused_variables)]
3683 let view = self;
3684 let mut cur: &'a [u8] = buf;
3685 while !cur.is_empty() {
3686 let before_tag = cur;
3687 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3688 match tag.field_number() {
3689 2u32 => {
3690 if tag.wire_type()
3691 != ::buffa::encoding::WireType::LengthDelimited
3692 {
3693 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3694 field_number: 2u32,
3695 expected: 2u8,
3696 actual: tag.wire_type() as u8,
3697 });
3698 }
3699 view.next_page_token = Some(
3700 ::buffa::types::borrow_str(&mut cur)?,
3701 );
3702 }
3703 1u32 => {
3704 if tag.wire_type()
3705 != ::buffa::encoding::WireType::LengthDelimited
3706 {
3707 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3708 field_number: 1u32,
3709 expected: 2u8,
3710 actual: tag.wire_type() as u8,
3711 });
3712 }
3713 if depth == 0 {
3714 return Err(::buffa::DecodeError::RecursionLimitExceeded);
3715 }
3716 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3717 view.volumes
3718 .push(
3719 super::super::__buffa::view::VolumeView::_decode_depth(
3720 sub,
3721 depth - 1,
3722 )?,
3723 );
3724 }
3725 _ => {
3726 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3727 let span_len = before_tag.len() - cur.len();
3728 view.__buffa_unknown_fields
3729 .push_raw(&before_tag[..span_len]);
3730 }
3731 }
3732 }
3733 ::core::result::Result::Ok(())
3734 }
3735 }
3736 impl<'a> ::buffa::MessageView<'a> for ListVolumesResponseView<'a> {
3737 type Owned = super::super::ListVolumesResponse;
3738 fn decode_view(
3739 buf: &'a [u8],
3740 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3741 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3742 }
3743 fn decode_view_with_limit(
3744 buf: &'a [u8],
3745 depth: u32,
3746 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3747 Self::_decode_depth(buf, depth)
3748 }
3749 fn to_owned_message(&self) -> super::super::ListVolumesResponse {
3750 self.to_owned_from_source(None)
3751 }
3752 #[allow(clippy::useless_conversion, clippy::needless_update)]
3753 fn to_owned_from_source(
3754 &self,
3755 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3756 ) -> super::super::ListVolumesResponse {
3757 #[allow(unused_imports)]
3758 use ::buffa::alloc::string::ToString as _;
3759 let _ = __buffa_src;
3760 super::super::ListVolumesResponse {
3761 volumes: self
3762 .volumes
3763 .iter()
3764 .map(|v| v.to_owned_from_source(__buffa_src))
3765 .collect(),
3766 next_page_token: self.next_page_token.map(|s| s.to_string()),
3767 __buffa_unknown_fields: self
3768 .__buffa_unknown_fields
3769 .to_owned()
3770 .unwrap_or_default()
3771 .into(),
3772 ..::core::default::Default::default()
3773 }
3774 }
3775 }
3776 impl<'a> ::buffa::ViewEncode<'a> for ListVolumesResponseView<'a> {
3777 #[allow(clippy::needless_borrow, clippy::let_and_return)]
3778 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3779 #[allow(unused_imports)]
3780 use ::buffa::Enumeration as _;
3781 let mut size = 0u32;
3782 for v in &self.volumes {
3783 let __slot = __cache.reserve();
3784 let inner_size = v.compute_size(__cache);
3785 __cache.set(__slot, inner_size);
3786 size
3787 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3788 + inner_size;
3789 }
3790 if let Some(ref v) = self.next_page_token {
3791 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3792 }
3793 size += self.__buffa_unknown_fields.encoded_len() as u32;
3794 size
3795 }
3796 #[allow(clippy::needless_borrow)]
3797 fn write_to(
3798 &self,
3799 __cache: &mut ::buffa::SizeCache,
3800 buf: &mut impl ::buffa::bytes::BufMut,
3801 ) {
3802 #[allow(unused_imports)]
3803 use ::buffa::Enumeration as _;
3804 for v in &self.volumes {
3805 ::buffa::encoding::Tag::new(
3806 1u32,
3807 ::buffa::encoding::WireType::LengthDelimited,
3808 )
3809 .encode(buf);
3810 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3811 v.write_to(__cache, buf);
3812 }
3813 if let Some(ref v) = self.next_page_token {
3814 ::buffa::encoding::Tag::new(
3815 2u32,
3816 ::buffa::encoding::WireType::LengthDelimited,
3817 )
3818 .encode(buf);
3819 ::buffa::types::encode_string(v, buf);
3820 }
3821 self.__buffa_unknown_fields.write_to(buf);
3822 }
3823 }
3824 impl<'__a> ::serde::Serialize for ListVolumesResponseView<'__a> {
3836 fn serialize<__S: ::serde::Serializer>(
3837 &self,
3838 __s: __S,
3839 ) -> ::core::result::Result<__S::Ok, __S::Error> {
3840 use ::serde::ser::SerializeMap as _;
3841 let mut __map = __s.serialize_map(::core::option::Option::None)?;
3842 if !self.volumes.is_empty() {
3843 __map.serialize_entry("volumes", &*self.volumes)?;
3844 }
3845 if let ::core::option::Option::Some(__v) = self.next_page_token {
3846 __map.serialize_entry("next_page_token", __v)?;
3847 }
3848 __map.end()
3849 }
3850 }
3851 impl<'a> ::buffa::MessageName for ListVolumesResponseView<'a> {
3852 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
3853 const NAME: &'static str = "ListVolumesResponse";
3854 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.ListVolumesResponse";
3855 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.ListVolumesResponse";
3856 }
3857 impl<'v> ::buffa::DefaultViewInstance for ListVolumesResponseView<'v> {
3858 fn default_view_instance<'a>() -> &'a Self
3859 where
3860 Self: 'a,
3861 {
3862 static VALUE: ::buffa::__private::OnceBox<
3863 ListVolumesResponseView<'static>,
3864 > = ::buffa::__private::OnceBox::new();
3865 VALUE
3866 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3867 <ListVolumesResponseView<'static>>::default(),
3868 ))
3869 }
3870 }
3871 impl ::buffa::ViewReborrow for ListVolumesResponseView<'static> {
3872 type Reborrowed<'b> = ListVolumesResponseView<'b>;
3873 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3874 this
3875 }
3876 }
3877 #[derive(Clone, Debug)]
3883 pub struct ListVolumesResponseOwnedView(
3884 ::buffa::OwnedView<ListVolumesResponseView<'static>>,
3885 );
3886 impl ListVolumesResponseOwnedView {
3887 pub fn decode(
3897 bytes: ::buffa::bytes::Bytes,
3898 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3899 ::core::result::Result::Ok(
3900 ListVolumesResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
3901 )
3902 }
3903 pub fn decode_with_options(
3911 bytes: ::buffa::bytes::Bytes,
3912 opts: &::buffa::DecodeOptions,
3913 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3914 ::core::result::Result::Ok(
3915 ListVolumesResponseOwnedView(
3916 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3917 ),
3918 )
3919 }
3920 pub fn from_owned(
3927 msg: &super::super::ListVolumesResponse,
3928 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3929 ::core::result::Result::Ok(
3930 ListVolumesResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
3931 )
3932 }
3933 #[must_use]
3935 pub fn view(&self) -> &ListVolumesResponseView<'_> {
3936 self.0.reborrow()
3937 }
3938 #[must_use]
3940 pub fn to_owned_message(&self) -> super::super::ListVolumesResponse {
3941 self.0.to_owned_message()
3942 }
3943 #[must_use]
3945 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3946 self.0.bytes()
3947 }
3948 #[must_use]
3950 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3951 self.0.into_bytes()
3952 }
3953 #[must_use]
3957 pub fn volumes(
3958 &self,
3959 ) -> &::buffa::RepeatedView<
3960 '_,
3961 super::super::__buffa::view::VolumeView<'_>,
3962 > {
3963 &self.0.reborrow().volumes
3964 }
3965 #[must_use]
3972 pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
3973 self.0.reborrow().next_page_token
3974 }
3975 }
3976 impl ::core::convert::From<::buffa::OwnedView<ListVolumesResponseView<'static>>>
3977 for ListVolumesResponseOwnedView {
3978 fn from(
3979 inner: ::buffa::OwnedView<ListVolumesResponseView<'static>>,
3980 ) -> Self {
3981 ListVolumesResponseOwnedView(inner)
3982 }
3983 }
3984 impl ::core::convert::From<ListVolumesResponseOwnedView>
3985 for ::buffa::OwnedView<ListVolumesResponseView<'static>> {
3986 fn from(wrapper: ListVolumesResponseOwnedView) -> Self {
3987 wrapper.0
3988 }
3989 }
3990 impl ::core::convert::AsRef<::buffa::OwnedView<ListVolumesResponseView<'static>>>
3991 for ListVolumesResponseOwnedView {
3992 fn as_ref(&self) -> &::buffa::OwnedView<ListVolumesResponseView<'static>> {
3993 &self.0
3994 }
3995 }
3996 impl ::buffa::HasMessageView for super::super::ListVolumesResponse {
3997 type View<'a> = ListVolumesResponseView<'a>;
3998 type ViewHandle = ListVolumesResponseOwnedView;
3999 }
4000 impl ::serde::Serialize for ListVolumesResponseOwnedView {
4001 fn serialize<__S: ::serde::Serializer>(
4002 &self,
4003 __s: __S,
4004 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4005 ::serde::Serialize::serialize(&self.0, __s)
4006 }
4007 }
4008 #[derive(Clone, Debug, Default)]
4010 pub struct CreateVolumeRequestView<'a> {
4011 pub catalog_name: &'a str,
4015 pub schema_name: &'a str,
4019 pub name: &'a str,
4023 pub volume_type: ::buffa::EnumValue<super::super::VolumeType>,
4031 pub storage_location: ::core::option::Option<&'a str>,
4035 pub comment: ::core::option::Option<&'a str>,
4039 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4040 }
4041 impl<'a> CreateVolumeRequestView<'a> {
4042 #[doc(hidden)]
4050 pub fn _decode_depth(
4051 buf: &'a [u8],
4052 depth: u32,
4053 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4054 let mut view = Self::default();
4055 view._merge_into_view(buf, depth)?;
4056 ::core::result::Result::Ok(view)
4057 }
4058 #[doc(hidden)]
4066 pub fn _merge_into_view(
4067 &mut self,
4068 buf: &'a [u8],
4069 depth: u32,
4070 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4071 let _ = depth;
4072 #[allow(unused_variables)]
4073 let view = self;
4074 let mut cur: &'a [u8] = buf;
4075 while !cur.is_empty() {
4076 let before_tag = cur;
4077 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4078 match tag.field_number() {
4079 1u32 => {
4080 if tag.wire_type()
4081 != ::buffa::encoding::WireType::LengthDelimited
4082 {
4083 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4084 field_number: 1u32,
4085 expected: 2u8,
4086 actual: tag.wire_type() as u8,
4087 });
4088 }
4089 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
4090 }
4091 2u32 => {
4092 if tag.wire_type()
4093 != ::buffa::encoding::WireType::LengthDelimited
4094 {
4095 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4096 field_number: 2u32,
4097 expected: 2u8,
4098 actual: tag.wire_type() as u8,
4099 });
4100 }
4101 view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
4102 }
4103 3u32 => {
4104 if tag.wire_type()
4105 != ::buffa::encoding::WireType::LengthDelimited
4106 {
4107 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4108 field_number: 3u32,
4109 expected: 2u8,
4110 actual: tag.wire_type() as u8,
4111 });
4112 }
4113 view.name = ::buffa::types::borrow_str(&mut cur)?;
4114 }
4115 4u32 => {
4116 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4117 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4118 field_number: 4u32,
4119 expected: 0u8,
4120 actual: tag.wire_type() as u8,
4121 });
4122 }
4123 view.volume_type = ::buffa::EnumValue::from(
4124 ::buffa::types::decode_int32(&mut cur)?,
4125 );
4126 }
4127 5u32 => {
4128 if tag.wire_type()
4129 != ::buffa::encoding::WireType::LengthDelimited
4130 {
4131 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4132 field_number: 5u32,
4133 expected: 2u8,
4134 actual: tag.wire_type() as u8,
4135 });
4136 }
4137 view.storage_location = Some(
4138 ::buffa::types::borrow_str(&mut cur)?,
4139 );
4140 }
4141 6u32 => {
4142 if tag.wire_type()
4143 != ::buffa::encoding::WireType::LengthDelimited
4144 {
4145 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4146 field_number: 6u32,
4147 expected: 2u8,
4148 actual: tag.wire_type() as u8,
4149 });
4150 }
4151 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4152 }
4153 _ => {
4154 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4155 let span_len = before_tag.len() - cur.len();
4156 view.__buffa_unknown_fields
4157 .push_raw(&before_tag[..span_len]);
4158 }
4159 }
4160 }
4161 ::core::result::Result::Ok(())
4162 }
4163 }
4164 impl<'a> ::buffa::MessageView<'a> for CreateVolumeRequestView<'a> {
4165 type Owned = super::super::CreateVolumeRequest;
4166 fn decode_view(
4167 buf: &'a [u8],
4168 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4169 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4170 }
4171 fn decode_view_with_limit(
4172 buf: &'a [u8],
4173 depth: u32,
4174 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4175 Self::_decode_depth(buf, depth)
4176 }
4177 fn to_owned_message(&self) -> super::super::CreateVolumeRequest {
4178 self.to_owned_from_source(None)
4179 }
4180 #[allow(clippy::useless_conversion, clippy::needless_update)]
4181 fn to_owned_from_source(
4182 &self,
4183 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4184 ) -> super::super::CreateVolumeRequest {
4185 #[allow(unused_imports)]
4186 use ::buffa::alloc::string::ToString as _;
4187 let _ = __buffa_src;
4188 super::super::CreateVolumeRequest {
4189 catalog_name: self.catalog_name.to_string(),
4190 schema_name: self.schema_name.to_string(),
4191 name: self.name.to_string(),
4192 volume_type: self.volume_type,
4193 storage_location: self.storage_location.map(|s| s.to_string()),
4194 comment: self.comment.map(|s| s.to_string()),
4195 __buffa_unknown_fields: self
4196 .__buffa_unknown_fields
4197 .to_owned()
4198 .unwrap_or_default()
4199 .into(),
4200 ..::core::default::Default::default()
4201 }
4202 }
4203 }
4204 impl<'a> ::buffa::ViewEncode<'a> for CreateVolumeRequestView<'a> {
4205 #[allow(clippy::needless_borrow, clippy::let_and_return)]
4206 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4207 #[allow(unused_imports)]
4208 use ::buffa::Enumeration as _;
4209 let mut size = 0u32;
4210 if !self.catalog_name.is_empty() {
4211 size
4212 += 1u32
4213 + ::buffa::types::string_encoded_len(&self.catalog_name)
4214 as u32;
4215 }
4216 if !self.schema_name.is_empty() {
4217 size
4218 += 1u32
4219 + ::buffa::types::string_encoded_len(&self.schema_name)
4220 as u32;
4221 }
4222 if !self.name.is_empty() {
4223 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4224 }
4225 {
4226 let val = self.volume_type.to_i32();
4227 if val != 0 {
4228 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4229 }
4230 }
4231 if let Some(ref v) = self.storage_location {
4232 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4233 }
4234 if let Some(ref v) = self.comment {
4235 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4236 }
4237 size += self.__buffa_unknown_fields.encoded_len() as u32;
4238 size
4239 }
4240 #[allow(clippy::needless_borrow)]
4241 fn write_to(
4242 &self,
4243 _cache: &mut ::buffa::SizeCache,
4244 buf: &mut impl ::buffa::bytes::BufMut,
4245 ) {
4246 #[allow(unused_imports)]
4247 use ::buffa::Enumeration as _;
4248 if !self.catalog_name.is_empty() {
4249 ::buffa::encoding::Tag::new(
4250 1u32,
4251 ::buffa::encoding::WireType::LengthDelimited,
4252 )
4253 .encode(buf);
4254 ::buffa::types::encode_string(&self.catalog_name, buf);
4255 }
4256 if !self.schema_name.is_empty() {
4257 ::buffa::encoding::Tag::new(
4258 2u32,
4259 ::buffa::encoding::WireType::LengthDelimited,
4260 )
4261 .encode(buf);
4262 ::buffa::types::encode_string(&self.schema_name, buf);
4263 }
4264 if !self.name.is_empty() {
4265 ::buffa::encoding::Tag::new(
4266 3u32,
4267 ::buffa::encoding::WireType::LengthDelimited,
4268 )
4269 .encode(buf);
4270 ::buffa::types::encode_string(&self.name, buf);
4271 }
4272 {
4273 let val = self.volume_type.to_i32();
4274 if val != 0 {
4275 ::buffa::encoding::Tag::new(
4276 4u32,
4277 ::buffa::encoding::WireType::Varint,
4278 )
4279 .encode(buf);
4280 ::buffa::types::encode_int32(val, buf);
4281 }
4282 }
4283 if let Some(ref v) = self.storage_location {
4284 ::buffa::encoding::Tag::new(
4285 5u32,
4286 ::buffa::encoding::WireType::LengthDelimited,
4287 )
4288 .encode(buf);
4289 ::buffa::types::encode_string(v, buf);
4290 }
4291 if let Some(ref v) = self.comment {
4292 ::buffa::encoding::Tag::new(
4293 6u32,
4294 ::buffa::encoding::WireType::LengthDelimited,
4295 )
4296 .encode(buf);
4297 ::buffa::types::encode_string(v, buf);
4298 }
4299 self.__buffa_unknown_fields.write_to(buf);
4300 }
4301 }
4302 impl<'__a> ::serde::Serialize for CreateVolumeRequestView<'__a> {
4314 fn serialize<__S: ::serde::Serializer>(
4315 &self,
4316 __s: __S,
4317 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4318 use ::serde::ser::SerializeMap as _;
4319 let mut __map = __s.serialize_map(::core::option::Option::None)?;
4320 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
4321 __map.serialize_entry("catalog_name", self.catalog_name)?;
4322 }
4323 if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
4324 __map.serialize_entry("schema_name", self.schema_name)?;
4325 }
4326 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
4327 __map.serialize_entry("name", self.name)?;
4328 }
4329 if !::buffa::json_helpers::skip_if::is_default_enum_value(
4330 &self.volume_type,
4331 ) {
4332 __map.serialize_entry("volume_type", &self.volume_type)?;
4333 }
4334 if let ::core::option::Option::Some(__v) = self.storage_location {
4335 __map.serialize_entry("storage_location", __v)?;
4336 }
4337 if let ::core::option::Option::Some(__v) = self.comment {
4338 __map.serialize_entry("comment", __v)?;
4339 }
4340 __map.end()
4341 }
4342 }
4343 impl<'a> ::buffa::MessageName for CreateVolumeRequestView<'a> {
4344 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
4345 const NAME: &'static str = "CreateVolumeRequest";
4346 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.CreateVolumeRequest";
4347 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.CreateVolumeRequest";
4348 }
4349 impl<'v> ::buffa::DefaultViewInstance for CreateVolumeRequestView<'v> {
4350 fn default_view_instance<'a>() -> &'a Self
4351 where
4352 Self: 'a,
4353 {
4354 static VALUE: ::buffa::__private::OnceBox<
4355 CreateVolumeRequestView<'static>,
4356 > = ::buffa::__private::OnceBox::new();
4357 VALUE
4358 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4359 <CreateVolumeRequestView<'static>>::default(),
4360 ))
4361 }
4362 }
4363 impl ::buffa::ViewReborrow for CreateVolumeRequestView<'static> {
4364 type Reborrowed<'b> = CreateVolumeRequestView<'b>;
4365 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4366 this
4367 }
4368 }
4369 #[derive(Clone, Debug)]
4375 pub struct CreateVolumeRequestOwnedView(
4376 ::buffa::OwnedView<CreateVolumeRequestView<'static>>,
4377 );
4378 impl CreateVolumeRequestOwnedView {
4379 pub fn decode(
4389 bytes: ::buffa::bytes::Bytes,
4390 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4391 ::core::result::Result::Ok(
4392 CreateVolumeRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
4393 )
4394 }
4395 pub fn decode_with_options(
4403 bytes: ::buffa::bytes::Bytes,
4404 opts: &::buffa::DecodeOptions,
4405 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4406 ::core::result::Result::Ok(
4407 CreateVolumeRequestOwnedView(
4408 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4409 ),
4410 )
4411 }
4412 pub fn from_owned(
4419 msg: &super::super::CreateVolumeRequest,
4420 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4421 ::core::result::Result::Ok(
4422 CreateVolumeRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
4423 )
4424 }
4425 #[must_use]
4427 pub fn view(&self) -> &CreateVolumeRequestView<'_> {
4428 self.0.reborrow()
4429 }
4430 #[must_use]
4432 pub fn to_owned_message(&self) -> super::super::CreateVolumeRequest {
4433 self.0.to_owned_message()
4434 }
4435 #[must_use]
4437 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4438 self.0.bytes()
4439 }
4440 #[must_use]
4442 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4443 self.0.into_bytes()
4444 }
4445 #[must_use]
4449 pub fn catalog_name(&self) -> &'_ str {
4450 self.0.reborrow().catalog_name
4451 }
4452 #[must_use]
4456 pub fn schema_name(&self) -> &'_ str {
4457 self.0.reborrow().schema_name
4458 }
4459 #[must_use]
4463 pub fn name(&self) -> &'_ str {
4464 self.0.reborrow().name
4465 }
4466 #[must_use]
4474 pub fn volume_type(&self) -> ::buffa::EnumValue<super::super::VolumeType> {
4475 self.0.reborrow().volume_type
4476 }
4477 #[must_use]
4481 pub fn storage_location(&self) -> ::core::option::Option<&'_ str> {
4482 self.0.reborrow().storage_location
4483 }
4484 #[must_use]
4488 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
4489 self.0.reborrow().comment
4490 }
4491 }
4492 impl ::core::convert::From<::buffa::OwnedView<CreateVolumeRequestView<'static>>>
4493 for CreateVolumeRequestOwnedView {
4494 fn from(
4495 inner: ::buffa::OwnedView<CreateVolumeRequestView<'static>>,
4496 ) -> Self {
4497 CreateVolumeRequestOwnedView(inner)
4498 }
4499 }
4500 impl ::core::convert::From<CreateVolumeRequestOwnedView>
4501 for ::buffa::OwnedView<CreateVolumeRequestView<'static>> {
4502 fn from(wrapper: CreateVolumeRequestOwnedView) -> Self {
4503 wrapper.0
4504 }
4505 }
4506 impl ::core::convert::AsRef<::buffa::OwnedView<CreateVolumeRequestView<'static>>>
4507 for CreateVolumeRequestOwnedView {
4508 fn as_ref(&self) -> &::buffa::OwnedView<CreateVolumeRequestView<'static>> {
4509 &self.0
4510 }
4511 }
4512 impl ::buffa::HasMessageView for super::super::CreateVolumeRequest {
4513 type View<'a> = CreateVolumeRequestView<'a>;
4514 type ViewHandle = CreateVolumeRequestOwnedView;
4515 }
4516 impl ::serde::Serialize for CreateVolumeRequestOwnedView {
4517 fn serialize<__S: ::serde::Serializer>(
4518 &self,
4519 __s: __S,
4520 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4521 ::serde::Serialize::serialize(&self.0, __s)
4522 }
4523 }
4524 #[derive(Clone, Debug, Default)]
4525 pub struct GetVolumeRequestView<'a> {
4526 pub name: &'a str,
4530 pub include_browse: ::core::option::Option<bool>,
4534 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4535 }
4536 impl<'a> GetVolumeRequestView<'a> {
4537 #[doc(hidden)]
4545 pub fn _decode_depth(
4546 buf: &'a [u8],
4547 depth: u32,
4548 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4549 let mut view = Self::default();
4550 view._merge_into_view(buf, depth)?;
4551 ::core::result::Result::Ok(view)
4552 }
4553 #[doc(hidden)]
4561 pub fn _merge_into_view(
4562 &mut self,
4563 buf: &'a [u8],
4564 depth: u32,
4565 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4566 let _ = depth;
4567 #[allow(unused_variables)]
4568 let view = self;
4569 let mut cur: &'a [u8] = buf;
4570 while !cur.is_empty() {
4571 let before_tag = cur;
4572 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4573 match tag.field_number() {
4574 1u32 => {
4575 if tag.wire_type()
4576 != ::buffa::encoding::WireType::LengthDelimited
4577 {
4578 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4579 field_number: 1u32,
4580 expected: 2u8,
4581 actual: tag.wire_type() as u8,
4582 });
4583 }
4584 view.name = ::buffa::types::borrow_str(&mut cur)?;
4585 }
4586 1005u32 => {
4587 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4588 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4589 field_number: 1005u32,
4590 expected: 0u8,
4591 actual: tag.wire_type() as u8,
4592 });
4593 }
4594 view.include_browse = Some(
4595 ::buffa::types::decode_bool(&mut cur)?,
4596 );
4597 }
4598 _ => {
4599 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4600 let span_len = before_tag.len() - cur.len();
4601 view.__buffa_unknown_fields
4602 .push_raw(&before_tag[..span_len]);
4603 }
4604 }
4605 }
4606 ::core::result::Result::Ok(())
4607 }
4608 }
4609 impl<'a> ::buffa::MessageView<'a> for GetVolumeRequestView<'a> {
4610 type Owned = super::super::GetVolumeRequest;
4611 fn decode_view(
4612 buf: &'a [u8],
4613 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4614 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4615 }
4616 fn decode_view_with_limit(
4617 buf: &'a [u8],
4618 depth: u32,
4619 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4620 Self::_decode_depth(buf, depth)
4621 }
4622 fn to_owned_message(&self) -> super::super::GetVolumeRequest {
4623 self.to_owned_from_source(None)
4624 }
4625 #[allow(clippy::useless_conversion, clippy::needless_update)]
4626 fn to_owned_from_source(
4627 &self,
4628 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4629 ) -> super::super::GetVolumeRequest {
4630 #[allow(unused_imports)]
4631 use ::buffa::alloc::string::ToString as _;
4632 let _ = __buffa_src;
4633 super::super::GetVolumeRequest {
4634 name: self.name.to_string(),
4635 include_browse: self.include_browse,
4636 __buffa_unknown_fields: self
4637 .__buffa_unknown_fields
4638 .to_owned()
4639 .unwrap_or_default()
4640 .into(),
4641 ..::core::default::Default::default()
4642 }
4643 }
4644 }
4645 impl<'a> ::buffa::ViewEncode<'a> for GetVolumeRequestView<'a> {
4646 #[allow(clippy::needless_borrow, clippy::let_and_return)]
4647 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4648 #[allow(unused_imports)]
4649 use ::buffa::Enumeration as _;
4650 let mut size = 0u32;
4651 if !self.name.is_empty() {
4652 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4653 }
4654 if self.include_browse.is_some() {
4655 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4656 }
4657 size += self.__buffa_unknown_fields.encoded_len() as u32;
4658 size
4659 }
4660 #[allow(clippy::needless_borrow)]
4661 fn write_to(
4662 &self,
4663 _cache: &mut ::buffa::SizeCache,
4664 buf: &mut impl ::buffa::bytes::BufMut,
4665 ) {
4666 #[allow(unused_imports)]
4667 use ::buffa::Enumeration as _;
4668 if !self.name.is_empty() {
4669 ::buffa::encoding::Tag::new(
4670 1u32,
4671 ::buffa::encoding::WireType::LengthDelimited,
4672 )
4673 .encode(buf);
4674 ::buffa::types::encode_string(&self.name, buf);
4675 }
4676 if let Some(v) = self.include_browse {
4677 ::buffa::encoding::Tag::new(
4678 1005u32,
4679 ::buffa::encoding::WireType::Varint,
4680 )
4681 .encode(buf);
4682 ::buffa::types::encode_bool(v, buf);
4683 }
4684 self.__buffa_unknown_fields.write_to(buf);
4685 }
4686 }
4687 impl<'__a> ::serde::Serialize for GetVolumeRequestView<'__a> {
4699 fn serialize<__S: ::serde::Serializer>(
4700 &self,
4701 __s: __S,
4702 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4703 use ::serde::ser::SerializeMap as _;
4704 let mut __map = __s.serialize_map(::core::option::Option::None)?;
4705 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
4706 __map.serialize_entry("name", self.name)?;
4707 }
4708 if let ::core::option::Option::Some(__v) = self.include_browse {
4709 __map.serialize_entry("include_browse", &__v)?;
4710 }
4711 __map.end()
4712 }
4713 }
4714 impl<'a> ::buffa::MessageName for GetVolumeRequestView<'a> {
4715 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
4716 const NAME: &'static str = "GetVolumeRequest";
4717 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.GetVolumeRequest";
4718 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.GetVolumeRequest";
4719 }
4720 impl<'v> ::buffa::DefaultViewInstance for GetVolumeRequestView<'v> {
4721 fn default_view_instance<'a>() -> &'a Self
4722 where
4723 Self: 'a,
4724 {
4725 static VALUE: ::buffa::__private::OnceBox<
4726 GetVolumeRequestView<'static>,
4727 > = ::buffa::__private::OnceBox::new();
4728 VALUE
4729 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4730 <GetVolumeRequestView<'static>>::default(),
4731 ))
4732 }
4733 }
4734 impl ::buffa::ViewReborrow for GetVolumeRequestView<'static> {
4735 type Reborrowed<'b> = GetVolumeRequestView<'b>;
4736 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4737 this
4738 }
4739 }
4740 #[derive(Clone, Debug)]
4746 pub struct GetVolumeRequestOwnedView(
4747 ::buffa::OwnedView<GetVolumeRequestView<'static>>,
4748 );
4749 impl GetVolumeRequestOwnedView {
4750 pub fn decode(
4760 bytes: ::buffa::bytes::Bytes,
4761 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4762 ::core::result::Result::Ok(
4763 GetVolumeRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
4764 )
4765 }
4766 pub fn decode_with_options(
4774 bytes: ::buffa::bytes::Bytes,
4775 opts: &::buffa::DecodeOptions,
4776 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4777 ::core::result::Result::Ok(
4778 GetVolumeRequestOwnedView(
4779 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4780 ),
4781 )
4782 }
4783 pub fn from_owned(
4790 msg: &super::super::GetVolumeRequest,
4791 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4792 ::core::result::Result::Ok(
4793 GetVolumeRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
4794 )
4795 }
4796 #[must_use]
4798 pub fn view(&self) -> &GetVolumeRequestView<'_> {
4799 self.0.reborrow()
4800 }
4801 #[must_use]
4803 pub fn to_owned_message(&self) -> super::super::GetVolumeRequest {
4804 self.0.to_owned_message()
4805 }
4806 #[must_use]
4808 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4809 self.0.bytes()
4810 }
4811 #[must_use]
4813 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4814 self.0.into_bytes()
4815 }
4816 #[must_use]
4820 pub fn name(&self) -> &'_ str {
4821 self.0.reborrow().name
4822 }
4823 #[must_use]
4827 pub fn include_browse(&self) -> ::core::option::Option<bool> {
4828 self.0.reborrow().include_browse
4829 }
4830 }
4831 impl ::core::convert::From<::buffa::OwnedView<GetVolumeRequestView<'static>>>
4832 for GetVolumeRequestOwnedView {
4833 fn from(inner: ::buffa::OwnedView<GetVolumeRequestView<'static>>) -> Self {
4834 GetVolumeRequestOwnedView(inner)
4835 }
4836 }
4837 impl ::core::convert::From<GetVolumeRequestOwnedView>
4838 for ::buffa::OwnedView<GetVolumeRequestView<'static>> {
4839 fn from(wrapper: GetVolumeRequestOwnedView) -> Self {
4840 wrapper.0
4841 }
4842 }
4843 impl ::core::convert::AsRef<::buffa::OwnedView<GetVolumeRequestView<'static>>>
4844 for GetVolumeRequestOwnedView {
4845 fn as_ref(&self) -> &::buffa::OwnedView<GetVolumeRequestView<'static>> {
4846 &self.0
4847 }
4848 }
4849 impl ::buffa::HasMessageView for super::super::GetVolumeRequest {
4850 type View<'a> = GetVolumeRequestView<'a>;
4851 type ViewHandle = GetVolumeRequestOwnedView;
4852 }
4853 impl ::serde::Serialize for GetVolumeRequestOwnedView {
4854 fn serialize<__S: ::serde::Serializer>(
4855 &self,
4856 __s: __S,
4857 ) -> ::core::result::Result<__S::Ok, __S::Error> {
4858 ::serde::Serialize::serialize(&self.0, __s)
4859 }
4860 }
4861 #[derive(Clone, Debug, Default)]
4862 pub struct UpdateVolumeRequestView<'a> {
4863 pub name: &'a str,
4867 pub new_name: ::core::option::Option<&'a str>,
4871 pub comment: ::core::option::Option<&'a str>,
4875 pub owner: ::core::option::Option<&'a str>,
4879 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4880 }
4881 impl<'a> UpdateVolumeRequestView<'a> {
4882 #[doc(hidden)]
4890 pub fn _decode_depth(
4891 buf: &'a [u8],
4892 depth: u32,
4893 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4894 let mut view = Self::default();
4895 view._merge_into_view(buf, depth)?;
4896 ::core::result::Result::Ok(view)
4897 }
4898 #[doc(hidden)]
4906 pub fn _merge_into_view(
4907 &mut self,
4908 buf: &'a [u8],
4909 depth: u32,
4910 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4911 let _ = depth;
4912 #[allow(unused_variables)]
4913 let view = self;
4914 let mut cur: &'a [u8] = buf;
4915 while !cur.is_empty() {
4916 let before_tag = cur;
4917 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4918 match tag.field_number() {
4919 1u32 => {
4920 if tag.wire_type()
4921 != ::buffa::encoding::WireType::LengthDelimited
4922 {
4923 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4924 field_number: 1u32,
4925 expected: 2u8,
4926 actual: tag.wire_type() as u8,
4927 });
4928 }
4929 view.name = ::buffa::types::borrow_str(&mut cur)?;
4930 }
4931 2u32 => {
4932 if tag.wire_type()
4933 != ::buffa::encoding::WireType::LengthDelimited
4934 {
4935 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4936 field_number: 2u32,
4937 expected: 2u8,
4938 actual: tag.wire_type() as u8,
4939 });
4940 }
4941 view.new_name = Some(::buffa::types::borrow_str(&mut cur)?);
4942 }
4943 3u32 => {
4944 if tag.wire_type()
4945 != ::buffa::encoding::WireType::LengthDelimited
4946 {
4947 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4948 field_number: 3u32,
4949 expected: 2u8,
4950 actual: tag.wire_type() as u8,
4951 });
4952 }
4953 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4954 }
4955 4u32 => {
4956 if tag.wire_type()
4957 != ::buffa::encoding::WireType::LengthDelimited
4958 {
4959 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4960 field_number: 4u32,
4961 expected: 2u8,
4962 actual: tag.wire_type() as u8,
4963 });
4964 }
4965 view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
4966 }
4967 _ => {
4968 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4969 let span_len = before_tag.len() - cur.len();
4970 view.__buffa_unknown_fields
4971 .push_raw(&before_tag[..span_len]);
4972 }
4973 }
4974 }
4975 ::core::result::Result::Ok(())
4976 }
4977 }
4978 impl<'a> ::buffa::MessageView<'a> for UpdateVolumeRequestView<'a> {
4979 type Owned = super::super::UpdateVolumeRequest;
4980 fn decode_view(
4981 buf: &'a [u8],
4982 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4983 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4984 }
4985 fn decode_view_with_limit(
4986 buf: &'a [u8],
4987 depth: u32,
4988 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4989 Self::_decode_depth(buf, depth)
4990 }
4991 fn to_owned_message(&self) -> super::super::UpdateVolumeRequest {
4992 self.to_owned_from_source(None)
4993 }
4994 #[allow(clippy::useless_conversion, clippy::needless_update)]
4995 fn to_owned_from_source(
4996 &self,
4997 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4998 ) -> super::super::UpdateVolumeRequest {
4999 #[allow(unused_imports)]
5000 use ::buffa::alloc::string::ToString as _;
5001 let _ = __buffa_src;
5002 super::super::UpdateVolumeRequest {
5003 name: self.name.to_string(),
5004 new_name: self.new_name.map(|s| s.to_string()),
5005 comment: self.comment.map(|s| s.to_string()),
5006 owner: self.owner.map(|s| s.to_string()),
5007 __buffa_unknown_fields: self
5008 .__buffa_unknown_fields
5009 .to_owned()
5010 .unwrap_or_default()
5011 .into(),
5012 ..::core::default::Default::default()
5013 }
5014 }
5015 }
5016 impl<'a> ::buffa::ViewEncode<'a> for UpdateVolumeRequestView<'a> {
5017 #[allow(clippy::needless_borrow, clippy::let_and_return)]
5018 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5019 #[allow(unused_imports)]
5020 use ::buffa::Enumeration as _;
5021 let mut size = 0u32;
5022 if !self.name.is_empty() {
5023 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5024 }
5025 if let Some(ref v) = self.new_name {
5026 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5027 }
5028 if let Some(ref v) = self.comment {
5029 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5030 }
5031 if let Some(ref v) = self.owner {
5032 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5033 }
5034 size += self.__buffa_unknown_fields.encoded_len() as u32;
5035 size
5036 }
5037 #[allow(clippy::needless_borrow)]
5038 fn write_to(
5039 &self,
5040 _cache: &mut ::buffa::SizeCache,
5041 buf: &mut impl ::buffa::bytes::BufMut,
5042 ) {
5043 #[allow(unused_imports)]
5044 use ::buffa::Enumeration as _;
5045 if !self.name.is_empty() {
5046 ::buffa::encoding::Tag::new(
5047 1u32,
5048 ::buffa::encoding::WireType::LengthDelimited,
5049 )
5050 .encode(buf);
5051 ::buffa::types::encode_string(&self.name, buf);
5052 }
5053 if let Some(ref v) = self.new_name {
5054 ::buffa::encoding::Tag::new(
5055 2u32,
5056 ::buffa::encoding::WireType::LengthDelimited,
5057 )
5058 .encode(buf);
5059 ::buffa::types::encode_string(v, buf);
5060 }
5061 if let Some(ref v) = self.comment {
5062 ::buffa::encoding::Tag::new(
5063 3u32,
5064 ::buffa::encoding::WireType::LengthDelimited,
5065 )
5066 .encode(buf);
5067 ::buffa::types::encode_string(v, buf);
5068 }
5069 if let Some(ref v) = self.owner {
5070 ::buffa::encoding::Tag::new(
5071 4u32,
5072 ::buffa::encoding::WireType::LengthDelimited,
5073 )
5074 .encode(buf);
5075 ::buffa::types::encode_string(v, buf);
5076 }
5077 self.__buffa_unknown_fields.write_to(buf);
5078 }
5079 }
5080 impl<'__a> ::serde::Serialize for UpdateVolumeRequestView<'__a> {
5092 fn serialize<__S: ::serde::Serializer>(
5093 &self,
5094 __s: __S,
5095 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5096 use ::serde::ser::SerializeMap as _;
5097 let mut __map = __s.serialize_map(::core::option::Option::None)?;
5098 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5099 __map.serialize_entry("name", self.name)?;
5100 }
5101 if let ::core::option::Option::Some(__v) = self.new_name {
5102 __map.serialize_entry("new_name", __v)?;
5103 }
5104 if let ::core::option::Option::Some(__v) = self.comment {
5105 __map.serialize_entry("comment", __v)?;
5106 }
5107 if let ::core::option::Option::Some(__v) = self.owner {
5108 __map.serialize_entry("owner", __v)?;
5109 }
5110 __map.end()
5111 }
5112 }
5113 impl<'a> ::buffa::MessageName for UpdateVolumeRequestView<'a> {
5114 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
5115 const NAME: &'static str = "UpdateVolumeRequest";
5116 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.UpdateVolumeRequest";
5117 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.UpdateVolumeRequest";
5118 }
5119 impl<'v> ::buffa::DefaultViewInstance for UpdateVolumeRequestView<'v> {
5120 fn default_view_instance<'a>() -> &'a Self
5121 where
5122 Self: 'a,
5123 {
5124 static VALUE: ::buffa::__private::OnceBox<
5125 UpdateVolumeRequestView<'static>,
5126 > = ::buffa::__private::OnceBox::new();
5127 VALUE
5128 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5129 <UpdateVolumeRequestView<'static>>::default(),
5130 ))
5131 }
5132 }
5133 impl ::buffa::ViewReborrow for UpdateVolumeRequestView<'static> {
5134 type Reborrowed<'b> = UpdateVolumeRequestView<'b>;
5135 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5136 this
5137 }
5138 }
5139 #[derive(Clone, Debug)]
5145 pub struct UpdateVolumeRequestOwnedView(
5146 ::buffa::OwnedView<UpdateVolumeRequestView<'static>>,
5147 );
5148 impl UpdateVolumeRequestOwnedView {
5149 pub fn decode(
5159 bytes: ::buffa::bytes::Bytes,
5160 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5161 ::core::result::Result::Ok(
5162 UpdateVolumeRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5163 )
5164 }
5165 pub fn decode_with_options(
5173 bytes: ::buffa::bytes::Bytes,
5174 opts: &::buffa::DecodeOptions,
5175 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5176 ::core::result::Result::Ok(
5177 UpdateVolumeRequestOwnedView(
5178 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5179 ),
5180 )
5181 }
5182 pub fn from_owned(
5189 msg: &super::super::UpdateVolumeRequest,
5190 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5191 ::core::result::Result::Ok(
5192 UpdateVolumeRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5193 )
5194 }
5195 #[must_use]
5197 pub fn view(&self) -> &UpdateVolumeRequestView<'_> {
5198 self.0.reborrow()
5199 }
5200 #[must_use]
5202 pub fn to_owned_message(&self) -> super::super::UpdateVolumeRequest {
5203 self.0.to_owned_message()
5204 }
5205 #[must_use]
5207 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5208 self.0.bytes()
5209 }
5210 #[must_use]
5212 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5213 self.0.into_bytes()
5214 }
5215 #[must_use]
5219 pub fn name(&self) -> &'_ str {
5220 self.0.reborrow().name
5221 }
5222 #[must_use]
5226 pub fn new_name(&self) -> ::core::option::Option<&'_ str> {
5227 self.0.reborrow().new_name
5228 }
5229 #[must_use]
5233 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
5234 self.0.reborrow().comment
5235 }
5236 #[must_use]
5240 pub fn owner(&self) -> ::core::option::Option<&'_ str> {
5241 self.0.reborrow().owner
5242 }
5243 }
5244 impl ::core::convert::From<::buffa::OwnedView<UpdateVolumeRequestView<'static>>>
5245 for UpdateVolumeRequestOwnedView {
5246 fn from(
5247 inner: ::buffa::OwnedView<UpdateVolumeRequestView<'static>>,
5248 ) -> Self {
5249 UpdateVolumeRequestOwnedView(inner)
5250 }
5251 }
5252 impl ::core::convert::From<UpdateVolumeRequestOwnedView>
5253 for ::buffa::OwnedView<UpdateVolumeRequestView<'static>> {
5254 fn from(wrapper: UpdateVolumeRequestOwnedView) -> Self {
5255 wrapper.0
5256 }
5257 }
5258 impl ::core::convert::AsRef<::buffa::OwnedView<UpdateVolumeRequestView<'static>>>
5259 for UpdateVolumeRequestOwnedView {
5260 fn as_ref(&self) -> &::buffa::OwnedView<UpdateVolumeRequestView<'static>> {
5261 &self.0
5262 }
5263 }
5264 impl ::buffa::HasMessageView for super::super::UpdateVolumeRequest {
5265 type View<'a> = UpdateVolumeRequestView<'a>;
5266 type ViewHandle = UpdateVolumeRequestOwnedView;
5267 }
5268 impl ::serde::Serialize for UpdateVolumeRequestOwnedView {
5269 fn serialize<__S: ::serde::Serializer>(
5270 &self,
5271 __s: __S,
5272 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5273 ::serde::Serialize::serialize(&self.0, __s)
5274 }
5275 }
5276 #[derive(Clone, Debug, Default)]
5277 pub struct DeleteVolumeRequestView<'a> {
5278 pub name: &'a str,
5282 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5283 }
5284 impl<'a> DeleteVolumeRequestView<'a> {
5285 #[doc(hidden)]
5293 pub fn _decode_depth(
5294 buf: &'a [u8],
5295 depth: u32,
5296 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5297 let mut view = Self::default();
5298 view._merge_into_view(buf, depth)?;
5299 ::core::result::Result::Ok(view)
5300 }
5301 #[doc(hidden)]
5309 pub fn _merge_into_view(
5310 &mut self,
5311 buf: &'a [u8],
5312 depth: u32,
5313 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5314 let _ = depth;
5315 #[allow(unused_variables)]
5316 let view = self;
5317 let mut cur: &'a [u8] = buf;
5318 while !cur.is_empty() {
5319 let before_tag = cur;
5320 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5321 match tag.field_number() {
5322 1u32 => {
5323 if tag.wire_type()
5324 != ::buffa::encoding::WireType::LengthDelimited
5325 {
5326 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5327 field_number: 1u32,
5328 expected: 2u8,
5329 actual: tag.wire_type() as u8,
5330 });
5331 }
5332 view.name = ::buffa::types::borrow_str(&mut cur)?;
5333 }
5334 _ => {
5335 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5336 let span_len = before_tag.len() - cur.len();
5337 view.__buffa_unknown_fields
5338 .push_raw(&before_tag[..span_len]);
5339 }
5340 }
5341 }
5342 ::core::result::Result::Ok(())
5343 }
5344 }
5345 impl<'a> ::buffa::MessageView<'a> for DeleteVolumeRequestView<'a> {
5346 type Owned = super::super::DeleteVolumeRequest;
5347 fn decode_view(
5348 buf: &'a [u8],
5349 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5350 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5351 }
5352 fn decode_view_with_limit(
5353 buf: &'a [u8],
5354 depth: u32,
5355 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5356 Self::_decode_depth(buf, depth)
5357 }
5358 fn to_owned_message(&self) -> super::super::DeleteVolumeRequest {
5359 self.to_owned_from_source(None)
5360 }
5361 #[allow(clippy::useless_conversion, clippy::needless_update)]
5362 fn to_owned_from_source(
5363 &self,
5364 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5365 ) -> super::super::DeleteVolumeRequest {
5366 #[allow(unused_imports)]
5367 use ::buffa::alloc::string::ToString as _;
5368 let _ = __buffa_src;
5369 super::super::DeleteVolumeRequest {
5370 name: self.name.to_string(),
5371 __buffa_unknown_fields: self
5372 .__buffa_unknown_fields
5373 .to_owned()
5374 .unwrap_or_default()
5375 .into(),
5376 ..::core::default::Default::default()
5377 }
5378 }
5379 }
5380 impl<'a> ::buffa::ViewEncode<'a> for DeleteVolumeRequestView<'a> {
5381 #[allow(clippy::needless_borrow, clippy::let_and_return)]
5382 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5383 #[allow(unused_imports)]
5384 use ::buffa::Enumeration as _;
5385 let mut size = 0u32;
5386 if !self.name.is_empty() {
5387 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5388 }
5389 size += self.__buffa_unknown_fields.encoded_len() as u32;
5390 size
5391 }
5392 #[allow(clippy::needless_borrow)]
5393 fn write_to(
5394 &self,
5395 _cache: &mut ::buffa::SizeCache,
5396 buf: &mut impl ::buffa::bytes::BufMut,
5397 ) {
5398 #[allow(unused_imports)]
5399 use ::buffa::Enumeration as _;
5400 if !self.name.is_empty() {
5401 ::buffa::encoding::Tag::new(
5402 1u32,
5403 ::buffa::encoding::WireType::LengthDelimited,
5404 )
5405 .encode(buf);
5406 ::buffa::types::encode_string(&self.name, buf);
5407 }
5408 self.__buffa_unknown_fields.write_to(buf);
5409 }
5410 }
5411 impl<'__a> ::serde::Serialize for DeleteVolumeRequestView<'__a> {
5423 fn serialize<__S: ::serde::Serializer>(
5424 &self,
5425 __s: __S,
5426 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5427 use ::serde::ser::SerializeMap as _;
5428 let mut __map = __s.serialize_map(::core::option::Option::None)?;
5429 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5430 __map.serialize_entry("name", self.name)?;
5431 }
5432 __map.end()
5433 }
5434 }
5435 impl<'a> ::buffa::MessageName for DeleteVolumeRequestView<'a> {
5436 const PACKAGE: &'static str = "unitycatalog.volumes.v1";
5437 const NAME: &'static str = "DeleteVolumeRequest";
5438 const FULL_NAME: &'static str = "unitycatalog.volumes.v1.DeleteVolumeRequest";
5439 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.volumes.v1.DeleteVolumeRequest";
5440 }
5441 impl<'v> ::buffa::DefaultViewInstance for DeleteVolumeRequestView<'v> {
5442 fn default_view_instance<'a>() -> &'a Self
5443 where
5444 Self: 'a,
5445 {
5446 static VALUE: ::buffa::__private::OnceBox<
5447 DeleteVolumeRequestView<'static>,
5448 > = ::buffa::__private::OnceBox::new();
5449 VALUE
5450 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5451 <DeleteVolumeRequestView<'static>>::default(),
5452 ))
5453 }
5454 }
5455 impl ::buffa::ViewReborrow for DeleteVolumeRequestView<'static> {
5456 type Reborrowed<'b> = DeleteVolumeRequestView<'b>;
5457 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5458 this
5459 }
5460 }
5461 #[derive(Clone, Debug)]
5467 pub struct DeleteVolumeRequestOwnedView(
5468 ::buffa::OwnedView<DeleteVolumeRequestView<'static>>,
5469 );
5470 impl DeleteVolumeRequestOwnedView {
5471 pub fn decode(
5481 bytes: ::buffa::bytes::Bytes,
5482 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5483 ::core::result::Result::Ok(
5484 DeleteVolumeRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5485 )
5486 }
5487 pub fn decode_with_options(
5495 bytes: ::buffa::bytes::Bytes,
5496 opts: &::buffa::DecodeOptions,
5497 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5498 ::core::result::Result::Ok(
5499 DeleteVolumeRequestOwnedView(
5500 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5501 ),
5502 )
5503 }
5504 pub fn from_owned(
5511 msg: &super::super::DeleteVolumeRequest,
5512 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5513 ::core::result::Result::Ok(
5514 DeleteVolumeRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5515 )
5516 }
5517 #[must_use]
5519 pub fn view(&self) -> &DeleteVolumeRequestView<'_> {
5520 self.0.reborrow()
5521 }
5522 #[must_use]
5524 pub fn to_owned_message(&self) -> super::super::DeleteVolumeRequest {
5525 self.0.to_owned_message()
5526 }
5527 #[must_use]
5529 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5530 self.0.bytes()
5531 }
5532 #[must_use]
5534 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5535 self.0.into_bytes()
5536 }
5537 #[must_use]
5541 pub fn name(&self) -> &'_ str {
5542 self.0.reborrow().name
5543 }
5544 }
5545 impl ::core::convert::From<::buffa::OwnedView<DeleteVolumeRequestView<'static>>>
5546 for DeleteVolumeRequestOwnedView {
5547 fn from(
5548 inner: ::buffa::OwnedView<DeleteVolumeRequestView<'static>>,
5549 ) -> Self {
5550 DeleteVolumeRequestOwnedView(inner)
5551 }
5552 }
5553 impl ::core::convert::From<DeleteVolumeRequestOwnedView>
5554 for ::buffa::OwnedView<DeleteVolumeRequestView<'static>> {
5555 fn from(wrapper: DeleteVolumeRequestOwnedView) -> Self {
5556 wrapper.0
5557 }
5558 }
5559 impl ::core::convert::AsRef<::buffa::OwnedView<DeleteVolumeRequestView<'static>>>
5560 for DeleteVolumeRequestOwnedView {
5561 fn as_ref(&self) -> &::buffa::OwnedView<DeleteVolumeRequestView<'static>> {
5562 &self.0
5563 }
5564 }
5565 impl ::buffa::HasMessageView for super::super::DeleteVolumeRequest {
5566 type View<'a> = DeleteVolumeRequestView<'a>;
5567 type ViewHandle = DeleteVolumeRequestOwnedView;
5568 }
5569 impl ::serde::Serialize for DeleteVolumeRequestOwnedView {
5570 fn serialize<__S: ::serde::Serializer>(
5571 &self,
5572 __s: __S,
5573 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5574 ::serde::Serialize::serialize(&self.0, __s)
5575 }
5576 }
5577 }
5578 pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
5580 reg.register_json_any(super::__VOLUME_JSON_ANY);
5581 reg.register_json_any(super::__LIST_VOLUMES_REQUEST_JSON_ANY);
5582 reg.register_json_any(super::__LIST_VOLUMES_RESPONSE_JSON_ANY);
5583 reg.register_json_any(super::__CREATE_VOLUME_REQUEST_JSON_ANY);
5584 reg.register_json_any(super::__GET_VOLUME_REQUEST_JSON_ANY);
5585 reg.register_json_any(super::__UPDATE_VOLUME_REQUEST_JSON_ANY);
5586 reg.register_json_any(super::__DELETE_VOLUME_REQUEST_JSON_ANY);
5587 }
5588}
5589#[doc(inline)]
5590pub use self::__buffa::view::VolumeView;
5591#[doc(inline)]
5592pub use self::__buffa::view::VolumeOwnedView;
5593#[doc(inline)]
5594pub use self::__buffa::view::ListVolumesRequestView;
5595#[doc(inline)]
5596pub use self::__buffa::view::ListVolumesRequestOwnedView;
5597#[doc(inline)]
5598pub use self::__buffa::view::ListVolumesResponseView;
5599#[doc(inline)]
5600pub use self::__buffa::view::ListVolumesResponseOwnedView;
5601#[doc(inline)]
5602pub use self::__buffa::view::CreateVolumeRequestView;
5603#[doc(inline)]
5604pub use self::__buffa::view::CreateVolumeRequestOwnedView;
5605#[doc(inline)]
5606pub use self::__buffa::view::GetVolumeRequestView;
5607#[doc(inline)]
5608pub use self::__buffa::view::GetVolumeRequestOwnedView;
5609#[doc(inline)]
5610pub use self::__buffa::view::UpdateVolumeRequestView;
5611#[doc(inline)]
5612pub use self::__buffa::view::UpdateVolumeRequestOwnedView;
5613#[doc(inline)]
5614pub use self::__buffa::view::DeleteVolumeRequestView;
5615#[doc(inline)]
5616pub use self::__buffa::view::DeleteVolumeRequestOwnedView;
5617#[doc(inline)]
5618pub use self::__buffa::register_types;