1#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5#[repr(i32)]
6pub enum TableType {
7 TABLE_TYPE_UNSPECIFIED = 0i32,
8 MANAGED = 1i32,
9 EXTERNAL = 2i32,
10 VIEW = 3i32,
11 MATERIALIZED_VIEW = 4i32,
12 STREAMING_TABLE = 5i32,
13 METRIC_VIEW = 9i32,
19}
20impl TableType {
21 #[allow(non_upper_case_globals)]
23 pub const TableTypeUnspecified: Self = Self::TABLE_TYPE_UNSPECIFIED;
24 #[allow(non_upper_case_globals)]
26 pub const Managed: Self = Self::MANAGED;
27 #[allow(non_upper_case_globals)]
29 pub const External: Self = Self::EXTERNAL;
30 #[allow(non_upper_case_globals)]
32 pub const View: Self = Self::VIEW;
33 #[allow(non_upper_case_globals)]
35 pub const MaterializedView: Self = Self::MATERIALIZED_VIEW;
36 #[allow(non_upper_case_globals)]
38 pub const StreamingTable: Self = Self::STREAMING_TABLE;
39 #[allow(non_upper_case_globals)]
41 pub const MetricView: Self = Self::METRIC_VIEW;
42}
43impl ::core::default::Default for TableType {
44 fn default() -> Self {
45 Self::TABLE_TYPE_UNSPECIFIED
46 }
47}
48impl ::serde::Serialize for TableType {
49 fn serialize<S: ::serde::Serializer>(
50 &self,
51 s: S,
52 ) -> ::core::result::Result<S::Ok, S::Error> {
53 s.serialize_str(::buffa::Enumeration::proto_name(self))
54 }
55}
56impl<'de> ::serde::Deserialize<'de> for TableType {
57 fn deserialize<D: ::serde::Deserializer<'de>>(
58 d: D,
59 ) -> ::core::result::Result<Self, D::Error> {
60 struct _V;
61 impl ::serde::de::Visitor<'_> for _V {
62 type Value = TableType;
63 fn expecting(
64 &self,
65 f: &mut ::core::fmt::Formatter<'_>,
66 ) -> ::core::fmt::Result {
67 f.write_str(
68 concat!("a string, integer, or null for ", stringify!(TableType)),
69 )
70 }
71 fn visit_str<E: ::serde::de::Error>(
72 self,
73 v: &str,
74 ) -> ::core::result::Result<TableType, E> {
75 <TableType as ::buffa::Enumeration>::from_proto_name(v)
76 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
77 }
78 fn visit_i64<E: ::serde::de::Error>(
79 self,
80 v: i64,
81 ) -> ::core::result::Result<TableType, E> {
82 let v32 = i32::try_from(v)
83 .map_err(|_| {
84 ::serde::de::Error::custom(
85 ::buffa::alloc::format!("enum value {v} out of i32 range"),
86 )
87 })?;
88 <TableType as ::buffa::Enumeration>::from_i32(v32)
89 .ok_or_else(|| {
90 ::serde::de::Error::custom(
91 ::buffa::alloc::format!("unknown enum value {v32}"),
92 )
93 })
94 }
95 fn visit_u64<E: ::serde::de::Error>(
96 self,
97 v: u64,
98 ) -> ::core::result::Result<TableType, E> {
99 let v32 = i32::try_from(v)
100 .map_err(|_| {
101 ::serde::de::Error::custom(
102 ::buffa::alloc::format!("enum value {v} out of i32 range"),
103 )
104 })?;
105 <TableType as ::buffa::Enumeration>::from_i32(v32)
106 .ok_or_else(|| {
107 ::serde::de::Error::custom(
108 ::buffa::alloc::format!("unknown enum value {v32}"),
109 )
110 })
111 }
112 fn visit_unit<E: ::serde::de::Error>(
113 self,
114 ) -> ::core::result::Result<TableType, E> {
115 ::core::result::Result::Ok(::core::default::Default::default())
116 }
117 }
118 d.deserialize_any(_V)
119 }
120}
121impl ::buffa::json_helpers::ProtoElemJson for TableType {
122 fn serialize_proto_json<S: ::serde::Serializer>(
123 v: &Self,
124 s: S,
125 ) -> ::core::result::Result<S::Ok, S::Error> {
126 ::serde::Serialize::serialize(v, s)
127 }
128 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
129 d: D,
130 ) -> ::core::result::Result<Self, D::Error> {
131 <Self as ::serde::Deserialize>::deserialize(d)
132 }
133}
134impl ::buffa::Enumeration for TableType {
135 fn from_i32(value: i32) -> ::core::option::Option<Self> {
136 match value {
137 0i32 => ::core::option::Option::Some(Self::TABLE_TYPE_UNSPECIFIED),
138 1i32 => ::core::option::Option::Some(Self::MANAGED),
139 2i32 => ::core::option::Option::Some(Self::EXTERNAL),
140 3i32 => ::core::option::Option::Some(Self::VIEW),
141 4i32 => ::core::option::Option::Some(Self::MATERIALIZED_VIEW),
142 5i32 => ::core::option::Option::Some(Self::STREAMING_TABLE),
143 9i32 => ::core::option::Option::Some(Self::METRIC_VIEW),
144 _ => ::core::option::Option::None,
145 }
146 }
147 fn to_i32(&self) -> i32 {
148 *self as i32
149 }
150 fn proto_name(&self) -> &'static str {
151 match self {
152 Self::TABLE_TYPE_UNSPECIFIED => "TABLE_TYPE_UNSPECIFIED",
153 Self::MANAGED => "MANAGED",
154 Self::EXTERNAL => "EXTERNAL",
155 Self::VIEW => "VIEW",
156 Self::MATERIALIZED_VIEW => "MATERIALIZED_VIEW",
157 Self::STREAMING_TABLE => "STREAMING_TABLE",
158 Self::METRIC_VIEW => "METRIC_VIEW",
159 }
160 }
161 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
162 match name {
163 "TABLE_TYPE_UNSPECIFIED" => {
164 ::core::option::Option::Some(Self::TABLE_TYPE_UNSPECIFIED)
165 }
166 "MANAGED" => ::core::option::Option::Some(Self::MANAGED),
167 "EXTERNAL" => ::core::option::Option::Some(Self::EXTERNAL),
168 "VIEW" => ::core::option::Option::Some(Self::VIEW),
169 "MATERIALIZED_VIEW" => ::core::option::Option::Some(Self::MATERIALIZED_VIEW),
170 "STREAMING_TABLE" => ::core::option::Option::Some(Self::STREAMING_TABLE),
171 "METRIC_VIEW" => ::core::option::Option::Some(Self::METRIC_VIEW),
172 _ => ::core::option::Option::None,
173 }
174 }
175 fn values() -> &'static [Self] {
176 &[
177 Self::TABLE_TYPE_UNSPECIFIED,
178 Self::MANAGED,
179 Self::EXTERNAL,
180 Self::VIEW,
181 Self::MATERIALIZED_VIEW,
182 Self::STREAMING_TABLE,
183 Self::METRIC_VIEW,
184 ]
185 }
186}
187#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
188#[repr(i32)]
189pub enum DataSourceFormat {
190 DATA_SOURCE_FORMAT_UNSPECIFIED = 0i32,
191 DELTA = 1i32,
192 ICEBERG = 2i32,
193 HUDI = 3i32,
194 PARQUET = 4i32,
195 CSV = 5i32,
196 JSON = 6i32,
197 ORC = 7i32,
198 AVRO = 8i32,
199 TEXT = 9i32,
200 UNITY_CATALOG = 10i32,
201 DELTASHARING = 11i32,
202}
203impl DataSourceFormat {
204 #[allow(non_upper_case_globals)]
206 pub const DataSourceFormatUnspecified: Self = Self::DATA_SOURCE_FORMAT_UNSPECIFIED;
207 #[allow(non_upper_case_globals)]
209 pub const Delta: Self = Self::DELTA;
210 #[allow(non_upper_case_globals)]
212 pub const Iceberg: Self = Self::ICEBERG;
213 #[allow(non_upper_case_globals)]
215 pub const Hudi: Self = Self::HUDI;
216 #[allow(non_upper_case_globals)]
218 pub const Parquet: Self = Self::PARQUET;
219 #[allow(non_upper_case_globals)]
221 pub const Csv: Self = Self::CSV;
222 #[allow(non_upper_case_globals)]
224 pub const Json: Self = Self::JSON;
225 #[allow(non_upper_case_globals)]
227 pub const Orc: Self = Self::ORC;
228 #[allow(non_upper_case_globals)]
230 pub const Avro: Self = Self::AVRO;
231 #[allow(non_upper_case_globals)]
233 pub const Text: Self = Self::TEXT;
234 #[allow(non_upper_case_globals)]
236 pub const UnityCatalog: Self = Self::UNITY_CATALOG;
237 #[allow(non_upper_case_globals)]
239 pub const Deltasharing: Self = Self::DELTASHARING;
240}
241impl ::core::default::Default for DataSourceFormat {
242 fn default() -> Self {
243 Self::DATA_SOURCE_FORMAT_UNSPECIFIED
244 }
245}
246impl ::serde::Serialize for DataSourceFormat {
247 fn serialize<S: ::serde::Serializer>(
248 &self,
249 s: S,
250 ) -> ::core::result::Result<S::Ok, S::Error> {
251 s.serialize_str(::buffa::Enumeration::proto_name(self))
252 }
253}
254impl<'de> ::serde::Deserialize<'de> for DataSourceFormat {
255 fn deserialize<D: ::serde::Deserializer<'de>>(
256 d: D,
257 ) -> ::core::result::Result<Self, D::Error> {
258 struct _V;
259 impl ::serde::de::Visitor<'_> for _V {
260 type Value = DataSourceFormat;
261 fn expecting(
262 &self,
263 f: &mut ::core::fmt::Formatter<'_>,
264 ) -> ::core::fmt::Result {
265 f.write_str(
266 concat!(
267 "a string, integer, or null for ", stringify!(DataSourceFormat)
268 ),
269 )
270 }
271 fn visit_str<E: ::serde::de::Error>(
272 self,
273 v: &str,
274 ) -> ::core::result::Result<DataSourceFormat, E> {
275 <DataSourceFormat as ::buffa::Enumeration>::from_proto_name(v)
276 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
277 }
278 fn visit_i64<E: ::serde::de::Error>(
279 self,
280 v: i64,
281 ) -> ::core::result::Result<DataSourceFormat, E> {
282 let v32 = i32::try_from(v)
283 .map_err(|_| {
284 ::serde::de::Error::custom(
285 ::buffa::alloc::format!("enum value {v} out of i32 range"),
286 )
287 })?;
288 <DataSourceFormat as ::buffa::Enumeration>::from_i32(v32)
289 .ok_or_else(|| {
290 ::serde::de::Error::custom(
291 ::buffa::alloc::format!("unknown enum value {v32}"),
292 )
293 })
294 }
295 fn visit_u64<E: ::serde::de::Error>(
296 self,
297 v: u64,
298 ) -> ::core::result::Result<DataSourceFormat, E> {
299 let v32 = i32::try_from(v)
300 .map_err(|_| {
301 ::serde::de::Error::custom(
302 ::buffa::alloc::format!("enum value {v} out of i32 range"),
303 )
304 })?;
305 <DataSourceFormat as ::buffa::Enumeration>::from_i32(v32)
306 .ok_or_else(|| {
307 ::serde::de::Error::custom(
308 ::buffa::alloc::format!("unknown enum value {v32}"),
309 )
310 })
311 }
312 fn visit_unit<E: ::serde::de::Error>(
313 self,
314 ) -> ::core::result::Result<DataSourceFormat, E> {
315 ::core::result::Result::Ok(::core::default::Default::default())
316 }
317 }
318 d.deserialize_any(_V)
319 }
320}
321impl ::buffa::json_helpers::ProtoElemJson for DataSourceFormat {
322 fn serialize_proto_json<S: ::serde::Serializer>(
323 v: &Self,
324 s: S,
325 ) -> ::core::result::Result<S::Ok, S::Error> {
326 ::serde::Serialize::serialize(v, s)
327 }
328 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
329 d: D,
330 ) -> ::core::result::Result<Self, D::Error> {
331 <Self as ::serde::Deserialize>::deserialize(d)
332 }
333}
334impl ::buffa::Enumeration for DataSourceFormat {
335 fn from_i32(value: i32) -> ::core::option::Option<Self> {
336 match value {
337 0i32 => ::core::option::Option::Some(Self::DATA_SOURCE_FORMAT_UNSPECIFIED),
338 1i32 => ::core::option::Option::Some(Self::DELTA),
339 2i32 => ::core::option::Option::Some(Self::ICEBERG),
340 3i32 => ::core::option::Option::Some(Self::HUDI),
341 4i32 => ::core::option::Option::Some(Self::PARQUET),
342 5i32 => ::core::option::Option::Some(Self::CSV),
343 6i32 => ::core::option::Option::Some(Self::JSON),
344 7i32 => ::core::option::Option::Some(Self::ORC),
345 8i32 => ::core::option::Option::Some(Self::AVRO),
346 9i32 => ::core::option::Option::Some(Self::TEXT),
347 10i32 => ::core::option::Option::Some(Self::UNITY_CATALOG),
348 11i32 => ::core::option::Option::Some(Self::DELTASHARING),
349 _ => ::core::option::Option::None,
350 }
351 }
352 fn to_i32(&self) -> i32 {
353 *self as i32
354 }
355 fn proto_name(&self) -> &'static str {
356 match self {
357 Self::DATA_SOURCE_FORMAT_UNSPECIFIED => "DATA_SOURCE_FORMAT_UNSPECIFIED",
358 Self::DELTA => "DELTA",
359 Self::ICEBERG => "ICEBERG",
360 Self::HUDI => "HUDI",
361 Self::PARQUET => "PARQUET",
362 Self::CSV => "CSV",
363 Self::JSON => "JSON",
364 Self::ORC => "ORC",
365 Self::AVRO => "AVRO",
366 Self::TEXT => "TEXT",
367 Self::UNITY_CATALOG => "UNITY_CATALOG",
368 Self::DELTASHARING => "DELTASHARING",
369 }
370 }
371 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
372 match name {
373 "DATA_SOURCE_FORMAT_UNSPECIFIED" => {
374 ::core::option::Option::Some(Self::DATA_SOURCE_FORMAT_UNSPECIFIED)
375 }
376 "DELTA" => ::core::option::Option::Some(Self::DELTA),
377 "ICEBERG" => ::core::option::Option::Some(Self::ICEBERG),
378 "HUDI" => ::core::option::Option::Some(Self::HUDI),
379 "PARQUET" => ::core::option::Option::Some(Self::PARQUET),
380 "CSV" => ::core::option::Option::Some(Self::CSV),
381 "JSON" => ::core::option::Option::Some(Self::JSON),
382 "ORC" => ::core::option::Option::Some(Self::ORC),
383 "AVRO" => ::core::option::Option::Some(Self::AVRO),
384 "TEXT" => ::core::option::Option::Some(Self::TEXT),
385 "UNITY_CATALOG" => ::core::option::Option::Some(Self::UNITY_CATALOG),
386 "DELTASHARING" => ::core::option::Option::Some(Self::DELTASHARING),
387 _ => ::core::option::Option::None,
388 }
389 }
390 fn values() -> &'static [Self] {
391 &[
392 Self::DATA_SOURCE_FORMAT_UNSPECIFIED,
393 Self::DELTA,
394 Self::ICEBERG,
395 Self::HUDI,
396 Self::PARQUET,
397 Self::CSV,
398 Self::JSON,
399 Self::ORC,
400 Self::AVRO,
401 Self::TEXT,
402 Self::UNITY_CATALOG,
403 Self::DELTASHARING,
404 ]
405 }
406}
407#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
408#[repr(i32)]
409pub enum ColumnTypeName {
410 COLUMN_TYPE_NAME_UNSPECIFIED = 0i32,
411 BOOLEAN = 1i32,
412 BYTE = 2i32,
413 SHORT = 3i32,
414 INT = 4i32,
415 LONG = 5i32,
416 FLOAT = 6i32,
417 DOUBLE = 7i32,
418 DATE = 8i32,
419 TIMESTAMP = 9i32,
420 STRING = 10i32,
421 BINARY = 11i32,
422 DECIMAL = 12i32,
423 INTERVAL = 13i32,
424 ARRAY = 14i32,
425 STRUCT = 15i32,
426 MAP = 16i32,
427 CHAR = 17i32,
428 NULL = 18i32,
429 USER_DEFINED_TYPE = 19i32,
430 TIMESTAMP_NTZ = 20i32,
431 VARIANT = 21i32,
432 TABLE_TYPE = 22i32,
433}
434impl ColumnTypeName {
435 #[allow(non_upper_case_globals)]
437 pub const ColumnTypeNameUnspecified: Self = Self::COLUMN_TYPE_NAME_UNSPECIFIED;
438 #[allow(non_upper_case_globals)]
440 pub const Boolean: Self = Self::BOOLEAN;
441 #[allow(non_upper_case_globals)]
443 pub const Byte: Self = Self::BYTE;
444 #[allow(non_upper_case_globals)]
446 pub const Short: Self = Self::SHORT;
447 #[allow(non_upper_case_globals)]
449 pub const Int: Self = Self::INT;
450 #[allow(non_upper_case_globals)]
452 pub const Long: Self = Self::LONG;
453 #[allow(non_upper_case_globals)]
455 pub const Float: Self = Self::FLOAT;
456 #[allow(non_upper_case_globals)]
458 pub const Double: Self = Self::DOUBLE;
459 #[allow(non_upper_case_globals)]
461 pub const Date: Self = Self::DATE;
462 #[allow(non_upper_case_globals)]
464 pub const Timestamp: Self = Self::TIMESTAMP;
465 #[allow(non_upper_case_globals)]
467 pub const String: Self = Self::STRING;
468 #[allow(non_upper_case_globals)]
470 pub const Binary: Self = Self::BINARY;
471 #[allow(non_upper_case_globals)]
473 pub const Decimal: Self = Self::DECIMAL;
474 #[allow(non_upper_case_globals)]
476 pub const Interval: Self = Self::INTERVAL;
477 #[allow(non_upper_case_globals)]
479 pub const Array: Self = Self::ARRAY;
480 #[allow(non_upper_case_globals)]
482 pub const Struct: Self = Self::STRUCT;
483 #[allow(non_upper_case_globals)]
485 pub const Map: Self = Self::MAP;
486 #[allow(non_upper_case_globals)]
488 pub const Char: Self = Self::CHAR;
489 #[allow(non_upper_case_globals)]
491 pub const Null: Self = Self::NULL;
492 #[allow(non_upper_case_globals)]
494 pub const UserDefinedType: Self = Self::USER_DEFINED_TYPE;
495 #[allow(non_upper_case_globals)]
497 pub const TimestampNtz: Self = Self::TIMESTAMP_NTZ;
498 #[allow(non_upper_case_globals)]
500 pub const Variant: Self = Self::VARIANT;
501 #[allow(non_upper_case_globals)]
503 pub const TableType: Self = Self::TABLE_TYPE;
504}
505impl ::core::default::Default for ColumnTypeName {
506 fn default() -> Self {
507 Self::COLUMN_TYPE_NAME_UNSPECIFIED
508 }
509}
510impl ::serde::Serialize for ColumnTypeName {
511 fn serialize<S: ::serde::Serializer>(
512 &self,
513 s: S,
514 ) -> ::core::result::Result<S::Ok, S::Error> {
515 s.serialize_str(::buffa::Enumeration::proto_name(self))
516 }
517}
518impl<'de> ::serde::Deserialize<'de> for ColumnTypeName {
519 fn deserialize<D: ::serde::Deserializer<'de>>(
520 d: D,
521 ) -> ::core::result::Result<Self, D::Error> {
522 struct _V;
523 impl ::serde::de::Visitor<'_> for _V {
524 type Value = ColumnTypeName;
525 fn expecting(
526 &self,
527 f: &mut ::core::fmt::Formatter<'_>,
528 ) -> ::core::fmt::Result {
529 f.write_str(
530 concat!(
531 "a string, integer, or null for ", stringify!(ColumnTypeName)
532 ),
533 )
534 }
535 fn visit_str<E: ::serde::de::Error>(
536 self,
537 v: &str,
538 ) -> ::core::result::Result<ColumnTypeName, E> {
539 <ColumnTypeName as ::buffa::Enumeration>::from_proto_name(v)
540 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
541 }
542 fn visit_i64<E: ::serde::de::Error>(
543 self,
544 v: i64,
545 ) -> ::core::result::Result<ColumnTypeName, E> {
546 let v32 = i32::try_from(v)
547 .map_err(|_| {
548 ::serde::de::Error::custom(
549 ::buffa::alloc::format!("enum value {v} out of i32 range"),
550 )
551 })?;
552 <ColumnTypeName as ::buffa::Enumeration>::from_i32(v32)
553 .ok_or_else(|| {
554 ::serde::de::Error::custom(
555 ::buffa::alloc::format!("unknown enum value {v32}"),
556 )
557 })
558 }
559 fn visit_u64<E: ::serde::de::Error>(
560 self,
561 v: u64,
562 ) -> ::core::result::Result<ColumnTypeName, E> {
563 let v32 = i32::try_from(v)
564 .map_err(|_| {
565 ::serde::de::Error::custom(
566 ::buffa::alloc::format!("enum value {v} out of i32 range"),
567 )
568 })?;
569 <ColumnTypeName as ::buffa::Enumeration>::from_i32(v32)
570 .ok_or_else(|| {
571 ::serde::de::Error::custom(
572 ::buffa::alloc::format!("unknown enum value {v32}"),
573 )
574 })
575 }
576 fn visit_unit<E: ::serde::de::Error>(
577 self,
578 ) -> ::core::result::Result<ColumnTypeName, E> {
579 ::core::result::Result::Ok(::core::default::Default::default())
580 }
581 }
582 d.deserialize_any(_V)
583 }
584}
585impl ::buffa::json_helpers::ProtoElemJson for ColumnTypeName {
586 fn serialize_proto_json<S: ::serde::Serializer>(
587 v: &Self,
588 s: S,
589 ) -> ::core::result::Result<S::Ok, S::Error> {
590 ::serde::Serialize::serialize(v, s)
591 }
592 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
593 d: D,
594 ) -> ::core::result::Result<Self, D::Error> {
595 <Self as ::serde::Deserialize>::deserialize(d)
596 }
597}
598impl ::buffa::Enumeration for ColumnTypeName {
599 fn from_i32(value: i32) -> ::core::option::Option<Self> {
600 match value {
601 0i32 => ::core::option::Option::Some(Self::COLUMN_TYPE_NAME_UNSPECIFIED),
602 1i32 => ::core::option::Option::Some(Self::BOOLEAN),
603 2i32 => ::core::option::Option::Some(Self::BYTE),
604 3i32 => ::core::option::Option::Some(Self::SHORT),
605 4i32 => ::core::option::Option::Some(Self::INT),
606 5i32 => ::core::option::Option::Some(Self::LONG),
607 6i32 => ::core::option::Option::Some(Self::FLOAT),
608 7i32 => ::core::option::Option::Some(Self::DOUBLE),
609 8i32 => ::core::option::Option::Some(Self::DATE),
610 9i32 => ::core::option::Option::Some(Self::TIMESTAMP),
611 10i32 => ::core::option::Option::Some(Self::STRING),
612 11i32 => ::core::option::Option::Some(Self::BINARY),
613 12i32 => ::core::option::Option::Some(Self::DECIMAL),
614 13i32 => ::core::option::Option::Some(Self::INTERVAL),
615 14i32 => ::core::option::Option::Some(Self::ARRAY),
616 15i32 => ::core::option::Option::Some(Self::STRUCT),
617 16i32 => ::core::option::Option::Some(Self::MAP),
618 17i32 => ::core::option::Option::Some(Self::CHAR),
619 18i32 => ::core::option::Option::Some(Self::NULL),
620 19i32 => ::core::option::Option::Some(Self::USER_DEFINED_TYPE),
621 20i32 => ::core::option::Option::Some(Self::TIMESTAMP_NTZ),
622 21i32 => ::core::option::Option::Some(Self::VARIANT),
623 22i32 => ::core::option::Option::Some(Self::TABLE_TYPE),
624 _ => ::core::option::Option::None,
625 }
626 }
627 fn to_i32(&self) -> i32 {
628 *self as i32
629 }
630 fn proto_name(&self) -> &'static str {
631 match self {
632 Self::COLUMN_TYPE_NAME_UNSPECIFIED => "COLUMN_TYPE_NAME_UNSPECIFIED",
633 Self::BOOLEAN => "BOOLEAN",
634 Self::BYTE => "BYTE",
635 Self::SHORT => "SHORT",
636 Self::INT => "INT",
637 Self::LONG => "LONG",
638 Self::FLOAT => "FLOAT",
639 Self::DOUBLE => "DOUBLE",
640 Self::DATE => "DATE",
641 Self::TIMESTAMP => "TIMESTAMP",
642 Self::STRING => "STRING",
643 Self::BINARY => "BINARY",
644 Self::DECIMAL => "DECIMAL",
645 Self::INTERVAL => "INTERVAL",
646 Self::ARRAY => "ARRAY",
647 Self::STRUCT => "STRUCT",
648 Self::MAP => "MAP",
649 Self::CHAR => "CHAR",
650 Self::NULL => "NULL",
651 Self::USER_DEFINED_TYPE => "USER_DEFINED_TYPE",
652 Self::TIMESTAMP_NTZ => "TIMESTAMP_NTZ",
653 Self::VARIANT => "VARIANT",
654 Self::TABLE_TYPE => "TABLE_TYPE",
655 }
656 }
657 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
658 match name {
659 "COLUMN_TYPE_NAME_UNSPECIFIED" => {
660 ::core::option::Option::Some(Self::COLUMN_TYPE_NAME_UNSPECIFIED)
661 }
662 "BOOLEAN" => ::core::option::Option::Some(Self::BOOLEAN),
663 "BYTE" => ::core::option::Option::Some(Self::BYTE),
664 "SHORT" => ::core::option::Option::Some(Self::SHORT),
665 "INT" => ::core::option::Option::Some(Self::INT),
666 "LONG" => ::core::option::Option::Some(Self::LONG),
667 "FLOAT" => ::core::option::Option::Some(Self::FLOAT),
668 "DOUBLE" => ::core::option::Option::Some(Self::DOUBLE),
669 "DATE" => ::core::option::Option::Some(Self::DATE),
670 "TIMESTAMP" => ::core::option::Option::Some(Self::TIMESTAMP),
671 "STRING" => ::core::option::Option::Some(Self::STRING),
672 "BINARY" => ::core::option::Option::Some(Self::BINARY),
673 "DECIMAL" => ::core::option::Option::Some(Self::DECIMAL),
674 "INTERVAL" => ::core::option::Option::Some(Self::INTERVAL),
675 "ARRAY" => ::core::option::Option::Some(Self::ARRAY),
676 "STRUCT" => ::core::option::Option::Some(Self::STRUCT),
677 "MAP" => ::core::option::Option::Some(Self::MAP),
678 "CHAR" => ::core::option::Option::Some(Self::CHAR),
679 "NULL" => ::core::option::Option::Some(Self::NULL),
680 "USER_DEFINED_TYPE" => ::core::option::Option::Some(Self::USER_DEFINED_TYPE),
681 "TIMESTAMP_NTZ" => ::core::option::Option::Some(Self::TIMESTAMP_NTZ),
682 "VARIANT" => ::core::option::Option::Some(Self::VARIANT),
683 "TABLE_TYPE" => ::core::option::Option::Some(Self::TABLE_TYPE),
684 _ => ::core::option::Option::None,
685 }
686 }
687 fn values() -> &'static [Self] {
688 &[
689 Self::COLUMN_TYPE_NAME_UNSPECIFIED,
690 Self::BOOLEAN,
691 Self::BYTE,
692 Self::SHORT,
693 Self::INT,
694 Self::LONG,
695 Self::FLOAT,
696 Self::DOUBLE,
697 Self::DATE,
698 Self::TIMESTAMP,
699 Self::STRING,
700 Self::BINARY,
701 Self::DECIMAL,
702 Self::INTERVAL,
703 Self::ARRAY,
704 Self::STRUCT,
705 Self::MAP,
706 Self::CHAR,
707 Self::NULL,
708 Self::USER_DEFINED_TYPE,
709 Self::TIMESTAMP_NTZ,
710 Self::VARIANT,
711 Self::TABLE_TYPE,
712 ]
713 }
714}
715#[derive(Clone, PartialEq, Default)]
716#[derive(::serde::Serialize, ::serde::Deserialize)]
717#[serde(default)]
718pub struct TableSummary {
719 #[serde(
723 rename = "full_name",
724 alias = "fullName",
725 with = "::buffa::json_helpers::proto_string",
726 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
727 )]
728 pub full_name: ::buffa::alloc::string::String,
729 #[serde(
731 rename = "table_type",
732 alias = "tableType",
733 with = "::buffa::json_helpers::proto_enum",
734 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
735 )]
736 pub table_type: ::buffa::EnumValue<TableType>,
737 #[serde(skip)]
738 #[doc(hidden)]
739 pub __buffa_unknown_fields: ::buffa::UnknownFields,
740}
741impl ::core::fmt::Debug for TableSummary {
742 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
743 f.debug_struct("TableSummary")
744 .field("full_name", &self.full_name)
745 .field("table_type", &self.table_type)
746 .finish()
747 }
748}
749impl TableSummary {
750 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.TableSummary";
755}
756impl ::buffa::DefaultInstance for TableSummary {
757 fn default_instance() -> &'static Self {
758 static VALUE: ::buffa::__private::OnceBox<TableSummary> = ::buffa::__private::OnceBox::new();
759 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
760 }
761}
762impl ::buffa::MessageName for TableSummary {
763 const PACKAGE: &'static str = "unitycatalog.tables.v1";
764 const NAME: &'static str = "TableSummary";
765 const FULL_NAME: &'static str = "unitycatalog.tables.v1.TableSummary";
766 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.TableSummary";
767}
768impl ::buffa::Message for TableSummary {
769 #[allow(clippy::let_and_return)]
775 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
776 #[allow(unused_imports)]
777 use ::buffa::Enumeration as _;
778 let mut size = 0u32;
779 if !self.full_name.is_empty() {
780 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
781 }
782 {
783 let val = self.table_type.to_i32();
784 if val != 0 {
785 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
786 }
787 }
788 size += self.__buffa_unknown_fields.encoded_len() as u32;
789 size
790 }
791 fn write_to(
792 &self,
793 _cache: &mut ::buffa::SizeCache,
794 buf: &mut impl ::buffa::bytes::BufMut,
795 ) {
796 #[allow(unused_imports)]
797 use ::buffa::Enumeration as _;
798 if !self.full_name.is_empty() {
799 ::buffa::encoding::Tag::new(
800 1u32,
801 ::buffa::encoding::WireType::LengthDelimited,
802 )
803 .encode(buf);
804 ::buffa::types::encode_string(&self.full_name, buf);
805 }
806 {
807 let val = self.table_type.to_i32();
808 if val != 0 {
809 ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
810 .encode(buf);
811 ::buffa::types::encode_int32(val, buf);
812 }
813 }
814 self.__buffa_unknown_fields.write_to(buf);
815 }
816 fn merge_field(
817 &mut self,
818 tag: ::buffa::encoding::Tag,
819 buf: &mut impl ::buffa::bytes::Buf,
820 depth: u32,
821 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
822 #[allow(unused_imports)]
823 use ::buffa::bytes::Buf as _;
824 #[allow(unused_imports)]
825 use ::buffa::Enumeration as _;
826 match tag.field_number() {
827 1u32 => {
828 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
829 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
830 field_number: 1u32,
831 expected: 2u8,
832 actual: tag.wire_type() as u8,
833 });
834 }
835 ::buffa::types::merge_string(&mut self.full_name, buf)?;
836 }
837 2u32 => {
838 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
839 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
840 field_number: 2u32,
841 expected: 0u8,
842 actual: tag.wire_type() as u8,
843 });
844 }
845 self.table_type = ::buffa::EnumValue::from(
846 ::buffa::types::decode_int32(buf)?,
847 );
848 }
849 _ => {
850 self.__buffa_unknown_fields
851 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
852 }
853 }
854 ::core::result::Result::Ok(())
855 }
856 fn clear(&mut self) {
857 self.full_name.clear();
858 self.table_type = ::buffa::EnumValue::from(0);
859 self.__buffa_unknown_fields.clear();
860 }
861}
862impl ::buffa::ExtensionSet for TableSummary {
863 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.TableSummary";
864 fn unknown_fields(&self) -> &::buffa::UnknownFields {
865 &self.__buffa_unknown_fields
866 }
867 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
868 &mut self.__buffa_unknown_fields
869 }
870}
871impl ::buffa::json_helpers::ProtoElemJson for TableSummary {
872 fn serialize_proto_json<S: ::serde::Serializer>(
873 v: &Self,
874 s: S,
875 ) -> ::core::result::Result<S::Ok, S::Error> {
876 ::serde::Serialize::serialize(v, s)
877 }
878 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
879 d: D,
880 ) -> ::core::result::Result<Self, D::Error> {
881 <Self as ::serde::Deserialize>::deserialize(d)
882 }
883}
884#[doc(hidden)]
885pub const __TABLE_SUMMARY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
886 type_url: "type.googleapis.com/unitycatalog.tables.v1.TableSummary",
887 to_json: ::buffa::type_registry::any_to_json::<TableSummary>,
888 from_json: ::buffa::type_registry::any_from_json::<TableSummary>,
889 is_wkt: false,
890};
891#[derive(Clone, PartialEq, Default)]
892#[derive(::serde::Serialize, ::serde::Deserialize)]
893#[serde(default)]
894pub struct Column {
895 #[serde(
899 rename = "name",
900 with = "::buffa::json_helpers::proto_string",
901 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
902 )]
903 pub name: ::buffa::alloc::string::String,
904 #[serde(
908 rename = "type_text",
909 alias = "typeText",
910 with = "::buffa::json_helpers::proto_string",
911 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
912 )]
913 pub type_text: ::buffa::alloc::string::String,
914 #[serde(
918 rename = "type_json",
919 alias = "typeJson",
920 with = "::buffa::json_helpers::proto_string",
921 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
922 )]
923 pub type_json: ::buffa::alloc::string::String,
924 #[serde(
928 rename = "position",
929 with = "::buffa::json_helpers::opt_int32",
930 skip_serializing_if = "::core::option::Option::is_none"
931 )]
932 pub position: ::core::option::Option<i32>,
933 #[serde(
937 rename = "type_name",
938 alias = "typeName",
939 with = "::buffa::json_helpers::proto_enum",
940 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
941 )]
942 pub type_name: ::buffa::EnumValue<ColumnTypeName>,
943 #[serde(
947 rename = "type_precision",
948 alias = "typePrecision",
949 with = "::buffa::json_helpers::opt_int32",
950 skip_serializing_if = "::core::option::Option::is_none"
951 )]
952 pub type_precision: ::core::option::Option<i32>,
953 #[serde(
957 rename = "type_scale",
958 alias = "typeScale",
959 with = "::buffa::json_helpers::opt_int32",
960 skip_serializing_if = "::core::option::Option::is_none"
961 )]
962 pub type_scale: ::core::option::Option<i32>,
963 #[serde(
967 rename = "type_interval_type",
968 alias = "typeIntervalType",
969 skip_serializing_if = "::core::option::Option::is_none"
970 )]
971 pub type_interval_type: ::core::option::Option<::buffa::alloc::string::String>,
972 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
976 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
977 #[serde(
981 rename = "nullable",
982 skip_serializing_if = "::core::option::Option::is_none"
983 )]
984 pub nullable: ::core::option::Option<bool>,
985 #[serde(
989 rename = "partition_index",
990 alias = "partitionIndex",
991 with = "::buffa::json_helpers::opt_int32",
992 skip_serializing_if = "::core::option::Option::is_none"
993 )]
994 pub partition_index: ::core::option::Option<i32>,
995 #[serde(
999 rename = "column_id",
1000 alias = "columnId",
1001 skip_serializing_if = "::core::option::Option::is_none"
1002 )]
1003 pub column_id: ::core::option::Option<::buffa::alloc::string::String>,
1004 #[serde(skip)]
1005 #[doc(hidden)]
1006 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1007}
1008impl ::core::fmt::Debug for Column {
1009 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1010 f.debug_struct("Column")
1011 .field("name", &self.name)
1012 .field("type_text", &self.type_text)
1013 .field("type_json", &self.type_json)
1014 .field("position", &self.position)
1015 .field("type_name", &self.type_name)
1016 .field("type_precision", &self.type_precision)
1017 .field("type_scale", &self.type_scale)
1018 .field("type_interval_type", &self.type_interval_type)
1019 .field("comment", &self.comment)
1020 .field("nullable", &self.nullable)
1021 .field("partition_index", &self.partition_index)
1022 .field("column_id", &self.column_id)
1023 .finish()
1024 }
1025}
1026impl Column {
1027 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Column";
1032}
1033impl Column {
1034 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1035 #[inline]
1036 pub fn with_position(mut self, value: i32) -> Self {
1038 self.position = Some(value);
1039 self
1040 }
1041 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1042 #[inline]
1043 pub fn with_type_precision(mut self, value: i32) -> Self {
1045 self.type_precision = Some(value);
1046 self
1047 }
1048 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1049 #[inline]
1050 pub fn with_type_scale(mut self, value: i32) -> Self {
1052 self.type_scale = Some(value);
1053 self
1054 }
1055 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1056 #[inline]
1057 pub fn with_type_interval_type(
1059 mut self,
1060 value: impl Into<::buffa::alloc::string::String>,
1061 ) -> Self {
1062 self.type_interval_type = Some(value.into());
1063 self
1064 }
1065 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1066 #[inline]
1067 pub fn with_comment(
1069 mut self,
1070 value: impl Into<::buffa::alloc::string::String>,
1071 ) -> Self {
1072 self.comment = Some(value.into());
1073 self
1074 }
1075 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1076 #[inline]
1077 pub fn with_nullable(mut self, value: bool) -> Self {
1079 self.nullable = Some(value);
1080 self
1081 }
1082 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1083 #[inline]
1084 pub fn with_partition_index(mut self, value: i32) -> Self {
1086 self.partition_index = Some(value);
1087 self
1088 }
1089 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1090 #[inline]
1091 pub fn with_column_id(
1093 mut self,
1094 value: impl Into<::buffa::alloc::string::String>,
1095 ) -> Self {
1096 self.column_id = Some(value.into());
1097 self
1098 }
1099}
1100impl ::buffa::DefaultInstance for Column {
1101 fn default_instance() -> &'static Self {
1102 static VALUE: ::buffa::__private::OnceBox<Column> = ::buffa::__private::OnceBox::new();
1103 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1104 }
1105}
1106impl ::buffa::MessageName for Column {
1107 const PACKAGE: &'static str = "unitycatalog.tables.v1";
1108 const NAME: &'static str = "Column";
1109 const FULL_NAME: &'static str = "unitycatalog.tables.v1.Column";
1110 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Column";
1111}
1112impl ::buffa::Message for Column {
1113 #[allow(clippy::let_and_return)]
1119 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1120 #[allow(unused_imports)]
1121 use ::buffa::Enumeration as _;
1122 let mut size = 0u32;
1123 if !self.name.is_empty() {
1124 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1125 }
1126 if !self.type_text.is_empty() {
1127 size += 1u32 + ::buffa::types::string_encoded_len(&self.type_text) as u32;
1128 }
1129 if !self.type_json.is_empty() {
1130 size += 1u32 + ::buffa::types::string_encoded_len(&self.type_json) as u32;
1131 }
1132 if let Some(v) = self.position {
1133 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1134 }
1135 {
1136 let val = self.type_name.to_i32();
1137 if val != 0 {
1138 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1139 }
1140 }
1141 if let Some(v) = self.type_precision {
1142 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1143 }
1144 if let Some(v) = self.type_scale {
1145 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1146 }
1147 if let Some(ref v) = self.type_interval_type {
1148 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1149 }
1150 if let Some(ref v) = self.comment {
1151 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1152 }
1153 if self.nullable.is_some() {
1154 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1155 }
1156 if let Some(v) = self.partition_index {
1157 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1158 }
1159 if let Some(ref v) = self.column_id {
1160 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1161 }
1162 size += self.__buffa_unknown_fields.encoded_len() as u32;
1163 size
1164 }
1165 fn write_to(
1166 &self,
1167 _cache: &mut ::buffa::SizeCache,
1168 buf: &mut impl ::buffa::bytes::BufMut,
1169 ) {
1170 #[allow(unused_imports)]
1171 use ::buffa::Enumeration as _;
1172 if !self.name.is_empty() {
1173 ::buffa::encoding::Tag::new(
1174 1u32,
1175 ::buffa::encoding::WireType::LengthDelimited,
1176 )
1177 .encode(buf);
1178 ::buffa::types::encode_string(&self.name, buf);
1179 }
1180 if !self.type_text.is_empty() {
1181 ::buffa::encoding::Tag::new(
1182 2u32,
1183 ::buffa::encoding::WireType::LengthDelimited,
1184 )
1185 .encode(buf);
1186 ::buffa::types::encode_string(&self.type_text, buf);
1187 }
1188 if !self.type_json.is_empty() {
1189 ::buffa::encoding::Tag::new(
1190 3u32,
1191 ::buffa::encoding::WireType::LengthDelimited,
1192 )
1193 .encode(buf);
1194 ::buffa::types::encode_string(&self.type_json, buf);
1195 }
1196 if let Some(v) = self.position {
1197 ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
1198 .encode(buf);
1199 ::buffa::types::encode_int32(v, buf);
1200 }
1201 {
1202 let val = self.type_name.to_i32();
1203 if val != 0 {
1204 ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
1205 .encode(buf);
1206 ::buffa::types::encode_int32(val, buf);
1207 }
1208 }
1209 if let Some(v) = self.type_precision {
1210 ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
1211 .encode(buf);
1212 ::buffa::types::encode_int32(v, buf);
1213 }
1214 if let Some(v) = self.type_scale {
1215 ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
1216 .encode(buf);
1217 ::buffa::types::encode_int32(v, buf);
1218 }
1219 if let Some(ref v) = self.type_interval_type {
1220 ::buffa::encoding::Tag::new(
1221 8u32,
1222 ::buffa::encoding::WireType::LengthDelimited,
1223 )
1224 .encode(buf);
1225 ::buffa::types::encode_string(v, buf);
1226 }
1227 if let Some(ref v) = self.comment {
1228 ::buffa::encoding::Tag::new(
1229 9u32,
1230 ::buffa::encoding::WireType::LengthDelimited,
1231 )
1232 .encode(buf);
1233 ::buffa::types::encode_string(v, buf);
1234 }
1235 if let Some(v) = self.nullable {
1236 ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
1237 .encode(buf);
1238 ::buffa::types::encode_bool(v, buf);
1239 }
1240 if let Some(v) = self.partition_index {
1241 ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
1242 .encode(buf);
1243 ::buffa::types::encode_int32(v, buf);
1244 }
1245 if let Some(ref v) = self.column_id {
1246 ::buffa::encoding::Tag::new(
1247 12u32,
1248 ::buffa::encoding::WireType::LengthDelimited,
1249 )
1250 .encode(buf);
1251 ::buffa::types::encode_string(v, buf);
1252 }
1253 self.__buffa_unknown_fields.write_to(buf);
1254 }
1255 fn merge_field(
1256 &mut self,
1257 tag: ::buffa::encoding::Tag,
1258 buf: &mut impl ::buffa::bytes::Buf,
1259 depth: u32,
1260 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1261 #[allow(unused_imports)]
1262 use ::buffa::bytes::Buf as _;
1263 #[allow(unused_imports)]
1264 use ::buffa::Enumeration as _;
1265 match tag.field_number() {
1266 1u32 => {
1267 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1268 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1269 field_number: 1u32,
1270 expected: 2u8,
1271 actual: tag.wire_type() as u8,
1272 });
1273 }
1274 ::buffa::types::merge_string(&mut self.name, buf)?;
1275 }
1276 2u32 => {
1277 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1278 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1279 field_number: 2u32,
1280 expected: 2u8,
1281 actual: tag.wire_type() as u8,
1282 });
1283 }
1284 ::buffa::types::merge_string(&mut self.type_text, buf)?;
1285 }
1286 3u32 => {
1287 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1288 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1289 field_number: 3u32,
1290 expected: 2u8,
1291 actual: tag.wire_type() as u8,
1292 });
1293 }
1294 ::buffa::types::merge_string(&mut self.type_json, buf)?;
1295 }
1296 4u32 => {
1297 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1298 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1299 field_number: 4u32,
1300 expected: 0u8,
1301 actual: tag.wire_type() as u8,
1302 });
1303 }
1304 self.position = ::core::option::Option::Some(
1305 ::buffa::types::decode_int32(buf)?,
1306 );
1307 }
1308 5u32 => {
1309 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1310 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1311 field_number: 5u32,
1312 expected: 0u8,
1313 actual: tag.wire_type() as u8,
1314 });
1315 }
1316 self.type_name = ::buffa::EnumValue::from(
1317 ::buffa::types::decode_int32(buf)?,
1318 );
1319 }
1320 6u32 => {
1321 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1322 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1323 field_number: 6u32,
1324 expected: 0u8,
1325 actual: tag.wire_type() as u8,
1326 });
1327 }
1328 self.type_precision = ::core::option::Option::Some(
1329 ::buffa::types::decode_int32(buf)?,
1330 );
1331 }
1332 7u32 => {
1333 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1334 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1335 field_number: 7u32,
1336 expected: 0u8,
1337 actual: tag.wire_type() as u8,
1338 });
1339 }
1340 self.type_scale = ::core::option::Option::Some(
1341 ::buffa::types::decode_int32(buf)?,
1342 );
1343 }
1344 8u32 => {
1345 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1346 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1347 field_number: 8u32,
1348 expected: 2u8,
1349 actual: tag.wire_type() as u8,
1350 });
1351 }
1352 ::buffa::types::merge_string(
1353 self
1354 .type_interval_type
1355 .get_or_insert_with(::buffa::alloc::string::String::new),
1356 buf,
1357 )?;
1358 }
1359 9u32 => {
1360 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1361 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1362 field_number: 9u32,
1363 expected: 2u8,
1364 actual: tag.wire_type() as u8,
1365 });
1366 }
1367 ::buffa::types::merge_string(
1368 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1369 buf,
1370 )?;
1371 }
1372 10u32 => {
1373 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1374 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1375 field_number: 10u32,
1376 expected: 0u8,
1377 actual: tag.wire_type() as u8,
1378 });
1379 }
1380 self.nullable = ::core::option::Option::Some(
1381 ::buffa::types::decode_bool(buf)?,
1382 );
1383 }
1384 11u32 => {
1385 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1386 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1387 field_number: 11u32,
1388 expected: 0u8,
1389 actual: tag.wire_type() as u8,
1390 });
1391 }
1392 self.partition_index = ::core::option::Option::Some(
1393 ::buffa::types::decode_int32(buf)?,
1394 );
1395 }
1396 12u32 => {
1397 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1398 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1399 field_number: 12u32,
1400 expected: 2u8,
1401 actual: tag.wire_type() as u8,
1402 });
1403 }
1404 ::buffa::types::merge_string(
1405 self
1406 .column_id
1407 .get_or_insert_with(::buffa::alloc::string::String::new),
1408 buf,
1409 )?;
1410 }
1411 _ => {
1412 self.__buffa_unknown_fields
1413 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1414 }
1415 }
1416 ::core::result::Result::Ok(())
1417 }
1418 fn clear(&mut self) {
1419 self.name.clear();
1420 self.type_text.clear();
1421 self.type_json.clear();
1422 self.position = ::core::option::Option::None;
1423 self.type_name = ::buffa::EnumValue::from(0);
1424 self.type_precision = ::core::option::Option::None;
1425 self.type_scale = ::core::option::Option::None;
1426 self.type_interval_type = ::core::option::Option::None;
1427 self.comment = ::core::option::Option::None;
1428 self.nullable = ::core::option::Option::None;
1429 self.partition_index = ::core::option::Option::None;
1430 self.column_id = ::core::option::Option::None;
1431 self.__buffa_unknown_fields.clear();
1432 }
1433}
1434impl ::buffa::ExtensionSet for Column {
1435 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.Column";
1436 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1437 &self.__buffa_unknown_fields
1438 }
1439 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1440 &mut self.__buffa_unknown_fields
1441 }
1442}
1443impl ::buffa::json_helpers::ProtoElemJson for Column {
1444 fn serialize_proto_json<S: ::serde::Serializer>(
1445 v: &Self,
1446 s: S,
1447 ) -> ::core::result::Result<S::Ok, S::Error> {
1448 ::serde::Serialize::serialize(v, s)
1449 }
1450 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1451 d: D,
1452 ) -> ::core::result::Result<Self, D::Error> {
1453 <Self as ::serde::Deserialize>::deserialize(d)
1454 }
1455}
1456#[doc(hidden)]
1457pub const __COLUMN_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1458 type_url: "type.googleapis.com/unitycatalog.tables.v1.Column",
1459 to_json: ::buffa::type_registry::any_to_json::<Column>,
1460 from_json: ::buffa::type_registry::any_from_json::<Column>,
1461 is_wkt: false,
1462};
1463#[derive(Clone, PartialEq, Default)]
1465#[derive(::serde::Serialize, ::serde::Deserialize)]
1466#[serde(default)]
1467pub struct TableDependency {
1468 #[serde(
1473 rename = "table_full_name",
1474 alias = "tableFullName",
1475 with = "::buffa::json_helpers::proto_string",
1476 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1477 )]
1478 pub table_full_name: ::buffa::alloc::string::String,
1479 #[serde(skip)]
1480 #[doc(hidden)]
1481 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1482}
1483impl ::core::fmt::Debug for TableDependency {
1484 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1485 f.debug_struct("TableDependency")
1486 .field("table_full_name", &self.table_full_name)
1487 .finish()
1488 }
1489}
1490impl TableDependency {
1491 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.TableDependency";
1496}
1497impl ::buffa::DefaultInstance for TableDependency {
1498 fn default_instance() -> &'static Self {
1499 static VALUE: ::buffa::__private::OnceBox<TableDependency> = ::buffa::__private::OnceBox::new();
1500 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1501 }
1502}
1503impl ::buffa::MessageName for TableDependency {
1504 const PACKAGE: &'static str = "unitycatalog.tables.v1";
1505 const NAME: &'static str = "TableDependency";
1506 const FULL_NAME: &'static str = "unitycatalog.tables.v1.TableDependency";
1507 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.TableDependency";
1508}
1509impl ::buffa::Message for TableDependency {
1510 #[allow(clippy::let_and_return)]
1516 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1517 #[allow(unused_imports)]
1518 use ::buffa::Enumeration as _;
1519 let mut size = 0u32;
1520 if !self.table_full_name.is_empty() {
1521 size
1522 += 1u32
1523 + ::buffa::types::string_encoded_len(&self.table_full_name) as u32;
1524 }
1525 size += self.__buffa_unknown_fields.encoded_len() as u32;
1526 size
1527 }
1528 fn write_to(
1529 &self,
1530 _cache: &mut ::buffa::SizeCache,
1531 buf: &mut impl ::buffa::bytes::BufMut,
1532 ) {
1533 #[allow(unused_imports)]
1534 use ::buffa::Enumeration as _;
1535 if !self.table_full_name.is_empty() {
1536 ::buffa::encoding::Tag::new(
1537 1u32,
1538 ::buffa::encoding::WireType::LengthDelimited,
1539 )
1540 .encode(buf);
1541 ::buffa::types::encode_string(&self.table_full_name, buf);
1542 }
1543 self.__buffa_unknown_fields.write_to(buf);
1544 }
1545 fn merge_field(
1546 &mut self,
1547 tag: ::buffa::encoding::Tag,
1548 buf: &mut impl ::buffa::bytes::Buf,
1549 depth: u32,
1550 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1551 #[allow(unused_imports)]
1552 use ::buffa::bytes::Buf as _;
1553 #[allow(unused_imports)]
1554 use ::buffa::Enumeration as _;
1555 match tag.field_number() {
1556 1u32 => {
1557 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1558 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1559 field_number: 1u32,
1560 expected: 2u8,
1561 actual: tag.wire_type() as u8,
1562 });
1563 }
1564 ::buffa::types::merge_string(&mut self.table_full_name, buf)?;
1565 }
1566 _ => {
1567 self.__buffa_unknown_fields
1568 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1569 }
1570 }
1571 ::core::result::Result::Ok(())
1572 }
1573 fn clear(&mut self) {
1574 self.table_full_name.clear();
1575 self.__buffa_unknown_fields.clear();
1576 }
1577}
1578impl ::buffa::ExtensionSet for TableDependency {
1579 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.TableDependency";
1580 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1581 &self.__buffa_unknown_fields
1582 }
1583 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1584 &mut self.__buffa_unknown_fields
1585 }
1586}
1587impl ::buffa::json_helpers::ProtoElemJson for TableDependency {
1588 fn serialize_proto_json<S: ::serde::Serializer>(
1589 v: &Self,
1590 s: S,
1591 ) -> ::core::result::Result<S::Ok, S::Error> {
1592 ::serde::Serialize::serialize(v, s)
1593 }
1594 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1595 d: D,
1596 ) -> ::core::result::Result<Self, D::Error> {
1597 <Self as ::serde::Deserialize>::deserialize(d)
1598 }
1599}
1600#[doc(hidden)]
1601pub const __TABLE_DEPENDENCY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1602 type_url: "type.googleapis.com/unitycatalog.tables.v1.TableDependency",
1603 to_json: ::buffa::type_registry::any_to_json::<TableDependency>,
1604 from_json: ::buffa::type_registry::any_from_json::<TableDependency>,
1605 is_wkt: false,
1606};
1607#[derive(Clone, PartialEq, Default)]
1609#[derive(::serde::Serialize, ::serde::Deserialize)]
1610#[serde(default)]
1611pub struct FunctionDependency {
1612 #[serde(
1617 rename = "function_full_name",
1618 alias = "functionFullName",
1619 with = "::buffa::json_helpers::proto_string",
1620 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1621 )]
1622 pub function_full_name: ::buffa::alloc::string::String,
1623 #[serde(skip)]
1624 #[doc(hidden)]
1625 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1626}
1627impl ::core::fmt::Debug for FunctionDependency {
1628 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1629 f.debug_struct("FunctionDependency")
1630 .field("function_full_name", &self.function_full_name)
1631 .finish()
1632 }
1633}
1634impl FunctionDependency {
1635 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.FunctionDependency";
1640}
1641impl ::buffa::DefaultInstance for FunctionDependency {
1642 fn default_instance() -> &'static Self {
1643 static VALUE: ::buffa::__private::OnceBox<FunctionDependency> = ::buffa::__private::OnceBox::new();
1644 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1645 }
1646}
1647impl ::buffa::MessageName for FunctionDependency {
1648 const PACKAGE: &'static str = "unitycatalog.tables.v1";
1649 const NAME: &'static str = "FunctionDependency";
1650 const FULL_NAME: &'static str = "unitycatalog.tables.v1.FunctionDependency";
1651 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.FunctionDependency";
1652}
1653impl ::buffa::Message for FunctionDependency {
1654 #[allow(clippy::let_and_return)]
1660 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1661 #[allow(unused_imports)]
1662 use ::buffa::Enumeration as _;
1663 let mut size = 0u32;
1664 if !self.function_full_name.is_empty() {
1665 size
1666 += 1u32
1667 + ::buffa::types::string_encoded_len(&self.function_full_name)
1668 as u32;
1669 }
1670 size += self.__buffa_unknown_fields.encoded_len() as u32;
1671 size
1672 }
1673 fn write_to(
1674 &self,
1675 _cache: &mut ::buffa::SizeCache,
1676 buf: &mut impl ::buffa::bytes::BufMut,
1677 ) {
1678 #[allow(unused_imports)]
1679 use ::buffa::Enumeration as _;
1680 if !self.function_full_name.is_empty() {
1681 ::buffa::encoding::Tag::new(
1682 1u32,
1683 ::buffa::encoding::WireType::LengthDelimited,
1684 )
1685 .encode(buf);
1686 ::buffa::types::encode_string(&self.function_full_name, buf);
1687 }
1688 self.__buffa_unknown_fields.write_to(buf);
1689 }
1690 fn merge_field(
1691 &mut self,
1692 tag: ::buffa::encoding::Tag,
1693 buf: &mut impl ::buffa::bytes::Buf,
1694 depth: u32,
1695 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1696 #[allow(unused_imports)]
1697 use ::buffa::bytes::Buf as _;
1698 #[allow(unused_imports)]
1699 use ::buffa::Enumeration as _;
1700 match tag.field_number() {
1701 1u32 => {
1702 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1703 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1704 field_number: 1u32,
1705 expected: 2u8,
1706 actual: tag.wire_type() as u8,
1707 });
1708 }
1709 ::buffa::types::merge_string(&mut self.function_full_name, buf)?;
1710 }
1711 _ => {
1712 self.__buffa_unknown_fields
1713 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1714 }
1715 }
1716 ::core::result::Result::Ok(())
1717 }
1718 fn clear(&mut self) {
1719 self.function_full_name.clear();
1720 self.__buffa_unknown_fields.clear();
1721 }
1722}
1723impl ::buffa::ExtensionSet for FunctionDependency {
1724 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.FunctionDependency";
1725 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1726 &self.__buffa_unknown_fields
1727 }
1728 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1729 &mut self.__buffa_unknown_fields
1730 }
1731}
1732impl ::buffa::json_helpers::ProtoElemJson for FunctionDependency {
1733 fn serialize_proto_json<S: ::serde::Serializer>(
1734 v: &Self,
1735 s: S,
1736 ) -> ::core::result::Result<S::Ok, S::Error> {
1737 ::serde::Serialize::serialize(v, s)
1738 }
1739 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1740 d: D,
1741 ) -> ::core::result::Result<Self, D::Error> {
1742 <Self as ::serde::Deserialize>::deserialize(d)
1743 }
1744}
1745#[doc(hidden)]
1746pub const __FUNCTION_DEPENDENCY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1747 type_url: "type.googleapis.com/unitycatalog.tables.v1.FunctionDependency",
1748 to_json: ::buffa::type_registry::any_to_json::<FunctionDependency>,
1749 from_json: ::buffa::type_registry::any_from_json::<FunctionDependency>,
1750 is_wkt: false,
1751};
1752#[derive(Clone, PartialEq, Default)]
1754#[derive(::serde::Serialize)]
1755#[serde(default)]
1756pub struct Dependency {
1757 #[serde(flatten)]
1758 pub dependency: ::core::option::Option<__buffa::oneof::dependency::Dependency>,
1759 #[serde(skip)]
1760 #[doc(hidden)]
1761 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1762}
1763impl ::core::fmt::Debug for Dependency {
1764 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1765 f.debug_struct("Dependency").field("dependency", &self.dependency).finish()
1766 }
1767}
1768impl Dependency {
1769 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Dependency";
1774}
1775impl ::buffa::DefaultInstance for Dependency {
1776 fn default_instance() -> &'static Self {
1777 static VALUE: ::buffa::__private::OnceBox<Dependency> = ::buffa::__private::OnceBox::new();
1778 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1779 }
1780}
1781impl ::buffa::MessageName for Dependency {
1782 const PACKAGE: &'static str = "unitycatalog.tables.v1";
1783 const NAME: &'static str = "Dependency";
1784 const FULL_NAME: &'static str = "unitycatalog.tables.v1.Dependency";
1785 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Dependency";
1786}
1787impl ::buffa::Message for Dependency {
1788 #[allow(clippy::let_and_return)]
1794 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1795 #[allow(unused_imports)]
1796 use ::buffa::Enumeration as _;
1797 let mut size = 0u32;
1798 if let ::core::option::Option::Some(ref v) = self.dependency {
1799 match v {
1800 __buffa::oneof::dependency::Dependency::Table(x) => {
1801 let __slot = __cache.reserve();
1802 let inner = x.compute_size(__cache);
1803 __cache.set(__slot, inner);
1804 size
1805 += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1806 + inner;
1807 }
1808 __buffa::oneof::dependency::Dependency::Function(x) => {
1809 let __slot = __cache.reserve();
1810 let inner = x.compute_size(__cache);
1811 __cache.set(__slot, inner);
1812 size
1813 += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1814 + inner;
1815 }
1816 }
1817 }
1818 size += self.__buffa_unknown_fields.encoded_len() as u32;
1819 size
1820 }
1821 fn write_to(
1822 &self,
1823 __cache: &mut ::buffa::SizeCache,
1824 buf: &mut impl ::buffa::bytes::BufMut,
1825 ) {
1826 #[allow(unused_imports)]
1827 use ::buffa::Enumeration as _;
1828 if let ::core::option::Option::Some(ref v) = self.dependency {
1829 match v {
1830 __buffa::oneof::dependency::Dependency::Table(x) => {
1831 ::buffa::encoding::Tag::new(
1832 1u32,
1833 ::buffa::encoding::WireType::LengthDelimited,
1834 )
1835 .encode(buf);
1836 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1837 x.write_to(__cache, buf);
1838 }
1839 __buffa::oneof::dependency::Dependency::Function(x) => {
1840 ::buffa::encoding::Tag::new(
1841 2u32,
1842 ::buffa::encoding::WireType::LengthDelimited,
1843 )
1844 .encode(buf);
1845 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1846 x.write_to(__cache, buf);
1847 }
1848 }
1849 }
1850 self.__buffa_unknown_fields.write_to(buf);
1851 }
1852 fn merge_field(
1853 &mut self,
1854 tag: ::buffa::encoding::Tag,
1855 buf: &mut impl ::buffa::bytes::Buf,
1856 depth: u32,
1857 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1858 #[allow(unused_imports)]
1859 use ::buffa::bytes::Buf as _;
1860 #[allow(unused_imports)]
1861 use ::buffa::Enumeration as _;
1862 match tag.field_number() {
1863 1u32 => {
1864 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1865 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1866 field_number: 1u32,
1867 expected: 2u8,
1868 actual: tag.wire_type() as u8,
1869 });
1870 }
1871 if let ::core::option::Option::Some(
1872 __buffa::oneof::dependency::Dependency::Table(ref mut existing),
1873 ) = self.dependency
1874 {
1875 ::buffa::Message::merge_length_delimited(
1876 &mut **existing,
1877 buf,
1878 depth,
1879 )?;
1880 } else {
1881 let mut val = ::core::default::Default::default();
1882 ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1883 self.dependency = ::core::option::Option::Some(
1884 __buffa::oneof::dependency::Dependency::Table(
1885 ::buffa::alloc::boxed::Box::new(val),
1886 ),
1887 );
1888 }
1889 }
1890 2u32 => {
1891 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1892 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1893 field_number: 2u32,
1894 expected: 2u8,
1895 actual: tag.wire_type() as u8,
1896 });
1897 }
1898 if let ::core::option::Option::Some(
1899 __buffa::oneof::dependency::Dependency::Function(ref mut existing),
1900 ) = self.dependency
1901 {
1902 ::buffa::Message::merge_length_delimited(
1903 &mut **existing,
1904 buf,
1905 depth,
1906 )?;
1907 } else {
1908 let mut val = ::core::default::Default::default();
1909 ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1910 self.dependency = ::core::option::Option::Some(
1911 __buffa::oneof::dependency::Dependency::Function(
1912 ::buffa::alloc::boxed::Box::new(val),
1913 ),
1914 );
1915 }
1916 }
1917 _ => {
1918 self.__buffa_unknown_fields
1919 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1920 }
1921 }
1922 ::core::result::Result::Ok(())
1923 }
1924 fn clear(&mut self) {
1925 self.dependency = ::core::option::Option::None;
1926 self.__buffa_unknown_fields.clear();
1927 }
1928}
1929impl ::buffa::ExtensionSet for Dependency {
1930 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.Dependency";
1931 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1932 &self.__buffa_unknown_fields
1933 }
1934 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1935 &mut self.__buffa_unknown_fields
1936 }
1937}
1938impl<'de> serde::Deserialize<'de> for Dependency {
1939 fn deserialize<D: serde::Deserializer<'de>>(
1940 d: D,
1941 ) -> ::core::result::Result<Self, D::Error> {
1942 struct _V;
1943 impl<'de> serde::de::Visitor<'de> for _V {
1944 type Value = Dependency;
1945 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1946 f.write_str("struct Dependency")
1947 }
1948 #[allow(clippy::field_reassign_with_default)]
1949 fn visit_map<A: serde::de::MapAccess<'de>>(
1950 self,
1951 mut map: A,
1952 ) -> ::core::result::Result<Dependency, A::Error> {
1953 let mut __oneof_dependency: ::core::option::Option<
1954 __buffa::oneof::dependency::Dependency,
1955 > = None;
1956 while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
1957 match key.as_str() {
1958 "table" => {
1959 let v: ::core::option::Option<TableDependency> = map
1960 .next_value_seed(
1961 ::buffa::json_helpers::NullableDeserializeSeed(
1962 ::buffa::json_helpers::DefaultDeserializeSeed::<
1963 TableDependency,
1964 >::new(),
1965 ),
1966 )?;
1967 if let Some(v) = v {
1968 if __oneof_dependency.is_some() {
1969 return Err(
1970 serde::de::Error::custom(
1971 "multiple oneof fields set for 'dependency'",
1972 ),
1973 );
1974 }
1975 __oneof_dependency = Some(
1976 __buffa::oneof::dependency::Dependency::Table(
1977 ::buffa::alloc::boxed::Box::new(v),
1978 ),
1979 );
1980 }
1981 }
1982 "function" => {
1983 let v: ::core::option::Option<FunctionDependency> = map
1984 .next_value_seed(
1985 ::buffa::json_helpers::NullableDeserializeSeed(
1986 ::buffa::json_helpers::DefaultDeserializeSeed::<
1987 FunctionDependency,
1988 >::new(),
1989 ),
1990 )?;
1991 if let Some(v) = v {
1992 if __oneof_dependency.is_some() {
1993 return Err(
1994 serde::de::Error::custom(
1995 "multiple oneof fields set for 'dependency'",
1996 ),
1997 );
1998 }
1999 __oneof_dependency = Some(
2000 __buffa::oneof::dependency::Dependency::Function(
2001 ::buffa::alloc::boxed::Box::new(v),
2002 ),
2003 );
2004 }
2005 }
2006 _ => {
2007 map.next_value::<serde::de::IgnoredAny>()?;
2008 }
2009 }
2010 }
2011 let mut __r = <Dependency as ::core::default::Default>::default();
2012 __r.dependency = __oneof_dependency;
2013 Ok(__r)
2014 }
2015 }
2016 d.deserialize_map(_V)
2017 }
2018}
2019impl ::buffa::json_helpers::ProtoElemJson for Dependency {
2020 fn serialize_proto_json<S: ::serde::Serializer>(
2021 v: &Self,
2022 s: S,
2023 ) -> ::core::result::Result<S::Ok, S::Error> {
2024 ::serde::Serialize::serialize(v, s)
2025 }
2026 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2027 d: D,
2028 ) -> ::core::result::Result<Self, D::Error> {
2029 <Self as ::serde::Deserialize>::deserialize(d)
2030 }
2031}
2032#[doc(hidden)]
2033pub const __DEPENDENCY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2034 type_url: "type.googleapis.com/unitycatalog.tables.v1.Dependency",
2035 to_json: ::buffa::type_registry::any_to_json::<Dependency>,
2036 from_json: ::buffa::type_registry::any_from_json::<Dependency>,
2037 is_wkt: false,
2038};
2039pub mod dependency {
2040 #[allow(unused_imports)]
2041 use super::*;
2042 #[doc(inline)]
2043 pub use super::__buffa::oneof::dependency::Dependency;
2044 #[doc(inline)]
2045 pub use super::__buffa::view::oneof::dependency::Dependency as DependencyView;
2046}
2047#[derive(Clone, PartialEq, Default)]
2049#[derive(::serde::Serialize, ::serde::Deserialize)]
2050#[serde(default)]
2051pub struct DependencyList {
2052 #[serde(
2056 rename = "dependencies",
2057 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2058 deserialize_with = "::buffa::json_helpers::null_as_default"
2059 )]
2060 pub dependencies: ::buffa::alloc::vec::Vec<Dependency>,
2061 #[serde(skip)]
2062 #[doc(hidden)]
2063 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2064}
2065impl ::core::fmt::Debug for DependencyList {
2066 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2067 f.debug_struct("DependencyList")
2068 .field("dependencies", &self.dependencies)
2069 .finish()
2070 }
2071}
2072impl DependencyList {
2073 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.DependencyList";
2078}
2079impl ::buffa::DefaultInstance for DependencyList {
2080 fn default_instance() -> &'static Self {
2081 static VALUE: ::buffa::__private::OnceBox<DependencyList> = ::buffa::__private::OnceBox::new();
2082 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2083 }
2084}
2085impl ::buffa::MessageName for DependencyList {
2086 const PACKAGE: &'static str = "unitycatalog.tables.v1";
2087 const NAME: &'static str = "DependencyList";
2088 const FULL_NAME: &'static str = "unitycatalog.tables.v1.DependencyList";
2089 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.DependencyList";
2090}
2091impl ::buffa::Message for DependencyList {
2092 #[allow(clippy::let_and_return)]
2098 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2099 #[allow(unused_imports)]
2100 use ::buffa::Enumeration as _;
2101 let mut size = 0u32;
2102 for v in &self.dependencies {
2103 let __slot = __cache.reserve();
2104 let inner_size = v.compute_size(__cache);
2105 __cache.set(__slot, inner_size);
2106 size
2107 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2108 + inner_size;
2109 }
2110 size += self.__buffa_unknown_fields.encoded_len() as u32;
2111 size
2112 }
2113 fn write_to(
2114 &self,
2115 __cache: &mut ::buffa::SizeCache,
2116 buf: &mut impl ::buffa::bytes::BufMut,
2117 ) {
2118 #[allow(unused_imports)]
2119 use ::buffa::Enumeration as _;
2120 for v in &self.dependencies {
2121 ::buffa::encoding::Tag::new(
2122 1u32,
2123 ::buffa::encoding::WireType::LengthDelimited,
2124 )
2125 .encode(buf);
2126 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2127 v.write_to(__cache, buf);
2128 }
2129 self.__buffa_unknown_fields.write_to(buf);
2130 }
2131 fn merge_field(
2132 &mut self,
2133 tag: ::buffa::encoding::Tag,
2134 buf: &mut impl ::buffa::bytes::Buf,
2135 depth: u32,
2136 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2137 #[allow(unused_imports)]
2138 use ::buffa::bytes::Buf as _;
2139 #[allow(unused_imports)]
2140 use ::buffa::Enumeration as _;
2141 match tag.field_number() {
2142 1u32 => {
2143 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2144 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2145 field_number: 1u32,
2146 expected: 2u8,
2147 actual: tag.wire_type() as u8,
2148 });
2149 }
2150 let mut elem = ::core::default::Default::default();
2151 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
2152 self.dependencies.push(elem);
2153 }
2154 _ => {
2155 self.__buffa_unknown_fields
2156 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2157 }
2158 }
2159 ::core::result::Result::Ok(())
2160 }
2161 fn clear(&mut self) {
2162 self.dependencies.clear();
2163 self.__buffa_unknown_fields.clear();
2164 }
2165}
2166impl ::buffa::ExtensionSet for DependencyList {
2167 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.DependencyList";
2168 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2169 &self.__buffa_unknown_fields
2170 }
2171 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2172 &mut self.__buffa_unknown_fields
2173 }
2174}
2175impl ::buffa::json_helpers::ProtoElemJson for DependencyList {
2176 fn serialize_proto_json<S: ::serde::Serializer>(
2177 v: &Self,
2178 s: S,
2179 ) -> ::core::result::Result<S::Ok, S::Error> {
2180 ::serde::Serialize::serialize(v, s)
2181 }
2182 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2183 d: D,
2184 ) -> ::core::result::Result<Self, D::Error> {
2185 <Self as ::serde::Deserialize>::deserialize(d)
2186 }
2187}
2188#[doc(hidden)]
2189pub const __DEPENDENCY_LIST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2190 type_url: "type.googleapis.com/unitycatalog.tables.v1.DependencyList",
2191 to_json: ::buffa::type_registry::any_to_json::<DependencyList>,
2192 from_json: ::buffa::type_registry::any_from_json::<DependencyList>,
2193 is_wkt: false,
2194};
2195#[derive(Clone, PartialEq, Default)]
2196#[derive(::serde::Serialize, ::serde::Deserialize)]
2197#[serde(default)]
2198pub struct Table {
2199 #[serde(
2203 rename = "name",
2204 with = "::buffa::json_helpers::proto_string",
2205 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2206 )]
2207 pub name: ::buffa::alloc::string::String,
2208 #[serde(
2212 rename = "catalog_name",
2213 alias = "catalogName",
2214 with = "::buffa::json_helpers::proto_string",
2215 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2216 )]
2217 pub catalog_name: ::buffa::alloc::string::String,
2218 #[serde(
2222 rename = "schema_name",
2223 alias = "schemaName",
2224 with = "::buffa::json_helpers::proto_string",
2225 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2226 )]
2227 pub schema_name: ::buffa::alloc::string::String,
2228 #[serde(
2230 rename = "table_type",
2231 alias = "tableType",
2232 with = "::buffa::json_helpers::proto_enum",
2233 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2234 )]
2235 pub table_type: ::buffa::EnumValue<TableType>,
2236 #[serde(
2240 rename = "data_source_format",
2241 alias = "dataSourceFormat",
2242 with = "::buffa::json_helpers::proto_enum",
2243 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2244 )]
2245 pub data_source_format: ::buffa::EnumValue<DataSourceFormat>,
2246 #[serde(
2250 rename = "columns",
2251 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2252 deserialize_with = "::buffa::json_helpers::null_as_default"
2253 )]
2254 pub columns: ::buffa::alloc::vec::Vec<Column>,
2255 #[serde(
2259 rename = "storage_location",
2260 alias = "storageLocation",
2261 skip_serializing_if = "::core::option::Option::is_none"
2262 )]
2263 pub storage_location: ::core::option::Option<::buffa::alloc::string::String>,
2264 #[serde(
2270 rename = "view_definition",
2271 alias = "viewDefinition",
2272 skip_serializing_if = "::core::option::Option::is_none"
2273 )]
2274 pub view_definition: ::core::option::Option<::buffa::alloc::string::String>,
2275 #[serde(
2281 rename = "view_dependencies",
2282 alias = "viewDependencies",
2283 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2284 )]
2285 pub view_dependencies: ::buffa::MessageField<DependencyList>,
2286 #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
2292 pub owner: ::core::option::Option<::buffa::alloc::string::String>,
2293 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
2297 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
2298 #[serde(
2302 rename = "properties",
2303 skip_serializing_if = "::buffa::__private::HashMap::is_empty",
2304 deserialize_with = "::buffa::json_helpers::null_as_default"
2305 )]
2306 pub properties: ::buffa::__private::HashMap<
2307 ::buffa::alloc::string::String,
2308 ::buffa::alloc::string::String,
2309 >,
2310 #[serde(
2314 rename = "storage_credential_name",
2315 alias = "storageCredentialName",
2316 skip_serializing_if = "::core::option::Option::is_none"
2317 )]
2318 pub storage_credential_name: ::core::option::Option<::buffa::alloc::string::String>,
2319 #[serde(
2328 rename = "full_name",
2329 alias = "fullName",
2330 with = "::buffa::json_helpers::proto_string",
2331 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2332 )]
2333 pub full_name: ::buffa::alloc::string::String,
2334 #[serde(
2338 rename = "created_at",
2339 alias = "createdAt",
2340 with = "::buffa::json_helpers::opt_int64",
2341 skip_serializing_if = "::core::option::Option::is_none"
2342 )]
2343 pub created_at: ::core::option::Option<i64>,
2344 #[serde(
2348 rename = "created_by",
2349 alias = "createdBy",
2350 skip_serializing_if = "::core::option::Option::is_none"
2351 )]
2352 pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
2353 #[serde(
2357 rename = "updated_at",
2358 alias = "updatedAt",
2359 with = "::buffa::json_helpers::opt_int64",
2360 skip_serializing_if = "::core::option::Option::is_none"
2361 )]
2362 pub updated_at: ::core::option::Option<i64>,
2363 #[serde(
2367 rename = "updated_by",
2368 alias = "updatedBy",
2369 skip_serializing_if = "::core::option::Option::is_none"
2370 )]
2371 pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
2372 #[serde(
2376 rename = "deleted_at",
2377 alias = "deletedAt",
2378 with = "::buffa::json_helpers::opt_int64",
2379 skip_serializing_if = "::core::option::Option::is_none"
2380 )]
2381 pub deleted_at: ::core::option::Option<i64>,
2382 #[serde(
2386 rename = "table_id",
2387 alias = "tableId",
2388 skip_serializing_if = "::core::option::Option::is_none"
2389 )]
2390 pub table_id: ::core::option::Option<::buffa::alloc::string::String>,
2391 #[serde(skip)]
2392 #[doc(hidden)]
2393 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2394}
2395impl ::core::fmt::Debug for Table {
2396 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2397 f.debug_struct("Table")
2398 .field("name", &self.name)
2399 .field("catalog_name", &self.catalog_name)
2400 .field("schema_name", &self.schema_name)
2401 .field("table_type", &self.table_type)
2402 .field("data_source_format", &self.data_source_format)
2403 .field("columns", &self.columns)
2404 .field("storage_location", &self.storage_location)
2405 .field("view_definition", &self.view_definition)
2406 .field("view_dependencies", &self.view_dependencies)
2407 .field("owner", &self.owner)
2408 .field("comment", &self.comment)
2409 .field("properties", &self.properties)
2410 .field("storage_credential_name", &self.storage_credential_name)
2411 .field("full_name", &self.full_name)
2412 .field("created_at", &self.created_at)
2413 .field("created_by", &self.created_by)
2414 .field("updated_at", &self.updated_at)
2415 .field("updated_by", &self.updated_by)
2416 .field("deleted_at", &self.deleted_at)
2417 .field("table_id", &self.table_id)
2418 .finish()
2419 }
2420}
2421impl Table {
2422 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Table";
2427}
2428impl Table {
2429 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2430 #[inline]
2431 pub fn with_storage_location(
2433 mut self,
2434 value: impl Into<::buffa::alloc::string::String>,
2435 ) -> Self {
2436 self.storage_location = Some(value.into());
2437 self
2438 }
2439 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2440 #[inline]
2441 pub fn with_view_definition(
2443 mut self,
2444 value: impl Into<::buffa::alloc::string::String>,
2445 ) -> Self {
2446 self.view_definition = Some(value.into());
2447 self
2448 }
2449 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2450 #[inline]
2451 pub fn with_owner(
2453 mut self,
2454 value: impl Into<::buffa::alloc::string::String>,
2455 ) -> Self {
2456 self.owner = Some(value.into());
2457 self
2458 }
2459 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2460 #[inline]
2461 pub fn with_comment(
2463 mut self,
2464 value: impl Into<::buffa::alloc::string::String>,
2465 ) -> Self {
2466 self.comment = Some(value.into());
2467 self
2468 }
2469 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2470 #[inline]
2471 pub fn with_storage_credential_name(
2473 mut self,
2474 value: impl Into<::buffa::alloc::string::String>,
2475 ) -> Self {
2476 self.storage_credential_name = Some(value.into());
2477 self
2478 }
2479 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2480 #[inline]
2481 pub fn with_created_at(mut self, value: i64) -> Self {
2483 self.created_at = Some(value);
2484 self
2485 }
2486 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2487 #[inline]
2488 pub fn with_created_by(
2490 mut self,
2491 value: impl Into<::buffa::alloc::string::String>,
2492 ) -> Self {
2493 self.created_by = Some(value.into());
2494 self
2495 }
2496 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2497 #[inline]
2498 pub fn with_updated_at(mut self, value: i64) -> Self {
2500 self.updated_at = Some(value);
2501 self
2502 }
2503 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2504 #[inline]
2505 pub fn with_updated_by(
2507 mut self,
2508 value: impl Into<::buffa::alloc::string::String>,
2509 ) -> Self {
2510 self.updated_by = Some(value.into());
2511 self
2512 }
2513 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2514 #[inline]
2515 pub fn with_deleted_at(mut self, value: i64) -> Self {
2517 self.deleted_at = Some(value);
2518 self
2519 }
2520 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2521 #[inline]
2522 pub fn with_table_id(
2524 mut self,
2525 value: impl Into<::buffa::alloc::string::String>,
2526 ) -> Self {
2527 self.table_id = Some(value.into());
2528 self
2529 }
2530}
2531impl ::buffa::DefaultInstance for Table {
2532 fn default_instance() -> &'static Self {
2533 static VALUE: ::buffa::__private::OnceBox<Table> = ::buffa::__private::OnceBox::new();
2534 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2535 }
2536}
2537impl ::buffa::MessageName for Table {
2538 const PACKAGE: &'static str = "unitycatalog.tables.v1";
2539 const NAME: &'static str = "Table";
2540 const FULL_NAME: &'static str = "unitycatalog.tables.v1.Table";
2541 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Table";
2542}
2543impl ::buffa::Message for Table {
2544 #[allow(clippy::let_and_return)]
2550 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2551 #[allow(unused_imports)]
2552 use ::buffa::Enumeration as _;
2553 let mut size = 0u32;
2554 if !self.name.is_empty() {
2555 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2556 }
2557 if !self.catalog_name.is_empty() {
2558 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
2559 }
2560 if !self.schema_name.is_empty() {
2561 size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
2562 }
2563 {
2564 let val = self.table_type.to_i32();
2565 if val != 0 {
2566 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2567 }
2568 }
2569 {
2570 let val = self.data_source_format.to_i32();
2571 if val != 0 {
2572 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2573 }
2574 }
2575 for v in &self.columns {
2576 let __slot = __cache.reserve();
2577 let inner_size = v.compute_size(__cache);
2578 __cache.set(__slot, inner_size);
2579 size
2580 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2581 + inner_size;
2582 }
2583 if let Some(ref v) = self.storage_location {
2584 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2585 }
2586 if let Some(ref v) = self.view_definition {
2587 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2588 }
2589 if self.view_dependencies.is_set() {
2590 let __slot = __cache.reserve();
2591 let inner_size = self.view_dependencies.compute_size(__cache);
2592 __cache.set(__slot, inner_size);
2593 size
2594 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2595 + inner_size;
2596 }
2597 if let Some(ref v) = self.owner {
2598 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2599 }
2600 if let Some(ref v) = self.comment {
2601 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2602 }
2603 #[allow(clippy::for_kv_map)]
2604 for (k, v) in &self.properties {
2605 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
2606 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2607 size
2608 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
2609 + entry_size;
2610 }
2611 if let Some(ref v) = self.storage_credential_name {
2612 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2613 }
2614 if !self.full_name.is_empty() {
2615 size += 2u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
2616 }
2617 if let Some(v) = self.created_at {
2618 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2619 }
2620 if let Some(ref v) = self.created_by {
2621 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2622 }
2623 if let Some(v) = self.updated_at {
2624 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2625 }
2626 if let Some(ref v) = self.updated_by {
2627 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2628 }
2629 if let Some(v) = self.deleted_at {
2630 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2631 }
2632 if let Some(ref v) = self.table_id {
2633 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2634 }
2635 size += self.__buffa_unknown_fields.encoded_len() as u32;
2636 size
2637 }
2638 fn write_to(
2639 &self,
2640 __cache: &mut ::buffa::SizeCache,
2641 buf: &mut impl ::buffa::bytes::BufMut,
2642 ) {
2643 #[allow(unused_imports)]
2644 use ::buffa::Enumeration as _;
2645 if !self.name.is_empty() {
2646 ::buffa::encoding::Tag::new(
2647 1u32,
2648 ::buffa::encoding::WireType::LengthDelimited,
2649 )
2650 .encode(buf);
2651 ::buffa::types::encode_string(&self.name, buf);
2652 }
2653 if !self.catalog_name.is_empty() {
2654 ::buffa::encoding::Tag::new(
2655 2u32,
2656 ::buffa::encoding::WireType::LengthDelimited,
2657 )
2658 .encode(buf);
2659 ::buffa::types::encode_string(&self.catalog_name, buf);
2660 }
2661 if !self.schema_name.is_empty() {
2662 ::buffa::encoding::Tag::new(
2663 3u32,
2664 ::buffa::encoding::WireType::LengthDelimited,
2665 )
2666 .encode(buf);
2667 ::buffa::types::encode_string(&self.schema_name, buf);
2668 }
2669 {
2670 let val = self.table_type.to_i32();
2671 if val != 0 {
2672 ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
2673 .encode(buf);
2674 ::buffa::types::encode_int32(val, buf);
2675 }
2676 }
2677 {
2678 let val = self.data_source_format.to_i32();
2679 if val != 0 {
2680 ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
2681 .encode(buf);
2682 ::buffa::types::encode_int32(val, buf);
2683 }
2684 }
2685 for v in &self.columns {
2686 ::buffa::encoding::Tag::new(
2687 6u32,
2688 ::buffa::encoding::WireType::LengthDelimited,
2689 )
2690 .encode(buf);
2691 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2692 v.write_to(__cache, buf);
2693 }
2694 if let Some(ref v) = self.storage_location {
2695 ::buffa::encoding::Tag::new(
2696 7u32,
2697 ::buffa::encoding::WireType::LengthDelimited,
2698 )
2699 .encode(buf);
2700 ::buffa::types::encode_string(v, buf);
2701 }
2702 if let Some(ref v) = self.view_definition {
2703 ::buffa::encoding::Tag::new(
2704 8u32,
2705 ::buffa::encoding::WireType::LengthDelimited,
2706 )
2707 .encode(buf);
2708 ::buffa::types::encode_string(v, buf);
2709 }
2710 if self.view_dependencies.is_set() {
2711 ::buffa::encoding::Tag::new(
2712 9u32,
2713 ::buffa::encoding::WireType::LengthDelimited,
2714 )
2715 .encode(buf);
2716 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2717 self.view_dependencies.write_to(__cache, buf);
2718 }
2719 if let Some(ref v) = self.owner {
2720 ::buffa::encoding::Tag::new(
2721 11u32,
2722 ::buffa::encoding::WireType::LengthDelimited,
2723 )
2724 .encode(buf);
2725 ::buffa::types::encode_string(v, buf);
2726 }
2727 if let Some(ref v) = self.comment {
2728 ::buffa::encoding::Tag::new(
2729 12u32,
2730 ::buffa::encoding::WireType::LengthDelimited,
2731 )
2732 .encode(buf);
2733 ::buffa::types::encode_string(v, buf);
2734 }
2735 for (k, v) in &self.properties {
2736 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
2737 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2738 ::buffa::encoding::Tag::new(
2739 13u32,
2740 ::buffa::encoding::WireType::LengthDelimited,
2741 )
2742 .encode(buf);
2743 ::buffa::encoding::encode_varint(entry_size as u64, buf);
2744 ::buffa::encoding::Tag::new(
2745 1u32,
2746 ::buffa::encoding::WireType::LengthDelimited,
2747 )
2748 .encode(buf);
2749 ::buffa::types::encode_string(k, buf);
2750 ::buffa::encoding::Tag::new(
2751 2u32,
2752 ::buffa::encoding::WireType::LengthDelimited,
2753 )
2754 .encode(buf);
2755 ::buffa::types::encode_string(v, buf);
2756 }
2757 if let Some(ref v) = self.storage_credential_name {
2758 ::buffa::encoding::Tag::new(
2759 14u32,
2760 ::buffa::encoding::WireType::LengthDelimited,
2761 )
2762 .encode(buf);
2763 ::buffa::types::encode_string(v, buf);
2764 }
2765 if !self.full_name.is_empty() {
2766 ::buffa::encoding::Tag::new(
2767 17u32,
2768 ::buffa::encoding::WireType::LengthDelimited,
2769 )
2770 .encode(buf);
2771 ::buffa::types::encode_string(&self.full_name, buf);
2772 }
2773 if let Some(v) = self.created_at {
2774 ::buffa::encoding::Tag::new(18u32, ::buffa::encoding::WireType::Varint)
2775 .encode(buf);
2776 ::buffa::types::encode_int64(v, buf);
2777 }
2778 if let Some(ref v) = self.created_by {
2779 ::buffa::encoding::Tag::new(
2780 19u32,
2781 ::buffa::encoding::WireType::LengthDelimited,
2782 )
2783 .encode(buf);
2784 ::buffa::types::encode_string(v, buf);
2785 }
2786 if let Some(v) = self.updated_at {
2787 ::buffa::encoding::Tag::new(20u32, ::buffa::encoding::WireType::Varint)
2788 .encode(buf);
2789 ::buffa::types::encode_int64(v, buf);
2790 }
2791 if let Some(ref v) = self.updated_by {
2792 ::buffa::encoding::Tag::new(
2793 21u32,
2794 ::buffa::encoding::WireType::LengthDelimited,
2795 )
2796 .encode(buf);
2797 ::buffa::types::encode_string(v, buf);
2798 }
2799 if let Some(v) = self.deleted_at {
2800 ::buffa::encoding::Tag::new(22u32, ::buffa::encoding::WireType::Varint)
2801 .encode(buf);
2802 ::buffa::types::encode_int64(v, buf);
2803 }
2804 if let Some(ref v) = self.table_id {
2805 ::buffa::encoding::Tag::new(
2806 23u32,
2807 ::buffa::encoding::WireType::LengthDelimited,
2808 )
2809 .encode(buf);
2810 ::buffa::types::encode_string(v, buf);
2811 }
2812 self.__buffa_unknown_fields.write_to(buf);
2813 }
2814 fn merge_field(
2815 &mut self,
2816 tag: ::buffa::encoding::Tag,
2817 buf: &mut impl ::buffa::bytes::Buf,
2818 depth: u32,
2819 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2820 #[allow(unused_imports)]
2821 use ::buffa::bytes::Buf as _;
2822 #[allow(unused_imports)]
2823 use ::buffa::Enumeration as _;
2824 match tag.field_number() {
2825 1u32 => {
2826 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2827 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2828 field_number: 1u32,
2829 expected: 2u8,
2830 actual: tag.wire_type() as u8,
2831 });
2832 }
2833 ::buffa::types::merge_string(&mut self.name, buf)?;
2834 }
2835 2u32 => {
2836 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2837 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2838 field_number: 2u32,
2839 expected: 2u8,
2840 actual: tag.wire_type() as u8,
2841 });
2842 }
2843 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
2844 }
2845 3u32 => {
2846 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2847 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2848 field_number: 3u32,
2849 expected: 2u8,
2850 actual: tag.wire_type() as u8,
2851 });
2852 }
2853 ::buffa::types::merge_string(&mut self.schema_name, buf)?;
2854 }
2855 4u32 => {
2856 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2857 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2858 field_number: 4u32,
2859 expected: 0u8,
2860 actual: tag.wire_type() as u8,
2861 });
2862 }
2863 self.table_type = ::buffa::EnumValue::from(
2864 ::buffa::types::decode_int32(buf)?,
2865 );
2866 }
2867 5u32 => {
2868 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2869 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2870 field_number: 5u32,
2871 expected: 0u8,
2872 actual: tag.wire_type() as u8,
2873 });
2874 }
2875 self.data_source_format = ::buffa::EnumValue::from(
2876 ::buffa::types::decode_int32(buf)?,
2877 );
2878 }
2879 6u32 => {
2880 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2881 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2882 field_number: 6u32,
2883 expected: 2u8,
2884 actual: tag.wire_type() as u8,
2885 });
2886 }
2887 let mut elem = ::core::default::Default::default();
2888 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
2889 self.columns.push(elem);
2890 }
2891 7u32 => {
2892 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2893 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2894 field_number: 7u32,
2895 expected: 2u8,
2896 actual: tag.wire_type() as u8,
2897 });
2898 }
2899 ::buffa::types::merge_string(
2900 self
2901 .storage_location
2902 .get_or_insert_with(::buffa::alloc::string::String::new),
2903 buf,
2904 )?;
2905 }
2906 8u32 => {
2907 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2908 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2909 field_number: 8u32,
2910 expected: 2u8,
2911 actual: tag.wire_type() as u8,
2912 });
2913 }
2914 ::buffa::types::merge_string(
2915 self
2916 .view_definition
2917 .get_or_insert_with(::buffa::alloc::string::String::new),
2918 buf,
2919 )?;
2920 }
2921 9u32 => {
2922 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2923 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2924 field_number: 9u32,
2925 expected: 2u8,
2926 actual: tag.wire_type() as u8,
2927 });
2928 }
2929 ::buffa::Message::merge_length_delimited(
2930 self.view_dependencies.get_or_insert_default(),
2931 buf,
2932 depth,
2933 )?;
2934 }
2935 11u32 => {
2936 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2937 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2938 field_number: 11u32,
2939 expected: 2u8,
2940 actual: tag.wire_type() as u8,
2941 });
2942 }
2943 ::buffa::types::merge_string(
2944 self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
2945 buf,
2946 )?;
2947 }
2948 12u32 => {
2949 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2950 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2951 field_number: 12u32,
2952 expected: 2u8,
2953 actual: tag.wire_type() as u8,
2954 });
2955 }
2956 ::buffa::types::merge_string(
2957 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
2958 buf,
2959 )?;
2960 }
2961 13u32 => {
2962 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2963 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2964 field_number: 13u32,
2965 expected: 2u8,
2966 actual: tag.wire_type() as u8,
2967 });
2968 }
2969 let entry_len = ::buffa::encoding::decode_varint(buf)?;
2970 let entry_len = usize::try_from(entry_len)
2971 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
2972 if buf.remaining() < entry_len {
2973 return ::core::result::Result::Err(
2974 ::buffa::DecodeError::UnexpectedEof,
2975 );
2976 }
2977 let entry_limit = buf.remaining() - entry_len;
2978 let mut key = ::core::default::Default::default();
2979 let mut val = ::core::default::Default::default();
2980 while buf.remaining() > entry_limit {
2981 let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
2982 match entry_tag.field_number() {
2983 1 => {
2984 if entry_tag.wire_type()
2985 != ::buffa::encoding::WireType::LengthDelimited
2986 {
2987 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2988 field_number: entry_tag.field_number(),
2989 expected: 2u8,
2990 actual: entry_tag.wire_type() as u8,
2991 });
2992 }
2993 key = ::buffa::types::decode_string(buf)?;
2994 }
2995 2 => {
2996 if entry_tag.wire_type()
2997 != ::buffa::encoding::WireType::LengthDelimited
2998 {
2999 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3000 field_number: entry_tag.field_number(),
3001 expected: 2u8,
3002 actual: entry_tag.wire_type() as u8,
3003 });
3004 }
3005 val = ::buffa::types::decode_string(buf)?;
3006 }
3007 _ => {
3008 ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
3009 }
3010 }
3011 }
3012 if buf.remaining() != entry_limit {
3013 let remaining = buf.remaining();
3014 if remaining > entry_limit {
3015 buf.advance(remaining - entry_limit);
3016 } else {
3017 return ::core::result::Result::Err(
3018 ::buffa::DecodeError::UnexpectedEof,
3019 );
3020 }
3021 }
3022 self.properties.insert(key, val);
3023 }
3024 14u32 => {
3025 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3026 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3027 field_number: 14u32,
3028 expected: 2u8,
3029 actual: tag.wire_type() as u8,
3030 });
3031 }
3032 ::buffa::types::merge_string(
3033 self
3034 .storage_credential_name
3035 .get_or_insert_with(::buffa::alloc::string::String::new),
3036 buf,
3037 )?;
3038 }
3039 17u32 => {
3040 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3041 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3042 field_number: 17u32,
3043 expected: 2u8,
3044 actual: tag.wire_type() as u8,
3045 });
3046 }
3047 ::buffa::types::merge_string(&mut self.full_name, buf)?;
3048 }
3049 18u32 => {
3050 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3051 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3052 field_number: 18u32,
3053 expected: 0u8,
3054 actual: tag.wire_type() as u8,
3055 });
3056 }
3057 self.created_at = ::core::option::Option::Some(
3058 ::buffa::types::decode_int64(buf)?,
3059 );
3060 }
3061 19u32 => {
3062 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3063 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3064 field_number: 19u32,
3065 expected: 2u8,
3066 actual: tag.wire_type() as u8,
3067 });
3068 }
3069 ::buffa::types::merge_string(
3070 self
3071 .created_by
3072 .get_or_insert_with(::buffa::alloc::string::String::new),
3073 buf,
3074 )?;
3075 }
3076 20u32 => {
3077 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3078 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3079 field_number: 20u32,
3080 expected: 0u8,
3081 actual: tag.wire_type() as u8,
3082 });
3083 }
3084 self.updated_at = ::core::option::Option::Some(
3085 ::buffa::types::decode_int64(buf)?,
3086 );
3087 }
3088 21u32 => {
3089 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3090 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3091 field_number: 21u32,
3092 expected: 2u8,
3093 actual: tag.wire_type() as u8,
3094 });
3095 }
3096 ::buffa::types::merge_string(
3097 self
3098 .updated_by
3099 .get_or_insert_with(::buffa::alloc::string::String::new),
3100 buf,
3101 )?;
3102 }
3103 22u32 => {
3104 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3105 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3106 field_number: 22u32,
3107 expected: 0u8,
3108 actual: tag.wire_type() as u8,
3109 });
3110 }
3111 self.deleted_at = ::core::option::Option::Some(
3112 ::buffa::types::decode_int64(buf)?,
3113 );
3114 }
3115 23u32 => {
3116 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3117 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3118 field_number: 23u32,
3119 expected: 2u8,
3120 actual: tag.wire_type() as u8,
3121 });
3122 }
3123 ::buffa::types::merge_string(
3124 self
3125 .table_id
3126 .get_or_insert_with(::buffa::alloc::string::String::new),
3127 buf,
3128 )?;
3129 }
3130 _ => {
3131 self.__buffa_unknown_fields
3132 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3133 }
3134 }
3135 ::core::result::Result::Ok(())
3136 }
3137 fn clear(&mut self) {
3138 self.name.clear();
3139 self.catalog_name.clear();
3140 self.schema_name.clear();
3141 self.table_type = ::buffa::EnumValue::from(0);
3142 self.data_source_format = ::buffa::EnumValue::from(0);
3143 self.columns.clear();
3144 self.storage_location = ::core::option::Option::None;
3145 self.view_definition = ::core::option::Option::None;
3146 self.view_dependencies = ::buffa::MessageField::none();
3147 self.owner = ::core::option::Option::None;
3148 self.comment = ::core::option::Option::None;
3149 self.properties.clear();
3150 self.storage_credential_name = ::core::option::Option::None;
3151 self.full_name.clear();
3152 self.created_at = ::core::option::Option::None;
3153 self.created_by = ::core::option::Option::None;
3154 self.updated_at = ::core::option::Option::None;
3155 self.updated_by = ::core::option::Option::None;
3156 self.deleted_at = ::core::option::Option::None;
3157 self.table_id = ::core::option::Option::None;
3158 self.__buffa_unknown_fields.clear();
3159 }
3160}
3161impl ::buffa::ExtensionSet for Table {
3162 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.Table";
3163 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3164 &self.__buffa_unknown_fields
3165 }
3166 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3167 &mut self.__buffa_unknown_fields
3168 }
3169}
3170impl ::buffa::json_helpers::ProtoElemJson for Table {
3171 fn serialize_proto_json<S: ::serde::Serializer>(
3172 v: &Self,
3173 s: S,
3174 ) -> ::core::result::Result<S::Ok, S::Error> {
3175 ::serde::Serialize::serialize(v, s)
3176 }
3177 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3178 d: D,
3179 ) -> ::core::result::Result<Self, D::Error> {
3180 <Self as ::serde::Deserialize>::deserialize(d)
3181 }
3182}
3183#[doc(hidden)]
3184pub const __TABLE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3185 type_url: "type.googleapis.com/unitycatalog.tables.v1.Table",
3186 to_json: ::buffa::type_registry::any_to_json::<Table>,
3187 from_json: ::buffa::type_registry::any_from_json::<Table>,
3188 is_wkt: false,
3189};
3190#[derive(Clone, PartialEq, Default)]
3191#[derive(::serde::Serialize, ::serde::Deserialize)]
3192#[serde(default)]
3193pub struct ListTableSummariesRequest {
3194 #[serde(
3198 rename = "catalog_name",
3199 alias = "catalogName",
3200 with = "::buffa::json_helpers::proto_string",
3201 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3202 )]
3203 pub catalog_name: ::buffa::alloc::string::String,
3204 #[serde(
3208 rename = "schema_name_pattern",
3209 alias = "schemaNamePattern",
3210 skip_serializing_if = "::core::option::Option::is_none"
3211 )]
3212 pub schema_name_pattern: ::core::option::Option<::buffa::alloc::string::String>,
3213 #[serde(
3217 rename = "table_name_pattern",
3218 alias = "tableNamePattern",
3219 skip_serializing_if = "::core::option::Option::is_none"
3220 )]
3221 pub table_name_pattern: ::core::option::Option<::buffa::alloc::string::String>,
3222 #[serde(
3226 rename = "max_results",
3227 alias = "maxResults",
3228 with = "::buffa::json_helpers::opt_int32",
3229 skip_serializing_if = "::core::option::Option::is_none"
3230 )]
3231 pub max_results: ::core::option::Option<i32>,
3232 #[serde(
3236 rename = "page_token",
3237 alias = "pageToken",
3238 skip_serializing_if = "::core::option::Option::is_none"
3239 )]
3240 pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
3241 #[serde(
3245 rename = "include_manifest_capabilities",
3246 alias = "includeManifestCapabilities",
3247 skip_serializing_if = "::core::option::Option::is_none"
3248 )]
3249 pub include_manifest_capabilities: ::core::option::Option<bool>,
3250 #[serde(skip)]
3251 #[doc(hidden)]
3252 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3253}
3254impl ::core::fmt::Debug for ListTableSummariesRequest {
3255 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3256 f.debug_struct("ListTableSummariesRequest")
3257 .field("catalog_name", &self.catalog_name)
3258 .field("schema_name_pattern", &self.schema_name_pattern)
3259 .field("table_name_pattern", &self.table_name_pattern)
3260 .field("max_results", &self.max_results)
3261 .field("page_token", &self.page_token)
3262 .field("include_manifest_capabilities", &self.include_manifest_capabilities)
3263 .finish()
3264 }
3265}
3266impl ListTableSummariesRequest {
3267 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesRequest";
3272}
3273impl ListTableSummariesRequest {
3274 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3275 #[inline]
3276 pub fn with_schema_name_pattern(
3278 mut self,
3279 value: impl Into<::buffa::alloc::string::String>,
3280 ) -> Self {
3281 self.schema_name_pattern = Some(value.into());
3282 self
3283 }
3284 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3285 #[inline]
3286 pub fn with_table_name_pattern(
3288 mut self,
3289 value: impl Into<::buffa::alloc::string::String>,
3290 ) -> Self {
3291 self.table_name_pattern = Some(value.into());
3292 self
3293 }
3294 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3295 #[inline]
3296 pub fn with_max_results(mut self, value: i32) -> Self {
3298 self.max_results = Some(value);
3299 self
3300 }
3301 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3302 #[inline]
3303 pub fn with_page_token(
3305 mut self,
3306 value: impl Into<::buffa::alloc::string::String>,
3307 ) -> Self {
3308 self.page_token = Some(value.into());
3309 self
3310 }
3311 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3312 #[inline]
3313 pub fn with_include_manifest_capabilities(mut self, value: bool) -> Self {
3315 self.include_manifest_capabilities = Some(value);
3316 self
3317 }
3318}
3319impl ::buffa::DefaultInstance for ListTableSummariesRequest {
3320 fn default_instance() -> &'static Self {
3321 static VALUE: ::buffa::__private::OnceBox<ListTableSummariesRequest> = ::buffa::__private::OnceBox::new();
3322 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3323 }
3324}
3325impl ::buffa::MessageName for ListTableSummariesRequest {
3326 const PACKAGE: &'static str = "unitycatalog.tables.v1";
3327 const NAME: &'static str = "ListTableSummariesRequest";
3328 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTableSummariesRequest";
3329 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesRequest";
3330}
3331impl ::buffa::Message for ListTableSummariesRequest {
3332 #[allow(clippy::let_and_return)]
3338 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3339 #[allow(unused_imports)]
3340 use ::buffa::Enumeration as _;
3341 let mut size = 0u32;
3342 if !self.catalog_name.is_empty() {
3343 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
3344 }
3345 if let Some(ref v) = self.schema_name_pattern {
3346 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3347 }
3348 if let Some(ref v) = self.table_name_pattern {
3349 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3350 }
3351 if let Some(v) = self.max_results {
3352 size += 2u32 + ::buffa::types::int32_encoded_len(v) as u32;
3353 }
3354 if let Some(ref v) = self.page_token {
3355 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
3356 }
3357 if self.include_manifest_capabilities.is_some() {
3358 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3359 }
3360 size += self.__buffa_unknown_fields.encoded_len() as u32;
3361 size
3362 }
3363 fn write_to(
3364 &self,
3365 _cache: &mut ::buffa::SizeCache,
3366 buf: &mut impl ::buffa::bytes::BufMut,
3367 ) {
3368 #[allow(unused_imports)]
3369 use ::buffa::Enumeration as _;
3370 if !self.catalog_name.is_empty() {
3371 ::buffa::encoding::Tag::new(
3372 1u32,
3373 ::buffa::encoding::WireType::LengthDelimited,
3374 )
3375 .encode(buf);
3376 ::buffa::types::encode_string(&self.catalog_name, buf);
3377 }
3378 if let Some(ref v) = self.schema_name_pattern {
3379 ::buffa::encoding::Tag::new(
3380 2u32,
3381 ::buffa::encoding::WireType::LengthDelimited,
3382 )
3383 .encode(buf);
3384 ::buffa::types::encode_string(v, buf);
3385 }
3386 if let Some(ref v) = self.table_name_pattern {
3387 ::buffa::encoding::Tag::new(
3388 3u32,
3389 ::buffa::encoding::WireType::LengthDelimited,
3390 )
3391 .encode(buf);
3392 ::buffa::types::encode_string(v, buf);
3393 }
3394 if let Some(v) = self.max_results {
3395 ::buffa::encoding::Tag::new(100u32, ::buffa::encoding::WireType::Varint)
3396 .encode(buf);
3397 ::buffa::types::encode_int32(v, buf);
3398 }
3399 if let Some(ref v) = self.page_token {
3400 ::buffa::encoding::Tag::new(
3401 101u32,
3402 ::buffa::encoding::WireType::LengthDelimited,
3403 )
3404 .encode(buf);
3405 ::buffa::types::encode_string(v, buf);
3406 }
3407 if let Some(v) = self.include_manifest_capabilities {
3408 ::buffa::encoding::Tag::new(102u32, ::buffa::encoding::WireType::Varint)
3409 .encode(buf);
3410 ::buffa::types::encode_bool(v, buf);
3411 }
3412 self.__buffa_unknown_fields.write_to(buf);
3413 }
3414 fn merge_field(
3415 &mut self,
3416 tag: ::buffa::encoding::Tag,
3417 buf: &mut impl ::buffa::bytes::Buf,
3418 depth: u32,
3419 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3420 #[allow(unused_imports)]
3421 use ::buffa::bytes::Buf as _;
3422 #[allow(unused_imports)]
3423 use ::buffa::Enumeration as _;
3424 match tag.field_number() {
3425 1u32 => {
3426 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3427 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3428 field_number: 1u32,
3429 expected: 2u8,
3430 actual: tag.wire_type() as u8,
3431 });
3432 }
3433 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
3434 }
3435 2u32 => {
3436 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3437 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3438 field_number: 2u32,
3439 expected: 2u8,
3440 actual: tag.wire_type() as u8,
3441 });
3442 }
3443 ::buffa::types::merge_string(
3444 self
3445 .schema_name_pattern
3446 .get_or_insert_with(::buffa::alloc::string::String::new),
3447 buf,
3448 )?;
3449 }
3450 3u32 => {
3451 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3452 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3453 field_number: 3u32,
3454 expected: 2u8,
3455 actual: tag.wire_type() as u8,
3456 });
3457 }
3458 ::buffa::types::merge_string(
3459 self
3460 .table_name_pattern
3461 .get_or_insert_with(::buffa::alloc::string::String::new),
3462 buf,
3463 )?;
3464 }
3465 100u32 => {
3466 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3467 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3468 field_number: 100u32,
3469 expected: 0u8,
3470 actual: tag.wire_type() as u8,
3471 });
3472 }
3473 self.max_results = ::core::option::Option::Some(
3474 ::buffa::types::decode_int32(buf)?,
3475 );
3476 }
3477 101u32 => {
3478 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3479 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3480 field_number: 101u32,
3481 expected: 2u8,
3482 actual: tag.wire_type() as u8,
3483 });
3484 }
3485 ::buffa::types::merge_string(
3486 self
3487 .page_token
3488 .get_or_insert_with(::buffa::alloc::string::String::new),
3489 buf,
3490 )?;
3491 }
3492 102u32 => {
3493 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3494 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3495 field_number: 102u32,
3496 expected: 0u8,
3497 actual: tag.wire_type() as u8,
3498 });
3499 }
3500 self.include_manifest_capabilities = ::core::option::Option::Some(
3501 ::buffa::types::decode_bool(buf)?,
3502 );
3503 }
3504 _ => {
3505 self.__buffa_unknown_fields
3506 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3507 }
3508 }
3509 ::core::result::Result::Ok(())
3510 }
3511 fn clear(&mut self) {
3512 self.catalog_name.clear();
3513 self.schema_name_pattern = ::core::option::Option::None;
3514 self.table_name_pattern = ::core::option::Option::None;
3515 self.max_results = ::core::option::Option::None;
3516 self.page_token = ::core::option::Option::None;
3517 self.include_manifest_capabilities = ::core::option::Option::None;
3518 self.__buffa_unknown_fields.clear();
3519 }
3520}
3521impl ::buffa::ExtensionSet for ListTableSummariesRequest {
3522 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.ListTableSummariesRequest";
3523 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3524 &self.__buffa_unknown_fields
3525 }
3526 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3527 &mut self.__buffa_unknown_fields
3528 }
3529}
3530impl ::buffa::json_helpers::ProtoElemJson for ListTableSummariesRequest {
3531 fn serialize_proto_json<S: ::serde::Serializer>(
3532 v: &Self,
3533 s: S,
3534 ) -> ::core::result::Result<S::Ok, S::Error> {
3535 ::serde::Serialize::serialize(v, s)
3536 }
3537 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3538 d: D,
3539 ) -> ::core::result::Result<Self, D::Error> {
3540 <Self as ::serde::Deserialize>::deserialize(d)
3541 }
3542}
3543#[doc(hidden)]
3544pub const __LIST_TABLE_SUMMARIES_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3545 type_url: "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesRequest",
3546 to_json: ::buffa::type_registry::any_to_json::<ListTableSummariesRequest>,
3547 from_json: ::buffa::type_registry::any_from_json::<ListTableSummariesRequest>,
3548 is_wkt: false,
3549};
3550#[derive(Clone, PartialEq, Default)]
3551#[derive(::serde::Serialize, ::serde::Deserialize)]
3552#[serde(default)]
3553pub struct ListTableSummariesResponse {
3554 #[serde(
3558 rename = "tables",
3559 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3560 deserialize_with = "::buffa::json_helpers::null_as_default"
3561 )]
3562 pub tables: ::buffa::alloc::vec::Vec<TableSummary>,
3563 #[serde(
3567 rename = "next_page_token",
3568 alias = "nextPageToken",
3569 skip_serializing_if = "::core::option::Option::is_none"
3570 )]
3571 pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
3572 #[serde(skip)]
3573 #[doc(hidden)]
3574 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3575}
3576impl ::core::fmt::Debug for ListTableSummariesResponse {
3577 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3578 f.debug_struct("ListTableSummariesResponse")
3579 .field("tables", &self.tables)
3580 .field("next_page_token", &self.next_page_token)
3581 .finish()
3582 }
3583}
3584impl ListTableSummariesResponse {
3585 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesResponse";
3590}
3591impl ListTableSummariesResponse {
3592 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3593 #[inline]
3594 pub fn with_next_page_token(
3596 mut self,
3597 value: impl Into<::buffa::alloc::string::String>,
3598 ) -> Self {
3599 self.next_page_token = Some(value.into());
3600 self
3601 }
3602}
3603impl ::buffa::DefaultInstance for ListTableSummariesResponse {
3604 fn default_instance() -> &'static Self {
3605 static VALUE: ::buffa::__private::OnceBox<ListTableSummariesResponse> = ::buffa::__private::OnceBox::new();
3606 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3607 }
3608}
3609impl ::buffa::MessageName for ListTableSummariesResponse {
3610 const PACKAGE: &'static str = "unitycatalog.tables.v1";
3611 const NAME: &'static str = "ListTableSummariesResponse";
3612 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTableSummariesResponse";
3613 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesResponse";
3614}
3615impl ::buffa::Message for ListTableSummariesResponse {
3616 #[allow(clippy::let_and_return)]
3622 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3623 #[allow(unused_imports)]
3624 use ::buffa::Enumeration as _;
3625 let mut size = 0u32;
3626 for v in &self.tables {
3627 let __slot = __cache.reserve();
3628 let inner_size = v.compute_size(__cache);
3629 __cache.set(__slot, inner_size);
3630 size
3631 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3632 + inner_size;
3633 }
3634 if let Some(ref v) = self.next_page_token {
3635 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3636 }
3637 size += self.__buffa_unknown_fields.encoded_len() as u32;
3638 size
3639 }
3640 fn write_to(
3641 &self,
3642 __cache: &mut ::buffa::SizeCache,
3643 buf: &mut impl ::buffa::bytes::BufMut,
3644 ) {
3645 #[allow(unused_imports)]
3646 use ::buffa::Enumeration as _;
3647 for v in &self.tables {
3648 ::buffa::encoding::Tag::new(
3649 1u32,
3650 ::buffa::encoding::WireType::LengthDelimited,
3651 )
3652 .encode(buf);
3653 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3654 v.write_to(__cache, buf);
3655 }
3656 if let Some(ref v) = self.next_page_token {
3657 ::buffa::encoding::Tag::new(
3658 2u32,
3659 ::buffa::encoding::WireType::LengthDelimited,
3660 )
3661 .encode(buf);
3662 ::buffa::types::encode_string(v, buf);
3663 }
3664 self.__buffa_unknown_fields.write_to(buf);
3665 }
3666 fn merge_field(
3667 &mut self,
3668 tag: ::buffa::encoding::Tag,
3669 buf: &mut impl ::buffa::bytes::Buf,
3670 depth: u32,
3671 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3672 #[allow(unused_imports)]
3673 use ::buffa::bytes::Buf as _;
3674 #[allow(unused_imports)]
3675 use ::buffa::Enumeration as _;
3676 match tag.field_number() {
3677 1u32 => {
3678 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3679 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3680 field_number: 1u32,
3681 expected: 2u8,
3682 actual: tag.wire_type() as u8,
3683 });
3684 }
3685 let mut elem = ::core::default::Default::default();
3686 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3687 self.tables.push(elem);
3688 }
3689 2u32 => {
3690 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3691 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3692 field_number: 2u32,
3693 expected: 2u8,
3694 actual: tag.wire_type() as u8,
3695 });
3696 }
3697 ::buffa::types::merge_string(
3698 self
3699 .next_page_token
3700 .get_or_insert_with(::buffa::alloc::string::String::new),
3701 buf,
3702 )?;
3703 }
3704 _ => {
3705 self.__buffa_unknown_fields
3706 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3707 }
3708 }
3709 ::core::result::Result::Ok(())
3710 }
3711 fn clear(&mut self) {
3712 self.tables.clear();
3713 self.next_page_token = ::core::option::Option::None;
3714 self.__buffa_unknown_fields.clear();
3715 }
3716}
3717impl ::buffa::ExtensionSet for ListTableSummariesResponse {
3718 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.ListTableSummariesResponse";
3719 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3720 &self.__buffa_unknown_fields
3721 }
3722 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3723 &mut self.__buffa_unknown_fields
3724 }
3725}
3726impl ::buffa::json_helpers::ProtoElemJson for ListTableSummariesResponse {
3727 fn serialize_proto_json<S: ::serde::Serializer>(
3728 v: &Self,
3729 s: S,
3730 ) -> ::core::result::Result<S::Ok, S::Error> {
3731 ::serde::Serialize::serialize(v, s)
3732 }
3733 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3734 d: D,
3735 ) -> ::core::result::Result<Self, D::Error> {
3736 <Self as ::serde::Deserialize>::deserialize(d)
3737 }
3738}
3739#[doc(hidden)]
3740pub const __LIST_TABLE_SUMMARIES_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3741 type_url: "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesResponse",
3742 to_json: ::buffa::type_registry::any_to_json::<ListTableSummariesResponse>,
3743 from_json: ::buffa::type_registry::any_from_json::<ListTableSummariesResponse>,
3744 is_wkt: false,
3745};
3746#[derive(Clone, PartialEq, Default)]
3747#[derive(::serde::Serialize, ::serde::Deserialize)]
3748#[serde(default)]
3749pub struct ListTablesRequest {
3750 #[serde(
3754 rename = "catalog_name",
3755 alias = "catalogName",
3756 with = "::buffa::json_helpers::proto_string",
3757 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3758 )]
3759 pub catalog_name: ::buffa::alloc::string::String,
3760 #[serde(
3764 rename = "schema_name",
3765 alias = "schemaName",
3766 with = "::buffa::json_helpers::proto_string",
3767 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3768 )]
3769 pub schema_name: ::buffa::alloc::string::String,
3770 #[serde(
3774 rename = "max_results",
3775 alias = "maxResults",
3776 with = "::buffa::json_helpers::opt_int32",
3777 skip_serializing_if = "::core::option::Option::is_none"
3778 )]
3779 pub max_results: ::core::option::Option<i32>,
3780 #[serde(
3784 rename = "page_token",
3785 alias = "pageToken",
3786 skip_serializing_if = "::core::option::Option::is_none"
3787 )]
3788 pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
3789 #[serde(
3793 rename = "include_delta_metadata",
3794 alias = "includeDeltaMetadata",
3795 skip_serializing_if = "::core::option::Option::is_none"
3796 )]
3797 pub include_delta_metadata: ::core::option::Option<bool>,
3798 #[serde(
3802 rename = "omit_columns",
3803 alias = "omitColumns",
3804 skip_serializing_if = "::core::option::Option::is_none"
3805 )]
3806 pub omit_columns: ::core::option::Option<bool>,
3807 #[serde(
3811 rename = "omit_properties",
3812 alias = "omitProperties",
3813 skip_serializing_if = "::core::option::Option::is_none"
3814 )]
3815 pub omit_properties: ::core::option::Option<bool>,
3816 #[serde(
3820 rename = "omit_username",
3821 alias = "omitUsername",
3822 skip_serializing_if = "::core::option::Option::is_none"
3823 )]
3824 pub omit_username: ::core::option::Option<bool>,
3825 #[serde(
3829 rename = "include_browse",
3830 alias = "includeBrowse",
3831 skip_serializing_if = "::core::option::Option::is_none"
3832 )]
3833 pub include_browse: ::core::option::Option<bool>,
3834 #[serde(
3838 rename = "include_manifest_capabilities",
3839 alias = "includeManifestCapabilities",
3840 skip_serializing_if = "::core::option::Option::is_none"
3841 )]
3842 pub include_manifest_capabilities: ::core::option::Option<bool>,
3843 #[serde(skip)]
3844 #[doc(hidden)]
3845 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3846}
3847impl ::core::fmt::Debug for ListTablesRequest {
3848 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3849 f.debug_struct("ListTablesRequest")
3850 .field("catalog_name", &self.catalog_name)
3851 .field("schema_name", &self.schema_name)
3852 .field("max_results", &self.max_results)
3853 .field("page_token", &self.page_token)
3854 .field("include_delta_metadata", &self.include_delta_metadata)
3855 .field("omit_columns", &self.omit_columns)
3856 .field("omit_properties", &self.omit_properties)
3857 .field("omit_username", &self.omit_username)
3858 .field("include_browse", &self.include_browse)
3859 .field("include_manifest_capabilities", &self.include_manifest_capabilities)
3860 .finish()
3861 }
3862}
3863impl ListTablesRequest {
3864 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTablesRequest";
3869}
3870impl ListTablesRequest {
3871 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3872 #[inline]
3873 pub fn with_max_results(mut self, value: i32) -> Self {
3875 self.max_results = Some(value);
3876 self
3877 }
3878 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3879 #[inline]
3880 pub fn with_page_token(
3882 mut self,
3883 value: impl Into<::buffa::alloc::string::String>,
3884 ) -> Self {
3885 self.page_token = Some(value.into());
3886 self
3887 }
3888 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3889 #[inline]
3890 pub fn with_include_delta_metadata(mut self, value: bool) -> Self {
3892 self.include_delta_metadata = Some(value);
3893 self
3894 }
3895 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3896 #[inline]
3897 pub fn with_omit_columns(mut self, value: bool) -> Self {
3899 self.omit_columns = Some(value);
3900 self
3901 }
3902 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3903 #[inline]
3904 pub fn with_omit_properties(mut self, value: bool) -> Self {
3906 self.omit_properties = Some(value);
3907 self
3908 }
3909 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3910 #[inline]
3911 pub fn with_omit_username(mut self, value: bool) -> Self {
3913 self.omit_username = Some(value);
3914 self
3915 }
3916 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3917 #[inline]
3918 pub fn with_include_browse(mut self, value: bool) -> Self {
3920 self.include_browse = Some(value);
3921 self
3922 }
3923 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3924 #[inline]
3925 pub fn with_include_manifest_capabilities(mut self, value: bool) -> Self {
3927 self.include_manifest_capabilities = Some(value);
3928 self
3929 }
3930}
3931impl ::buffa::DefaultInstance for ListTablesRequest {
3932 fn default_instance() -> &'static Self {
3933 static VALUE: ::buffa::__private::OnceBox<ListTablesRequest> = ::buffa::__private::OnceBox::new();
3934 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3935 }
3936}
3937impl ::buffa::MessageName for ListTablesRequest {
3938 const PACKAGE: &'static str = "unitycatalog.tables.v1";
3939 const NAME: &'static str = "ListTablesRequest";
3940 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTablesRequest";
3941 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTablesRequest";
3942}
3943impl ::buffa::Message for ListTablesRequest {
3944 #[allow(clippy::let_and_return)]
3950 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3951 #[allow(unused_imports)]
3952 use ::buffa::Enumeration as _;
3953 let mut size = 0u32;
3954 if !self.catalog_name.is_empty() {
3955 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
3956 }
3957 if !self.schema_name.is_empty() {
3958 size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
3959 }
3960 if let Some(v) = self.max_results {
3961 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3962 }
3963 if let Some(ref v) = self.page_token {
3964 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3965 }
3966 if self.include_delta_metadata.is_some() {
3967 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3968 }
3969 if self.omit_columns.is_some() {
3970 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3971 }
3972 if self.omit_properties.is_some() {
3973 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3974 }
3975 if self.omit_username.is_some() {
3976 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3977 }
3978 if self.include_browse.is_some() {
3979 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3980 }
3981 if self.include_manifest_capabilities.is_some() {
3982 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3983 }
3984 size += self.__buffa_unknown_fields.encoded_len() as u32;
3985 size
3986 }
3987 fn write_to(
3988 &self,
3989 _cache: &mut ::buffa::SizeCache,
3990 buf: &mut impl ::buffa::bytes::BufMut,
3991 ) {
3992 #[allow(unused_imports)]
3993 use ::buffa::Enumeration as _;
3994 if !self.catalog_name.is_empty() {
3995 ::buffa::encoding::Tag::new(
3996 1u32,
3997 ::buffa::encoding::WireType::LengthDelimited,
3998 )
3999 .encode(buf);
4000 ::buffa::types::encode_string(&self.catalog_name, buf);
4001 }
4002 if !self.schema_name.is_empty() {
4003 ::buffa::encoding::Tag::new(
4004 2u32,
4005 ::buffa::encoding::WireType::LengthDelimited,
4006 )
4007 .encode(buf);
4008 ::buffa::types::encode_string(&self.schema_name, buf);
4009 }
4010 if let Some(v) = self.max_results {
4011 ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
4012 .encode(buf);
4013 ::buffa::types::encode_int32(v, buf);
4014 }
4015 if let Some(ref v) = self.page_token {
4016 ::buffa::encoding::Tag::new(
4017 4u32,
4018 ::buffa::encoding::WireType::LengthDelimited,
4019 )
4020 .encode(buf);
4021 ::buffa::types::encode_string(v, buf);
4022 }
4023 if let Some(v) = self.include_delta_metadata {
4024 ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
4025 .encode(buf);
4026 ::buffa::types::encode_bool(v, buf);
4027 }
4028 if let Some(v) = self.omit_columns {
4029 ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
4030 .encode(buf);
4031 ::buffa::types::encode_bool(v, buf);
4032 }
4033 if let Some(v) = self.omit_properties {
4034 ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
4035 .encode(buf);
4036 ::buffa::types::encode_bool(v, buf);
4037 }
4038 if let Some(v) = self.omit_username {
4039 ::buffa::encoding::Tag::new(8u32, ::buffa::encoding::WireType::Varint)
4040 .encode(buf);
4041 ::buffa::types::encode_bool(v, buf);
4042 }
4043 if let Some(v) = self.include_browse {
4044 ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
4045 .encode(buf);
4046 ::buffa::types::encode_bool(v, buf);
4047 }
4048 if let Some(v) = self.include_manifest_capabilities {
4049 ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
4050 .encode(buf);
4051 ::buffa::types::encode_bool(v, buf);
4052 }
4053 self.__buffa_unknown_fields.write_to(buf);
4054 }
4055 fn merge_field(
4056 &mut self,
4057 tag: ::buffa::encoding::Tag,
4058 buf: &mut impl ::buffa::bytes::Buf,
4059 depth: u32,
4060 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4061 #[allow(unused_imports)]
4062 use ::buffa::bytes::Buf as _;
4063 #[allow(unused_imports)]
4064 use ::buffa::Enumeration as _;
4065 match tag.field_number() {
4066 1u32 => {
4067 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4068 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4069 field_number: 1u32,
4070 expected: 2u8,
4071 actual: tag.wire_type() as u8,
4072 });
4073 }
4074 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
4075 }
4076 2u32 => {
4077 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4078 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4079 field_number: 2u32,
4080 expected: 2u8,
4081 actual: tag.wire_type() as u8,
4082 });
4083 }
4084 ::buffa::types::merge_string(&mut self.schema_name, buf)?;
4085 }
4086 3u32 => {
4087 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4088 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4089 field_number: 3u32,
4090 expected: 0u8,
4091 actual: tag.wire_type() as u8,
4092 });
4093 }
4094 self.max_results = ::core::option::Option::Some(
4095 ::buffa::types::decode_int32(buf)?,
4096 );
4097 }
4098 4u32 => {
4099 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4100 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4101 field_number: 4u32,
4102 expected: 2u8,
4103 actual: tag.wire_type() as u8,
4104 });
4105 }
4106 ::buffa::types::merge_string(
4107 self
4108 .page_token
4109 .get_or_insert_with(::buffa::alloc::string::String::new),
4110 buf,
4111 )?;
4112 }
4113 5u32 => {
4114 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4115 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4116 field_number: 5u32,
4117 expected: 0u8,
4118 actual: tag.wire_type() as u8,
4119 });
4120 }
4121 self.include_delta_metadata = ::core::option::Option::Some(
4122 ::buffa::types::decode_bool(buf)?,
4123 );
4124 }
4125 6u32 => {
4126 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4127 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4128 field_number: 6u32,
4129 expected: 0u8,
4130 actual: tag.wire_type() as u8,
4131 });
4132 }
4133 self.omit_columns = ::core::option::Option::Some(
4134 ::buffa::types::decode_bool(buf)?,
4135 );
4136 }
4137 7u32 => {
4138 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4139 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4140 field_number: 7u32,
4141 expected: 0u8,
4142 actual: tag.wire_type() as u8,
4143 });
4144 }
4145 self.omit_properties = ::core::option::Option::Some(
4146 ::buffa::types::decode_bool(buf)?,
4147 );
4148 }
4149 8u32 => {
4150 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4151 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4152 field_number: 8u32,
4153 expected: 0u8,
4154 actual: tag.wire_type() as u8,
4155 });
4156 }
4157 self.omit_username = ::core::option::Option::Some(
4158 ::buffa::types::decode_bool(buf)?,
4159 );
4160 }
4161 9u32 => {
4162 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4163 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4164 field_number: 9u32,
4165 expected: 0u8,
4166 actual: tag.wire_type() as u8,
4167 });
4168 }
4169 self.include_browse = ::core::option::Option::Some(
4170 ::buffa::types::decode_bool(buf)?,
4171 );
4172 }
4173 10u32 => {
4174 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4175 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4176 field_number: 10u32,
4177 expected: 0u8,
4178 actual: tag.wire_type() as u8,
4179 });
4180 }
4181 self.include_manifest_capabilities = ::core::option::Option::Some(
4182 ::buffa::types::decode_bool(buf)?,
4183 );
4184 }
4185 _ => {
4186 self.__buffa_unknown_fields
4187 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4188 }
4189 }
4190 ::core::result::Result::Ok(())
4191 }
4192 fn clear(&mut self) {
4193 self.catalog_name.clear();
4194 self.schema_name.clear();
4195 self.max_results = ::core::option::Option::None;
4196 self.page_token = ::core::option::Option::None;
4197 self.include_delta_metadata = ::core::option::Option::None;
4198 self.omit_columns = ::core::option::Option::None;
4199 self.omit_properties = ::core::option::Option::None;
4200 self.omit_username = ::core::option::Option::None;
4201 self.include_browse = ::core::option::Option::None;
4202 self.include_manifest_capabilities = ::core::option::Option::None;
4203 self.__buffa_unknown_fields.clear();
4204 }
4205}
4206impl ::buffa::ExtensionSet for ListTablesRequest {
4207 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.ListTablesRequest";
4208 fn unknown_fields(&self) -> &::buffa::UnknownFields {
4209 &self.__buffa_unknown_fields
4210 }
4211 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4212 &mut self.__buffa_unknown_fields
4213 }
4214}
4215impl ::buffa::json_helpers::ProtoElemJson for ListTablesRequest {
4216 fn serialize_proto_json<S: ::serde::Serializer>(
4217 v: &Self,
4218 s: S,
4219 ) -> ::core::result::Result<S::Ok, S::Error> {
4220 ::serde::Serialize::serialize(v, s)
4221 }
4222 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4223 d: D,
4224 ) -> ::core::result::Result<Self, D::Error> {
4225 <Self as ::serde::Deserialize>::deserialize(d)
4226 }
4227}
4228#[doc(hidden)]
4229pub const __LIST_TABLES_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4230 type_url: "type.googleapis.com/unitycatalog.tables.v1.ListTablesRequest",
4231 to_json: ::buffa::type_registry::any_to_json::<ListTablesRequest>,
4232 from_json: ::buffa::type_registry::any_from_json::<ListTablesRequest>,
4233 is_wkt: false,
4234};
4235#[derive(Clone, PartialEq, Default)]
4236#[derive(::serde::Serialize, ::serde::Deserialize)]
4237#[serde(default)]
4238pub struct ListTablesResponse {
4239 #[serde(
4243 rename = "tables",
4244 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4245 deserialize_with = "::buffa::json_helpers::null_as_default"
4246 )]
4247 pub tables: ::buffa::alloc::vec::Vec<Table>,
4248 #[serde(
4252 rename = "next_page_token",
4253 alias = "nextPageToken",
4254 skip_serializing_if = "::core::option::Option::is_none"
4255 )]
4256 pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
4257 #[serde(skip)]
4258 #[doc(hidden)]
4259 pub __buffa_unknown_fields: ::buffa::UnknownFields,
4260}
4261impl ::core::fmt::Debug for ListTablesResponse {
4262 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4263 f.debug_struct("ListTablesResponse")
4264 .field("tables", &self.tables)
4265 .field("next_page_token", &self.next_page_token)
4266 .finish()
4267 }
4268}
4269impl ListTablesResponse {
4270 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTablesResponse";
4275}
4276impl ListTablesResponse {
4277 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
4278 #[inline]
4279 pub fn with_next_page_token(
4281 mut self,
4282 value: impl Into<::buffa::alloc::string::String>,
4283 ) -> Self {
4284 self.next_page_token = Some(value.into());
4285 self
4286 }
4287}
4288impl ::buffa::DefaultInstance for ListTablesResponse {
4289 fn default_instance() -> &'static Self {
4290 static VALUE: ::buffa::__private::OnceBox<ListTablesResponse> = ::buffa::__private::OnceBox::new();
4291 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4292 }
4293}
4294impl ::buffa::MessageName for ListTablesResponse {
4295 const PACKAGE: &'static str = "unitycatalog.tables.v1";
4296 const NAME: &'static str = "ListTablesResponse";
4297 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTablesResponse";
4298 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTablesResponse";
4299}
4300impl ::buffa::Message for ListTablesResponse {
4301 #[allow(clippy::let_and_return)]
4307 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4308 #[allow(unused_imports)]
4309 use ::buffa::Enumeration as _;
4310 let mut size = 0u32;
4311 for v in &self.tables {
4312 let __slot = __cache.reserve();
4313 let inner_size = v.compute_size(__cache);
4314 __cache.set(__slot, inner_size);
4315 size
4316 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4317 + inner_size;
4318 }
4319 if let Some(ref v) = self.next_page_token {
4320 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4321 }
4322 size += self.__buffa_unknown_fields.encoded_len() as u32;
4323 size
4324 }
4325 fn write_to(
4326 &self,
4327 __cache: &mut ::buffa::SizeCache,
4328 buf: &mut impl ::buffa::bytes::BufMut,
4329 ) {
4330 #[allow(unused_imports)]
4331 use ::buffa::Enumeration as _;
4332 for v in &self.tables {
4333 ::buffa::encoding::Tag::new(
4334 1u32,
4335 ::buffa::encoding::WireType::LengthDelimited,
4336 )
4337 .encode(buf);
4338 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4339 v.write_to(__cache, buf);
4340 }
4341 if let Some(ref v) = self.next_page_token {
4342 ::buffa::encoding::Tag::new(
4343 2u32,
4344 ::buffa::encoding::WireType::LengthDelimited,
4345 )
4346 .encode(buf);
4347 ::buffa::types::encode_string(v, buf);
4348 }
4349 self.__buffa_unknown_fields.write_to(buf);
4350 }
4351 fn merge_field(
4352 &mut self,
4353 tag: ::buffa::encoding::Tag,
4354 buf: &mut impl ::buffa::bytes::Buf,
4355 depth: u32,
4356 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4357 #[allow(unused_imports)]
4358 use ::buffa::bytes::Buf as _;
4359 #[allow(unused_imports)]
4360 use ::buffa::Enumeration as _;
4361 match tag.field_number() {
4362 1u32 => {
4363 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4364 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4365 field_number: 1u32,
4366 expected: 2u8,
4367 actual: tag.wire_type() as u8,
4368 });
4369 }
4370 let mut elem = ::core::default::Default::default();
4371 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4372 self.tables.push(elem);
4373 }
4374 2u32 => {
4375 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4376 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4377 field_number: 2u32,
4378 expected: 2u8,
4379 actual: tag.wire_type() as u8,
4380 });
4381 }
4382 ::buffa::types::merge_string(
4383 self
4384 .next_page_token
4385 .get_or_insert_with(::buffa::alloc::string::String::new),
4386 buf,
4387 )?;
4388 }
4389 _ => {
4390 self.__buffa_unknown_fields
4391 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4392 }
4393 }
4394 ::core::result::Result::Ok(())
4395 }
4396 fn clear(&mut self) {
4397 self.tables.clear();
4398 self.next_page_token = ::core::option::Option::None;
4399 self.__buffa_unknown_fields.clear();
4400 }
4401}
4402impl ::buffa::ExtensionSet for ListTablesResponse {
4403 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.ListTablesResponse";
4404 fn unknown_fields(&self) -> &::buffa::UnknownFields {
4405 &self.__buffa_unknown_fields
4406 }
4407 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4408 &mut self.__buffa_unknown_fields
4409 }
4410}
4411impl ::buffa::json_helpers::ProtoElemJson for ListTablesResponse {
4412 fn serialize_proto_json<S: ::serde::Serializer>(
4413 v: &Self,
4414 s: S,
4415 ) -> ::core::result::Result<S::Ok, S::Error> {
4416 ::serde::Serialize::serialize(v, s)
4417 }
4418 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4419 d: D,
4420 ) -> ::core::result::Result<Self, D::Error> {
4421 <Self as ::serde::Deserialize>::deserialize(d)
4422 }
4423}
4424#[doc(hidden)]
4425pub const __LIST_TABLES_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4426 type_url: "type.googleapis.com/unitycatalog.tables.v1.ListTablesResponse",
4427 to_json: ::buffa::type_registry::any_to_json::<ListTablesResponse>,
4428 from_json: ::buffa::type_registry::any_from_json::<ListTablesResponse>,
4429 is_wkt: false,
4430};
4431#[derive(Clone, PartialEq, Default)]
4435#[derive(::serde::Serialize, ::serde::Deserialize)]
4436#[serde(default)]
4437pub struct CreateTableRequest {
4438 #[serde(
4442 rename = "name",
4443 with = "::buffa::json_helpers::proto_string",
4444 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4445 )]
4446 pub name: ::buffa::alloc::string::String,
4447 #[serde(
4451 rename = "schema_name",
4452 alias = "schemaName",
4453 with = "::buffa::json_helpers::proto_string",
4454 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4455 )]
4456 pub schema_name: ::buffa::alloc::string::String,
4457 #[serde(
4461 rename = "catalog_name",
4462 alias = "catalogName",
4463 with = "::buffa::json_helpers::proto_string",
4464 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4465 )]
4466 pub catalog_name: ::buffa::alloc::string::String,
4467 #[serde(
4469 rename = "table_type",
4470 alias = "tableType",
4471 with = "::buffa::json_helpers::proto_enum",
4472 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4473 )]
4474 pub table_type: ::buffa::EnumValue<TableType>,
4475 #[serde(
4477 rename = "data_source_format",
4478 alias = "dataSourceFormat",
4479 with = "::buffa::json_helpers::proto_enum",
4480 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4481 )]
4482 pub data_source_format: ::buffa::EnumValue<DataSourceFormat>,
4483 #[serde(
4487 rename = "columns",
4488 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4489 deserialize_with = "::buffa::json_helpers::null_as_default"
4490 )]
4491 pub columns: ::buffa::alloc::vec::Vec<Column>,
4492 #[serde(
4496 rename = "storage_location",
4497 alias = "storageLocation",
4498 skip_serializing_if = "::core::option::Option::is_none"
4499 )]
4500 pub storage_location: ::core::option::Option<::buffa::alloc::string::String>,
4501 #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
4505 pub comment: ::core::option::Option<::buffa::alloc::string::String>,
4506 #[serde(
4510 rename = "properties",
4511 skip_serializing_if = "::buffa::__private::HashMap::is_empty",
4512 deserialize_with = "::buffa::json_helpers::null_as_default"
4513 )]
4514 pub properties: ::buffa::__private::HashMap<
4515 ::buffa::alloc::string::String,
4516 ::buffa::alloc::string::String,
4517 >,
4518 #[serde(
4524 rename = "view_definition",
4525 alias = "viewDefinition",
4526 skip_serializing_if = "::core::option::Option::is_none"
4527 )]
4528 pub view_definition: ::core::option::Option<::buffa::alloc::string::String>,
4529 #[serde(
4535 rename = "view_dependencies",
4536 alias = "viewDependencies",
4537 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4538 )]
4539 pub view_dependencies: ::buffa::MessageField<DependencyList>,
4540 #[serde(skip)]
4541 #[doc(hidden)]
4542 pub __buffa_unknown_fields: ::buffa::UnknownFields,
4543}
4544impl ::core::fmt::Debug for CreateTableRequest {
4545 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4546 f.debug_struct("CreateTableRequest")
4547 .field("name", &self.name)
4548 .field("schema_name", &self.schema_name)
4549 .field("catalog_name", &self.catalog_name)
4550 .field("table_type", &self.table_type)
4551 .field("data_source_format", &self.data_source_format)
4552 .field("columns", &self.columns)
4553 .field("storage_location", &self.storage_location)
4554 .field("comment", &self.comment)
4555 .field("properties", &self.properties)
4556 .field("view_definition", &self.view_definition)
4557 .field("view_dependencies", &self.view_dependencies)
4558 .finish()
4559 }
4560}
4561impl CreateTableRequest {
4562 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.CreateTableRequest";
4567}
4568impl CreateTableRequest {
4569 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
4570 #[inline]
4571 pub fn with_storage_location(
4573 mut self,
4574 value: impl Into<::buffa::alloc::string::String>,
4575 ) -> Self {
4576 self.storage_location = Some(value.into());
4577 self
4578 }
4579 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
4580 #[inline]
4581 pub fn with_comment(
4583 mut self,
4584 value: impl Into<::buffa::alloc::string::String>,
4585 ) -> Self {
4586 self.comment = Some(value.into());
4587 self
4588 }
4589 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
4590 #[inline]
4591 pub fn with_view_definition(
4593 mut self,
4594 value: impl Into<::buffa::alloc::string::String>,
4595 ) -> Self {
4596 self.view_definition = Some(value.into());
4597 self
4598 }
4599}
4600impl ::buffa::DefaultInstance for CreateTableRequest {
4601 fn default_instance() -> &'static Self {
4602 static VALUE: ::buffa::__private::OnceBox<CreateTableRequest> = ::buffa::__private::OnceBox::new();
4603 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4604 }
4605}
4606impl ::buffa::MessageName for CreateTableRequest {
4607 const PACKAGE: &'static str = "unitycatalog.tables.v1";
4608 const NAME: &'static str = "CreateTableRequest";
4609 const FULL_NAME: &'static str = "unitycatalog.tables.v1.CreateTableRequest";
4610 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.CreateTableRequest";
4611}
4612impl ::buffa::Message for CreateTableRequest {
4613 #[allow(clippy::let_and_return)]
4619 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4620 #[allow(unused_imports)]
4621 use ::buffa::Enumeration as _;
4622 let mut size = 0u32;
4623 if !self.name.is_empty() {
4624 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4625 }
4626 if !self.schema_name.is_empty() {
4627 size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
4628 }
4629 if !self.catalog_name.is_empty() {
4630 size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
4631 }
4632 {
4633 let val = self.table_type.to_i32();
4634 if val != 0 {
4635 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4636 }
4637 }
4638 {
4639 let val = self.data_source_format.to_i32();
4640 if val != 0 {
4641 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4642 }
4643 }
4644 for v in &self.columns {
4645 let __slot = __cache.reserve();
4646 let inner_size = v.compute_size(__cache);
4647 __cache.set(__slot, inner_size);
4648 size
4649 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4650 + inner_size;
4651 }
4652 if let Some(ref v) = self.storage_location {
4653 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4654 }
4655 if let Some(ref v) = self.comment {
4656 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4657 }
4658 #[allow(clippy::for_kv_map)]
4659 for (k, v) in &self.properties {
4660 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
4661 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4662 size
4663 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
4664 + entry_size;
4665 }
4666 if let Some(ref v) = self.view_definition {
4667 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4668 }
4669 if self.view_dependencies.is_set() {
4670 let __slot = __cache.reserve();
4671 let inner_size = self.view_dependencies.compute_size(__cache);
4672 __cache.set(__slot, inner_size);
4673 size
4674 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4675 + inner_size;
4676 }
4677 size += self.__buffa_unknown_fields.encoded_len() as u32;
4678 size
4679 }
4680 fn write_to(
4681 &self,
4682 __cache: &mut ::buffa::SizeCache,
4683 buf: &mut impl ::buffa::bytes::BufMut,
4684 ) {
4685 #[allow(unused_imports)]
4686 use ::buffa::Enumeration as _;
4687 if !self.name.is_empty() {
4688 ::buffa::encoding::Tag::new(
4689 1u32,
4690 ::buffa::encoding::WireType::LengthDelimited,
4691 )
4692 .encode(buf);
4693 ::buffa::types::encode_string(&self.name, buf);
4694 }
4695 if !self.schema_name.is_empty() {
4696 ::buffa::encoding::Tag::new(
4697 2u32,
4698 ::buffa::encoding::WireType::LengthDelimited,
4699 )
4700 .encode(buf);
4701 ::buffa::types::encode_string(&self.schema_name, buf);
4702 }
4703 if !self.catalog_name.is_empty() {
4704 ::buffa::encoding::Tag::new(
4705 3u32,
4706 ::buffa::encoding::WireType::LengthDelimited,
4707 )
4708 .encode(buf);
4709 ::buffa::types::encode_string(&self.catalog_name, buf);
4710 }
4711 {
4712 let val = self.table_type.to_i32();
4713 if val != 0 {
4714 ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
4715 .encode(buf);
4716 ::buffa::types::encode_int32(val, buf);
4717 }
4718 }
4719 {
4720 let val = self.data_source_format.to_i32();
4721 if val != 0 {
4722 ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
4723 .encode(buf);
4724 ::buffa::types::encode_int32(val, buf);
4725 }
4726 }
4727 for v in &self.columns {
4728 ::buffa::encoding::Tag::new(
4729 6u32,
4730 ::buffa::encoding::WireType::LengthDelimited,
4731 )
4732 .encode(buf);
4733 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4734 v.write_to(__cache, buf);
4735 }
4736 if let Some(ref v) = self.storage_location {
4737 ::buffa::encoding::Tag::new(
4738 7u32,
4739 ::buffa::encoding::WireType::LengthDelimited,
4740 )
4741 .encode(buf);
4742 ::buffa::types::encode_string(v, buf);
4743 }
4744 if let Some(ref v) = self.comment {
4745 ::buffa::encoding::Tag::new(
4746 8u32,
4747 ::buffa::encoding::WireType::LengthDelimited,
4748 )
4749 .encode(buf);
4750 ::buffa::types::encode_string(v, buf);
4751 }
4752 for (k, v) in &self.properties {
4753 let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
4754 + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4755 ::buffa::encoding::Tag::new(
4756 9u32,
4757 ::buffa::encoding::WireType::LengthDelimited,
4758 )
4759 .encode(buf);
4760 ::buffa::encoding::encode_varint(entry_size as u64, buf);
4761 ::buffa::encoding::Tag::new(
4762 1u32,
4763 ::buffa::encoding::WireType::LengthDelimited,
4764 )
4765 .encode(buf);
4766 ::buffa::types::encode_string(k, buf);
4767 ::buffa::encoding::Tag::new(
4768 2u32,
4769 ::buffa::encoding::WireType::LengthDelimited,
4770 )
4771 .encode(buf);
4772 ::buffa::types::encode_string(v, buf);
4773 }
4774 if let Some(ref v) = self.view_definition {
4775 ::buffa::encoding::Tag::new(
4776 10u32,
4777 ::buffa::encoding::WireType::LengthDelimited,
4778 )
4779 .encode(buf);
4780 ::buffa::types::encode_string(v, buf);
4781 }
4782 if self.view_dependencies.is_set() {
4783 ::buffa::encoding::Tag::new(
4784 11u32,
4785 ::buffa::encoding::WireType::LengthDelimited,
4786 )
4787 .encode(buf);
4788 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4789 self.view_dependencies.write_to(__cache, buf);
4790 }
4791 self.__buffa_unknown_fields.write_to(buf);
4792 }
4793 fn merge_field(
4794 &mut self,
4795 tag: ::buffa::encoding::Tag,
4796 buf: &mut impl ::buffa::bytes::Buf,
4797 depth: u32,
4798 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4799 #[allow(unused_imports)]
4800 use ::buffa::bytes::Buf as _;
4801 #[allow(unused_imports)]
4802 use ::buffa::Enumeration as _;
4803 match tag.field_number() {
4804 1u32 => {
4805 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4806 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4807 field_number: 1u32,
4808 expected: 2u8,
4809 actual: tag.wire_type() as u8,
4810 });
4811 }
4812 ::buffa::types::merge_string(&mut self.name, buf)?;
4813 }
4814 2u32 => {
4815 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4816 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4817 field_number: 2u32,
4818 expected: 2u8,
4819 actual: tag.wire_type() as u8,
4820 });
4821 }
4822 ::buffa::types::merge_string(&mut self.schema_name, buf)?;
4823 }
4824 3u32 => {
4825 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4826 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4827 field_number: 3u32,
4828 expected: 2u8,
4829 actual: tag.wire_type() as u8,
4830 });
4831 }
4832 ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
4833 }
4834 4u32 => {
4835 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4836 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4837 field_number: 4u32,
4838 expected: 0u8,
4839 actual: tag.wire_type() as u8,
4840 });
4841 }
4842 self.table_type = ::buffa::EnumValue::from(
4843 ::buffa::types::decode_int32(buf)?,
4844 );
4845 }
4846 5u32 => {
4847 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4848 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4849 field_number: 5u32,
4850 expected: 0u8,
4851 actual: tag.wire_type() as u8,
4852 });
4853 }
4854 self.data_source_format = ::buffa::EnumValue::from(
4855 ::buffa::types::decode_int32(buf)?,
4856 );
4857 }
4858 6u32 => {
4859 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4860 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4861 field_number: 6u32,
4862 expected: 2u8,
4863 actual: tag.wire_type() as u8,
4864 });
4865 }
4866 let mut elem = ::core::default::Default::default();
4867 ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4868 self.columns.push(elem);
4869 }
4870 7u32 => {
4871 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4872 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4873 field_number: 7u32,
4874 expected: 2u8,
4875 actual: tag.wire_type() as u8,
4876 });
4877 }
4878 ::buffa::types::merge_string(
4879 self
4880 .storage_location
4881 .get_or_insert_with(::buffa::alloc::string::String::new),
4882 buf,
4883 )?;
4884 }
4885 8u32 => {
4886 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4887 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4888 field_number: 8u32,
4889 expected: 2u8,
4890 actual: tag.wire_type() as u8,
4891 });
4892 }
4893 ::buffa::types::merge_string(
4894 self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
4895 buf,
4896 )?;
4897 }
4898 9u32 => {
4899 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4900 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4901 field_number: 9u32,
4902 expected: 2u8,
4903 actual: tag.wire_type() as u8,
4904 });
4905 }
4906 let entry_len = ::buffa::encoding::decode_varint(buf)?;
4907 let entry_len = usize::try_from(entry_len)
4908 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
4909 if buf.remaining() < entry_len {
4910 return ::core::result::Result::Err(
4911 ::buffa::DecodeError::UnexpectedEof,
4912 );
4913 }
4914 let entry_limit = buf.remaining() - entry_len;
4915 let mut key = ::core::default::Default::default();
4916 let mut val = ::core::default::Default::default();
4917 while buf.remaining() > entry_limit {
4918 let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
4919 match entry_tag.field_number() {
4920 1 => {
4921 if entry_tag.wire_type()
4922 != ::buffa::encoding::WireType::LengthDelimited
4923 {
4924 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4925 field_number: entry_tag.field_number(),
4926 expected: 2u8,
4927 actual: entry_tag.wire_type() as u8,
4928 });
4929 }
4930 key = ::buffa::types::decode_string(buf)?;
4931 }
4932 2 => {
4933 if entry_tag.wire_type()
4934 != ::buffa::encoding::WireType::LengthDelimited
4935 {
4936 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4937 field_number: entry_tag.field_number(),
4938 expected: 2u8,
4939 actual: entry_tag.wire_type() as u8,
4940 });
4941 }
4942 val = ::buffa::types::decode_string(buf)?;
4943 }
4944 _ => {
4945 ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
4946 }
4947 }
4948 }
4949 if buf.remaining() != entry_limit {
4950 let remaining = buf.remaining();
4951 if remaining > entry_limit {
4952 buf.advance(remaining - entry_limit);
4953 } else {
4954 return ::core::result::Result::Err(
4955 ::buffa::DecodeError::UnexpectedEof,
4956 );
4957 }
4958 }
4959 self.properties.insert(key, val);
4960 }
4961 10u32 => {
4962 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4963 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4964 field_number: 10u32,
4965 expected: 2u8,
4966 actual: tag.wire_type() as u8,
4967 });
4968 }
4969 ::buffa::types::merge_string(
4970 self
4971 .view_definition
4972 .get_or_insert_with(::buffa::alloc::string::String::new),
4973 buf,
4974 )?;
4975 }
4976 11u32 => {
4977 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4978 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4979 field_number: 11u32,
4980 expected: 2u8,
4981 actual: tag.wire_type() as u8,
4982 });
4983 }
4984 ::buffa::Message::merge_length_delimited(
4985 self.view_dependencies.get_or_insert_default(),
4986 buf,
4987 depth,
4988 )?;
4989 }
4990 _ => {
4991 self.__buffa_unknown_fields
4992 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4993 }
4994 }
4995 ::core::result::Result::Ok(())
4996 }
4997 fn clear(&mut self) {
4998 self.name.clear();
4999 self.schema_name.clear();
5000 self.catalog_name.clear();
5001 self.table_type = ::buffa::EnumValue::from(0);
5002 self.data_source_format = ::buffa::EnumValue::from(0);
5003 self.columns.clear();
5004 self.storage_location = ::core::option::Option::None;
5005 self.comment = ::core::option::Option::None;
5006 self.properties.clear();
5007 self.view_definition = ::core::option::Option::None;
5008 self.view_dependencies = ::buffa::MessageField::none();
5009 self.__buffa_unknown_fields.clear();
5010 }
5011}
5012impl ::buffa::ExtensionSet for CreateTableRequest {
5013 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.CreateTableRequest";
5014 fn unknown_fields(&self) -> &::buffa::UnknownFields {
5015 &self.__buffa_unknown_fields
5016 }
5017 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5018 &mut self.__buffa_unknown_fields
5019 }
5020}
5021impl ::buffa::json_helpers::ProtoElemJson for CreateTableRequest {
5022 fn serialize_proto_json<S: ::serde::Serializer>(
5023 v: &Self,
5024 s: S,
5025 ) -> ::core::result::Result<S::Ok, S::Error> {
5026 ::serde::Serialize::serialize(v, s)
5027 }
5028 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5029 d: D,
5030 ) -> ::core::result::Result<Self, D::Error> {
5031 <Self as ::serde::Deserialize>::deserialize(d)
5032 }
5033}
5034#[doc(hidden)]
5035pub const __CREATE_TABLE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5036 type_url: "type.googleapis.com/unitycatalog.tables.v1.CreateTableRequest",
5037 to_json: ::buffa::type_registry::any_to_json::<CreateTableRequest>,
5038 from_json: ::buffa::type_registry::any_from_json::<CreateTableRequest>,
5039 is_wkt: false,
5040};
5041#[derive(Clone, PartialEq, Default)]
5043#[derive(::serde::Serialize, ::serde::Deserialize)]
5044#[serde(default)]
5045pub struct GetTableRequest {
5046 #[serde(
5050 rename = "full_name",
5051 alias = "fullName",
5052 with = "::buffa::json_helpers::proto_string",
5053 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5054 )]
5055 pub full_name: ::buffa::alloc::string::String,
5056 #[serde(
5060 rename = "include_delta_metadata",
5061 alias = "includeDeltaMetadata",
5062 skip_serializing_if = "::core::option::Option::is_none"
5063 )]
5064 pub include_delta_metadata: ::core::option::Option<bool>,
5065 #[serde(
5069 rename = "include_browse",
5070 alias = "includeBrowse",
5071 skip_serializing_if = "::core::option::Option::is_none"
5072 )]
5073 pub include_browse: ::core::option::Option<bool>,
5074 #[serde(
5078 rename = "include_manifest_capabilities",
5079 alias = "includeManifestCapabilities",
5080 skip_serializing_if = "::core::option::Option::is_none"
5081 )]
5082 pub include_manifest_capabilities: ::core::option::Option<bool>,
5083 #[serde(skip)]
5084 #[doc(hidden)]
5085 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5086}
5087impl ::core::fmt::Debug for GetTableRequest {
5088 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5089 f.debug_struct("GetTableRequest")
5090 .field("full_name", &self.full_name)
5091 .field("include_delta_metadata", &self.include_delta_metadata)
5092 .field("include_browse", &self.include_browse)
5093 .field("include_manifest_capabilities", &self.include_manifest_capabilities)
5094 .finish()
5095 }
5096}
5097impl GetTableRequest {
5098 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableRequest";
5103}
5104impl GetTableRequest {
5105 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
5106 #[inline]
5107 pub fn with_include_delta_metadata(mut self, value: bool) -> Self {
5109 self.include_delta_metadata = Some(value);
5110 self
5111 }
5112 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
5113 #[inline]
5114 pub fn with_include_browse(mut self, value: bool) -> Self {
5116 self.include_browse = Some(value);
5117 self
5118 }
5119 #[must_use = "with_* setters return `self` by value; assign or chain the result"]
5120 #[inline]
5121 pub fn with_include_manifest_capabilities(mut self, value: bool) -> Self {
5123 self.include_manifest_capabilities = Some(value);
5124 self
5125 }
5126}
5127impl ::buffa::DefaultInstance for GetTableRequest {
5128 fn default_instance() -> &'static Self {
5129 static VALUE: ::buffa::__private::OnceBox<GetTableRequest> = ::buffa::__private::OnceBox::new();
5130 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5131 }
5132}
5133impl ::buffa::MessageName for GetTableRequest {
5134 const PACKAGE: &'static str = "unitycatalog.tables.v1";
5135 const NAME: &'static str = "GetTableRequest";
5136 const FULL_NAME: &'static str = "unitycatalog.tables.v1.GetTableRequest";
5137 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableRequest";
5138}
5139impl ::buffa::Message for GetTableRequest {
5140 #[allow(clippy::let_and_return)]
5146 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5147 #[allow(unused_imports)]
5148 use ::buffa::Enumeration as _;
5149 let mut size = 0u32;
5150 if !self.full_name.is_empty() {
5151 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
5152 }
5153 if self.include_delta_metadata.is_some() {
5154 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5155 }
5156 if self.include_browse.is_some() {
5157 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5158 }
5159 if self.include_manifest_capabilities.is_some() {
5160 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5161 }
5162 size += self.__buffa_unknown_fields.encoded_len() as u32;
5163 size
5164 }
5165 fn write_to(
5166 &self,
5167 _cache: &mut ::buffa::SizeCache,
5168 buf: &mut impl ::buffa::bytes::BufMut,
5169 ) {
5170 #[allow(unused_imports)]
5171 use ::buffa::Enumeration as _;
5172 if !self.full_name.is_empty() {
5173 ::buffa::encoding::Tag::new(
5174 1u32,
5175 ::buffa::encoding::WireType::LengthDelimited,
5176 )
5177 .encode(buf);
5178 ::buffa::types::encode_string(&self.full_name, buf);
5179 }
5180 if let Some(v) = self.include_delta_metadata {
5181 ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
5182 .encode(buf);
5183 ::buffa::types::encode_bool(v, buf);
5184 }
5185 if let Some(v) = self.include_browse {
5186 ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
5187 .encode(buf);
5188 ::buffa::types::encode_bool(v, buf);
5189 }
5190 if let Some(v) = self.include_manifest_capabilities {
5191 ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
5192 .encode(buf);
5193 ::buffa::types::encode_bool(v, buf);
5194 }
5195 self.__buffa_unknown_fields.write_to(buf);
5196 }
5197 fn merge_field(
5198 &mut self,
5199 tag: ::buffa::encoding::Tag,
5200 buf: &mut impl ::buffa::bytes::Buf,
5201 depth: u32,
5202 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5203 #[allow(unused_imports)]
5204 use ::buffa::bytes::Buf as _;
5205 #[allow(unused_imports)]
5206 use ::buffa::Enumeration as _;
5207 match tag.field_number() {
5208 1u32 => {
5209 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5210 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5211 field_number: 1u32,
5212 expected: 2u8,
5213 actual: tag.wire_type() as u8,
5214 });
5215 }
5216 ::buffa::types::merge_string(&mut self.full_name, buf)?;
5217 }
5218 2u32 => {
5219 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5220 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5221 field_number: 2u32,
5222 expected: 0u8,
5223 actual: tag.wire_type() as u8,
5224 });
5225 }
5226 self.include_delta_metadata = ::core::option::Option::Some(
5227 ::buffa::types::decode_bool(buf)?,
5228 );
5229 }
5230 3u32 => {
5231 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5232 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5233 field_number: 3u32,
5234 expected: 0u8,
5235 actual: tag.wire_type() as u8,
5236 });
5237 }
5238 self.include_browse = ::core::option::Option::Some(
5239 ::buffa::types::decode_bool(buf)?,
5240 );
5241 }
5242 4u32 => {
5243 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5244 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5245 field_number: 4u32,
5246 expected: 0u8,
5247 actual: tag.wire_type() as u8,
5248 });
5249 }
5250 self.include_manifest_capabilities = ::core::option::Option::Some(
5251 ::buffa::types::decode_bool(buf)?,
5252 );
5253 }
5254 _ => {
5255 self.__buffa_unknown_fields
5256 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5257 }
5258 }
5259 ::core::result::Result::Ok(())
5260 }
5261 fn clear(&mut self) {
5262 self.full_name.clear();
5263 self.include_delta_metadata = ::core::option::Option::None;
5264 self.include_browse = ::core::option::Option::None;
5265 self.include_manifest_capabilities = ::core::option::Option::None;
5266 self.__buffa_unknown_fields.clear();
5267 }
5268}
5269impl ::buffa::ExtensionSet for GetTableRequest {
5270 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.GetTableRequest";
5271 fn unknown_fields(&self) -> &::buffa::UnknownFields {
5272 &self.__buffa_unknown_fields
5273 }
5274 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5275 &mut self.__buffa_unknown_fields
5276 }
5277}
5278impl ::buffa::json_helpers::ProtoElemJson for GetTableRequest {
5279 fn serialize_proto_json<S: ::serde::Serializer>(
5280 v: &Self,
5281 s: S,
5282 ) -> ::core::result::Result<S::Ok, S::Error> {
5283 ::serde::Serialize::serialize(v, s)
5284 }
5285 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5286 d: D,
5287 ) -> ::core::result::Result<Self, D::Error> {
5288 <Self as ::serde::Deserialize>::deserialize(d)
5289 }
5290}
5291#[doc(hidden)]
5292pub const __GET_TABLE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5293 type_url: "type.googleapis.com/unitycatalog.tables.v1.GetTableRequest",
5294 to_json: ::buffa::type_registry::any_to_json::<GetTableRequest>,
5295 from_json: ::buffa::type_registry::any_from_json::<GetTableRequest>,
5296 is_wkt: false,
5297};
5298#[derive(Clone, PartialEq, Default)]
5300#[derive(::serde::Serialize, ::serde::Deserialize)]
5301#[serde(default)]
5302pub struct GetTableExistsRequest {
5303 #[serde(
5307 rename = "full_name",
5308 alias = "fullName",
5309 with = "::buffa::json_helpers::proto_string",
5310 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5311 )]
5312 pub full_name: ::buffa::alloc::string::String,
5313 #[serde(skip)]
5314 #[doc(hidden)]
5315 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5316}
5317impl ::core::fmt::Debug for GetTableExistsRequest {
5318 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5319 f.debug_struct("GetTableExistsRequest")
5320 .field("full_name", &self.full_name)
5321 .finish()
5322 }
5323}
5324impl GetTableExistsRequest {
5325 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsRequest";
5330}
5331impl ::buffa::DefaultInstance for GetTableExistsRequest {
5332 fn default_instance() -> &'static Self {
5333 static VALUE: ::buffa::__private::OnceBox<GetTableExistsRequest> = ::buffa::__private::OnceBox::new();
5334 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5335 }
5336}
5337impl ::buffa::MessageName for GetTableExistsRequest {
5338 const PACKAGE: &'static str = "unitycatalog.tables.v1";
5339 const NAME: &'static str = "GetTableExistsRequest";
5340 const FULL_NAME: &'static str = "unitycatalog.tables.v1.GetTableExistsRequest";
5341 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsRequest";
5342}
5343impl ::buffa::Message for GetTableExistsRequest {
5344 #[allow(clippy::let_and_return)]
5350 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5351 #[allow(unused_imports)]
5352 use ::buffa::Enumeration as _;
5353 let mut size = 0u32;
5354 if !self.full_name.is_empty() {
5355 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
5356 }
5357 size += self.__buffa_unknown_fields.encoded_len() as u32;
5358 size
5359 }
5360 fn write_to(
5361 &self,
5362 _cache: &mut ::buffa::SizeCache,
5363 buf: &mut impl ::buffa::bytes::BufMut,
5364 ) {
5365 #[allow(unused_imports)]
5366 use ::buffa::Enumeration as _;
5367 if !self.full_name.is_empty() {
5368 ::buffa::encoding::Tag::new(
5369 1u32,
5370 ::buffa::encoding::WireType::LengthDelimited,
5371 )
5372 .encode(buf);
5373 ::buffa::types::encode_string(&self.full_name, buf);
5374 }
5375 self.__buffa_unknown_fields.write_to(buf);
5376 }
5377 fn merge_field(
5378 &mut self,
5379 tag: ::buffa::encoding::Tag,
5380 buf: &mut impl ::buffa::bytes::Buf,
5381 depth: u32,
5382 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5383 #[allow(unused_imports)]
5384 use ::buffa::bytes::Buf as _;
5385 #[allow(unused_imports)]
5386 use ::buffa::Enumeration as _;
5387 match tag.field_number() {
5388 1u32 => {
5389 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5390 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5391 field_number: 1u32,
5392 expected: 2u8,
5393 actual: tag.wire_type() as u8,
5394 });
5395 }
5396 ::buffa::types::merge_string(&mut self.full_name, buf)?;
5397 }
5398 _ => {
5399 self.__buffa_unknown_fields
5400 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5401 }
5402 }
5403 ::core::result::Result::Ok(())
5404 }
5405 fn clear(&mut self) {
5406 self.full_name.clear();
5407 self.__buffa_unknown_fields.clear();
5408 }
5409}
5410impl ::buffa::ExtensionSet for GetTableExistsRequest {
5411 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.GetTableExistsRequest";
5412 fn unknown_fields(&self) -> &::buffa::UnknownFields {
5413 &self.__buffa_unknown_fields
5414 }
5415 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5416 &mut self.__buffa_unknown_fields
5417 }
5418}
5419impl ::buffa::json_helpers::ProtoElemJson for GetTableExistsRequest {
5420 fn serialize_proto_json<S: ::serde::Serializer>(
5421 v: &Self,
5422 s: S,
5423 ) -> ::core::result::Result<S::Ok, S::Error> {
5424 ::serde::Serialize::serialize(v, s)
5425 }
5426 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5427 d: D,
5428 ) -> ::core::result::Result<Self, D::Error> {
5429 <Self as ::serde::Deserialize>::deserialize(d)
5430 }
5431}
5432#[doc(hidden)]
5433pub const __GET_TABLE_EXISTS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5434 type_url: "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsRequest",
5435 to_json: ::buffa::type_registry::any_to_json::<GetTableExistsRequest>,
5436 from_json: ::buffa::type_registry::any_from_json::<GetTableExistsRequest>,
5437 is_wkt: false,
5438};
5439#[derive(Clone, PartialEq, Default)]
5440#[derive(::serde::Serialize, ::serde::Deserialize)]
5441#[serde(default)]
5442pub struct GetTableExistsResponse {
5443 #[serde(
5447 rename = "table_exists",
5448 alias = "tableExists",
5449 with = "::buffa::json_helpers::proto_bool",
5450 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5451 )]
5452 pub table_exists: bool,
5453 #[serde(skip)]
5454 #[doc(hidden)]
5455 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5456}
5457impl ::core::fmt::Debug for GetTableExistsResponse {
5458 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5459 f.debug_struct("GetTableExistsResponse")
5460 .field("table_exists", &self.table_exists)
5461 .finish()
5462 }
5463}
5464impl GetTableExistsResponse {
5465 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsResponse";
5470}
5471impl ::buffa::DefaultInstance for GetTableExistsResponse {
5472 fn default_instance() -> &'static Self {
5473 static VALUE: ::buffa::__private::OnceBox<GetTableExistsResponse> = ::buffa::__private::OnceBox::new();
5474 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5475 }
5476}
5477impl ::buffa::MessageName for GetTableExistsResponse {
5478 const PACKAGE: &'static str = "unitycatalog.tables.v1";
5479 const NAME: &'static str = "GetTableExistsResponse";
5480 const FULL_NAME: &'static str = "unitycatalog.tables.v1.GetTableExistsResponse";
5481 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsResponse";
5482}
5483impl ::buffa::Message for GetTableExistsResponse {
5484 #[allow(clippy::let_and_return)]
5490 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5491 #[allow(unused_imports)]
5492 use ::buffa::Enumeration as _;
5493 let mut size = 0u32;
5494 if self.table_exists {
5495 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5496 }
5497 size += self.__buffa_unknown_fields.encoded_len() as u32;
5498 size
5499 }
5500 fn write_to(
5501 &self,
5502 _cache: &mut ::buffa::SizeCache,
5503 buf: &mut impl ::buffa::bytes::BufMut,
5504 ) {
5505 #[allow(unused_imports)]
5506 use ::buffa::Enumeration as _;
5507 if self.table_exists {
5508 ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
5509 .encode(buf);
5510 ::buffa::types::encode_bool(self.table_exists, buf);
5511 }
5512 self.__buffa_unknown_fields.write_to(buf);
5513 }
5514 fn merge_field(
5515 &mut self,
5516 tag: ::buffa::encoding::Tag,
5517 buf: &mut impl ::buffa::bytes::Buf,
5518 depth: u32,
5519 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5520 #[allow(unused_imports)]
5521 use ::buffa::bytes::Buf as _;
5522 #[allow(unused_imports)]
5523 use ::buffa::Enumeration as _;
5524 match tag.field_number() {
5525 1u32 => {
5526 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5527 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5528 field_number: 1u32,
5529 expected: 0u8,
5530 actual: tag.wire_type() as u8,
5531 });
5532 }
5533 self.table_exists = ::buffa::types::decode_bool(buf)?;
5534 }
5535 _ => {
5536 self.__buffa_unknown_fields
5537 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5538 }
5539 }
5540 ::core::result::Result::Ok(())
5541 }
5542 fn clear(&mut self) {
5543 self.table_exists = false;
5544 self.__buffa_unknown_fields.clear();
5545 }
5546}
5547impl ::buffa::ExtensionSet for GetTableExistsResponse {
5548 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.GetTableExistsResponse";
5549 fn unknown_fields(&self) -> &::buffa::UnknownFields {
5550 &self.__buffa_unknown_fields
5551 }
5552 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5553 &mut self.__buffa_unknown_fields
5554 }
5555}
5556impl ::buffa::json_helpers::ProtoElemJson for GetTableExistsResponse {
5557 fn serialize_proto_json<S: ::serde::Serializer>(
5558 v: &Self,
5559 s: S,
5560 ) -> ::core::result::Result<S::Ok, S::Error> {
5561 ::serde::Serialize::serialize(v, s)
5562 }
5563 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5564 d: D,
5565 ) -> ::core::result::Result<Self, D::Error> {
5566 <Self as ::serde::Deserialize>::deserialize(d)
5567 }
5568}
5569#[doc(hidden)]
5570pub const __GET_TABLE_EXISTS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5571 type_url: "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsResponse",
5572 to_json: ::buffa::type_registry::any_to_json::<GetTableExistsResponse>,
5573 from_json: ::buffa::type_registry::any_from_json::<GetTableExistsResponse>,
5574 is_wkt: false,
5575};
5576#[derive(Clone, PartialEq, Default)]
5578#[derive(::serde::Serialize, ::serde::Deserialize)]
5579#[serde(default)]
5580pub struct DeleteTableRequest {
5581 #[serde(
5585 rename = "full_name",
5586 alias = "fullName",
5587 with = "::buffa::json_helpers::proto_string",
5588 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5589 )]
5590 pub full_name: ::buffa::alloc::string::String,
5591 #[serde(skip)]
5592 #[doc(hidden)]
5593 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5594}
5595impl ::core::fmt::Debug for DeleteTableRequest {
5596 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5597 f.debug_struct("DeleteTableRequest").field("full_name", &self.full_name).finish()
5598 }
5599}
5600impl DeleteTableRequest {
5601 pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.DeleteTableRequest";
5606}
5607impl ::buffa::DefaultInstance for DeleteTableRequest {
5608 fn default_instance() -> &'static Self {
5609 static VALUE: ::buffa::__private::OnceBox<DeleteTableRequest> = ::buffa::__private::OnceBox::new();
5610 VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5611 }
5612}
5613impl ::buffa::MessageName for DeleteTableRequest {
5614 const PACKAGE: &'static str = "unitycatalog.tables.v1";
5615 const NAME: &'static str = "DeleteTableRequest";
5616 const FULL_NAME: &'static str = "unitycatalog.tables.v1.DeleteTableRequest";
5617 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.DeleteTableRequest";
5618}
5619impl ::buffa::Message for DeleteTableRequest {
5620 #[allow(clippy::let_and_return)]
5626 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5627 #[allow(unused_imports)]
5628 use ::buffa::Enumeration as _;
5629 let mut size = 0u32;
5630 if !self.full_name.is_empty() {
5631 size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
5632 }
5633 size += self.__buffa_unknown_fields.encoded_len() as u32;
5634 size
5635 }
5636 fn write_to(
5637 &self,
5638 _cache: &mut ::buffa::SizeCache,
5639 buf: &mut impl ::buffa::bytes::BufMut,
5640 ) {
5641 #[allow(unused_imports)]
5642 use ::buffa::Enumeration as _;
5643 if !self.full_name.is_empty() {
5644 ::buffa::encoding::Tag::new(
5645 1u32,
5646 ::buffa::encoding::WireType::LengthDelimited,
5647 )
5648 .encode(buf);
5649 ::buffa::types::encode_string(&self.full_name, buf);
5650 }
5651 self.__buffa_unknown_fields.write_to(buf);
5652 }
5653 fn merge_field(
5654 &mut self,
5655 tag: ::buffa::encoding::Tag,
5656 buf: &mut impl ::buffa::bytes::Buf,
5657 depth: u32,
5658 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5659 #[allow(unused_imports)]
5660 use ::buffa::bytes::Buf as _;
5661 #[allow(unused_imports)]
5662 use ::buffa::Enumeration as _;
5663 match tag.field_number() {
5664 1u32 => {
5665 if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5666 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5667 field_number: 1u32,
5668 expected: 2u8,
5669 actual: tag.wire_type() as u8,
5670 });
5671 }
5672 ::buffa::types::merge_string(&mut self.full_name, buf)?;
5673 }
5674 _ => {
5675 self.__buffa_unknown_fields
5676 .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5677 }
5678 }
5679 ::core::result::Result::Ok(())
5680 }
5681 fn clear(&mut self) {
5682 self.full_name.clear();
5683 self.__buffa_unknown_fields.clear();
5684 }
5685}
5686impl ::buffa::ExtensionSet for DeleteTableRequest {
5687 const PROTO_FQN: &'static str = "unitycatalog.tables.v1.DeleteTableRequest";
5688 fn unknown_fields(&self) -> &::buffa::UnknownFields {
5689 &self.__buffa_unknown_fields
5690 }
5691 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5692 &mut self.__buffa_unknown_fields
5693 }
5694}
5695impl ::buffa::json_helpers::ProtoElemJson for DeleteTableRequest {
5696 fn serialize_proto_json<S: ::serde::Serializer>(
5697 v: &Self,
5698 s: S,
5699 ) -> ::core::result::Result<S::Ok, S::Error> {
5700 ::serde::Serialize::serialize(v, s)
5701 }
5702 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5703 d: D,
5704 ) -> ::core::result::Result<Self, D::Error> {
5705 <Self as ::serde::Deserialize>::deserialize(d)
5706 }
5707}
5708#[doc(hidden)]
5709pub const __DELETE_TABLE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5710 type_url: "type.googleapis.com/unitycatalog.tables.v1.DeleteTableRequest",
5711 to_json: ::buffa::type_registry::any_to_json::<DeleteTableRequest>,
5712 from_json: ::buffa::type_registry::any_from_json::<DeleteTableRequest>,
5713 is_wkt: false,
5714};
5715#[allow(
5716 non_camel_case_types,
5717 dead_code,
5718 unused_imports,
5719 unused_qualifications,
5720 clippy::derivable_impls,
5721 clippy::match_single_binding,
5722 clippy::uninlined_format_args,
5723 clippy::doc_lazy_continuation,
5724 clippy::module_inception
5725)]
5726pub mod __buffa {
5727 #[allow(unused_imports)]
5728 use super::*;
5729 pub mod view {
5730 #[allow(unused_imports)]
5731 use super::*;
5732 #[derive(Clone, Debug, Default)]
5733 pub struct TableSummaryView<'a> {
5734 pub full_name: &'a str,
5738 pub table_type: ::buffa::EnumValue<super::super::TableType>,
5740 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5741 }
5742 impl<'a> TableSummaryView<'a> {
5743 #[doc(hidden)]
5751 pub fn _decode_depth(
5752 buf: &'a [u8],
5753 depth: u32,
5754 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5755 let mut view = Self::default();
5756 view._merge_into_view(buf, depth)?;
5757 ::core::result::Result::Ok(view)
5758 }
5759 #[doc(hidden)]
5767 pub fn _merge_into_view(
5768 &mut self,
5769 buf: &'a [u8],
5770 depth: u32,
5771 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5772 let _ = depth;
5773 #[allow(unused_variables)]
5774 let view = self;
5775 let mut cur: &'a [u8] = buf;
5776 while !cur.is_empty() {
5777 let before_tag = cur;
5778 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5779 match tag.field_number() {
5780 1u32 => {
5781 if tag.wire_type()
5782 != ::buffa::encoding::WireType::LengthDelimited
5783 {
5784 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5785 field_number: 1u32,
5786 expected: 2u8,
5787 actual: tag.wire_type() as u8,
5788 });
5789 }
5790 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
5791 }
5792 2u32 => {
5793 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5794 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5795 field_number: 2u32,
5796 expected: 0u8,
5797 actual: tag.wire_type() as u8,
5798 });
5799 }
5800 view.table_type = ::buffa::EnumValue::from(
5801 ::buffa::types::decode_int32(&mut cur)?,
5802 );
5803 }
5804 _ => {
5805 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5806 let span_len = before_tag.len() - cur.len();
5807 view.__buffa_unknown_fields
5808 .push_raw(&before_tag[..span_len]);
5809 }
5810 }
5811 }
5812 ::core::result::Result::Ok(())
5813 }
5814 }
5815 impl<'a> ::buffa::MessageView<'a> for TableSummaryView<'a> {
5816 type Owned = super::super::TableSummary;
5817 fn decode_view(
5818 buf: &'a [u8],
5819 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5820 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5821 }
5822 fn decode_view_with_limit(
5823 buf: &'a [u8],
5824 depth: u32,
5825 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5826 Self::_decode_depth(buf, depth)
5827 }
5828 fn to_owned_message(&self) -> super::super::TableSummary {
5829 self.to_owned_from_source(None)
5830 }
5831 #[allow(clippy::useless_conversion, clippy::needless_update)]
5832 fn to_owned_from_source(
5833 &self,
5834 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5835 ) -> super::super::TableSummary {
5836 #[allow(unused_imports)]
5837 use ::buffa::alloc::string::ToString as _;
5838 let _ = __buffa_src;
5839 super::super::TableSummary {
5840 full_name: self.full_name.to_string(),
5841 table_type: self.table_type,
5842 __buffa_unknown_fields: self
5843 .__buffa_unknown_fields
5844 .to_owned()
5845 .unwrap_or_default()
5846 .into(),
5847 ..::core::default::Default::default()
5848 }
5849 }
5850 }
5851 impl<'a> ::buffa::ViewEncode<'a> for TableSummaryView<'a> {
5852 #[allow(clippy::needless_borrow, clippy::let_and_return)]
5853 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5854 #[allow(unused_imports)]
5855 use ::buffa::Enumeration as _;
5856 let mut size = 0u32;
5857 if !self.full_name.is_empty() {
5858 size
5859 += 1u32
5860 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
5861 }
5862 {
5863 let val = self.table_type.to_i32();
5864 if val != 0 {
5865 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5866 }
5867 }
5868 size += self.__buffa_unknown_fields.encoded_len() as u32;
5869 size
5870 }
5871 #[allow(clippy::needless_borrow)]
5872 fn write_to(
5873 &self,
5874 _cache: &mut ::buffa::SizeCache,
5875 buf: &mut impl ::buffa::bytes::BufMut,
5876 ) {
5877 #[allow(unused_imports)]
5878 use ::buffa::Enumeration as _;
5879 if !self.full_name.is_empty() {
5880 ::buffa::encoding::Tag::new(
5881 1u32,
5882 ::buffa::encoding::WireType::LengthDelimited,
5883 )
5884 .encode(buf);
5885 ::buffa::types::encode_string(&self.full_name, buf);
5886 }
5887 {
5888 let val = self.table_type.to_i32();
5889 if val != 0 {
5890 ::buffa::encoding::Tag::new(
5891 2u32,
5892 ::buffa::encoding::WireType::Varint,
5893 )
5894 .encode(buf);
5895 ::buffa::types::encode_int32(val, buf);
5896 }
5897 }
5898 self.__buffa_unknown_fields.write_to(buf);
5899 }
5900 }
5901 impl<'__a> ::serde::Serialize for TableSummaryView<'__a> {
5913 fn serialize<__S: ::serde::Serializer>(
5914 &self,
5915 __s: __S,
5916 ) -> ::core::result::Result<__S::Ok, __S::Error> {
5917 use ::serde::ser::SerializeMap as _;
5918 let mut __map = __s.serialize_map(::core::option::Option::None)?;
5919 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
5920 __map.serialize_entry("full_name", self.full_name)?;
5921 }
5922 if !::buffa::json_helpers::skip_if::is_default_enum_value(
5923 &self.table_type,
5924 ) {
5925 __map.serialize_entry("table_type", &self.table_type)?;
5926 }
5927 __map.end()
5928 }
5929 }
5930 impl<'a> ::buffa::MessageName for TableSummaryView<'a> {
5931 const PACKAGE: &'static str = "unitycatalog.tables.v1";
5932 const NAME: &'static str = "TableSummary";
5933 const FULL_NAME: &'static str = "unitycatalog.tables.v1.TableSummary";
5934 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.TableSummary";
5935 }
5936 impl<'v> ::buffa::DefaultViewInstance for TableSummaryView<'v> {
5937 fn default_view_instance<'a>() -> &'a Self
5938 where
5939 Self: 'a,
5940 {
5941 static VALUE: ::buffa::__private::OnceBox<TableSummaryView<'static>> = ::buffa::__private::OnceBox::new();
5942 VALUE
5943 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5944 <TableSummaryView<'static>>::default(),
5945 ))
5946 }
5947 }
5948 impl ::buffa::ViewReborrow for TableSummaryView<'static> {
5949 type Reborrowed<'b> = TableSummaryView<'b>;
5950 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5951 this
5952 }
5953 }
5954 #[derive(Clone, Debug)]
5960 pub struct TableSummaryOwnedView(::buffa::OwnedView<TableSummaryView<'static>>);
5961 impl TableSummaryOwnedView {
5962 pub fn decode(
5972 bytes: ::buffa::bytes::Bytes,
5973 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5974 ::core::result::Result::Ok(
5975 TableSummaryOwnedView(::buffa::OwnedView::decode(bytes)?),
5976 )
5977 }
5978 pub fn decode_with_options(
5986 bytes: ::buffa::bytes::Bytes,
5987 opts: &::buffa::DecodeOptions,
5988 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5989 ::core::result::Result::Ok(
5990 TableSummaryOwnedView(
5991 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5992 ),
5993 )
5994 }
5995 pub fn from_owned(
6002 msg: &super::super::TableSummary,
6003 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6004 ::core::result::Result::Ok(
6005 TableSummaryOwnedView(::buffa::OwnedView::from_owned(msg)?),
6006 )
6007 }
6008 #[must_use]
6010 pub fn view(&self) -> &TableSummaryView<'_> {
6011 self.0.reborrow()
6012 }
6013 #[must_use]
6015 pub fn to_owned_message(&self) -> super::super::TableSummary {
6016 self.0.to_owned_message()
6017 }
6018 #[must_use]
6020 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6021 self.0.bytes()
6022 }
6023 #[must_use]
6025 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6026 self.0.into_bytes()
6027 }
6028 #[must_use]
6032 pub fn full_name(&self) -> &'_ str {
6033 self.0.reborrow().full_name
6034 }
6035 #[must_use]
6037 pub fn table_type(&self) -> ::buffa::EnumValue<super::super::TableType> {
6038 self.0.reborrow().table_type
6039 }
6040 }
6041 impl ::core::convert::From<::buffa::OwnedView<TableSummaryView<'static>>>
6042 for TableSummaryOwnedView {
6043 fn from(inner: ::buffa::OwnedView<TableSummaryView<'static>>) -> Self {
6044 TableSummaryOwnedView(inner)
6045 }
6046 }
6047 impl ::core::convert::From<TableSummaryOwnedView>
6048 for ::buffa::OwnedView<TableSummaryView<'static>> {
6049 fn from(wrapper: TableSummaryOwnedView) -> Self {
6050 wrapper.0
6051 }
6052 }
6053 impl ::core::convert::AsRef<::buffa::OwnedView<TableSummaryView<'static>>>
6054 for TableSummaryOwnedView {
6055 fn as_ref(&self) -> &::buffa::OwnedView<TableSummaryView<'static>> {
6056 &self.0
6057 }
6058 }
6059 impl ::buffa::HasMessageView for super::super::TableSummary {
6060 type View<'a> = TableSummaryView<'a>;
6061 type ViewHandle = TableSummaryOwnedView;
6062 }
6063 impl ::serde::Serialize for TableSummaryOwnedView {
6064 fn serialize<__S: ::serde::Serializer>(
6065 &self,
6066 __s: __S,
6067 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6068 ::serde::Serialize::serialize(&self.0, __s)
6069 }
6070 }
6071 #[derive(Clone, Debug, Default)]
6072 pub struct ColumnView<'a> {
6073 pub name: &'a str,
6077 pub type_text: &'a str,
6081 pub type_json: &'a str,
6085 pub position: ::core::option::Option<i32>,
6089 pub type_name: ::buffa::EnumValue<super::super::ColumnTypeName>,
6093 pub type_precision: ::core::option::Option<i32>,
6097 pub type_scale: ::core::option::Option<i32>,
6101 pub type_interval_type: ::core::option::Option<&'a str>,
6105 pub comment: ::core::option::Option<&'a str>,
6109 pub nullable: ::core::option::Option<bool>,
6113 pub partition_index: ::core::option::Option<i32>,
6117 pub column_id: ::core::option::Option<&'a str>,
6121 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6122 }
6123 impl<'a> ColumnView<'a> {
6124 #[doc(hidden)]
6132 pub fn _decode_depth(
6133 buf: &'a [u8],
6134 depth: u32,
6135 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6136 let mut view = Self::default();
6137 view._merge_into_view(buf, depth)?;
6138 ::core::result::Result::Ok(view)
6139 }
6140 #[doc(hidden)]
6148 pub fn _merge_into_view(
6149 &mut self,
6150 buf: &'a [u8],
6151 depth: u32,
6152 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6153 let _ = depth;
6154 #[allow(unused_variables)]
6155 let view = self;
6156 let mut cur: &'a [u8] = buf;
6157 while !cur.is_empty() {
6158 let before_tag = cur;
6159 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6160 match tag.field_number() {
6161 1u32 => {
6162 if tag.wire_type()
6163 != ::buffa::encoding::WireType::LengthDelimited
6164 {
6165 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6166 field_number: 1u32,
6167 expected: 2u8,
6168 actual: tag.wire_type() as u8,
6169 });
6170 }
6171 view.name = ::buffa::types::borrow_str(&mut cur)?;
6172 }
6173 2u32 => {
6174 if tag.wire_type()
6175 != ::buffa::encoding::WireType::LengthDelimited
6176 {
6177 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6178 field_number: 2u32,
6179 expected: 2u8,
6180 actual: tag.wire_type() as u8,
6181 });
6182 }
6183 view.type_text = ::buffa::types::borrow_str(&mut cur)?;
6184 }
6185 3u32 => {
6186 if tag.wire_type()
6187 != ::buffa::encoding::WireType::LengthDelimited
6188 {
6189 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6190 field_number: 3u32,
6191 expected: 2u8,
6192 actual: tag.wire_type() as u8,
6193 });
6194 }
6195 view.type_json = ::buffa::types::borrow_str(&mut cur)?;
6196 }
6197 4u32 => {
6198 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6199 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6200 field_number: 4u32,
6201 expected: 0u8,
6202 actual: tag.wire_type() as u8,
6203 });
6204 }
6205 view.position = Some(
6206 ::buffa::types::decode_int32(&mut cur)?,
6207 );
6208 }
6209 5u32 => {
6210 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6211 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6212 field_number: 5u32,
6213 expected: 0u8,
6214 actual: tag.wire_type() as u8,
6215 });
6216 }
6217 view.type_name = ::buffa::EnumValue::from(
6218 ::buffa::types::decode_int32(&mut cur)?,
6219 );
6220 }
6221 6u32 => {
6222 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6223 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6224 field_number: 6u32,
6225 expected: 0u8,
6226 actual: tag.wire_type() as u8,
6227 });
6228 }
6229 view.type_precision = Some(
6230 ::buffa::types::decode_int32(&mut cur)?,
6231 );
6232 }
6233 7u32 => {
6234 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6235 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6236 field_number: 7u32,
6237 expected: 0u8,
6238 actual: tag.wire_type() as u8,
6239 });
6240 }
6241 view.type_scale = Some(
6242 ::buffa::types::decode_int32(&mut cur)?,
6243 );
6244 }
6245 8u32 => {
6246 if tag.wire_type()
6247 != ::buffa::encoding::WireType::LengthDelimited
6248 {
6249 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6250 field_number: 8u32,
6251 expected: 2u8,
6252 actual: tag.wire_type() as u8,
6253 });
6254 }
6255 view.type_interval_type = Some(
6256 ::buffa::types::borrow_str(&mut cur)?,
6257 );
6258 }
6259 9u32 => {
6260 if tag.wire_type()
6261 != ::buffa::encoding::WireType::LengthDelimited
6262 {
6263 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6264 field_number: 9u32,
6265 expected: 2u8,
6266 actual: tag.wire_type() as u8,
6267 });
6268 }
6269 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
6270 }
6271 10u32 => {
6272 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6273 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6274 field_number: 10u32,
6275 expected: 0u8,
6276 actual: tag.wire_type() as u8,
6277 });
6278 }
6279 view.nullable = Some(::buffa::types::decode_bool(&mut cur)?);
6280 }
6281 11u32 => {
6282 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6283 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6284 field_number: 11u32,
6285 expected: 0u8,
6286 actual: tag.wire_type() as u8,
6287 });
6288 }
6289 view.partition_index = Some(
6290 ::buffa::types::decode_int32(&mut cur)?,
6291 );
6292 }
6293 12u32 => {
6294 if tag.wire_type()
6295 != ::buffa::encoding::WireType::LengthDelimited
6296 {
6297 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6298 field_number: 12u32,
6299 expected: 2u8,
6300 actual: tag.wire_type() as u8,
6301 });
6302 }
6303 view.column_id = Some(::buffa::types::borrow_str(&mut cur)?);
6304 }
6305 _ => {
6306 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6307 let span_len = before_tag.len() - cur.len();
6308 view.__buffa_unknown_fields
6309 .push_raw(&before_tag[..span_len]);
6310 }
6311 }
6312 }
6313 ::core::result::Result::Ok(())
6314 }
6315 }
6316 impl<'a> ::buffa::MessageView<'a> for ColumnView<'a> {
6317 type Owned = super::super::Column;
6318 fn decode_view(
6319 buf: &'a [u8],
6320 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6321 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6322 }
6323 fn decode_view_with_limit(
6324 buf: &'a [u8],
6325 depth: u32,
6326 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6327 Self::_decode_depth(buf, depth)
6328 }
6329 fn to_owned_message(&self) -> super::super::Column {
6330 self.to_owned_from_source(None)
6331 }
6332 #[allow(clippy::useless_conversion, clippy::needless_update)]
6333 fn to_owned_from_source(
6334 &self,
6335 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6336 ) -> super::super::Column {
6337 #[allow(unused_imports)]
6338 use ::buffa::alloc::string::ToString as _;
6339 let _ = __buffa_src;
6340 super::super::Column {
6341 name: self.name.to_string(),
6342 type_text: self.type_text.to_string(),
6343 type_json: self.type_json.to_string(),
6344 position: self.position,
6345 type_name: self.type_name,
6346 type_precision: self.type_precision,
6347 type_scale: self.type_scale,
6348 type_interval_type: self.type_interval_type.map(|s| s.to_string()),
6349 comment: self.comment.map(|s| s.to_string()),
6350 nullable: self.nullable,
6351 partition_index: self.partition_index,
6352 column_id: self.column_id.map(|s| s.to_string()),
6353 __buffa_unknown_fields: self
6354 .__buffa_unknown_fields
6355 .to_owned()
6356 .unwrap_or_default()
6357 .into(),
6358 ..::core::default::Default::default()
6359 }
6360 }
6361 }
6362 impl<'a> ::buffa::ViewEncode<'a> for ColumnView<'a> {
6363 #[allow(clippy::needless_borrow, clippy::let_and_return)]
6364 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6365 #[allow(unused_imports)]
6366 use ::buffa::Enumeration as _;
6367 let mut size = 0u32;
6368 if !self.name.is_empty() {
6369 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
6370 }
6371 if !self.type_text.is_empty() {
6372 size
6373 += 1u32
6374 + ::buffa::types::string_encoded_len(&self.type_text) as u32;
6375 }
6376 if !self.type_json.is_empty() {
6377 size
6378 += 1u32
6379 + ::buffa::types::string_encoded_len(&self.type_json) as u32;
6380 }
6381 if let Some(v) = self.position {
6382 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
6383 }
6384 {
6385 let val = self.type_name.to_i32();
6386 if val != 0 {
6387 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6388 }
6389 }
6390 if let Some(v) = self.type_precision {
6391 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
6392 }
6393 if let Some(v) = self.type_scale {
6394 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
6395 }
6396 if let Some(ref v) = self.type_interval_type {
6397 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6398 }
6399 if let Some(ref v) = self.comment {
6400 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6401 }
6402 if self.nullable.is_some() {
6403 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6404 }
6405 if let Some(v) = self.partition_index {
6406 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
6407 }
6408 if let Some(ref v) = self.column_id {
6409 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6410 }
6411 size += self.__buffa_unknown_fields.encoded_len() as u32;
6412 size
6413 }
6414 #[allow(clippy::needless_borrow)]
6415 fn write_to(
6416 &self,
6417 _cache: &mut ::buffa::SizeCache,
6418 buf: &mut impl ::buffa::bytes::BufMut,
6419 ) {
6420 #[allow(unused_imports)]
6421 use ::buffa::Enumeration as _;
6422 if !self.name.is_empty() {
6423 ::buffa::encoding::Tag::new(
6424 1u32,
6425 ::buffa::encoding::WireType::LengthDelimited,
6426 )
6427 .encode(buf);
6428 ::buffa::types::encode_string(&self.name, buf);
6429 }
6430 if !self.type_text.is_empty() {
6431 ::buffa::encoding::Tag::new(
6432 2u32,
6433 ::buffa::encoding::WireType::LengthDelimited,
6434 )
6435 .encode(buf);
6436 ::buffa::types::encode_string(&self.type_text, buf);
6437 }
6438 if !self.type_json.is_empty() {
6439 ::buffa::encoding::Tag::new(
6440 3u32,
6441 ::buffa::encoding::WireType::LengthDelimited,
6442 )
6443 .encode(buf);
6444 ::buffa::types::encode_string(&self.type_json, buf);
6445 }
6446 if let Some(v) = self.position {
6447 ::buffa::encoding::Tag::new(
6448 4u32,
6449 ::buffa::encoding::WireType::Varint,
6450 )
6451 .encode(buf);
6452 ::buffa::types::encode_int32(v, buf);
6453 }
6454 {
6455 let val = self.type_name.to_i32();
6456 if val != 0 {
6457 ::buffa::encoding::Tag::new(
6458 5u32,
6459 ::buffa::encoding::WireType::Varint,
6460 )
6461 .encode(buf);
6462 ::buffa::types::encode_int32(val, buf);
6463 }
6464 }
6465 if let Some(v) = self.type_precision {
6466 ::buffa::encoding::Tag::new(
6467 6u32,
6468 ::buffa::encoding::WireType::Varint,
6469 )
6470 .encode(buf);
6471 ::buffa::types::encode_int32(v, buf);
6472 }
6473 if let Some(v) = self.type_scale {
6474 ::buffa::encoding::Tag::new(
6475 7u32,
6476 ::buffa::encoding::WireType::Varint,
6477 )
6478 .encode(buf);
6479 ::buffa::types::encode_int32(v, buf);
6480 }
6481 if let Some(ref v) = self.type_interval_type {
6482 ::buffa::encoding::Tag::new(
6483 8u32,
6484 ::buffa::encoding::WireType::LengthDelimited,
6485 )
6486 .encode(buf);
6487 ::buffa::types::encode_string(v, buf);
6488 }
6489 if let Some(ref v) = self.comment {
6490 ::buffa::encoding::Tag::new(
6491 9u32,
6492 ::buffa::encoding::WireType::LengthDelimited,
6493 )
6494 .encode(buf);
6495 ::buffa::types::encode_string(v, buf);
6496 }
6497 if let Some(v) = self.nullable {
6498 ::buffa::encoding::Tag::new(
6499 10u32,
6500 ::buffa::encoding::WireType::Varint,
6501 )
6502 .encode(buf);
6503 ::buffa::types::encode_bool(v, buf);
6504 }
6505 if let Some(v) = self.partition_index {
6506 ::buffa::encoding::Tag::new(
6507 11u32,
6508 ::buffa::encoding::WireType::Varint,
6509 )
6510 .encode(buf);
6511 ::buffa::types::encode_int32(v, buf);
6512 }
6513 if let Some(ref v) = self.column_id {
6514 ::buffa::encoding::Tag::new(
6515 12u32,
6516 ::buffa::encoding::WireType::LengthDelimited,
6517 )
6518 .encode(buf);
6519 ::buffa::types::encode_string(v, buf);
6520 }
6521 self.__buffa_unknown_fields.write_to(buf);
6522 }
6523 }
6524 impl<'__a> ::serde::Serialize for ColumnView<'__a> {
6536 fn serialize<__S: ::serde::Serializer>(
6537 &self,
6538 __s: __S,
6539 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6540 use ::serde::ser::SerializeMap as _;
6541 let mut __map = __s.serialize_map(::core::option::Option::None)?;
6542 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
6543 __map.serialize_entry("name", self.name)?;
6544 }
6545 if !::buffa::json_helpers::skip_if::is_empty_str(self.type_text) {
6546 __map.serialize_entry("type_text", self.type_text)?;
6547 }
6548 if !::buffa::json_helpers::skip_if::is_empty_str(self.type_json) {
6549 __map.serialize_entry("type_json", self.type_json)?;
6550 }
6551 if let ::core::option::Option::Some(__v) = self.position {
6552 struct _W(i32);
6553 impl ::serde::Serialize for _W {
6554 fn serialize<__S: ::serde::Serializer>(
6555 &self,
6556 __s: __S,
6557 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6558 ::buffa::json_helpers::int32::serialize(&self.0, __s)
6559 }
6560 }
6561 __map.serialize_entry("position", &_W(__v))?;
6562 }
6563 if !::buffa::json_helpers::skip_if::is_default_enum_value(
6564 &self.type_name,
6565 ) {
6566 __map.serialize_entry("type_name", &self.type_name)?;
6567 }
6568 if let ::core::option::Option::Some(__v) = self.type_precision {
6569 struct _W(i32);
6570 impl ::serde::Serialize for _W {
6571 fn serialize<__S: ::serde::Serializer>(
6572 &self,
6573 __s: __S,
6574 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6575 ::buffa::json_helpers::int32::serialize(&self.0, __s)
6576 }
6577 }
6578 __map.serialize_entry("type_precision", &_W(__v))?;
6579 }
6580 if let ::core::option::Option::Some(__v) = self.type_scale {
6581 struct _W(i32);
6582 impl ::serde::Serialize for _W {
6583 fn serialize<__S: ::serde::Serializer>(
6584 &self,
6585 __s: __S,
6586 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6587 ::buffa::json_helpers::int32::serialize(&self.0, __s)
6588 }
6589 }
6590 __map.serialize_entry("type_scale", &_W(__v))?;
6591 }
6592 if let ::core::option::Option::Some(__v) = self.type_interval_type {
6593 __map.serialize_entry("type_interval_type", __v)?;
6594 }
6595 if let ::core::option::Option::Some(__v) = self.comment {
6596 __map.serialize_entry("comment", __v)?;
6597 }
6598 if let ::core::option::Option::Some(__v) = self.nullable {
6599 __map.serialize_entry("nullable", &__v)?;
6600 }
6601 if let ::core::option::Option::Some(__v) = self.partition_index {
6602 struct _W(i32);
6603 impl ::serde::Serialize for _W {
6604 fn serialize<__S: ::serde::Serializer>(
6605 &self,
6606 __s: __S,
6607 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6608 ::buffa::json_helpers::int32::serialize(&self.0, __s)
6609 }
6610 }
6611 __map.serialize_entry("partition_index", &_W(__v))?;
6612 }
6613 if let ::core::option::Option::Some(__v) = self.column_id {
6614 __map.serialize_entry("column_id", __v)?;
6615 }
6616 __map.end()
6617 }
6618 }
6619 impl<'a> ::buffa::MessageName for ColumnView<'a> {
6620 const PACKAGE: &'static str = "unitycatalog.tables.v1";
6621 const NAME: &'static str = "Column";
6622 const FULL_NAME: &'static str = "unitycatalog.tables.v1.Column";
6623 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Column";
6624 }
6625 impl<'v> ::buffa::DefaultViewInstance for ColumnView<'v> {
6626 fn default_view_instance<'a>() -> &'a Self
6627 where
6628 Self: 'a,
6629 {
6630 static VALUE: ::buffa::__private::OnceBox<ColumnView<'static>> = ::buffa::__private::OnceBox::new();
6631 VALUE
6632 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6633 <ColumnView<'static>>::default(),
6634 ))
6635 }
6636 }
6637 impl ::buffa::ViewReborrow for ColumnView<'static> {
6638 type Reborrowed<'b> = ColumnView<'b>;
6639 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6640 this
6641 }
6642 }
6643 #[derive(Clone, Debug)]
6649 pub struct ColumnOwnedView(::buffa::OwnedView<ColumnView<'static>>);
6650 impl ColumnOwnedView {
6651 pub fn decode(
6661 bytes: ::buffa::bytes::Bytes,
6662 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6663 ::core::result::Result::Ok(
6664 ColumnOwnedView(::buffa::OwnedView::decode(bytes)?),
6665 )
6666 }
6667 pub fn decode_with_options(
6675 bytes: ::buffa::bytes::Bytes,
6676 opts: &::buffa::DecodeOptions,
6677 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6678 ::core::result::Result::Ok(
6679 ColumnOwnedView(
6680 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6681 ),
6682 )
6683 }
6684 pub fn from_owned(
6691 msg: &super::super::Column,
6692 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6693 ::core::result::Result::Ok(
6694 ColumnOwnedView(::buffa::OwnedView::from_owned(msg)?),
6695 )
6696 }
6697 #[must_use]
6699 pub fn view(&self) -> &ColumnView<'_> {
6700 self.0.reborrow()
6701 }
6702 #[must_use]
6704 pub fn to_owned_message(&self) -> super::super::Column {
6705 self.0.to_owned_message()
6706 }
6707 #[must_use]
6709 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6710 self.0.bytes()
6711 }
6712 #[must_use]
6714 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6715 self.0.into_bytes()
6716 }
6717 #[must_use]
6721 pub fn name(&self) -> &'_ str {
6722 self.0.reborrow().name
6723 }
6724 #[must_use]
6728 pub fn type_text(&self) -> &'_ str {
6729 self.0.reborrow().type_text
6730 }
6731 #[must_use]
6735 pub fn type_json(&self) -> &'_ str {
6736 self.0.reborrow().type_json
6737 }
6738 #[must_use]
6742 pub fn position(&self) -> ::core::option::Option<i32> {
6743 self.0.reborrow().position
6744 }
6745 #[must_use]
6749 pub fn type_name(&self) -> ::buffa::EnumValue<super::super::ColumnTypeName> {
6750 self.0.reborrow().type_name
6751 }
6752 #[must_use]
6756 pub fn type_precision(&self) -> ::core::option::Option<i32> {
6757 self.0.reborrow().type_precision
6758 }
6759 #[must_use]
6763 pub fn type_scale(&self) -> ::core::option::Option<i32> {
6764 self.0.reborrow().type_scale
6765 }
6766 #[must_use]
6770 pub fn type_interval_type(&self) -> ::core::option::Option<&'_ str> {
6771 self.0.reborrow().type_interval_type
6772 }
6773 #[must_use]
6777 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
6778 self.0.reborrow().comment
6779 }
6780 #[must_use]
6784 pub fn nullable(&self) -> ::core::option::Option<bool> {
6785 self.0.reborrow().nullable
6786 }
6787 #[must_use]
6791 pub fn partition_index(&self) -> ::core::option::Option<i32> {
6792 self.0.reborrow().partition_index
6793 }
6794 #[must_use]
6798 pub fn column_id(&self) -> ::core::option::Option<&'_ str> {
6799 self.0.reborrow().column_id
6800 }
6801 }
6802 impl ::core::convert::From<::buffa::OwnedView<ColumnView<'static>>>
6803 for ColumnOwnedView {
6804 fn from(inner: ::buffa::OwnedView<ColumnView<'static>>) -> Self {
6805 ColumnOwnedView(inner)
6806 }
6807 }
6808 impl ::core::convert::From<ColumnOwnedView>
6809 for ::buffa::OwnedView<ColumnView<'static>> {
6810 fn from(wrapper: ColumnOwnedView) -> Self {
6811 wrapper.0
6812 }
6813 }
6814 impl ::core::convert::AsRef<::buffa::OwnedView<ColumnView<'static>>>
6815 for ColumnOwnedView {
6816 fn as_ref(&self) -> &::buffa::OwnedView<ColumnView<'static>> {
6817 &self.0
6818 }
6819 }
6820 impl ::buffa::HasMessageView for super::super::Column {
6821 type View<'a> = ColumnView<'a>;
6822 type ViewHandle = ColumnOwnedView;
6823 }
6824 impl ::serde::Serialize for ColumnOwnedView {
6825 fn serialize<__S: ::serde::Serializer>(
6826 &self,
6827 __s: __S,
6828 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6829 ::serde::Serialize::serialize(&self.0, __s)
6830 }
6831 }
6832 #[derive(Clone, Debug, Default)]
6834 pub struct TableDependencyView<'a> {
6835 pub table_full_name: &'a str,
6840 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6841 }
6842 impl<'a> TableDependencyView<'a> {
6843 #[doc(hidden)]
6851 pub fn _decode_depth(
6852 buf: &'a [u8],
6853 depth: u32,
6854 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6855 let mut view = Self::default();
6856 view._merge_into_view(buf, depth)?;
6857 ::core::result::Result::Ok(view)
6858 }
6859 #[doc(hidden)]
6867 pub fn _merge_into_view(
6868 &mut self,
6869 buf: &'a [u8],
6870 depth: u32,
6871 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6872 let _ = depth;
6873 #[allow(unused_variables)]
6874 let view = self;
6875 let mut cur: &'a [u8] = buf;
6876 while !cur.is_empty() {
6877 let before_tag = cur;
6878 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6879 match tag.field_number() {
6880 1u32 => {
6881 if tag.wire_type()
6882 != ::buffa::encoding::WireType::LengthDelimited
6883 {
6884 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6885 field_number: 1u32,
6886 expected: 2u8,
6887 actual: tag.wire_type() as u8,
6888 });
6889 }
6890 view.table_full_name = ::buffa::types::borrow_str(&mut cur)?;
6891 }
6892 _ => {
6893 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6894 let span_len = before_tag.len() - cur.len();
6895 view.__buffa_unknown_fields
6896 .push_raw(&before_tag[..span_len]);
6897 }
6898 }
6899 }
6900 ::core::result::Result::Ok(())
6901 }
6902 }
6903 impl<'a> ::buffa::MessageView<'a> for TableDependencyView<'a> {
6904 type Owned = super::super::TableDependency;
6905 fn decode_view(
6906 buf: &'a [u8],
6907 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6908 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6909 }
6910 fn decode_view_with_limit(
6911 buf: &'a [u8],
6912 depth: u32,
6913 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6914 Self::_decode_depth(buf, depth)
6915 }
6916 fn to_owned_message(&self) -> super::super::TableDependency {
6917 self.to_owned_from_source(None)
6918 }
6919 #[allow(clippy::useless_conversion, clippy::needless_update)]
6920 fn to_owned_from_source(
6921 &self,
6922 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6923 ) -> super::super::TableDependency {
6924 #[allow(unused_imports)]
6925 use ::buffa::alloc::string::ToString as _;
6926 let _ = __buffa_src;
6927 super::super::TableDependency {
6928 table_full_name: self.table_full_name.to_string(),
6929 __buffa_unknown_fields: self
6930 .__buffa_unknown_fields
6931 .to_owned()
6932 .unwrap_or_default()
6933 .into(),
6934 ..::core::default::Default::default()
6935 }
6936 }
6937 }
6938 impl<'a> ::buffa::ViewEncode<'a> for TableDependencyView<'a> {
6939 #[allow(clippy::needless_borrow, clippy::let_and_return)]
6940 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6941 #[allow(unused_imports)]
6942 use ::buffa::Enumeration as _;
6943 let mut size = 0u32;
6944 if !self.table_full_name.is_empty() {
6945 size
6946 += 1u32
6947 + ::buffa::types::string_encoded_len(&self.table_full_name)
6948 as u32;
6949 }
6950 size += self.__buffa_unknown_fields.encoded_len() as u32;
6951 size
6952 }
6953 #[allow(clippy::needless_borrow)]
6954 fn write_to(
6955 &self,
6956 _cache: &mut ::buffa::SizeCache,
6957 buf: &mut impl ::buffa::bytes::BufMut,
6958 ) {
6959 #[allow(unused_imports)]
6960 use ::buffa::Enumeration as _;
6961 if !self.table_full_name.is_empty() {
6962 ::buffa::encoding::Tag::new(
6963 1u32,
6964 ::buffa::encoding::WireType::LengthDelimited,
6965 )
6966 .encode(buf);
6967 ::buffa::types::encode_string(&self.table_full_name, buf);
6968 }
6969 self.__buffa_unknown_fields.write_to(buf);
6970 }
6971 }
6972 impl<'__a> ::serde::Serialize for TableDependencyView<'__a> {
6984 fn serialize<__S: ::serde::Serializer>(
6985 &self,
6986 __s: __S,
6987 ) -> ::core::result::Result<__S::Ok, __S::Error> {
6988 use ::serde::ser::SerializeMap as _;
6989 let mut __map = __s.serialize_map(::core::option::Option::None)?;
6990 if !::buffa::json_helpers::skip_if::is_empty_str(self.table_full_name) {
6991 __map.serialize_entry("table_full_name", self.table_full_name)?;
6992 }
6993 __map.end()
6994 }
6995 }
6996 impl<'a> ::buffa::MessageName for TableDependencyView<'a> {
6997 const PACKAGE: &'static str = "unitycatalog.tables.v1";
6998 const NAME: &'static str = "TableDependency";
6999 const FULL_NAME: &'static str = "unitycatalog.tables.v1.TableDependency";
7000 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.TableDependency";
7001 }
7002 impl<'v> ::buffa::DefaultViewInstance for TableDependencyView<'v> {
7003 fn default_view_instance<'a>() -> &'a Self
7004 where
7005 Self: 'a,
7006 {
7007 static VALUE: ::buffa::__private::OnceBox<
7008 TableDependencyView<'static>,
7009 > = ::buffa::__private::OnceBox::new();
7010 VALUE
7011 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7012 <TableDependencyView<'static>>::default(),
7013 ))
7014 }
7015 }
7016 impl ::buffa::ViewReborrow for TableDependencyView<'static> {
7017 type Reborrowed<'b> = TableDependencyView<'b>;
7018 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7019 this
7020 }
7021 }
7022 #[derive(Clone, Debug)]
7028 pub struct TableDependencyOwnedView(
7029 ::buffa::OwnedView<TableDependencyView<'static>>,
7030 );
7031 impl TableDependencyOwnedView {
7032 pub fn decode(
7042 bytes: ::buffa::bytes::Bytes,
7043 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7044 ::core::result::Result::Ok(
7045 TableDependencyOwnedView(::buffa::OwnedView::decode(bytes)?),
7046 )
7047 }
7048 pub fn decode_with_options(
7056 bytes: ::buffa::bytes::Bytes,
7057 opts: &::buffa::DecodeOptions,
7058 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7059 ::core::result::Result::Ok(
7060 TableDependencyOwnedView(
7061 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7062 ),
7063 )
7064 }
7065 pub fn from_owned(
7072 msg: &super::super::TableDependency,
7073 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7074 ::core::result::Result::Ok(
7075 TableDependencyOwnedView(::buffa::OwnedView::from_owned(msg)?),
7076 )
7077 }
7078 #[must_use]
7080 pub fn view(&self) -> &TableDependencyView<'_> {
7081 self.0.reborrow()
7082 }
7083 #[must_use]
7085 pub fn to_owned_message(&self) -> super::super::TableDependency {
7086 self.0.to_owned_message()
7087 }
7088 #[must_use]
7090 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7091 self.0.bytes()
7092 }
7093 #[must_use]
7095 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7096 self.0.into_bytes()
7097 }
7098 #[must_use]
7103 pub fn table_full_name(&self) -> &'_ str {
7104 self.0.reborrow().table_full_name
7105 }
7106 }
7107 impl ::core::convert::From<::buffa::OwnedView<TableDependencyView<'static>>>
7108 for TableDependencyOwnedView {
7109 fn from(inner: ::buffa::OwnedView<TableDependencyView<'static>>) -> Self {
7110 TableDependencyOwnedView(inner)
7111 }
7112 }
7113 impl ::core::convert::From<TableDependencyOwnedView>
7114 for ::buffa::OwnedView<TableDependencyView<'static>> {
7115 fn from(wrapper: TableDependencyOwnedView) -> Self {
7116 wrapper.0
7117 }
7118 }
7119 impl ::core::convert::AsRef<::buffa::OwnedView<TableDependencyView<'static>>>
7120 for TableDependencyOwnedView {
7121 fn as_ref(&self) -> &::buffa::OwnedView<TableDependencyView<'static>> {
7122 &self.0
7123 }
7124 }
7125 impl ::buffa::HasMessageView for super::super::TableDependency {
7126 type View<'a> = TableDependencyView<'a>;
7127 type ViewHandle = TableDependencyOwnedView;
7128 }
7129 impl ::serde::Serialize for TableDependencyOwnedView {
7130 fn serialize<__S: ::serde::Serializer>(
7131 &self,
7132 __s: __S,
7133 ) -> ::core::result::Result<__S::Ok, __S::Error> {
7134 ::serde::Serialize::serialize(&self.0, __s)
7135 }
7136 }
7137 #[derive(Clone, Debug, Default)]
7139 pub struct FunctionDependencyView<'a> {
7140 pub function_full_name: &'a str,
7145 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7146 }
7147 impl<'a> FunctionDependencyView<'a> {
7148 #[doc(hidden)]
7156 pub fn _decode_depth(
7157 buf: &'a [u8],
7158 depth: u32,
7159 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7160 let mut view = Self::default();
7161 view._merge_into_view(buf, depth)?;
7162 ::core::result::Result::Ok(view)
7163 }
7164 #[doc(hidden)]
7172 pub fn _merge_into_view(
7173 &mut self,
7174 buf: &'a [u8],
7175 depth: u32,
7176 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7177 let _ = depth;
7178 #[allow(unused_variables)]
7179 let view = self;
7180 let mut cur: &'a [u8] = buf;
7181 while !cur.is_empty() {
7182 let before_tag = cur;
7183 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7184 match tag.field_number() {
7185 1u32 => {
7186 if tag.wire_type()
7187 != ::buffa::encoding::WireType::LengthDelimited
7188 {
7189 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7190 field_number: 1u32,
7191 expected: 2u8,
7192 actual: tag.wire_type() as u8,
7193 });
7194 }
7195 view.function_full_name = ::buffa::types::borrow_str(
7196 &mut cur,
7197 )?;
7198 }
7199 _ => {
7200 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7201 let span_len = before_tag.len() - cur.len();
7202 view.__buffa_unknown_fields
7203 .push_raw(&before_tag[..span_len]);
7204 }
7205 }
7206 }
7207 ::core::result::Result::Ok(())
7208 }
7209 }
7210 impl<'a> ::buffa::MessageView<'a> for FunctionDependencyView<'a> {
7211 type Owned = super::super::FunctionDependency;
7212 fn decode_view(
7213 buf: &'a [u8],
7214 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7215 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7216 }
7217 fn decode_view_with_limit(
7218 buf: &'a [u8],
7219 depth: u32,
7220 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7221 Self::_decode_depth(buf, depth)
7222 }
7223 fn to_owned_message(&self) -> super::super::FunctionDependency {
7224 self.to_owned_from_source(None)
7225 }
7226 #[allow(clippy::useless_conversion, clippy::needless_update)]
7227 fn to_owned_from_source(
7228 &self,
7229 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7230 ) -> super::super::FunctionDependency {
7231 #[allow(unused_imports)]
7232 use ::buffa::alloc::string::ToString as _;
7233 let _ = __buffa_src;
7234 super::super::FunctionDependency {
7235 function_full_name: self.function_full_name.to_string(),
7236 __buffa_unknown_fields: self
7237 .__buffa_unknown_fields
7238 .to_owned()
7239 .unwrap_or_default()
7240 .into(),
7241 ..::core::default::Default::default()
7242 }
7243 }
7244 }
7245 impl<'a> ::buffa::ViewEncode<'a> for FunctionDependencyView<'a> {
7246 #[allow(clippy::needless_borrow, clippy::let_and_return)]
7247 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7248 #[allow(unused_imports)]
7249 use ::buffa::Enumeration as _;
7250 let mut size = 0u32;
7251 if !self.function_full_name.is_empty() {
7252 size
7253 += 1u32
7254 + ::buffa::types::string_encoded_len(
7255 &self.function_full_name,
7256 ) as u32;
7257 }
7258 size += self.__buffa_unknown_fields.encoded_len() as u32;
7259 size
7260 }
7261 #[allow(clippy::needless_borrow)]
7262 fn write_to(
7263 &self,
7264 _cache: &mut ::buffa::SizeCache,
7265 buf: &mut impl ::buffa::bytes::BufMut,
7266 ) {
7267 #[allow(unused_imports)]
7268 use ::buffa::Enumeration as _;
7269 if !self.function_full_name.is_empty() {
7270 ::buffa::encoding::Tag::new(
7271 1u32,
7272 ::buffa::encoding::WireType::LengthDelimited,
7273 )
7274 .encode(buf);
7275 ::buffa::types::encode_string(&self.function_full_name, buf);
7276 }
7277 self.__buffa_unknown_fields.write_to(buf);
7278 }
7279 }
7280 impl<'__a> ::serde::Serialize for FunctionDependencyView<'__a> {
7292 fn serialize<__S: ::serde::Serializer>(
7293 &self,
7294 __s: __S,
7295 ) -> ::core::result::Result<__S::Ok, __S::Error> {
7296 use ::serde::ser::SerializeMap as _;
7297 let mut __map = __s.serialize_map(::core::option::Option::None)?;
7298 if !::buffa::json_helpers::skip_if::is_empty_str(
7299 self.function_full_name,
7300 ) {
7301 __map.serialize_entry("function_full_name", self.function_full_name)?;
7302 }
7303 __map.end()
7304 }
7305 }
7306 impl<'a> ::buffa::MessageName for FunctionDependencyView<'a> {
7307 const PACKAGE: &'static str = "unitycatalog.tables.v1";
7308 const NAME: &'static str = "FunctionDependency";
7309 const FULL_NAME: &'static str = "unitycatalog.tables.v1.FunctionDependency";
7310 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.FunctionDependency";
7311 }
7312 impl<'v> ::buffa::DefaultViewInstance for FunctionDependencyView<'v> {
7313 fn default_view_instance<'a>() -> &'a Self
7314 where
7315 Self: 'a,
7316 {
7317 static VALUE: ::buffa::__private::OnceBox<
7318 FunctionDependencyView<'static>,
7319 > = ::buffa::__private::OnceBox::new();
7320 VALUE
7321 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7322 <FunctionDependencyView<'static>>::default(),
7323 ))
7324 }
7325 }
7326 impl ::buffa::ViewReborrow for FunctionDependencyView<'static> {
7327 type Reborrowed<'b> = FunctionDependencyView<'b>;
7328 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7329 this
7330 }
7331 }
7332 #[derive(Clone, Debug)]
7338 pub struct FunctionDependencyOwnedView(
7339 ::buffa::OwnedView<FunctionDependencyView<'static>>,
7340 );
7341 impl FunctionDependencyOwnedView {
7342 pub fn decode(
7352 bytes: ::buffa::bytes::Bytes,
7353 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7354 ::core::result::Result::Ok(
7355 FunctionDependencyOwnedView(::buffa::OwnedView::decode(bytes)?),
7356 )
7357 }
7358 pub fn decode_with_options(
7366 bytes: ::buffa::bytes::Bytes,
7367 opts: &::buffa::DecodeOptions,
7368 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7369 ::core::result::Result::Ok(
7370 FunctionDependencyOwnedView(
7371 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7372 ),
7373 )
7374 }
7375 pub fn from_owned(
7382 msg: &super::super::FunctionDependency,
7383 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7384 ::core::result::Result::Ok(
7385 FunctionDependencyOwnedView(::buffa::OwnedView::from_owned(msg)?),
7386 )
7387 }
7388 #[must_use]
7390 pub fn view(&self) -> &FunctionDependencyView<'_> {
7391 self.0.reborrow()
7392 }
7393 #[must_use]
7395 pub fn to_owned_message(&self) -> super::super::FunctionDependency {
7396 self.0.to_owned_message()
7397 }
7398 #[must_use]
7400 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7401 self.0.bytes()
7402 }
7403 #[must_use]
7405 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7406 self.0.into_bytes()
7407 }
7408 #[must_use]
7413 pub fn function_full_name(&self) -> &'_ str {
7414 self.0.reborrow().function_full_name
7415 }
7416 }
7417 impl ::core::convert::From<::buffa::OwnedView<FunctionDependencyView<'static>>>
7418 for FunctionDependencyOwnedView {
7419 fn from(inner: ::buffa::OwnedView<FunctionDependencyView<'static>>) -> Self {
7420 FunctionDependencyOwnedView(inner)
7421 }
7422 }
7423 impl ::core::convert::From<FunctionDependencyOwnedView>
7424 for ::buffa::OwnedView<FunctionDependencyView<'static>> {
7425 fn from(wrapper: FunctionDependencyOwnedView) -> Self {
7426 wrapper.0
7427 }
7428 }
7429 impl ::core::convert::AsRef<::buffa::OwnedView<FunctionDependencyView<'static>>>
7430 for FunctionDependencyOwnedView {
7431 fn as_ref(&self) -> &::buffa::OwnedView<FunctionDependencyView<'static>> {
7432 &self.0
7433 }
7434 }
7435 impl ::buffa::HasMessageView for super::super::FunctionDependency {
7436 type View<'a> = FunctionDependencyView<'a>;
7437 type ViewHandle = FunctionDependencyOwnedView;
7438 }
7439 impl ::serde::Serialize for FunctionDependencyOwnedView {
7440 fn serialize<__S: ::serde::Serializer>(
7441 &self,
7442 __s: __S,
7443 ) -> ::core::result::Result<__S::Ok, __S::Error> {
7444 ::serde::Serialize::serialize(&self.0, __s)
7445 }
7446 }
7447 #[derive(Clone, Debug, Default)]
7449 pub struct DependencyView<'a> {
7450 pub dependency: ::core::option::Option<
7451 super::super::__buffa::view::oneof::dependency::Dependency<'a>,
7452 >,
7453 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7454 }
7455 impl<'a> DependencyView<'a> {
7456 #[doc(hidden)]
7464 pub fn _decode_depth(
7465 buf: &'a [u8],
7466 depth: u32,
7467 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7468 let mut view = Self::default();
7469 view._merge_into_view(buf, depth)?;
7470 ::core::result::Result::Ok(view)
7471 }
7472 #[doc(hidden)]
7480 pub fn _merge_into_view(
7481 &mut self,
7482 buf: &'a [u8],
7483 depth: u32,
7484 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7485 let _ = depth;
7486 #[allow(unused_variables)]
7487 let view = self;
7488 let mut cur: &'a [u8] = buf;
7489 while !cur.is_empty() {
7490 let before_tag = cur;
7491 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7492 match tag.field_number() {
7493 1u32 => {
7494 if tag.wire_type()
7495 != ::buffa::encoding::WireType::LengthDelimited
7496 {
7497 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7498 field_number: 1u32,
7499 expected: 2u8,
7500 actual: tag.wire_type() as u8,
7501 });
7502 }
7503 if depth == 0 {
7504 return Err(::buffa::DecodeError::RecursionLimitExceeded);
7505 }
7506 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7507 if let Some(
7508 super::super::__buffa::view::oneof::dependency::Dependency::Table(
7509 ref mut existing,
7510 ),
7511 ) = view.dependency
7512 {
7513 existing._merge_into_view(sub, depth - 1)?;
7514 } else {
7515 view.dependency = Some(
7516 super::super::__buffa::view::oneof::dependency::Dependency::Table(
7517 ::buffa::alloc::boxed::Box::new(
7518 super::super::__buffa::view::TableDependencyView::_decode_depth(
7519 sub,
7520 depth - 1,
7521 )?,
7522 ),
7523 ),
7524 );
7525 }
7526 }
7527 2u32 => {
7528 if tag.wire_type()
7529 != ::buffa::encoding::WireType::LengthDelimited
7530 {
7531 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7532 field_number: 2u32,
7533 expected: 2u8,
7534 actual: tag.wire_type() as u8,
7535 });
7536 }
7537 if depth == 0 {
7538 return Err(::buffa::DecodeError::RecursionLimitExceeded);
7539 }
7540 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7541 if let Some(
7542 super::super::__buffa::view::oneof::dependency::Dependency::Function(
7543 ref mut existing,
7544 ),
7545 ) = view.dependency
7546 {
7547 existing._merge_into_view(sub, depth - 1)?;
7548 } else {
7549 view.dependency = Some(
7550 super::super::__buffa::view::oneof::dependency::Dependency::Function(
7551 ::buffa::alloc::boxed::Box::new(
7552 super::super::__buffa::view::FunctionDependencyView::_decode_depth(
7553 sub,
7554 depth - 1,
7555 )?,
7556 ),
7557 ),
7558 );
7559 }
7560 }
7561 _ => {
7562 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7563 let span_len = before_tag.len() - cur.len();
7564 view.__buffa_unknown_fields
7565 .push_raw(&before_tag[..span_len]);
7566 }
7567 }
7568 }
7569 ::core::result::Result::Ok(())
7570 }
7571 }
7572 impl<'a> ::buffa::MessageView<'a> for DependencyView<'a> {
7573 type Owned = super::super::Dependency;
7574 fn decode_view(
7575 buf: &'a [u8],
7576 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7577 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7578 }
7579 fn decode_view_with_limit(
7580 buf: &'a [u8],
7581 depth: u32,
7582 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7583 Self::_decode_depth(buf, depth)
7584 }
7585 fn to_owned_message(&self) -> super::super::Dependency {
7586 self.to_owned_from_source(None)
7587 }
7588 #[allow(clippy::useless_conversion, clippy::needless_update)]
7589 fn to_owned_from_source(
7590 &self,
7591 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7592 ) -> super::super::Dependency {
7593 #[allow(unused_imports)]
7594 use ::buffa::alloc::string::ToString as _;
7595 let _ = __buffa_src;
7596 super::super::Dependency {
7597 dependency: self
7598 .dependency
7599 .as_ref()
7600 .map(|v| match v {
7601 super::super::__buffa::view::oneof::dependency::Dependency::Table(
7602 v,
7603 ) => {
7604 super::super::__buffa::oneof::dependency::Dependency::Table(
7605 ::buffa::alloc::boxed::Box::new(
7606 v.to_owned_from_source(__buffa_src),
7607 ),
7608 )
7609 }
7610 super::super::__buffa::view::oneof::dependency::Dependency::Function(
7611 v,
7612 ) => {
7613 super::super::__buffa::oneof::dependency::Dependency::Function(
7614 ::buffa::alloc::boxed::Box::new(
7615 v.to_owned_from_source(__buffa_src),
7616 ),
7617 )
7618 }
7619 }),
7620 __buffa_unknown_fields: self
7621 .__buffa_unknown_fields
7622 .to_owned()
7623 .unwrap_or_default()
7624 .into(),
7625 ..::core::default::Default::default()
7626 }
7627 }
7628 }
7629 impl<'a> ::buffa::ViewEncode<'a> for DependencyView<'a> {
7630 #[allow(clippy::needless_borrow, clippy::let_and_return)]
7631 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7632 #[allow(unused_imports)]
7633 use ::buffa::Enumeration as _;
7634 let mut size = 0u32;
7635 if let ::core::option::Option::Some(ref v) = self.dependency {
7636 match v {
7637 super::super::__buffa::view::oneof::dependency::Dependency::Table(
7638 x,
7639 ) => {
7640 let __slot = __cache.reserve();
7641 let inner = x.compute_size(__cache);
7642 __cache.set(__slot, inner);
7643 size
7644 += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
7645 + inner;
7646 }
7647 super::super::__buffa::view::oneof::dependency::Dependency::Function(
7648 x,
7649 ) => {
7650 let __slot = __cache.reserve();
7651 let inner = x.compute_size(__cache);
7652 __cache.set(__slot, inner);
7653 size
7654 += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
7655 + inner;
7656 }
7657 }
7658 }
7659 size += self.__buffa_unknown_fields.encoded_len() as u32;
7660 size
7661 }
7662 #[allow(clippy::needless_borrow)]
7663 fn write_to(
7664 &self,
7665 __cache: &mut ::buffa::SizeCache,
7666 buf: &mut impl ::buffa::bytes::BufMut,
7667 ) {
7668 #[allow(unused_imports)]
7669 use ::buffa::Enumeration as _;
7670 if let ::core::option::Option::Some(ref v) = self.dependency {
7671 match v {
7672 super::super::__buffa::view::oneof::dependency::Dependency::Table(
7673 x,
7674 ) => {
7675 ::buffa::encoding::Tag::new(
7676 1u32,
7677 ::buffa::encoding::WireType::LengthDelimited,
7678 )
7679 .encode(buf);
7680 ::buffa::encoding::encode_varint(
7681 __cache.consume_next() as u64,
7682 buf,
7683 );
7684 x.write_to(__cache, buf);
7685 }
7686 super::super::__buffa::view::oneof::dependency::Dependency::Function(
7687 x,
7688 ) => {
7689 ::buffa::encoding::Tag::new(
7690 2u32,
7691 ::buffa::encoding::WireType::LengthDelimited,
7692 )
7693 .encode(buf);
7694 ::buffa::encoding::encode_varint(
7695 __cache.consume_next() as u64,
7696 buf,
7697 );
7698 x.write_to(__cache, buf);
7699 }
7700 }
7701 }
7702 self.__buffa_unknown_fields.write_to(buf);
7703 }
7704 }
7705 impl<'__a> ::serde::Serialize for DependencyView<'__a> {
7717 fn serialize<__S: ::serde::Serializer>(
7718 &self,
7719 __s: __S,
7720 ) -> ::core::result::Result<__S::Ok, __S::Error> {
7721 use ::serde::ser::SerializeMap as _;
7722 let mut __map = __s.serialize_map(::core::option::Option::None)?;
7723 if let ::core::option::Option::Some(ref __ov) = self.dependency {
7724 match __ov {
7725 super::super::__buffa::view::oneof::dependency::Dependency::Table(
7726 v,
7727 ) => {
7728 __map.serialize_entry("table", v)?;
7729 }
7730 super::super::__buffa::view::oneof::dependency::Dependency::Function(
7731 v,
7732 ) => {
7733 __map.serialize_entry("function", v)?;
7734 }
7735 }
7736 }
7737 __map.end()
7738 }
7739 }
7740 impl<'a> ::buffa::MessageName for DependencyView<'a> {
7741 const PACKAGE: &'static str = "unitycatalog.tables.v1";
7742 const NAME: &'static str = "Dependency";
7743 const FULL_NAME: &'static str = "unitycatalog.tables.v1.Dependency";
7744 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Dependency";
7745 }
7746 impl<'v> ::buffa::DefaultViewInstance for DependencyView<'v> {
7747 fn default_view_instance<'a>() -> &'a Self
7748 where
7749 Self: 'a,
7750 {
7751 static VALUE: ::buffa::__private::OnceBox<DependencyView<'static>> = ::buffa::__private::OnceBox::new();
7752 VALUE
7753 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7754 <DependencyView<'static>>::default(),
7755 ))
7756 }
7757 }
7758 impl ::buffa::ViewReborrow for DependencyView<'static> {
7759 type Reborrowed<'b> = DependencyView<'b>;
7760 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7761 this
7762 }
7763 }
7764 #[derive(Clone, Debug)]
7770 pub struct DependencyOwnedView(::buffa::OwnedView<DependencyView<'static>>);
7771 impl DependencyOwnedView {
7772 pub fn decode(
7782 bytes: ::buffa::bytes::Bytes,
7783 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7784 ::core::result::Result::Ok(
7785 DependencyOwnedView(::buffa::OwnedView::decode(bytes)?),
7786 )
7787 }
7788 pub fn decode_with_options(
7796 bytes: ::buffa::bytes::Bytes,
7797 opts: &::buffa::DecodeOptions,
7798 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7799 ::core::result::Result::Ok(
7800 DependencyOwnedView(
7801 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7802 ),
7803 )
7804 }
7805 pub fn from_owned(
7812 msg: &super::super::Dependency,
7813 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7814 ::core::result::Result::Ok(
7815 DependencyOwnedView(::buffa::OwnedView::from_owned(msg)?),
7816 )
7817 }
7818 #[must_use]
7820 pub fn view(&self) -> &DependencyView<'_> {
7821 self.0.reborrow()
7822 }
7823 #[must_use]
7825 pub fn to_owned_message(&self) -> super::super::Dependency {
7826 self.0.to_owned_message()
7827 }
7828 #[must_use]
7830 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7831 self.0.bytes()
7832 }
7833 #[must_use]
7835 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7836 self.0.into_bytes()
7837 }
7838 #[must_use]
7840 pub fn dependency(
7841 &self,
7842 ) -> ::core::option::Option<
7843 &super::super::__buffa::view::oneof::dependency::Dependency<'_>,
7844 > {
7845 self.0.reborrow().dependency.as_ref()
7846 }
7847 }
7848 impl ::core::convert::From<::buffa::OwnedView<DependencyView<'static>>>
7849 for DependencyOwnedView {
7850 fn from(inner: ::buffa::OwnedView<DependencyView<'static>>) -> Self {
7851 DependencyOwnedView(inner)
7852 }
7853 }
7854 impl ::core::convert::From<DependencyOwnedView>
7855 for ::buffa::OwnedView<DependencyView<'static>> {
7856 fn from(wrapper: DependencyOwnedView) -> Self {
7857 wrapper.0
7858 }
7859 }
7860 impl ::core::convert::AsRef<::buffa::OwnedView<DependencyView<'static>>>
7861 for DependencyOwnedView {
7862 fn as_ref(&self) -> &::buffa::OwnedView<DependencyView<'static>> {
7863 &self.0
7864 }
7865 }
7866 impl ::buffa::HasMessageView for super::super::Dependency {
7867 type View<'a> = DependencyView<'a>;
7868 type ViewHandle = DependencyOwnedView;
7869 }
7870 impl ::serde::Serialize for DependencyOwnedView {
7871 fn serialize<__S: ::serde::Serializer>(
7872 &self,
7873 __s: __S,
7874 ) -> ::core::result::Result<__S::Ok, __S::Error> {
7875 ::serde::Serialize::serialize(&self.0, __s)
7876 }
7877 }
7878 #[derive(Clone, Debug, Default)]
7880 pub struct DependencyListView<'a> {
7881 pub dependencies: ::buffa::RepeatedView<
7885 'a,
7886 super::super::__buffa::view::DependencyView<'a>,
7887 >,
7888 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7889 }
7890 impl<'a> DependencyListView<'a> {
7891 #[doc(hidden)]
7899 pub fn _decode_depth(
7900 buf: &'a [u8],
7901 depth: u32,
7902 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7903 let mut view = Self::default();
7904 view._merge_into_view(buf, depth)?;
7905 ::core::result::Result::Ok(view)
7906 }
7907 #[doc(hidden)]
7915 pub fn _merge_into_view(
7916 &mut self,
7917 buf: &'a [u8],
7918 depth: u32,
7919 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7920 let _ = depth;
7921 #[allow(unused_variables)]
7922 let view = self;
7923 let mut cur: &'a [u8] = buf;
7924 while !cur.is_empty() {
7925 let before_tag = cur;
7926 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7927 match tag.field_number() {
7928 1u32 => {
7929 if tag.wire_type()
7930 != ::buffa::encoding::WireType::LengthDelimited
7931 {
7932 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7933 field_number: 1u32,
7934 expected: 2u8,
7935 actual: tag.wire_type() as u8,
7936 });
7937 }
7938 if depth == 0 {
7939 return Err(::buffa::DecodeError::RecursionLimitExceeded);
7940 }
7941 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7942 view.dependencies
7943 .push(
7944 super::super::__buffa::view::DependencyView::_decode_depth(
7945 sub,
7946 depth - 1,
7947 )?,
7948 );
7949 }
7950 _ => {
7951 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7952 let span_len = before_tag.len() - cur.len();
7953 view.__buffa_unknown_fields
7954 .push_raw(&before_tag[..span_len]);
7955 }
7956 }
7957 }
7958 ::core::result::Result::Ok(())
7959 }
7960 }
7961 impl<'a> ::buffa::MessageView<'a> for DependencyListView<'a> {
7962 type Owned = super::super::DependencyList;
7963 fn decode_view(
7964 buf: &'a [u8],
7965 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7966 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7967 }
7968 fn decode_view_with_limit(
7969 buf: &'a [u8],
7970 depth: u32,
7971 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7972 Self::_decode_depth(buf, depth)
7973 }
7974 fn to_owned_message(&self) -> super::super::DependencyList {
7975 self.to_owned_from_source(None)
7976 }
7977 #[allow(clippy::useless_conversion, clippy::needless_update)]
7978 fn to_owned_from_source(
7979 &self,
7980 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7981 ) -> super::super::DependencyList {
7982 #[allow(unused_imports)]
7983 use ::buffa::alloc::string::ToString as _;
7984 let _ = __buffa_src;
7985 super::super::DependencyList {
7986 dependencies: self
7987 .dependencies
7988 .iter()
7989 .map(|v| v.to_owned_from_source(__buffa_src))
7990 .collect(),
7991 __buffa_unknown_fields: self
7992 .__buffa_unknown_fields
7993 .to_owned()
7994 .unwrap_or_default()
7995 .into(),
7996 ..::core::default::Default::default()
7997 }
7998 }
7999 }
8000 impl<'a> ::buffa::ViewEncode<'a> for DependencyListView<'a> {
8001 #[allow(clippy::needless_borrow, clippy::let_and_return)]
8002 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8003 #[allow(unused_imports)]
8004 use ::buffa::Enumeration as _;
8005 let mut size = 0u32;
8006 for v in &self.dependencies {
8007 let __slot = __cache.reserve();
8008 let inner_size = v.compute_size(__cache);
8009 __cache.set(__slot, inner_size);
8010 size
8011 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8012 + inner_size;
8013 }
8014 size += self.__buffa_unknown_fields.encoded_len() as u32;
8015 size
8016 }
8017 #[allow(clippy::needless_borrow)]
8018 fn write_to(
8019 &self,
8020 __cache: &mut ::buffa::SizeCache,
8021 buf: &mut impl ::buffa::bytes::BufMut,
8022 ) {
8023 #[allow(unused_imports)]
8024 use ::buffa::Enumeration as _;
8025 for v in &self.dependencies {
8026 ::buffa::encoding::Tag::new(
8027 1u32,
8028 ::buffa::encoding::WireType::LengthDelimited,
8029 )
8030 .encode(buf);
8031 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8032 v.write_to(__cache, buf);
8033 }
8034 self.__buffa_unknown_fields.write_to(buf);
8035 }
8036 }
8037 impl<'__a> ::serde::Serialize for DependencyListView<'__a> {
8049 fn serialize<__S: ::serde::Serializer>(
8050 &self,
8051 __s: __S,
8052 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8053 use ::serde::ser::SerializeMap as _;
8054 let mut __map = __s.serialize_map(::core::option::Option::None)?;
8055 if !self.dependencies.is_empty() {
8056 __map.serialize_entry("dependencies", &*self.dependencies)?;
8057 }
8058 __map.end()
8059 }
8060 }
8061 impl<'a> ::buffa::MessageName for DependencyListView<'a> {
8062 const PACKAGE: &'static str = "unitycatalog.tables.v1";
8063 const NAME: &'static str = "DependencyList";
8064 const FULL_NAME: &'static str = "unitycatalog.tables.v1.DependencyList";
8065 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.DependencyList";
8066 }
8067 impl<'v> ::buffa::DefaultViewInstance for DependencyListView<'v> {
8068 fn default_view_instance<'a>() -> &'a Self
8069 where
8070 Self: 'a,
8071 {
8072 static VALUE: ::buffa::__private::OnceBox<DependencyListView<'static>> = ::buffa::__private::OnceBox::new();
8073 VALUE
8074 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8075 <DependencyListView<'static>>::default(),
8076 ))
8077 }
8078 }
8079 impl ::buffa::ViewReborrow for DependencyListView<'static> {
8080 type Reborrowed<'b> = DependencyListView<'b>;
8081 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8082 this
8083 }
8084 }
8085 #[derive(Clone, Debug)]
8091 pub struct DependencyListOwnedView(
8092 ::buffa::OwnedView<DependencyListView<'static>>,
8093 );
8094 impl DependencyListOwnedView {
8095 pub fn decode(
8105 bytes: ::buffa::bytes::Bytes,
8106 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8107 ::core::result::Result::Ok(
8108 DependencyListOwnedView(::buffa::OwnedView::decode(bytes)?),
8109 )
8110 }
8111 pub fn decode_with_options(
8119 bytes: ::buffa::bytes::Bytes,
8120 opts: &::buffa::DecodeOptions,
8121 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8122 ::core::result::Result::Ok(
8123 DependencyListOwnedView(
8124 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8125 ),
8126 )
8127 }
8128 pub fn from_owned(
8135 msg: &super::super::DependencyList,
8136 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8137 ::core::result::Result::Ok(
8138 DependencyListOwnedView(::buffa::OwnedView::from_owned(msg)?),
8139 )
8140 }
8141 #[must_use]
8143 pub fn view(&self) -> &DependencyListView<'_> {
8144 self.0.reborrow()
8145 }
8146 #[must_use]
8148 pub fn to_owned_message(&self) -> super::super::DependencyList {
8149 self.0.to_owned_message()
8150 }
8151 #[must_use]
8153 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8154 self.0.bytes()
8155 }
8156 #[must_use]
8158 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8159 self.0.into_bytes()
8160 }
8161 #[must_use]
8165 pub fn dependencies(
8166 &self,
8167 ) -> &::buffa::RepeatedView<
8168 '_,
8169 super::super::__buffa::view::DependencyView<'_>,
8170 > {
8171 &self.0.reborrow().dependencies
8172 }
8173 }
8174 impl ::core::convert::From<::buffa::OwnedView<DependencyListView<'static>>>
8175 for DependencyListOwnedView {
8176 fn from(inner: ::buffa::OwnedView<DependencyListView<'static>>) -> Self {
8177 DependencyListOwnedView(inner)
8178 }
8179 }
8180 impl ::core::convert::From<DependencyListOwnedView>
8181 for ::buffa::OwnedView<DependencyListView<'static>> {
8182 fn from(wrapper: DependencyListOwnedView) -> Self {
8183 wrapper.0
8184 }
8185 }
8186 impl ::core::convert::AsRef<::buffa::OwnedView<DependencyListView<'static>>>
8187 for DependencyListOwnedView {
8188 fn as_ref(&self) -> &::buffa::OwnedView<DependencyListView<'static>> {
8189 &self.0
8190 }
8191 }
8192 impl ::buffa::HasMessageView for super::super::DependencyList {
8193 type View<'a> = DependencyListView<'a>;
8194 type ViewHandle = DependencyListOwnedView;
8195 }
8196 impl ::serde::Serialize for DependencyListOwnedView {
8197 fn serialize<__S: ::serde::Serializer>(
8198 &self,
8199 __s: __S,
8200 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8201 ::serde::Serialize::serialize(&self.0, __s)
8202 }
8203 }
8204 #[derive(Clone, Debug, Default)]
8205 pub struct TableView<'a> {
8206 pub name: &'a str,
8210 pub catalog_name: &'a str,
8214 pub schema_name: &'a str,
8218 pub table_type: ::buffa::EnumValue<super::super::TableType>,
8220 pub data_source_format: ::buffa::EnumValue<super::super::DataSourceFormat>,
8224 pub columns: ::buffa::RepeatedView<
8228 'a,
8229 super::super::__buffa::view::ColumnView<'a>,
8230 >,
8231 pub storage_location: ::core::option::Option<&'a str>,
8235 pub view_definition: ::core::option::Option<&'a str>,
8241 pub view_dependencies: ::buffa::MessageFieldView<
8247 super::super::__buffa::view::DependencyListView<'a>,
8248 >,
8249 pub owner: ::core::option::Option<&'a str>,
8255 pub comment: ::core::option::Option<&'a str>,
8259 pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
8263 pub storage_credential_name: ::core::option::Option<&'a str>,
8267 pub full_name: &'a str,
8276 pub created_at: ::core::option::Option<i64>,
8280 pub created_by: ::core::option::Option<&'a str>,
8284 pub updated_at: ::core::option::Option<i64>,
8288 pub updated_by: ::core::option::Option<&'a str>,
8292 pub deleted_at: ::core::option::Option<i64>,
8296 pub table_id: ::core::option::Option<&'a str>,
8300 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8301 }
8302 impl<'a> TableView<'a> {
8303 #[doc(hidden)]
8311 pub fn _decode_depth(
8312 buf: &'a [u8],
8313 depth: u32,
8314 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8315 let mut view = Self::default();
8316 view._merge_into_view(buf, depth)?;
8317 ::core::result::Result::Ok(view)
8318 }
8319 #[doc(hidden)]
8327 pub fn _merge_into_view(
8328 &mut self,
8329 buf: &'a [u8],
8330 depth: u32,
8331 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8332 let _ = depth;
8333 #[allow(unused_variables)]
8334 let view = self;
8335 let mut cur: &'a [u8] = buf;
8336 while !cur.is_empty() {
8337 let before_tag = cur;
8338 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8339 match tag.field_number() {
8340 1u32 => {
8341 if tag.wire_type()
8342 != ::buffa::encoding::WireType::LengthDelimited
8343 {
8344 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8345 field_number: 1u32,
8346 expected: 2u8,
8347 actual: tag.wire_type() as u8,
8348 });
8349 }
8350 view.name = ::buffa::types::borrow_str(&mut cur)?;
8351 }
8352 2u32 => {
8353 if tag.wire_type()
8354 != ::buffa::encoding::WireType::LengthDelimited
8355 {
8356 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8357 field_number: 2u32,
8358 expected: 2u8,
8359 actual: tag.wire_type() as u8,
8360 });
8361 }
8362 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
8363 }
8364 3u32 => {
8365 if tag.wire_type()
8366 != ::buffa::encoding::WireType::LengthDelimited
8367 {
8368 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8369 field_number: 3u32,
8370 expected: 2u8,
8371 actual: tag.wire_type() as u8,
8372 });
8373 }
8374 view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
8375 }
8376 4u32 => {
8377 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8378 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8379 field_number: 4u32,
8380 expected: 0u8,
8381 actual: tag.wire_type() as u8,
8382 });
8383 }
8384 view.table_type = ::buffa::EnumValue::from(
8385 ::buffa::types::decode_int32(&mut cur)?,
8386 );
8387 }
8388 5u32 => {
8389 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8390 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8391 field_number: 5u32,
8392 expected: 0u8,
8393 actual: tag.wire_type() as u8,
8394 });
8395 }
8396 view.data_source_format = ::buffa::EnumValue::from(
8397 ::buffa::types::decode_int32(&mut cur)?,
8398 );
8399 }
8400 7u32 => {
8401 if tag.wire_type()
8402 != ::buffa::encoding::WireType::LengthDelimited
8403 {
8404 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8405 field_number: 7u32,
8406 expected: 2u8,
8407 actual: tag.wire_type() as u8,
8408 });
8409 }
8410 view.storage_location = Some(
8411 ::buffa::types::borrow_str(&mut cur)?,
8412 );
8413 }
8414 8u32 => {
8415 if tag.wire_type()
8416 != ::buffa::encoding::WireType::LengthDelimited
8417 {
8418 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8419 field_number: 8u32,
8420 expected: 2u8,
8421 actual: tag.wire_type() as u8,
8422 });
8423 }
8424 view.view_definition = Some(
8425 ::buffa::types::borrow_str(&mut cur)?,
8426 );
8427 }
8428 9u32 => {
8429 if tag.wire_type()
8430 != ::buffa::encoding::WireType::LengthDelimited
8431 {
8432 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8433 field_number: 9u32,
8434 expected: 2u8,
8435 actual: tag.wire_type() as u8,
8436 });
8437 }
8438 if depth == 0 {
8439 return Err(::buffa::DecodeError::RecursionLimitExceeded);
8440 }
8441 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8442 match view.view_dependencies.as_mut() {
8443 Some(existing) => existing._merge_into_view(sub, depth - 1)?,
8444 None => {
8445 view.view_dependencies = ::buffa::MessageFieldView::set(
8446 super::super::__buffa::view::DependencyListView::_decode_depth(
8447 sub,
8448 depth - 1,
8449 )?,
8450 );
8451 }
8452 }
8453 }
8454 11u32 => {
8455 if tag.wire_type()
8456 != ::buffa::encoding::WireType::LengthDelimited
8457 {
8458 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8459 field_number: 11u32,
8460 expected: 2u8,
8461 actual: tag.wire_type() as u8,
8462 });
8463 }
8464 view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
8465 }
8466 12u32 => {
8467 if tag.wire_type()
8468 != ::buffa::encoding::WireType::LengthDelimited
8469 {
8470 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8471 field_number: 12u32,
8472 expected: 2u8,
8473 actual: tag.wire_type() as u8,
8474 });
8475 }
8476 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
8477 }
8478 14u32 => {
8479 if tag.wire_type()
8480 != ::buffa::encoding::WireType::LengthDelimited
8481 {
8482 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8483 field_number: 14u32,
8484 expected: 2u8,
8485 actual: tag.wire_type() as u8,
8486 });
8487 }
8488 view.storage_credential_name = Some(
8489 ::buffa::types::borrow_str(&mut cur)?,
8490 );
8491 }
8492 17u32 => {
8493 if tag.wire_type()
8494 != ::buffa::encoding::WireType::LengthDelimited
8495 {
8496 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8497 field_number: 17u32,
8498 expected: 2u8,
8499 actual: tag.wire_type() as u8,
8500 });
8501 }
8502 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
8503 }
8504 18u32 => {
8505 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8506 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8507 field_number: 18u32,
8508 expected: 0u8,
8509 actual: tag.wire_type() as u8,
8510 });
8511 }
8512 view.created_at = Some(
8513 ::buffa::types::decode_int64(&mut cur)?,
8514 );
8515 }
8516 19u32 => {
8517 if tag.wire_type()
8518 != ::buffa::encoding::WireType::LengthDelimited
8519 {
8520 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8521 field_number: 19u32,
8522 expected: 2u8,
8523 actual: tag.wire_type() as u8,
8524 });
8525 }
8526 view.created_by = Some(
8527 ::buffa::types::borrow_str(&mut cur)?,
8528 );
8529 }
8530 20u32 => {
8531 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8532 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8533 field_number: 20u32,
8534 expected: 0u8,
8535 actual: tag.wire_type() as u8,
8536 });
8537 }
8538 view.updated_at = Some(
8539 ::buffa::types::decode_int64(&mut cur)?,
8540 );
8541 }
8542 21u32 => {
8543 if tag.wire_type()
8544 != ::buffa::encoding::WireType::LengthDelimited
8545 {
8546 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8547 field_number: 21u32,
8548 expected: 2u8,
8549 actual: tag.wire_type() as u8,
8550 });
8551 }
8552 view.updated_by = Some(
8553 ::buffa::types::borrow_str(&mut cur)?,
8554 );
8555 }
8556 22u32 => {
8557 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8558 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8559 field_number: 22u32,
8560 expected: 0u8,
8561 actual: tag.wire_type() as u8,
8562 });
8563 }
8564 view.deleted_at = Some(
8565 ::buffa::types::decode_int64(&mut cur)?,
8566 );
8567 }
8568 23u32 => {
8569 if tag.wire_type()
8570 != ::buffa::encoding::WireType::LengthDelimited
8571 {
8572 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8573 field_number: 23u32,
8574 expected: 2u8,
8575 actual: tag.wire_type() as u8,
8576 });
8577 }
8578 view.table_id = Some(::buffa::types::borrow_str(&mut cur)?);
8579 }
8580 6u32 => {
8581 if tag.wire_type()
8582 != ::buffa::encoding::WireType::LengthDelimited
8583 {
8584 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8585 field_number: 6u32,
8586 expected: 2u8,
8587 actual: tag.wire_type() as u8,
8588 });
8589 }
8590 if depth == 0 {
8591 return Err(::buffa::DecodeError::RecursionLimitExceeded);
8592 }
8593 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8594 view.columns
8595 .push(
8596 super::super::__buffa::view::ColumnView::_decode_depth(
8597 sub,
8598 depth - 1,
8599 )?,
8600 );
8601 }
8602 13u32 => {
8603 if tag.wire_type()
8604 != ::buffa::encoding::WireType::LengthDelimited
8605 {
8606 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8607 field_number: 13u32,
8608 expected: 2u8,
8609 actual: tag.wire_type() as u8,
8610 });
8611 }
8612 let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
8613 let mut entry_cur: &'a [u8] = entry_bytes;
8614 let mut key = "";
8615 let mut val = "";
8616 while !entry_cur.is_empty() {
8617 let entry_tag = ::buffa::encoding::Tag::decode(
8618 &mut entry_cur,
8619 )?;
8620 match entry_tag.field_number() {
8621 1 => {
8622 if entry_tag.wire_type()
8623 != ::buffa::encoding::WireType::LengthDelimited
8624 {
8625 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8626 field_number: entry_tag.field_number(),
8627 expected: 2u8,
8628 actual: entry_tag.wire_type() as u8,
8629 });
8630 }
8631 key = ::buffa::types::borrow_str(&mut entry_cur)?;
8632 }
8633 2 => {
8634 if entry_tag.wire_type()
8635 != ::buffa::encoding::WireType::LengthDelimited
8636 {
8637 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8638 field_number: entry_tag.field_number(),
8639 expected: 2u8,
8640 actual: entry_tag.wire_type() as u8,
8641 });
8642 }
8643 val = ::buffa::types::borrow_str(&mut entry_cur)?;
8644 }
8645 _ => {
8646 ::buffa::encoding::skip_field_depth(
8647 entry_tag,
8648 &mut entry_cur,
8649 depth,
8650 )?;
8651 }
8652 }
8653 }
8654 view.properties.push(key, val);
8655 }
8656 _ => {
8657 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8658 let span_len = before_tag.len() - cur.len();
8659 view.__buffa_unknown_fields
8660 .push_raw(&before_tag[..span_len]);
8661 }
8662 }
8663 }
8664 ::core::result::Result::Ok(())
8665 }
8666 }
8667 impl<'a> ::buffa::MessageView<'a> for TableView<'a> {
8668 type Owned = super::super::Table;
8669 fn decode_view(
8670 buf: &'a [u8],
8671 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8672 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8673 }
8674 fn decode_view_with_limit(
8675 buf: &'a [u8],
8676 depth: u32,
8677 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8678 Self::_decode_depth(buf, depth)
8679 }
8680 fn to_owned_message(&self) -> super::super::Table {
8681 self.to_owned_from_source(None)
8682 }
8683 #[allow(clippy::useless_conversion, clippy::needless_update)]
8684 fn to_owned_from_source(
8685 &self,
8686 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8687 ) -> super::super::Table {
8688 #[allow(unused_imports)]
8689 use ::buffa::alloc::string::ToString as _;
8690 let _ = __buffa_src;
8691 super::super::Table {
8692 name: self.name.to_string(),
8693 catalog_name: self.catalog_name.to_string(),
8694 schema_name: self.schema_name.to_string(),
8695 table_type: self.table_type,
8696 data_source_format: self.data_source_format,
8697 columns: self
8698 .columns
8699 .iter()
8700 .map(|v| v.to_owned_from_source(__buffa_src))
8701 .collect(),
8702 storage_location: self.storage_location.map(|s| s.to_string()),
8703 view_definition: self.view_definition.map(|s| s.to_string()),
8704 view_dependencies: match self.view_dependencies.as_option() {
8705 Some(v) => {
8706 ::buffa::MessageField::<
8707 super::super::DependencyList,
8708 >::some(v.to_owned_from_source(__buffa_src))
8709 }
8710 None => ::buffa::MessageField::none(),
8711 },
8712 owner: self.owner.map(|s| s.to_string()),
8713 comment: self.comment.map(|s| s.to_string()),
8714 properties: self
8715 .properties
8716 .iter()
8717 .map(|(k, v)| (k.to_string(), v.to_string()))
8718 .collect(),
8719 storage_credential_name: self
8720 .storage_credential_name
8721 .map(|s| s.to_string()),
8722 full_name: self.full_name.to_string(),
8723 created_at: self.created_at,
8724 created_by: self.created_by.map(|s| s.to_string()),
8725 updated_at: self.updated_at,
8726 updated_by: self.updated_by.map(|s| s.to_string()),
8727 deleted_at: self.deleted_at,
8728 table_id: self.table_id.map(|s| s.to_string()),
8729 __buffa_unknown_fields: self
8730 .__buffa_unknown_fields
8731 .to_owned()
8732 .unwrap_or_default()
8733 .into(),
8734 ..::core::default::Default::default()
8735 }
8736 }
8737 }
8738 impl<'a> ::buffa::ViewEncode<'a> for TableView<'a> {
8739 #[allow(clippy::needless_borrow, clippy::let_and_return)]
8740 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8741 #[allow(unused_imports)]
8742 use ::buffa::Enumeration as _;
8743 let mut size = 0u32;
8744 if !self.name.is_empty() {
8745 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
8746 }
8747 if !self.catalog_name.is_empty() {
8748 size
8749 += 1u32
8750 + ::buffa::types::string_encoded_len(&self.catalog_name)
8751 as u32;
8752 }
8753 if !self.schema_name.is_empty() {
8754 size
8755 += 1u32
8756 + ::buffa::types::string_encoded_len(&self.schema_name)
8757 as u32;
8758 }
8759 {
8760 let val = self.table_type.to_i32();
8761 if val != 0 {
8762 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
8763 }
8764 }
8765 {
8766 let val = self.data_source_format.to_i32();
8767 if val != 0 {
8768 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
8769 }
8770 }
8771 for v in &self.columns {
8772 let __slot = __cache.reserve();
8773 let inner_size = v.compute_size(__cache);
8774 __cache.set(__slot, inner_size);
8775 size
8776 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8777 + inner_size;
8778 }
8779 if let Some(ref v) = self.storage_location {
8780 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8781 }
8782 if let Some(ref v) = self.view_definition {
8783 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8784 }
8785 if self.view_dependencies.is_set() {
8786 let __slot = __cache.reserve();
8787 let inner_size = self.view_dependencies.compute_size(__cache);
8788 __cache.set(__slot, inner_size);
8789 size
8790 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8791 + inner_size;
8792 }
8793 if let Some(ref v) = self.owner {
8794 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8795 }
8796 if let Some(ref v) = self.comment {
8797 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8798 }
8799 #[allow(clippy::for_kv_map)]
8800 for (k, v) in &self.properties {
8801 let entry_size: u32 = 1u32
8802 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
8803 + ::buffa::types::string_encoded_len(v) as u32;
8804 size
8805 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
8806 + entry_size;
8807 }
8808 if let Some(ref v) = self.storage_credential_name {
8809 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8810 }
8811 if !self.full_name.is_empty() {
8812 size
8813 += 2u32
8814 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
8815 }
8816 if let Some(v) = self.created_at {
8817 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
8818 }
8819 if let Some(ref v) = self.created_by {
8820 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
8821 }
8822 if let Some(v) = self.updated_at {
8823 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
8824 }
8825 if let Some(ref v) = self.updated_by {
8826 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
8827 }
8828 if let Some(v) = self.deleted_at {
8829 size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
8830 }
8831 if let Some(ref v) = self.table_id {
8832 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
8833 }
8834 size += self.__buffa_unknown_fields.encoded_len() as u32;
8835 size
8836 }
8837 #[allow(clippy::needless_borrow)]
8838 fn write_to(
8839 &self,
8840 __cache: &mut ::buffa::SizeCache,
8841 buf: &mut impl ::buffa::bytes::BufMut,
8842 ) {
8843 #[allow(unused_imports)]
8844 use ::buffa::Enumeration as _;
8845 if !self.name.is_empty() {
8846 ::buffa::encoding::Tag::new(
8847 1u32,
8848 ::buffa::encoding::WireType::LengthDelimited,
8849 )
8850 .encode(buf);
8851 ::buffa::types::encode_string(&self.name, buf);
8852 }
8853 if !self.catalog_name.is_empty() {
8854 ::buffa::encoding::Tag::new(
8855 2u32,
8856 ::buffa::encoding::WireType::LengthDelimited,
8857 )
8858 .encode(buf);
8859 ::buffa::types::encode_string(&self.catalog_name, buf);
8860 }
8861 if !self.schema_name.is_empty() {
8862 ::buffa::encoding::Tag::new(
8863 3u32,
8864 ::buffa::encoding::WireType::LengthDelimited,
8865 )
8866 .encode(buf);
8867 ::buffa::types::encode_string(&self.schema_name, buf);
8868 }
8869 {
8870 let val = self.table_type.to_i32();
8871 if val != 0 {
8872 ::buffa::encoding::Tag::new(
8873 4u32,
8874 ::buffa::encoding::WireType::Varint,
8875 )
8876 .encode(buf);
8877 ::buffa::types::encode_int32(val, buf);
8878 }
8879 }
8880 {
8881 let val = self.data_source_format.to_i32();
8882 if val != 0 {
8883 ::buffa::encoding::Tag::new(
8884 5u32,
8885 ::buffa::encoding::WireType::Varint,
8886 )
8887 .encode(buf);
8888 ::buffa::types::encode_int32(val, buf);
8889 }
8890 }
8891 for v in &self.columns {
8892 ::buffa::encoding::Tag::new(
8893 6u32,
8894 ::buffa::encoding::WireType::LengthDelimited,
8895 )
8896 .encode(buf);
8897 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8898 v.write_to(__cache, buf);
8899 }
8900 if let Some(ref v) = self.storage_location {
8901 ::buffa::encoding::Tag::new(
8902 7u32,
8903 ::buffa::encoding::WireType::LengthDelimited,
8904 )
8905 .encode(buf);
8906 ::buffa::types::encode_string(v, buf);
8907 }
8908 if let Some(ref v) = self.view_definition {
8909 ::buffa::encoding::Tag::new(
8910 8u32,
8911 ::buffa::encoding::WireType::LengthDelimited,
8912 )
8913 .encode(buf);
8914 ::buffa::types::encode_string(v, buf);
8915 }
8916 if self.view_dependencies.is_set() {
8917 ::buffa::encoding::Tag::new(
8918 9u32,
8919 ::buffa::encoding::WireType::LengthDelimited,
8920 )
8921 .encode(buf);
8922 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8923 self.view_dependencies.write_to(__cache, buf);
8924 }
8925 if let Some(ref v) = self.owner {
8926 ::buffa::encoding::Tag::new(
8927 11u32,
8928 ::buffa::encoding::WireType::LengthDelimited,
8929 )
8930 .encode(buf);
8931 ::buffa::types::encode_string(v, buf);
8932 }
8933 if let Some(ref v) = self.comment {
8934 ::buffa::encoding::Tag::new(
8935 12u32,
8936 ::buffa::encoding::WireType::LengthDelimited,
8937 )
8938 .encode(buf);
8939 ::buffa::types::encode_string(v, buf);
8940 }
8941 for (k, v) in &self.properties {
8942 let entry_size: u32 = 1u32
8943 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
8944 + ::buffa::types::string_encoded_len(v) as u32;
8945 ::buffa::encoding::Tag::new(
8946 13u32,
8947 ::buffa::encoding::WireType::LengthDelimited,
8948 )
8949 .encode(buf);
8950 ::buffa::encoding::encode_varint(entry_size as u64, buf);
8951 ::buffa::encoding::Tag::new(
8952 1u32,
8953 ::buffa::encoding::WireType::LengthDelimited,
8954 )
8955 .encode(buf);
8956 ::buffa::types::encode_string(k, buf);
8957 ::buffa::encoding::Tag::new(
8958 2u32,
8959 ::buffa::encoding::WireType::LengthDelimited,
8960 )
8961 .encode(buf);
8962 ::buffa::types::encode_string(v, buf);
8963 }
8964 if let Some(ref v) = self.storage_credential_name {
8965 ::buffa::encoding::Tag::new(
8966 14u32,
8967 ::buffa::encoding::WireType::LengthDelimited,
8968 )
8969 .encode(buf);
8970 ::buffa::types::encode_string(v, buf);
8971 }
8972 if !self.full_name.is_empty() {
8973 ::buffa::encoding::Tag::new(
8974 17u32,
8975 ::buffa::encoding::WireType::LengthDelimited,
8976 )
8977 .encode(buf);
8978 ::buffa::types::encode_string(&self.full_name, buf);
8979 }
8980 if let Some(v) = self.created_at {
8981 ::buffa::encoding::Tag::new(
8982 18u32,
8983 ::buffa::encoding::WireType::Varint,
8984 )
8985 .encode(buf);
8986 ::buffa::types::encode_int64(v, buf);
8987 }
8988 if let Some(ref v) = self.created_by {
8989 ::buffa::encoding::Tag::new(
8990 19u32,
8991 ::buffa::encoding::WireType::LengthDelimited,
8992 )
8993 .encode(buf);
8994 ::buffa::types::encode_string(v, buf);
8995 }
8996 if let Some(v) = self.updated_at {
8997 ::buffa::encoding::Tag::new(
8998 20u32,
8999 ::buffa::encoding::WireType::Varint,
9000 )
9001 .encode(buf);
9002 ::buffa::types::encode_int64(v, buf);
9003 }
9004 if let Some(ref v) = self.updated_by {
9005 ::buffa::encoding::Tag::new(
9006 21u32,
9007 ::buffa::encoding::WireType::LengthDelimited,
9008 )
9009 .encode(buf);
9010 ::buffa::types::encode_string(v, buf);
9011 }
9012 if let Some(v) = self.deleted_at {
9013 ::buffa::encoding::Tag::new(
9014 22u32,
9015 ::buffa::encoding::WireType::Varint,
9016 )
9017 .encode(buf);
9018 ::buffa::types::encode_int64(v, buf);
9019 }
9020 if let Some(ref v) = self.table_id {
9021 ::buffa::encoding::Tag::new(
9022 23u32,
9023 ::buffa::encoding::WireType::LengthDelimited,
9024 )
9025 .encode(buf);
9026 ::buffa::types::encode_string(v, buf);
9027 }
9028 self.__buffa_unknown_fields.write_to(buf);
9029 }
9030 }
9031 impl<'__a> ::serde::Serialize for TableView<'__a> {
9043 fn serialize<__S: ::serde::Serializer>(
9044 &self,
9045 __s: __S,
9046 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9047 use ::serde::ser::SerializeMap as _;
9048 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9049 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9050 __map.serialize_entry("name", self.name)?;
9051 }
9052 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
9053 __map.serialize_entry("catalog_name", self.catalog_name)?;
9054 }
9055 if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
9056 __map.serialize_entry("schema_name", self.schema_name)?;
9057 }
9058 if !::buffa::json_helpers::skip_if::is_default_enum_value(
9059 &self.table_type,
9060 ) {
9061 __map.serialize_entry("table_type", &self.table_type)?;
9062 }
9063 if !::buffa::json_helpers::skip_if::is_default_enum_value(
9064 &self.data_source_format,
9065 ) {
9066 __map.serialize_entry("data_source_format", &self.data_source_format)?;
9067 }
9068 if !self.columns.is_empty() {
9069 __map.serialize_entry("columns", &*self.columns)?;
9070 }
9071 if let ::core::option::Option::Some(__v) = self.storage_location {
9072 __map.serialize_entry("storage_location", __v)?;
9073 }
9074 if let ::core::option::Option::Some(__v) = self.view_definition {
9075 __map.serialize_entry("view_definition", __v)?;
9076 }
9077 {
9078 if let ::core::option::Option::Some(__v) = self
9079 .view_dependencies
9080 .as_option()
9081 {
9082 __map.serialize_entry("view_dependencies", __v)?;
9083 }
9084 }
9085 if let ::core::option::Option::Some(__v) = self.owner {
9086 __map.serialize_entry("owner", __v)?;
9087 }
9088 if let ::core::option::Option::Some(__v) = self.comment {
9089 __map.serialize_entry("comment", __v)?;
9090 }
9091 if !self.properties.is_empty() {
9092 struct _WM<'__a, '__x>(
9093 &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
9094 );
9095 impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
9096 fn serialize<__S: ::serde::Serializer>(
9097 &self,
9098 __s: __S,
9099 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9100 use ::serde::ser::SerializeMap as _;
9101 let mut __m = __s
9102 .serialize_map(::core::option::Option::Some(self.0.len()))?;
9103 for (k, v) in self.0.iter_unique() {
9104 __m.serialize_entry(k, v)?;
9105 }
9106 __m.end()
9107 }
9108 }
9109 __map.serialize_entry("properties", &_WM(&self.properties))?;
9110 }
9111 if let ::core::option::Option::Some(__v) = self.storage_credential_name {
9112 __map.serialize_entry("storage_credential_name", __v)?;
9113 }
9114 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
9115 __map.serialize_entry("full_name", self.full_name)?;
9116 }
9117 if let ::core::option::Option::Some(__v) = self.created_at {
9118 struct _W(i64);
9119 impl ::serde::Serialize for _W {
9120 fn serialize<__S: ::serde::Serializer>(
9121 &self,
9122 __s: __S,
9123 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9124 ::buffa::json_helpers::int64::serialize(&self.0, __s)
9125 }
9126 }
9127 __map.serialize_entry("created_at", &_W(__v))?;
9128 }
9129 if let ::core::option::Option::Some(__v) = self.created_by {
9130 __map.serialize_entry("created_by", __v)?;
9131 }
9132 if let ::core::option::Option::Some(__v) = self.updated_at {
9133 struct _W(i64);
9134 impl ::serde::Serialize for _W {
9135 fn serialize<__S: ::serde::Serializer>(
9136 &self,
9137 __s: __S,
9138 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9139 ::buffa::json_helpers::int64::serialize(&self.0, __s)
9140 }
9141 }
9142 __map.serialize_entry("updated_at", &_W(__v))?;
9143 }
9144 if let ::core::option::Option::Some(__v) = self.updated_by {
9145 __map.serialize_entry("updated_by", __v)?;
9146 }
9147 if let ::core::option::Option::Some(__v) = self.deleted_at {
9148 struct _W(i64);
9149 impl ::serde::Serialize for _W {
9150 fn serialize<__S: ::serde::Serializer>(
9151 &self,
9152 __s: __S,
9153 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9154 ::buffa::json_helpers::int64::serialize(&self.0, __s)
9155 }
9156 }
9157 __map.serialize_entry("deleted_at", &_W(__v))?;
9158 }
9159 if let ::core::option::Option::Some(__v) = self.table_id {
9160 __map.serialize_entry("table_id", __v)?;
9161 }
9162 __map.end()
9163 }
9164 }
9165 impl<'a> ::buffa::MessageName for TableView<'a> {
9166 const PACKAGE: &'static str = "unitycatalog.tables.v1";
9167 const NAME: &'static str = "Table";
9168 const FULL_NAME: &'static str = "unitycatalog.tables.v1.Table";
9169 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.Table";
9170 }
9171 impl<'v> ::buffa::DefaultViewInstance for TableView<'v> {
9172 fn default_view_instance<'a>() -> &'a Self
9173 where
9174 Self: 'a,
9175 {
9176 static VALUE: ::buffa::__private::OnceBox<TableView<'static>> = ::buffa::__private::OnceBox::new();
9177 VALUE
9178 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9179 <TableView<'static>>::default(),
9180 ))
9181 }
9182 }
9183 impl ::buffa::ViewReborrow for TableView<'static> {
9184 type Reborrowed<'b> = TableView<'b>;
9185 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9186 this
9187 }
9188 }
9189 #[derive(Clone, Debug)]
9195 pub struct TableOwnedView(::buffa::OwnedView<TableView<'static>>);
9196 impl TableOwnedView {
9197 pub fn decode(
9207 bytes: ::buffa::bytes::Bytes,
9208 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9209 ::core::result::Result::Ok(
9210 TableOwnedView(::buffa::OwnedView::decode(bytes)?),
9211 )
9212 }
9213 pub fn decode_with_options(
9221 bytes: ::buffa::bytes::Bytes,
9222 opts: &::buffa::DecodeOptions,
9223 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9224 ::core::result::Result::Ok(
9225 TableOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
9226 )
9227 }
9228 pub fn from_owned(
9235 msg: &super::super::Table,
9236 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9237 ::core::result::Result::Ok(
9238 TableOwnedView(::buffa::OwnedView::from_owned(msg)?),
9239 )
9240 }
9241 #[must_use]
9243 pub fn view(&self) -> &TableView<'_> {
9244 self.0.reborrow()
9245 }
9246 #[must_use]
9248 pub fn to_owned_message(&self) -> super::super::Table {
9249 self.0.to_owned_message()
9250 }
9251 #[must_use]
9253 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9254 self.0.bytes()
9255 }
9256 #[must_use]
9258 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9259 self.0.into_bytes()
9260 }
9261 #[must_use]
9265 pub fn name(&self) -> &'_ str {
9266 self.0.reborrow().name
9267 }
9268 #[must_use]
9272 pub fn catalog_name(&self) -> &'_ str {
9273 self.0.reborrow().catalog_name
9274 }
9275 #[must_use]
9279 pub fn schema_name(&self) -> &'_ str {
9280 self.0.reborrow().schema_name
9281 }
9282 #[must_use]
9284 pub fn table_type(&self) -> ::buffa::EnumValue<super::super::TableType> {
9285 self.0.reborrow().table_type
9286 }
9287 #[must_use]
9291 pub fn data_source_format(
9292 &self,
9293 ) -> ::buffa::EnumValue<super::super::DataSourceFormat> {
9294 self.0.reborrow().data_source_format
9295 }
9296 #[must_use]
9300 pub fn columns(
9301 &self,
9302 ) -> &::buffa::RepeatedView<
9303 '_,
9304 super::super::__buffa::view::ColumnView<'_>,
9305 > {
9306 &self.0.reborrow().columns
9307 }
9308 #[must_use]
9312 pub fn storage_location(&self) -> ::core::option::Option<&'_ str> {
9313 self.0.reborrow().storage_location
9314 }
9315 #[must_use]
9321 pub fn view_definition(&self) -> ::core::option::Option<&'_ str> {
9322 self.0.reborrow().view_definition
9323 }
9324 #[must_use]
9330 pub fn view_dependencies(
9331 &self,
9332 ) -> &::buffa::MessageFieldView<
9333 super::super::__buffa::view::DependencyListView<'_>,
9334 > {
9335 &self.0.reborrow().view_dependencies
9336 }
9337 #[must_use]
9343 pub fn owner(&self) -> ::core::option::Option<&'_ str> {
9344 self.0.reborrow().owner
9345 }
9346 #[must_use]
9350 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
9351 self.0.reborrow().comment
9352 }
9353 #[must_use]
9357 pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
9358 &self.0.reborrow().properties
9359 }
9360 #[must_use]
9364 pub fn storage_credential_name(&self) -> ::core::option::Option<&'_ str> {
9365 self.0.reborrow().storage_credential_name
9366 }
9367 #[must_use]
9376 pub fn full_name(&self) -> &'_ str {
9377 self.0.reborrow().full_name
9378 }
9379 #[must_use]
9383 pub fn created_at(&self) -> ::core::option::Option<i64> {
9384 self.0.reborrow().created_at
9385 }
9386 #[must_use]
9390 pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
9391 self.0.reborrow().created_by
9392 }
9393 #[must_use]
9397 pub fn updated_at(&self) -> ::core::option::Option<i64> {
9398 self.0.reborrow().updated_at
9399 }
9400 #[must_use]
9404 pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
9405 self.0.reborrow().updated_by
9406 }
9407 #[must_use]
9411 pub fn deleted_at(&self) -> ::core::option::Option<i64> {
9412 self.0.reborrow().deleted_at
9413 }
9414 #[must_use]
9418 pub fn table_id(&self) -> ::core::option::Option<&'_ str> {
9419 self.0.reborrow().table_id
9420 }
9421 }
9422 impl ::core::convert::From<::buffa::OwnedView<TableView<'static>>>
9423 for TableOwnedView {
9424 fn from(inner: ::buffa::OwnedView<TableView<'static>>) -> Self {
9425 TableOwnedView(inner)
9426 }
9427 }
9428 impl ::core::convert::From<TableOwnedView>
9429 for ::buffa::OwnedView<TableView<'static>> {
9430 fn from(wrapper: TableOwnedView) -> Self {
9431 wrapper.0
9432 }
9433 }
9434 impl ::core::convert::AsRef<::buffa::OwnedView<TableView<'static>>>
9435 for TableOwnedView {
9436 fn as_ref(&self) -> &::buffa::OwnedView<TableView<'static>> {
9437 &self.0
9438 }
9439 }
9440 impl ::buffa::HasMessageView for super::super::Table {
9441 type View<'a> = TableView<'a>;
9442 type ViewHandle = TableOwnedView;
9443 }
9444 impl ::serde::Serialize for TableOwnedView {
9445 fn serialize<__S: ::serde::Serializer>(
9446 &self,
9447 __s: __S,
9448 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9449 ::serde::Serialize::serialize(&self.0, __s)
9450 }
9451 }
9452 #[derive(Clone, Debug, Default)]
9453 pub struct ListTableSummariesRequestView<'a> {
9454 pub catalog_name: &'a str,
9458 pub schema_name_pattern: ::core::option::Option<&'a str>,
9462 pub table_name_pattern: ::core::option::Option<&'a str>,
9466 pub max_results: ::core::option::Option<i32>,
9470 pub page_token: ::core::option::Option<&'a str>,
9474 pub include_manifest_capabilities: ::core::option::Option<bool>,
9478 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9479 }
9480 impl<'a> ListTableSummariesRequestView<'a> {
9481 #[doc(hidden)]
9489 pub fn _decode_depth(
9490 buf: &'a [u8],
9491 depth: u32,
9492 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9493 let mut view = Self::default();
9494 view._merge_into_view(buf, depth)?;
9495 ::core::result::Result::Ok(view)
9496 }
9497 #[doc(hidden)]
9505 pub fn _merge_into_view(
9506 &mut self,
9507 buf: &'a [u8],
9508 depth: u32,
9509 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9510 let _ = depth;
9511 #[allow(unused_variables)]
9512 let view = self;
9513 let mut cur: &'a [u8] = buf;
9514 while !cur.is_empty() {
9515 let before_tag = cur;
9516 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9517 match tag.field_number() {
9518 1u32 => {
9519 if tag.wire_type()
9520 != ::buffa::encoding::WireType::LengthDelimited
9521 {
9522 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9523 field_number: 1u32,
9524 expected: 2u8,
9525 actual: tag.wire_type() as u8,
9526 });
9527 }
9528 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
9529 }
9530 2u32 => {
9531 if tag.wire_type()
9532 != ::buffa::encoding::WireType::LengthDelimited
9533 {
9534 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9535 field_number: 2u32,
9536 expected: 2u8,
9537 actual: tag.wire_type() as u8,
9538 });
9539 }
9540 view.schema_name_pattern = Some(
9541 ::buffa::types::borrow_str(&mut cur)?,
9542 );
9543 }
9544 3u32 => {
9545 if tag.wire_type()
9546 != ::buffa::encoding::WireType::LengthDelimited
9547 {
9548 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9549 field_number: 3u32,
9550 expected: 2u8,
9551 actual: tag.wire_type() as u8,
9552 });
9553 }
9554 view.table_name_pattern = Some(
9555 ::buffa::types::borrow_str(&mut cur)?,
9556 );
9557 }
9558 100u32 => {
9559 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9560 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9561 field_number: 100u32,
9562 expected: 0u8,
9563 actual: tag.wire_type() as u8,
9564 });
9565 }
9566 view.max_results = Some(
9567 ::buffa::types::decode_int32(&mut cur)?,
9568 );
9569 }
9570 101u32 => {
9571 if tag.wire_type()
9572 != ::buffa::encoding::WireType::LengthDelimited
9573 {
9574 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9575 field_number: 101u32,
9576 expected: 2u8,
9577 actual: tag.wire_type() as u8,
9578 });
9579 }
9580 view.page_token = Some(
9581 ::buffa::types::borrow_str(&mut cur)?,
9582 );
9583 }
9584 102u32 => {
9585 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9586 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9587 field_number: 102u32,
9588 expected: 0u8,
9589 actual: tag.wire_type() as u8,
9590 });
9591 }
9592 view.include_manifest_capabilities = Some(
9593 ::buffa::types::decode_bool(&mut cur)?,
9594 );
9595 }
9596 _ => {
9597 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9598 let span_len = before_tag.len() - cur.len();
9599 view.__buffa_unknown_fields
9600 .push_raw(&before_tag[..span_len]);
9601 }
9602 }
9603 }
9604 ::core::result::Result::Ok(())
9605 }
9606 }
9607 impl<'a> ::buffa::MessageView<'a> for ListTableSummariesRequestView<'a> {
9608 type Owned = super::super::ListTableSummariesRequest;
9609 fn decode_view(
9610 buf: &'a [u8],
9611 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9612 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9613 }
9614 fn decode_view_with_limit(
9615 buf: &'a [u8],
9616 depth: u32,
9617 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9618 Self::_decode_depth(buf, depth)
9619 }
9620 fn to_owned_message(&self) -> super::super::ListTableSummariesRequest {
9621 self.to_owned_from_source(None)
9622 }
9623 #[allow(clippy::useless_conversion, clippy::needless_update)]
9624 fn to_owned_from_source(
9625 &self,
9626 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9627 ) -> super::super::ListTableSummariesRequest {
9628 #[allow(unused_imports)]
9629 use ::buffa::alloc::string::ToString as _;
9630 let _ = __buffa_src;
9631 super::super::ListTableSummariesRequest {
9632 catalog_name: self.catalog_name.to_string(),
9633 schema_name_pattern: self.schema_name_pattern.map(|s| s.to_string()),
9634 table_name_pattern: self.table_name_pattern.map(|s| s.to_string()),
9635 max_results: self.max_results,
9636 page_token: self.page_token.map(|s| s.to_string()),
9637 include_manifest_capabilities: self.include_manifest_capabilities,
9638 __buffa_unknown_fields: self
9639 .__buffa_unknown_fields
9640 .to_owned()
9641 .unwrap_or_default()
9642 .into(),
9643 ..::core::default::Default::default()
9644 }
9645 }
9646 }
9647 impl<'a> ::buffa::ViewEncode<'a> for ListTableSummariesRequestView<'a> {
9648 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9649 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9650 #[allow(unused_imports)]
9651 use ::buffa::Enumeration as _;
9652 let mut size = 0u32;
9653 if !self.catalog_name.is_empty() {
9654 size
9655 += 1u32
9656 + ::buffa::types::string_encoded_len(&self.catalog_name)
9657 as u32;
9658 }
9659 if let Some(ref v) = self.schema_name_pattern {
9660 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9661 }
9662 if let Some(ref v) = self.table_name_pattern {
9663 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9664 }
9665 if let Some(v) = self.max_results {
9666 size += 2u32 + ::buffa::types::int32_encoded_len(v) as u32;
9667 }
9668 if let Some(ref v) = self.page_token {
9669 size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
9670 }
9671 if self.include_manifest_capabilities.is_some() {
9672 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
9673 }
9674 size += self.__buffa_unknown_fields.encoded_len() as u32;
9675 size
9676 }
9677 #[allow(clippy::needless_borrow)]
9678 fn write_to(
9679 &self,
9680 _cache: &mut ::buffa::SizeCache,
9681 buf: &mut impl ::buffa::bytes::BufMut,
9682 ) {
9683 #[allow(unused_imports)]
9684 use ::buffa::Enumeration as _;
9685 if !self.catalog_name.is_empty() {
9686 ::buffa::encoding::Tag::new(
9687 1u32,
9688 ::buffa::encoding::WireType::LengthDelimited,
9689 )
9690 .encode(buf);
9691 ::buffa::types::encode_string(&self.catalog_name, buf);
9692 }
9693 if let Some(ref v) = self.schema_name_pattern {
9694 ::buffa::encoding::Tag::new(
9695 2u32,
9696 ::buffa::encoding::WireType::LengthDelimited,
9697 )
9698 .encode(buf);
9699 ::buffa::types::encode_string(v, buf);
9700 }
9701 if let Some(ref v) = self.table_name_pattern {
9702 ::buffa::encoding::Tag::new(
9703 3u32,
9704 ::buffa::encoding::WireType::LengthDelimited,
9705 )
9706 .encode(buf);
9707 ::buffa::types::encode_string(v, buf);
9708 }
9709 if let Some(v) = self.max_results {
9710 ::buffa::encoding::Tag::new(
9711 100u32,
9712 ::buffa::encoding::WireType::Varint,
9713 )
9714 .encode(buf);
9715 ::buffa::types::encode_int32(v, buf);
9716 }
9717 if let Some(ref v) = self.page_token {
9718 ::buffa::encoding::Tag::new(
9719 101u32,
9720 ::buffa::encoding::WireType::LengthDelimited,
9721 )
9722 .encode(buf);
9723 ::buffa::types::encode_string(v, buf);
9724 }
9725 if let Some(v) = self.include_manifest_capabilities {
9726 ::buffa::encoding::Tag::new(
9727 102u32,
9728 ::buffa::encoding::WireType::Varint,
9729 )
9730 .encode(buf);
9731 ::buffa::types::encode_bool(v, buf);
9732 }
9733 self.__buffa_unknown_fields.write_to(buf);
9734 }
9735 }
9736 impl<'__a> ::serde::Serialize for ListTableSummariesRequestView<'__a> {
9748 fn serialize<__S: ::serde::Serializer>(
9749 &self,
9750 __s: __S,
9751 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9752 use ::serde::ser::SerializeMap as _;
9753 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9754 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
9755 __map.serialize_entry("catalog_name", self.catalog_name)?;
9756 }
9757 if let ::core::option::Option::Some(__v) = self.schema_name_pattern {
9758 __map.serialize_entry("schema_name_pattern", __v)?;
9759 }
9760 if let ::core::option::Option::Some(__v) = self.table_name_pattern {
9761 __map.serialize_entry("table_name_pattern", __v)?;
9762 }
9763 if let ::core::option::Option::Some(__v) = self.max_results {
9764 struct _W(i32);
9765 impl ::serde::Serialize for _W {
9766 fn serialize<__S: ::serde::Serializer>(
9767 &self,
9768 __s: __S,
9769 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9770 ::buffa::json_helpers::int32::serialize(&self.0, __s)
9771 }
9772 }
9773 __map.serialize_entry("max_results", &_W(__v))?;
9774 }
9775 if let ::core::option::Option::Some(__v) = self.page_token {
9776 __map.serialize_entry("page_token", __v)?;
9777 }
9778 if let ::core::option::Option::Some(__v) = self
9779 .include_manifest_capabilities
9780 {
9781 __map.serialize_entry("include_manifest_capabilities", &__v)?;
9782 }
9783 __map.end()
9784 }
9785 }
9786 impl<'a> ::buffa::MessageName for ListTableSummariesRequestView<'a> {
9787 const PACKAGE: &'static str = "unitycatalog.tables.v1";
9788 const NAME: &'static str = "ListTableSummariesRequest";
9789 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTableSummariesRequest";
9790 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesRequest";
9791 }
9792 impl<'v> ::buffa::DefaultViewInstance for ListTableSummariesRequestView<'v> {
9793 fn default_view_instance<'a>() -> &'a Self
9794 where
9795 Self: 'a,
9796 {
9797 static VALUE: ::buffa::__private::OnceBox<
9798 ListTableSummariesRequestView<'static>,
9799 > = ::buffa::__private::OnceBox::new();
9800 VALUE
9801 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9802 <ListTableSummariesRequestView<'static>>::default(),
9803 ))
9804 }
9805 }
9806 impl ::buffa::ViewReborrow for ListTableSummariesRequestView<'static> {
9807 type Reborrowed<'b> = ListTableSummariesRequestView<'b>;
9808 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9809 this
9810 }
9811 }
9812 #[derive(Clone, Debug)]
9818 pub struct ListTableSummariesRequestOwnedView(
9819 ::buffa::OwnedView<ListTableSummariesRequestView<'static>>,
9820 );
9821 impl ListTableSummariesRequestOwnedView {
9822 pub fn decode(
9832 bytes: ::buffa::bytes::Bytes,
9833 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9834 ::core::result::Result::Ok(
9835 ListTableSummariesRequestOwnedView(
9836 ::buffa::OwnedView::decode(bytes)?,
9837 ),
9838 )
9839 }
9840 pub fn decode_with_options(
9848 bytes: ::buffa::bytes::Bytes,
9849 opts: &::buffa::DecodeOptions,
9850 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9851 ::core::result::Result::Ok(
9852 ListTableSummariesRequestOwnedView(
9853 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9854 ),
9855 )
9856 }
9857 pub fn from_owned(
9864 msg: &super::super::ListTableSummariesRequest,
9865 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9866 ::core::result::Result::Ok(
9867 ListTableSummariesRequestOwnedView(
9868 ::buffa::OwnedView::from_owned(msg)?,
9869 ),
9870 )
9871 }
9872 #[must_use]
9874 pub fn view(&self) -> &ListTableSummariesRequestView<'_> {
9875 self.0.reborrow()
9876 }
9877 #[must_use]
9879 pub fn to_owned_message(&self) -> super::super::ListTableSummariesRequest {
9880 self.0.to_owned_message()
9881 }
9882 #[must_use]
9884 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9885 self.0.bytes()
9886 }
9887 #[must_use]
9889 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9890 self.0.into_bytes()
9891 }
9892 #[must_use]
9896 pub fn catalog_name(&self) -> &'_ str {
9897 self.0.reborrow().catalog_name
9898 }
9899 #[must_use]
9903 pub fn schema_name_pattern(&self) -> ::core::option::Option<&'_ str> {
9904 self.0.reborrow().schema_name_pattern
9905 }
9906 #[must_use]
9910 pub fn table_name_pattern(&self) -> ::core::option::Option<&'_ str> {
9911 self.0.reborrow().table_name_pattern
9912 }
9913 #[must_use]
9917 pub fn max_results(&self) -> ::core::option::Option<i32> {
9918 self.0.reborrow().max_results
9919 }
9920 #[must_use]
9924 pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
9925 self.0.reborrow().page_token
9926 }
9927 #[must_use]
9931 pub fn include_manifest_capabilities(&self) -> ::core::option::Option<bool> {
9932 self.0.reborrow().include_manifest_capabilities
9933 }
9934 }
9935 impl ::core::convert::From<
9936 ::buffa::OwnedView<ListTableSummariesRequestView<'static>>,
9937 > for ListTableSummariesRequestOwnedView {
9938 fn from(
9939 inner: ::buffa::OwnedView<ListTableSummariesRequestView<'static>>,
9940 ) -> Self {
9941 ListTableSummariesRequestOwnedView(inner)
9942 }
9943 }
9944 impl ::core::convert::From<ListTableSummariesRequestOwnedView>
9945 for ::buffa::OwnedView<ListTableSummariesRequestView<'static>> {
9946 fn from(wrapper: ListTableSummariesRequestOwnedView) -> Self {
9947 wrapper.0
9948 }
9949 }
9950 impl ::core::convert::AsRef<
9951 ::buffa::OwnedView<ListTableSummariesRequestView<'static>>,
9952 > for ListTableSummariesRequestOwnedView {
9953 fn as_ref(
9954 &self,
9955 ) -> &::buffa::OwnedView<ListTableSummariesRequestView<'static>> {
9956 &self.0
9957 }
9958 }
9959 impl ::buffa::HasMessageView for super::super::ListTableSummariesRequest {
9960 type View<'a> = ListTableSummariesRequestView<'a>;
9961 type ViewHandle = ListTableSummariesRequestOwnedView;
9962 }
9963 impl ::serde::Serialize for ListTableSummariesRequestOwnedView {
9964 fn serialize<__S: ::serde::Serializer>(
9965 &self,
9966 __s: __S,
9967 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9968 ::serde::Serialize::serialize(&self.0, __s)
9969 }
9970 }
9971 #[derive(Clone, Debug, Default)]
9972 pub struct ListTableSummariesResponseView<'a> {
9973 pub tables: ::buffa::RepeatedView<
9977 'a,
9978 super::super::__buffa::view::TableSummaryView<'a>,
9979 >,
9980 pub next_page_token: ::core::option::Option<&'a str>,
9984 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9985 }
9986 impl<'a> ListTableSummariesResponseView<'a> {
9987 #[doc(hidden)]
9995 pub fn _decode_depth(
9996 buf: &'a [u8],
9997 depth: u32,
9998 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9999 let mut view = Self::default();
10000 view._merge_into_view(buf, depth)?;
10001 ::core::result::Result::Ok(view)
10002 }
10003 #[doc(hidden)]
10011 pub fn _merge_into_view(
10012 &mut self,
10013 buf: &'a [u8],
10014 depth: u32,
10015 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10016 let _ = depth;
10017 #[allow(unused_variables)]
10018 let view = self;
10019 let mut cur: &'a [u8] = buf;
10020 while !cur.is_empty() {
10021 let before_tag = cur;
10022 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10023 match tag.field_number() {
10024 2u32 => {
10025 if tag.wire_type()
10026 != ::buffa::encoding::WireType::LengthDelimited
10027 {
10028 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10029 field_number: 2u32,
10030 expected: 2u8,
10031 actual: tag.wire_type() as u8,
10032 });
10033 }
10034 view.next_page_token = Some(
10035 ::buffa::types::borrow_str(&mut cur)?,
10036 );
10037 }
10038 1u32 => {
10039 if tag.wire_type()
10040 != ::buffa::encoding::WireType::LengthDelimited
10041 {
10042 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10043 field_number: 1u32,
10044 expected: 2u8,
10045 actual: tag.wire_type() as u8,
10046 });
10047 }
10048 if depth == 0 {
10049 return Err(::buffa::DecodeError::RecursionLimitExceeded);
10050 }
10051 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10052 view.tables
10053 .push(
10054 super::super::__buffa::view::TableSummaryView::_decode_depth(
10055 sub,
10056 depth - 1,
10057 )?,
10058 );
10059 }
10060 _ => {
10061 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10062 let span_len = before_tag.len() - cur.len();
10063 view.__buffa_unknown_fields
10064 .push_raw(&before_tag[..span_len]);
10065 }
10066 }
10067 }
10068 ::core::result::Result::Ok(())
10069 }
10070 }
10071 impl<'a> ::buffa::MessageView<'a> for ListTableSummariesResponseView<'a> {
10072 type Owned = super::super::ListTableSummariesResponse;
10073 fn decode_view(
10074 buf: &'a [u8],
10075 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10076 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10077 }
10078 fn decode_view_with_limit(
10079 buf: &'a [u8],
10080 depth: u32,
10081 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10082 Self::_decode_depth(buf, depth)
10083 }
10084 fn to_owned_message(&self) -> super::super::ListTableSummariesResponse {
10085 self.to_owned_from_source(None)
10086 }
10087 #[allow(clippy::useless_conversion, clippy::needless_update)]
10088 fn to_owned_from_source(
10089 &self,
10090 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10091 ) -> super::super::ListTableSummariesResponse {
10092 #[allow(unused_imports)]
10093 use ::buffa::alloc::string::ToString as _;
10094 let _ = __buffa_src;
10095 super::super::ListTableSummariesResponse {
10096 tables: self
10097 .tables
10098 .iter()
10099 .map(|v| v.to_owned_from_source(__buffa_src))
10100 .collect(),
10101 next_page_token: self.next_page_token.map(|s| s.to_string()),
10102 __buffa_unknown_fields: self
10103 .__buffa_unknown_fields
10104 .to_owned()
10105 .unwrap_or_default()
10106 .into(),
10107 ..::core::default::Default::default()
10108 }
10109 }
10110 }
10111 impl<'a> ::buffa::ViewEncode<'a> for ListTableSummariesResponseView<'a> {
10112 #[allow(clippy::needless_borrow, clippy::let_and_return)]
10113 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10114 #[allow(unused_imports)]
10115 use ::buffa::Enumeration as _;
10116 let mut size = 0u32;
10117 for v in &self.tables {
10118 let __slot = __cache.reserve();
10119 let inner_size = v.compute_size(__cache);
10120 __cache.set(__slot, inner_size);
10121 size
10122 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10123 + inner_size;
10124 }
10125 if let Some(ref v) = self.next_page_token {
10126 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
10127 }
10128 size += self.__buffa_unknown_fields.encoded_len() as u32;
10129 size
10130 }
10131 #[allow(clippy::needless_borrow)]
10132 fn write_to(
10133 &self,
10134 __cache: &mut ::buffa::SizeCache,
10135 buf: &mut impl ::buffa::bytes::BufMut,
10136 ) {
10137 #[allow(unused_imports)]
10138 use ::buffa::Enumeration as _;
10139 for v in &self.tables {
10140 ::buffa::encoding::Tag::new(
10141 1u32,
10142 ::buffa::encoding::WireType::LengthDelimited,
10143 )
10144 .encode(buf);
10145 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10146 v.write_to(__cache, buf);
10147 }
10148 if let Some(ref v) = self.next_page_token {
10149 ::buffa::encoding::Tag::new(
10150 2u32,
10151 ::buffa::encoding::WireType::LengthDelimited,
10152 )
10153 .encode(buf);
10154 ::buffa::types::encode_string(v, buf);
10155 }
10156 self.__buffa_unknown_fields.write_to(buf);
10157 }
10158 }
10159 impl<'__a> ::serde::Serialize for ListTableSummariesResponseView<'__a> {
10171 fn serialize<__S: ::serde::Serializer>(
10172 &self,
10173 __s: __S,
10174 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10175 use ::serde::ser::SerializeMap as _;
10176 let mut __map = __s.serialize_map(::core::option::Option::None)?;
10177 if !self.tables.is_empty() {
10178 __map.serialize_entry("tables", &*self.tables)?;
10179 }
10180 if let ::core::option::Option::Some(__v) = self.next_page_token {
10181 __map.serialize_entry("next_page_token", __v)?;
10182 }
10183 __map.end()
10184 }
10185 }
10186 impl<'a> ::buffa::MessageName for ListTableSummariesResponseView<'a> {
10187 const PACKAGE: &'static str = "unitycatalog.tables.v1";
10188 const NAME: &'static str = "ListTableSummariesResponse";
10189 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTableSummariesResponse";
10190 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTableSummariesResponse";
10191 }
10192 impl<'v> ::buffa::DefaultViewInstance for ListTableSummariesResponseView<'v> {
10193 fn default_view_instance<'a>() -> &'a Self
10194 where
10195 Self: 'a,
10196 {
10197 static VALUE: ::buffa::__private::OnceBox<
10198 ListTableSummariesResponseView<'static>,
10199 > = ::buffa::__private::OnceBox::new();
10200 VALUE
10201 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10202 <ListTableSummariesResponseView<'static>>::default(),
10203 ))
10204 }
10205 }
10206 impl ::buffa::ViewReborrow for ListTableSummariesResponseView<'static> {
10207 type Reborrowed<'b> = ListTableSummariesResponseView<'b>;
10208 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10209 this
10210 }
10211 }
10212 #[derive(Clone, Debug)]
10218 pub struct ListTableSummariesResponseOwnedView(
10219 ::buffa::OwnedView<ListTableSummariesResponseView<'static>>,
10220 );
10221 impl ListTableSummariesResponseOwnedView {
10222 pub fn decode(
10232 bytes: ::buffa::bytes::Bytes,
10233 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10234 ::core::result::Result::Ok(
10235 ListTableSummariesResponseOwnedView(
10236 ::buffa::OwnedView::decode(bytes)?,
10237 ),
10238 )
10239 }
10240 pub fn decode_with_options(
10248 bytes: ::buffa::bytes::Bytes,
10249 opts: &::buffa::DecodeOptions,
10250 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10251 ::core::result::Result::Ok(
10252 ListTableSummariesResponseOwnedView(
10253 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10254 ),
10255 )
10256 }
10257 pub fn from_owned(
10264 msg: &super::super::ListTableSummariesResponse,
10265 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10266 ::core::result::Result::Ok(
10267 ListTableSummariesResponseOwnedView(
10268 ::buffa::OwnedView::from_owned(msg)?,
10269 ),
10270 )
10271 }
10272 #[must_use]
10274 pub fn view(&self) -> &ListTableSummariesResponseView<'_> {
10275 self.0.reborrow()
10276 }
10277 #[must_use]
10279 pub fn to_owned_message(&self) -> super::super::ListTableSummariesResponse {
10280 self.0.to_owned_message()
10281 }
10282 #[must_use]
10284 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10285 self.0.bytes()
10286 }
10287 #[must_use]
10289 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10290 self.0.into_bytes()
10291 }
10292 #[must_use]
10296 pub fn tables(
10297 &self,
10298 ) -> &::buffa::RepeatedView<
10299 '_,
10300 super::super::__buffa::view::TableSummaryView<'_>,
10301 > {
10302 &self.0.reborrow().tables
10303 }
10304 #[must_use]
10308 pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
10309 self.0.reborrow().next_page_token
10310 }
10311 }
10312 impl ::core::convert::From<
10313 ::buffa::OwnedView<ListTableSummariesResponseView<'static>>,
10314 > for ListTableSummariesResponseOwnedView {
10315 fn from(
10316 inner: ::buffa::OwnedView<ListTableSummariesResponseView<'static>>,
10317 ) -> Self {
10318 ListTableSummariesResponseOwnedView(inner)
10319 }
10320 }
10321 impl ::core::convert::From<ListTableSummariesResponseOwnedView>
10322 for ::buffa::OwnedView<ListTableSummariesResponseView<'static>> {
10323 fn from(wrapper: ListTableSummariesResponseOwnedView) -> Self {
10324 wrapper.0
10325 }
10326 }
10327 impl ::core::convert::AsRef<
10328 ::buffa::OwnedView<ListTableSummariesResponseView<'static>>,
10329 > for ListTableSummariesResponseOwnedView {
10330 fn as_ref(
10331 &self,
10332 ) -> &::buffa::OwnedView<ListTableSummariesResponseView<'static>> {
10333 &self.0
10334 }
10335 }
10336 impl ::buffa::HasMessageView for super::super::ListTableSummariesResponse {
10337 type View<'a> = ListTableSummariesResponseView<'a>;
10338 type ViewHandle = ListTableSummariesResponseOwnedView;
10339 }
10340 impl ::serde::Serialize for ListTableSummariesResponseOwnedView {
10341 fn serialize<__S: ::serde::Serializer>(
10342 &self,
10343 __s: __S,
10344 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10345 ::serde::Serialize::serialize(&self.0, __s)
10346 }
10347 }
10348 #[derive(Clone, Debug, Default)]
10349 pub struct ListTablesRequestView<'a> {
10350 pub catalog_name: &'a str,
10354 pub schema_name: &'a str,
10358 pub max_results: ::core::option::Option<i32>,
10362 pub page_token: ::core::option::Option<&'a str>,
10366 pub include_delta_metadata: ::core::option::Option<bool>,
10370 pub omit_columns: ::core::option::Option<bool>,
10374 pub omit_properties: ::core::option::Option<bool>,
10378 pub omit_username: ::core::option::Option<bool>,
10382 pub include_browse: ::core::option::Option<bool>,
10386 pub include_manifest_capabilities: ::core::option::Option<bool>,
10390 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10391 }
10392 impl<'a> ListTablesRequestView<'a> {
10393 #[doc(hidden)]
10401 pub fn _decode_depth(
10402 buf: &'a [u8],
10403 depth: u32,
10404 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10405 let mut view = Self::default();
10406 view._merge_into_view(buf, depth)?;
10407 ::core::result::Result::Ok(view)
10408 }
10409 #[doc(hidden)]
10417 pub fn _merge_into_view(
10418 &mut self,
10419 buf: &'a [u8],
10420 depth: u32,
10421 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10422 let _ = depth;
10423 #[allow(unused_variables)]
10424 let view = self;
10425 let mut cur: &'a [u8] = buf;
10426 while !cur.is_empty() {
10427 let before_tag = cur;
10428 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10429 match tag.field_number() {
10430 1u32 => {
10431 if tag.wire_type()
10432 != ::buffa::encoding::WireType::LengthDelimited
10433 {
10434 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10435 field_number: 1u32,
10436 expected: 2u8,
10437 actual: tag.wire_type() as u8,
10438 });
10439 }
10440 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
10441 }
10442 2u32 => {
10443 if tag.wire_type()
10444 != ::buffa::encoding::WireType::LengthDelimited
10445 {
10446 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10447 field_number: 2u32,
10448 expected: 2u8,
10449 actual: tag.wire_type() as u8,
10450 });
10451 }
10452 view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
10453 }
10454 3u32 => {
10455 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10456 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10457 field_number: 3u32,
10458 expected: 0u8,
10459 actual: tag.wire_type() as u8,
10460 });
10461 }
10462 view.max_results = Some(
10463 ::buffa::types::decode_int32(&mut cur)?,
10464 );
10465 }
10466 4u32 => {
10467 if tag.wire_type()
10468 != ::buffa::encoding::WireType::LengthDelimited
10469 {
10470 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10471 field_number: 4u32,
10472 expected: 2u8,
10473 actual: tag.wire_type() as u8,
10474 });
10475 }
10476 view.page_token = Some(
10477 ::buffa::types::borrow_str(&mut cur)?,
10478 );
10479 }
10480 5u32 => {
10481 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10482 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10483 field_number: 5u32,
10484 expected: 0u8,
10485 actual: tag.wire_type() as u8,
10486 });
10487 }
10488 view.include_delta_metadata = Some(
10489 ::buffa::types::decode_bool(&mut cur)?,
10490 );
10491 }
10492 6u32 => {
10493 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10494 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10495 field_number: 6u32,
10496 expected: 0u8,
10497 actual: tag.wire_type() as u8,
10498 });
10499 }
10500 view.omit_columns = Some(
10501 ::buffa::types::decode_bool(&mut cur)?,
10502 );
10503 }
10504 7u32 => {
10505 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10506 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10507 field_number: 7u32,
10508 expected: 0u8,
10509 actual: tag.wire_type() as u8,
10510 });
10511 }
10512 view.omit_properties = Some(
10513 ::buffa::types::decode_bool(&mut cur)?,
10514 );
10515 }
10516 8u32 => {
10517 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10518 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10519 field_number: 8u32,
10520 expected: 0u8,
10521 actual: tag.wire_type() as u8,
10522 });
10523 }
10524 view.omit_username = Some(
10525 ::buffa::types::decode_bool(&mut cur)?,
10526 );
10527 }
10528 9u32 => {
10529 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10530 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10531 field_number: 9u32,
10532 expected: 0u8,
10533 actual: tag.wire_type() as u8,
10534 });
10535 }
10536 view.include_browse = Some(
10537 ::buffa::types::decode_bool(&mut cur)?,
10538 );
10539 }
10540 10u32 => {
10541 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10542 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10543 field_number: 10u32,
10544 expected: 0u8,
10545 actual: tag.wire_type() as u8,
10546 });
10547 }
10548 view.include_manifest_capabilities = Some(
10549 ::buffa::types::decode_bool(&mut cur)?,
10550 );
10551 }
10552 _ => {
10553 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10554 let span_len = before_tag.len() - cur.len();
10555 view.__buffa_unknown_fields
10556 .push_raw(&before_tag[..span_len]);
10557 }
10558 }
10559 }
10560 ::core::result::Result::Ok(())
10561 }
10562 }
10563 impl<'a> ::buffa::MessageView<'a> for ListTablesRequestView<'a> {
10564 type Owned = super::super::ListTablesRequest;
10565 fn decode_view(
10566 buf: &'a [u8],
10567 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10568 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10569 }
10570 fn decode_view_with_limit(
10571 buf: &'a [u8],
10572 depth: u32,
10573 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10574 Self::_decode_depth(buf, depth)
10575 }
10576 fn to_owned_message(&self) -> super::super::ListTablesRequest {
10577 self.to_owned_from_source(None)
10578 }
10579 #[allow(clippy::useless_conversion, clippy::needless_update)]
10580 fn to_owned_from_source(
10581 &self,
10582 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10583 ) -> super::super::ListTablesRequest {
10584 #[allow(unused_imports)]
10585 use ::buffa::alloc::string::ToString as _;
10586 let _ = __buffa_src;
10587 super::super::ListTablesRequest {
10588 catalog_name: self.catalog_name.to_string(),
10589 schema_name: self.schema_name.to_string(),
10590 max_results: self.max_results,
10591 page_token: self.page_token.map(|s| s.to_string()),
10592 include_delta_metadata: self.include_delta_metadata,
10593 omit_columns: self.omit_columns,
10594 omit_properties: self.omit_properties,
10595 omit_username: self.omit_username,
10596 include_browse: self.include_browse,
10597 include_manifest_capabilities: self.include_manifest_capabilities,
10598 __buffa_unknown_fields: self
10599 .__buffa_unknown_fields
10600 .to_owned()
10601 .unwrap_or_default()
10602 .into(),
10603 ..::core::default::Default::default()
10604 }
10605 }
10606 }
10607 impl<'a> ::buffa::ViewEncode<'a> for ListTablesRequestView<'a> {
10608 #[allow(clippy::needless_borrow, clippy::let_and_return)]
10609 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10610 #[allow(unused_imports)]
10611 use ::buffa::Enumeration as _;
10612 let mut size = 0u32;
10613 if !self.catalog_name.is_empty() {
10614 size
10615 += 1u32
10616 + ::buffa::types::string_encoded_len(&self.catalog_name)
10617 as u32;
10618 }
10619 if !self.schema_name.is_empty() {
10620 size
10621 += 1u32
10622 + ::buffa::types::string_encoded_len(&self.schema_name)
10623 as u32;
10624 }
10625 if let Some(v) = self.max_results {
10626 size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
10627 }
10628 if let Some(ref v) = self.page_token {
10629 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
10630 }
10631 if self.include_delta_metadata.is_some() {
10632 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10633 }
10634 if self.omit_columns.is_some() {
10635 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10636 }
10637 if self.omit_properties.is_some() {
10638 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10639 }
10640 if self.omit_username.is_some() {
10641 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10642 }
10643 if self.include_browse.is_some() {
10644 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10645 }
10646 if self.include_manifest_capabilities.is_some() {
10647 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10648 }
10649 size += self.__buffa_unknown_fields.encoded_len() as u32;
10650 size
10651 }
10652 #[allow(clippy::needless_borrow)]
10653 fn write_to(
10654 &self,
10655 _cache: &mut ::buffa::SizeCache,
10656 buf: &mut impl ::buffa::bytes::BufMut,
10657 ) {
10658 #[allow(unused_imports)]
10659 use ::buffa::Enumeration as _;
10660 if !self.catalog_name.is_empty() {
10661 ::buffa::encoding::Tag::new(
10662 1u32,
10663 ::buffa::encoding::WireType::LengthDelimited,
10664 )
10665 .encode(buf);
10666 ::buffa::types::encode_string(&self.catalog_name, buf);
10667 }
10668 if !self.schema_name.is_empty() {
10669 ::buffa::encoding::Tag::new(
10670 2u32,
10671 ::buffa::encoding::WireType::LengthDelimited,
10672 )
10673 .encode(buf);
10674 ::buffa::types::encode_string(&self.schema_name, buf);
10675 }
10676 if let Some(v) = self.max_results {
10677 ::buffa::encoding::Tag::new(
10678 3u32,
10679 ::buffa::encoding::WireType::Varint,
10680 )
10681 .encode(buf);
10682 ::buffa::types::encode_int32(v, buf);
10683 }
10684 if let Some(ref v) = self.page_token {
10685 ::buffa::encoding::Tag::new(
10686 4u32,
10687 ::buffa::encoding::WireType::LengthDelimited,
10688 )
10689 .encode(buf);
10690 ::buffa::types::encode_string(v, buf);
10691 }
10692 if let Some(v) = self.include_delta_metadata {
10693 ::buffa::encoding::Tag::new(
10694 5u32,
10695 ::buffa::encoding::WireType::Varint,
10696 )
10697 .encode(buf);
10698 ::buffa::types::encode_bool(v, buf);
10699 }
10700 if let Some(v) = self.omit_columns {
10701 ::buffa::encoding::Tag::new(
10702 6u32,
10703 ::buffa::encoding::WireType::Varint,
10704 )
10705 .encode(buf);
10706 ::buffa::types::encode_bool(v, buf);
10707 }
10708 if let Some(v) = self.omit_properties {
10709 ::buffa::encoding::Tag::new(
10710 7u32,
10711 ::buffa::encoding::WireType::Varint,
10712 )
10713 .encode(buf);
10714 ::buffa::types::encode_bool(v, buf);
10715 }
10716 if let Some(v) = self.omit_username {
10717 ::buffa::encoding::Tag::new(
10718 8u32,
10719 ::buffa::encoding::WireType::Varint,
10720 )
10721 .encode(buf);
10722 ::buffa::types::encode_bool(v, buf);
10723 }
10724 if let Some(v) = self.include_browse {
10725 ::buffa::encoding::Tag::new(
10726 9u32,
10727 ::buffa::encoding::WireType::Varint,
10728 )
10729 .encode(buf);
10730 ::buffa::types::encode_bool(v, buf);
10731 }
10732 if let Some(v) = self.include_manifest_capabilities {
10733 ::buffa::encoding::Tag::new(
10734 10u32,
10735 ::buffa::encoding::WireType::Varint,
10736 )
10737 .encode(buf);
10738 ::buffa::types::encode_bool(v, buf);
10739 }
10740 self.__buffa_unknown_fields.write_to(buf);
10741 }
10742 }
10743 impl<'__a> ::serde::Serialize for ListTablesRequestView<'__a> {
10755 fn serialize<__S: ::serde::Serializer>(
10756 &self,
10757 __s: __S,
10758 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10759 use ::serde::ser::SerializeMap as _;
10760 let mut __map = __s.serialize_map(::core::option::Option::None)?;
10761 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
10762 __map.serialize_entry("catalog_name", self.catalog_name)?;
10763 }
10764 if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
10765 __map.serialize_entry("schema_name", self.schema_name)?;
10766 }
10767 if let ::core::option::Option::Some(__v) = self.max_results {
10768 struct _W(i32);
10769 impl ::serde::Serialize for _W {
10770 fn serialize<__S: ::serde::Serializer>(
10771 &self,
10772 __s: __S,
10773 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10774 ::buffa::json_helpers::int32::serialize(&self.0, __s)
10775 }
10776 }
10777 __map.serialize_entry("max_results", &_W(__v))?;
10778 }
10779 if let ::core::option::Option::Some(__v) = self.page_token {
10780 __map.serialize_entry("page_token", __v)?;
10781 }
10782 if let ::core::option::Option::Some(__v) = self.include_delta_metadata {
10783 __map.serialize_entry("include_delta_metadata", &__v)?;
10784 }
10785 if let ::core::option::Option::Some(__v) = self.omit_columns {
10786 __map.serialize_entry("omit_columns", &__v)?;
10787 }
10788 if let ::core::option::Option::Some(__v) = self.omit_properties {
10789 __map.serialize_entry("omit_properties", &__v)?;
10790 }
10791 if let ::core::option::Option::Some(__v) = self.omit_username {
10792 __map.serialize_entry("omit_username", &__v)?;
10793 }
10794 if let ::core::option::Option::Some(__v) = self.include_browse {
10795 __map.serialize_entry("include_browse", &__v)?;
10796 }
10797 if let ::core::option::Option::Some(__v) = self
10798 .include_manifest_capabilities
10799 {
10800 __map.serialize_entry("include_manifest_capabilities", &__v)?;
10801 }
10802 __map.end()
10803 }
10804 }
10805 impl<'a> ::buffa::MessageName for ListTablesRequestView<'a> {
10806 const PACKAGE: &'static str = "unitycatalog.tables.v1";
10807 const NAME: &'static str = "ListTablesRequest";
10808 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTablesRequest";
10809 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTablesRequest";
10810 }
10811 impl<'v> ::buffa::DefaultViewInstance for ListTablesRequestView<'v> {
10812 fn default_view_instance<'a>() -> &'a Self
10813 where
10814 Self: 'a,
10815 {
10816 static VALUE: ::buffa::__private::OnceBox<
10817 ListTablesRequestView<'static>,
10818 > = ::buffa::__private::OnceBox::new();
10819 VALUE
10820 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10821 <ListTablesRequestView<'static>>::default(),
10822 ))
10823 }
10824 }
10825 impl ::buffa::ViewReborrow for ListTablesRequestView<'static> {
10826 type Reborrowed<'b> = ListTablesRequestView<'b>;
10827 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10828 this
10829 }
10830 }
10831 #[derive(Clone, Debug)]
10837 pub struct ListTablesRequestOwnedView(
10838 ::buffa::OwnedView<ListTablesRequestView<'static>>,
10839 );
10840 impl ListTablesRequestOwnedView {
10841 pub fn decode(
10851 bytes: ::buffa::bytes::Bytes,
10852 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10853 ::core::result::Result::Ok(
10854 ListTablesRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10855 )
10856 }
10857 pub fn decode_with_options(
10865 bytes: ::buffa::bytes::Bytes,
10866 opts: &::buffa::DecodeOptions,
10867 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10868 ::core::result::Result::Ok(
10869 ListTablesRequestOwnedView(
10870 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10871 ),
10872 )
10873 }
10874 pub fn from_owned(
10881 msg: &super::super::ListTablesRequest,
10882 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10883 ::core::result::Result::Ok(
10884 ListTablesRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10885 )
10886 }
10887 #[must_use]
10889 pub fn view(&self) -> &ListTablesRequestView<'_> {
10890 self.0.reborrow()
10891 }
10892 #[must_use]
10894 pub fn to_owned_message(&self) -> super::super::ListTablesRequest {
10895 self.0.to_owned_message()
10896 }
10897 #[must_use]
10899 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10900 self.0.bytes()
10901 }
10902 #[must_use]
10904 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10905 self.0.into_bytes()
10906 }
10907 #[must_use]
10911 pub fn catalog_name(&self) -> &'_ str {
10912 self.0.reborrow().catalog_name
10913 }
10914 #[must_use]
10918 pub fn schema_name(&self) -> &'_ str {
10919 self.0.reborrow().schema_name
10920 }
10921 #[must_use]
10925 pub fn max_results(&self) -> ::core::option::Option<i32> {
10926 self.0.reborrow().max_results
10927 }
10928 #[must_use]
10932 pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
10933 self.0.reborrow().page_token
10934 }
10935 #[must_use]
10939 pub fn include_delta_metadata(&self) -> ::core::option::Option<bool> {
10940 self.0.reborrow().include_delta_metadata
10941 }
10942 #[must_use]
10946 pub fn omit_columns(&self) -> ::core::option::Option<bool> {
10947 self.0.reborrow().omit_columns
10948 }
10949 #[must_use]
10953 pub fn omit_properties(&self) -> ::core::option::Option<bool> {
10954 self.0.reborrow().omit_properties
10955 }
10956 #[must_use]
10960 pub fn omit_username(&self) -> ::core::option::Option<bool> {
10961 self.0.reborrow().omit_username
10962 }
10963 #[must_use]
10967 pub fn include_browse(&self) -> ::core::option::Option<bool> {
10968 self.0.reborrow().include_browse
10969 }
10970 #[must_use]
10974 pub fn include_manifest_capabilities(&self) -> ::core::option::Option<bool> {
10975 self.0.reborrow().include_manifest_capabilities
10976 }
10977 }
10978 impl ::core::convert::From<::buffa::OwnedView<ListTablesRequestView<'static>>>
10979 for ListTablesRequestOwnedView {
10980 fn from(inner: ::buffa::OwnedView<ListTablesRequestView<'static>>) -> Self {
10981 ListTablesRequestOwnedView(inner)
10982 }
10983 }
10984 impl ::core::convert::From<ListTablesRequestOwnedView>
10985 for ::buffa::OwnedView<ListTablesRequestView<'static>> {
10986 fn from(wrapper: ListTablesRequestOwnedView) -> Self {
10987 wrapper.0
10988 }
10989 }
10990 impl ::core::convert::AsRef<::buffa::OwnedView<ListTablesRequestView<'static>>>
10991 for ListTablesRequestOwnedView {
10992 fn as_ref(&self) -> &::buffa::OwnedView<ListTablesRequestView<'static>> {
10993 &self.0
10994 }
10995 }
10996 impl ::buffa::HasMessageView for super::super::ListTablesRequest {
10997 type View<'a> = ListTablesRequestView<'a>;
10998 type ViewHandle = ListTablesRequestOwnedView;
10999 }
11000 impl ::serde::Serialize for ListTablesRequestOwnedView {
11001 fn serialize<__S: ::serde::Serializer>(
11002 &self,
11003 __s: __S,
11004 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11005 ::serde::Serialize::serialize(&self.0, __s)
11006 }
11007 }
11008 #[derive(Clone, Debug, Default)]
11009 pub struct ListTablesResponseView<'a> {
11010 pub tables: ::buffa::RepeatedView<
11014 'a,
11015 super::super::__buffa::view::TableView<'a>,
11016 >,
11017 pub next_page_token: ::core::option::Option<&'a str>,
11021 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11022 }
11023 impl<'a> ListTablesResponseView<'a> {
11024 #[doc(hidden)]
11032 pub fn _decode_depth(
11033 buf: &'a [u8],
11034 depth: u32,
11035 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11036 let mut view = Self::default();
11037 view._merge_into_view(buf, depth)?;
11038 ::core::result::Result::Ok(view)
11039 }
11040 #[doc(hidden)]
11048 pub fn _merge_into_view(
11049 &mut self,
11050 buf: &'a [u8],
11051 depth: u32,
11052 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
11053 let _ = depth;
11054 #[allow(unused_variables)]
11055 let view = self;
11056 let mut cur: &'a [u8] = buf;
11057 while !cur.is_empty() {
11058 let before_tag = cur;
11059 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
11060 match tag.field_number() {
11061 2u32 => {
11062 if tag.wire_type()
11063 != ::buffa::encoding::WireType::LengthDelimited
11064 {
11065 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11066 field_number: 2u32,
11067 expected: 2u8,
11068 actual: tag.wire_type() as u8,
11069 });
11070 }
11071 view.next_page_token = Some(
11072 ::buffa::types::borrow_str(&mut cur)?,
11073 );
11074 }
11075 1u32 => {
11076 if tag.wire_type()
11077 != ::buffa::encoding::WireType::LengthDelimited
11078 {
11079 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11080 field_number: 1u32,
11081 expected: 2u8,
11082 actual: tag.wire_type() as u8,
11083 });
11084 }
11085 if depth == 0 {
11086 return Err(::buffa::DecodeError::RecursionLimitExceeded);
11087 }
11088 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11089 view.tables
11090 .push(
11091 super::super::__buffa::view::TableView::_decode_depth(
11092 sub,
11093 depth - 1,
11094 )?,
11095 );
11096 }
11097 _ => {
11098 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
11099 let span_len = before_tag.len() - cur.len();
11100 view.__buffa_unknown_fields
11101 .push_raw(&before_tag[..span_len]);
11102 }
11103 }
11104 }
11105 ::core::result::Result::Ok(())
11106 }
11107 }
11108 impl<'a> ::buffa::MessageView<'a> for ListTablesResponseView<'a> {
11109 type Owned = super::super::ListTablesResponse;
11110 fn decode_view(
11111 buf: &'a [u8],
11112 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11113 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
11114 }
11115 fn decode_view_with_limit(
11116 buf: &'a [u8],
11117 depth: u32,
11118 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11119 Self::_decode_depth(buf, depth)
11120 }
11121 fn to_owned_message(&self) -> super::super::ListTablesResponse {
11122 self.to_owned_from_source(None)
11123 }
11124 #[allow(clippy::useless_conversion, clippy::needless_update)]
11125 fn to_owned_from_source(
11126 &self,
11127 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11128 ) -> super::super::ListTablesResponse {
11129 #[allow(unused_imports)]
11130 use ::buffa::alloc::string::ToString as _;
11131 let _ = __buffa_src;
11132 super::super::ListTablesResponse {
11133 tables: self
11134 .tables
11135 .iter()
11136 .map(|v| v.to_owned_from_source(__buffa_src))
11137 .collect(),
11138 next_page_token: self.next_page_token.map(|s| s.to_string()),
11139 __buffa_unknown_fields: self
11140 .__buffa_unknown_fields
11141 .to_owned()
11142 .unwrap_or_default()
11143 .into(),
11144 ..::core::default::Default::default()
11145 }
11146 }
11147 }
11148 impl<'a> ::buffa::ViewEncode<'a> for ListTablesResponseView<'a> {
11149 #[allow(clippy::needless_borrow, clippy::let_and_return)]
11150 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11151 #[allow(unused_imports)]
11152 use ::buffa::Enumeration as _;
11153 let mut size = 0u32;
11154 for v in &self.tables {
11155 let __slot = __cache.reserve();
11156 let inner_size = v.compute_size(__cache);
11157 __cache.set(__slot, inner_size);
11158 size
11159 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11160 + inner_size;
11161 }
11162 if let Some(ref v) = self.next_page_token {
11163 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
11164 }
11165 size += self.__buffa_unknown_fields.encoded_len() as u32;
11166 size
11167 }
11168 #[allow(clippy::needless_borrow)]
11169 fn write_to(
11170 &self,
11171 __cache: &mut ::buffa::SizeCache,
11172 buf: &mut impl ::buffa::bytes::BufMut,
11173 ) {
11174 #[allow(unused_imports)]
11175 use ::buffa::Enumeration as _;
11176 for v in &self.tables {
11177 ::buffa::encoding::Tag::new(
11178 1u32,
11179 ::buffa::encoding::WireType::LengthDelimited,
11180 )
11181 .encode(buf);
11182 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11183 v.write_to(__cache, buf);
11184 }
11185 if let Some(ref v) = self.next_page_token {
11186 ::buffa::encoding::Tag::new(
11187 2u32,
11188 ::buffa::encoding::WireType::LengthDelimited,
11189 )
11190 .encode(buf);
11191 ::buffa::types::encode_string(v, buf);
11192 }
11193 self.__buffa_unknown_fields.write_to(buf);
11194 }
11195 }
11196 impl<'__a> ::serde::Serialize for ListTablesResponseView<'__a> {
11208 fn serialize<__S: ::serde::Serializer>(
11209 &self,
11210 __s: __S,
11211 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11212 use ::serde::ser::SerializeMap as _;
11213 let mut __map = __s.serialize_map(::core::option::Option::None)?;
11214 if !self.tables.is_empty() {
11215 __map.serialize_entry("tables", &*self.tables)?;
11216 }
11217 if let ::core::option::Option::Some(__v) = self.next_page_token {
11218 __map.serialize_entry("next_page_token", __v)?;
11219 }
11220 __map.end()
11221 }
11222 }
11223 impl<'a> ::buffa::MessageName for ListTablesResponseView<'a> {
11224 const PACKAGE: &'static str = "unitycatalog.tables.v1";
11225 const NAME: &'static str = "ListTablesResponse";
11226 const FULL_NAME: &'static str = "unitycatalog.tables.v1.ListTablesResponse";
11227 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.ListTablesResponse";
11228 }
11229 impl<'v> ::buffa::DefaultViewInstance for ListTablesResponseView<'v> {
11230 fn default_view_instance<'a>() -> &'a Self
11231 where
11232 Self: 'a,
11233 {
11234 static VALUE: ::buffa::__private::OnceBox<
11235 ListTablesResponseView<'static>,
11236 > = ::buffa::__private::OnceBox::new();
11237 VALUE
11238 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
11239 <ListTablesResponseView<'static>>::default(),
11240 ))
11241 }
11242 }
11243 impl ::buffa::ViewReborrow for ListTablesResponseView<'static> {
11244 type Reborrowed<'b> = ListTablesResponseView<'b>;
11245 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
11246 this
11247 }
11248 }
11249 #[derive(Clone, Debug)]
11255 pub struct ListTablesResponseOwnedView(
11256 ::buffa::OwnedView<ListTablesResponseView<'static>>,
11257 );
11258 impl ListTablesResponseOwnedView {
11259 pub fn decode(
11269 bytes: ::buffa::bytes::Bytes,
11270 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11271 ::core::result::Result::Ok(
11272 ListTablesResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
11273 )
11274 }
11275 pub fn decode_with_options(
11283 bytes: ::buffa::bytes::Bytes,
11284 opts: &::buffa::DecodeOptions,
11285 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11286 ::core::result::Result::Ok(
11287 ListTablesResponseOwnedView(
11288 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11289 ),
11290 )
11291 }
11292 pub fn from_owned(
11299 msg: &super::super::ListTablesResponse,
11300 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11301 ::core::result::Result::Ok(
11302 ListTablesResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
11303 )
11304 }
11305 #[must_use]
11307 pub fn view(&self) -> &ListTablesResponseView<'_> {
11308 self.0.reborrow()
11309 }
11310 #[must_use]
11312 pub fn to_owned_message(&self) -> super::super::ListTablesResponse {
11313 self.0.to_owned_message()
11314 }
11315 #[must_use]
11317 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11318 self.0.bytes()
11319 }
11320 #[must_use]
11322 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11323 self.0.into_bytes()
11324 }
11325 #[must_use]
11329 pub fn tables(
11330 &self,
11331 ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::TableView<'_>> {
11332 &self.0.reborrow().tables
11333 }
11334 #[must_use]
11338 pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
11339 self.0.reborrow().next_page_token
11340 }
11341 }
11342 impl ::core::convert::From<::buffa::OwnedView<ListTablesResponseView<'static>>>
11343 for ListTablesResponseOwnedView {
11344 fn from(inner: ::buffa::OwnedView<ListTablesResponseView<'static>>) -> Self {
11345 ListTablesResponseOwnedView(inner)
11346 }
11347 }
11348 impl ::core::convert::From<ListTablesResponseOwnedView>
11349 for ::buffa::OwnedView<ListTablesResponseView<'static>> {
11350 fn from(wrapper: ListTablesResponseOwnedView) -> Self {
11351 wrapper.0
11352 }
11353 }
11354 impl ::core::convert::AsRef<::buffa::OwnedView<ListTablesResponseView<'static>>>
11355 for ListTablesResponseOwnedView {
11356 fn as_ref(&self) -> &::buffa::OwnedView<ListTablesResponseView<'static>> {
11357 &self.0
11358 }
11359 }
11360 impl ::buffa::HasMessageView for super::super::ListTablesResponse {
11361 type View<'a> = ListTablesResponseView<'a>;
11362 type ViewHandle = ListTablesResponseOwnedView;
11363 }
11364 impl ::serde::Serialize for ListTablesResponseOwnedView {
11365 fn serialize<__S: ::serde::Serializer>(
11366 &self,
11367 __s: __S,
11368 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11369 ::serde::Serialize::serialize(&self.0, __s)
11370 }
11371 }
11372 #[derive(Clone, Debug, Default)]
11376 pub struct CreateTableRequestView<'a> {
11377 pub name: &'a str,
11381 pub schema_name: &'a str,
11385 pub catalog_name: &'a str,
11389 pub table_type: ::buffa::EnumValue<super::super::TableType>,
11391 pub data_source_format: ::buffa::EnumValue<super::super::DataSourceFormat>,
11393 pub columns: ::buffa::RepeatedView<
11397 'a,
11398 super::super::__buffa::view::ColumnView<'a>,
11399 >,
11400 pub storage_location: ::core::option::Option<&'a str>,
11404 pub comment: ::core::option::Option<&'a str>,
11408 pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
11412 pub view_definition: ::core::option::Option<&'a str>,
11418 pub view_dependencies: ::buffa::MessageFieldView<
11424 super::super::__buffa::view::DependencyListView<'a>,
11425 >,
11426 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11427 }
11428 impl<'a> CreateTableRequestView<'a> {
11429 #[doc(hidden)]
11437 pub fn _decode_depth(
11438 buf: &'a [u8],
11439 depth: u32,
11440 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11441 let mut view = Self::default();
11442 view._merge_into_view(buf, depth)?;
11443 ::core::result::Result::Ok(view)
11444 }
11445 #[doc(hidden)]
11453 pub fn _merge_into_view(
11454 &mut self,
11455 buf: &'a [u8],
11456 depth: u32,
11457 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
11458 let _ = depth;
11459 #[allow(unused_variables)]
11460 let view = self;
11461 let mut cur: &'a [u8] = buf;
11462 while !cur.is_empty() {
11463 let before_tag = cur;
11464 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
11465 match tag.field_number() {
11466 1u32 => {
11467 if tag.wire_type()
11468 != ::buffa::encoding::WireType::LengthDelimited
11469 {
11470 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11471 field_number: 1u32,
11472 expected: 2u8,
11473 actual: tag.wire_type() as u8,
11474 });
11475 }
11476 view.name = ::buffa::types::borrow_str(&mut cur)?;
11477 }
11478 2u32 => {
11479 if tag.wire_type()
11480 != ::buffa::encoding::WireType::LengthDelimited
11481 {
11482 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11483 field_number: 2u32,
11484 expected: 2u8,
11485 actual: tag.wire_type() as u8,
11486 });
11487 }
11488 view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
11489 }
11490 3u32 => {
11491 if tag.wire_type()
11492 != ::buffa::encoding::WireType::LengthDelimited
11493 {
11494 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11495 field_number: 3u32,
11496 expected: 2u8,
11497 actual: tag.wire_type() as u8,
11498 });
11499 }
11500 view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
11501 }
11502 4u32 => {
11503 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
11504 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11505 field_number: 4u32,
11506 expected: 0u8,
11507 actual: tag.wire_type() as u8,
11508 });
11509 }
11510 view.table_type = ::buffa::EnumValue::from(
11511 ::buffa::types::decode_int32(&mut cur)?,
11512 );
11513 }
11514 5u32 => {
11515 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
11516 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11517 field_number: 5u32,
11518 expected: 0u8,
11519 actual: tag.wire_type() as u8,
11520 });
11521 }
11522 view.data_source_format = ::buffa::EnumValue::from(
11523 ::buffa::types::decode_int32(&mut cur)?,
11524 );
11525 }
11526 7u32 => {
11527 if tag.wire_type()
11528 != ::buffa::encoding::WireType::LengthDelimited
11529 {
11530 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11531 field_number: 7u32,
11532 expected: 2u8,
11533 actual: tag.wire_type() as u8,
11534 });
11535 }
11536 view.storage_location = Some(
11537 ::buffa::types::borrow_str(&mut cur)?,
11538 );
11539 }
11540 8u32 => {
11541 if tag.wire_type()
11542 != ::buffa::encoding::WireType::LengthDelimited
11543 {
11544 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11545 field_number: 8u32,
11546 expected: 2u8,
11547 actual: tag.wire_type() as u8,
11548 });
11549 }
11550 view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
11551 }
11552 10u32 => {
11553 if tag.wire_type()
11554 != ::buffa::encoding::WireType::LengthDelimited
11555 {
11556 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11557 field_number: 10u32,
11558 expected: 2u8,
11559 actual: tag.wire_type() as u8,
11560 });
11561 }
11562 view.view_definition = Some(
11563 ::buffa::types::borrow_str(&mut cur)?,
11564 );
11565 }
11566 11u32 => {
11567 if tag.wire_type()
11568 != ::buffa::encoding::WireType::LengthDelimited
11569 {
11570 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11571 field_number: 11u32,
11572 expected: 2u8,
11573 actual: tag.wire_type() as u8,
11574 });
11575 }
11576 if depth == 0 {
11577 return Err(::buffa::DecodeError::RecursionLimitExceeded);
11578 }
11579 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11580 match view.view_dependencies.as_mut() {
11581 Some(existing) => existing._merge_into_view(sub, depth - 1)?,
11582 None => {
11583 view.view_dependencies = ::buffa::MessageFieldView::set(
11584 super::super::__buffa::view::DependencyListView::_decode_depth(
11585 sub,
11586 depth - 1,
11587 )?,
11588 );
11589 }
11590 }
11591 }
11592 6u32 => {
11593 if tag.wire_type()
11594 != ::buffa::encoding::WireType::LengthDelimited
11595 {
11596 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11597 field_number: 6u32,
11598 expected: 2u8,
11599 actual: tag.wire_type() as u8,
11600 });
11601 }
11602 if depth == 0 {
11603 return Err(::buffa::DecodeError::RecursionLimitExceeded);
11604 }
11605 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11606 view.columns
11607 .push(
11608 super::super::__buffa::view::ColumnView::_decode_depth(
11609 sub,
11610 depth - 1,
11611 )?,
11612 );
11613 }
11614 9u32 => {
11615 if tag.wire_type()
11616 != ::buffa::encoding::WireType::LengthDelimited
11617 {
11618 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11619 field_number: 9u32,
11620 expected: 2u8,
11621 actual: tag.wire_type() as u8,
11622 });
11623 }
11624 let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
11625 let mut entry_cur: &'a [u8] = entry_bytes;
11626 let mut key = "";
11627 let mut val = "";
11628 while !entry_cur.is_empty() {
11629 let entry_tag = ::buffa::encoding::Tag::decode(
11630 &mut entry_cur,
11631 )?;
11632 match entry_tag.field_number() {
11633 1 => {
11634 if entry_tag.wire_type()
11635 != ::buffa::encoding::WireType::LengthDelimited
11636 {
11637 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11638 field_number: entry_tag.field_number(),
11639 expected: 2u8,
11640 actual: entry_tag.wire_type() as u8,
11641 });
11642 }
11643 key = ::buffa::types::borrow_str(&mut entry_cur)?;
11644 }
11645 2 => {
11646 if entry_tag.wire_type()
11647 != ::buffa::encoding::WireType::LengthDelimited
11648 {
11649 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11650 field_number: entry_tag.field_number(),
11651 expected: 2u8,
11652 actual: entry_tag.wire_type() as u8,
11653 });
11654 }
11655 val = ::buffa::types::borrow_str(&mut entry_cur)?;
11656 }
11657 _ => {
11658 ::buffa::encoding::skip_field_depth(
11659 entry_tag,
11660 &mut entry_cur,
11661 depth,
11662 )?;
11663 }
11664 }
11665 }
11666 view.properties.push(key, val);
11667 }
11668 _ => {
11669 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
11670 let span_len = before_tag.len() - cur.len();
11671 view.__buffa_unknown_fields
11672 .push_raw(&before_tag[..span_len]);
11673 }
11674 }
11675 }
11676 ::core::result::Result::Ok(())
11677 }
11678 }
11679 impl<'a> ::buffa::MessageView<'a> for CreateTableRequestView<'a> {
11680 type Owned = super::super::CreateTableRequest;
11681 fn decode_view(
11682 buf: &'a [u8],
11683 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11684 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
11685 }
11686 fn decode_view_with_limit(
11687 buf: &'a [u8],
11688 depth: u32,
11689 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11690 Self::_decode_depth(buf, depth)
11691 }
11692 fn to_owned_message(&self) -> super::super::CreateTableRequest {
11693 self.to_owned_from_source(None)
11694 }
11695 #[allow(clippy::useless_conversion, clippy::needless_update)]
11696 fn to_owned_from_source(
11697 &self,
11698 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11699 ) -> super::super::CreateTableRequest {
11700 #[allow(unused_imports)]
11701 use ::buffa::alloc::string::ToString as _;
11702 let _ = __buffa_src;
11703 super::super::CreateTableRequest {
11704 name: self.name.to_string(),
11705 schema_name: self.schema_name.to_string(),
11706 catalog_name: self.catalog_name.to_string(),
11707 table_type: self.table_type,
11708 data_source_format: self.data_source_format,
11709 columns: self
11710 .columns
11711 .iter()
11712 .map(|v| v.to_owned_from_source(__buffa_src))
11713 .collect(),
11714 storage_location: self.storage_location.map(|s| s.to_string()),
11715 comment: self.comment.map(|s| s.to_string()),
11716 properties: self
11717 .properties
11718 .iter()
11719 .map(|(k, v)| (k.to_string(), v.to_string()))
11720 .collect(),
11721 view_definition: self.view_definition.map(|s| s.to_string()),
11722 view_dependencies: match self.view_dependencies.as_option() {
11723 Some(v) => {
11724 ::buffa::MessageField::<
11725 super::super::DependencyList,
11726 >::some(v.to_owned_from_source(__buffa_src))
11727 }
11728 None => ::buffa::MessageField::none(),
11729 },
11730 __buffa_unknown_fields: self
11731 .__buffa_unknown_fields
11732 .to_owned()
11733 .unwrap_or_default()
11734 .into(),
11735 ..::core::default::Default::default()
11736 }
11737 }
11738 }
11739 impl<'a> ::buffa::ViewEncode<'a> for CreateTableRequestView<'a> {
11740 #[allow(clippy::needless_borrow, clippy::let_and_return)]
11741 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11742 #[allow(unused_imports)]
11743 use ::buffa::Enumeration as _;
11744 let mut size = 0u32;
11745 if !self.name.is_empty() {
11746 size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
11747 }
11748 if !self.schema_name.is_empty() {
11749 size
11750 += 1u32
11751 + ::buffa::types::string_encoded_len(&self.schema_name)
11752 as u32;
11753 }
11754 if !self.catalog_name.is_empty() {
11755 size
11756 += 1u32
11757 + ::buffa::types::string_encoded_len(&self.catalog_name)
11758 as u32;
11759 }
11760 {
11761 let val = self.table_type.to_i32();
11762 if val != 0 {
11763 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11764 }
11765 }
11766 {
11767 let val = self.data_source_format.to_i32();
11768 if val != 0 {
11769 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11770 }
11771 }
11772 for v in &self.columns {
11773 let __slot = __cache.reserve();
11774 let inner_size = v.compute_size(__cache);
11775 __cache.set(__slot, inner_size);
11776 size
11777 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11778 + inner_size;
11779 }
11780 if let Some(ref v) = self.storage_location {
11781 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
11782 }
11783 if let Some(ref v) = self.comment {
11784 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
11785 }
11786 #[allow(clippy::for_kv_map)]
11787 for (k, v) in &self.properties {
11788 let entry_size: u32 = 1u32
11789 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
11790 + ::buffa::types::string_encoded_len(v) as u32;
11791 size
11792 += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
11793 + entry_size;
11794 }
11795 if let Some(ref v) = self.view_definition {
11796 size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
11797 }
11798 if self.view_dependencies.is_set() {
11799 let __slot = __cache.reserve();
11800 let inner_size = self.view_dependencies.compute_size(__cache);
11801 __cache.set(__slot, inner_size);
11802 size
11803 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11804 + inner_size;
11805 }
11806 size += self.__buffa_unknown_fields.encoded_len() as u32;
11807 size
11808 }
11809 #[allow(clippy::needless_borrow)]
11810 fn write_to(
11811 &self,
11812 __cache: &mut ::buffa::SizeCache,
11813 buf: &mut impl ::buffa::bytes::BufMut,
11814 ) {
11815 #[allow(unused_imports)]
11816 use ::buffa::Enumeration as _;
11817 if !self.name.is_empty() {
11818 ::buffa::encoding::Tag::new(
11819 1u32,
11820 ::buffa::encoding::WireType::LengthDelimited,
11821 )
11822 .encode(buf);
11823 ::buffa::types::encode_string(&self.name, buf);
11824 }
11825 if !self.schema_name.is_empty() {
11826 ::buffa::encoding::Tag::new(
11827 2u32,
11828 ::buffa::encoding::WireType::LengthDelimited,
11829 )
11830 .encode(buf);
11831 ::buffa::types::encode_string(&self.schema_name, buf);
11832 }
11833 if !self.catalog_name.is_empty() {
11834 ::buffa::encoding::Tag::new(
11835 3u32,
11836 ::buffa::encoding::WireType::LengthDelimited,
11837 )
11838 .encode(buf);
11839 ::buffa::types::encode_string(&self.catalog_name, buf);
11840 }
11841 {
11842 let val = self.table_type.to_i32();
11843 if val != 0 {
11844 ::buffa::encoding::Tag::new(
11845 4u32,
11846 ::buffa::encoding::WireType::Varint,
11847 )
11848 .encode(buf);
11849 ::buffa::types::encode_int32(val, buf);
11850 }
11851 }
11852 {
11853 let val = self.data_source_format.to_i32();
11854 if val != 0 {
11855 ::buffa::encoding::Tag::new(
11856 5u32,
11857 ::buffa::encoding::WireType::Varint,
11858 )
11859 .encode(buf);
11860 ::buffa::types::encode_int32(val, buf);
11861 }
11862 }
11863 for v in &self.columns {
11864 ::buffa::encoding::Tag::new(
11865 6u32,
11866 ::buffa::encoding::WireType::LengthDelimited,
11867 )
11868 .encode(buf);
11869 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11870 v.write_to(__cache, buf);
11871 }
11872 if let Some(ref v) = self.storage_location {
11873 ::buffa::encoding::Tag::new(
11874 7u32,
11875 ::buffa::encoding::WireType::LengthDelimited,
11876 )
11877 .encode(buf);
11878 ::buffa::types::encode_string(v, buf);
11879 }
11880 if let Some(ref v) = self.comment {
11881 ::buffa::encoding::Tag::new(
11882 8u32,
11883 ::buffa::encoding::WireType::LengthDelimited,
11884 )
11885 .encode(buf);
11886 ::buffa::types::encode_string(v, buf);
11887 }
11888 for (k, v) in &self.properties {
11889 let entry_size: u32 = 1u32
11890 + ::buffa::types::string_encoded_len(k) as u32 + 1u32
11891 + ::buffa::types::string_encoded_len(v) as u32;
11892 ::buffa::encoding::Tag::new(
11893 9u32,
11894 ::buffa::encoding::WireType::LengthDelimited,
11895 )
11896 .encode(buf);
11897 ::buffa::encoding::encode_varint(entry_size as u64, buf);
11898 ::buffa::encoding::Tag::new(
11899 1u32,
11900 ::buffa::encoding::WireType::LengthDelimited,
11901 )
11902 .encode(buf);
11903 ::buffa::types::encode_string(k, buf);
11904 ::buffa::encoding::Tag::new(
11905 2u32,
11906 ::buffa::encoding::WireType::LengthDelimited,
11907 )
11908 .encode(buf);
11909 ::buffa::types::encode_string(v, buf);
11910 }
11911 if let Some(ref v) = self.view_definition {
11912 ::buffa::encoding::Tag::new(
11913 10u32,
11914 ::buffa::encoding::WireType::LengthDelimited,
11915 )
11916 .encode(buf);
11917 ::buffa::types::encode_string(v, buf);
11918 }
11919 if self.view_dependencies.is_set() {
11920 ::buffa::encoding::Tag::new(
11921 11u32,
11922 ::buffa::encoding::WireType::LengthDelimited,
11923 )
11924 .encode(buf);
11925 ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11926 self.view_dependencies.write_to(__cache, buf);
11927 }
11928 self.__buffa_unknown_fields.write_to(buf);
11929 }
11930 }
11931 impl<'__a> ::serde::Serialize for CreateTableRequestView<'__a> {
11943 fn serialize<__S: ::serde::Serializer>(
11944 &self,
11945 __s: __S,
11946 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11947 use ::serde::ser::SerializeMap as _;
11948 let mut __map = __s.serialize_map(::core::option::Option::None)?;
11949 if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
11950 __map.serialize_entry("name", self.name)?;
11951 }
11952 if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
11953 __map.serialize_entry("schema_name", self.schema_name)?;
11954 }
11955 if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
11956 __map.serialize_entry("catalog_name", self.catalog_name)?;
11957 }
11958 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11959 &self.table_type,
11960 ) {
11961 __map.serialize_entry("table_type", &self.table_type)?;
11962 }
11963 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11964 &self.data_source_format,
11965 ) {
11966 __map.serialize_entry("data_source_format", &self.data_source_format)?;
11967 }
11968 if !self.columns.is_empty() {
11969 __map.serialize_entry("columns", &*self.columns)?;
11970 }
11971 if let ::core::option::Option::Some(__v) = self.storage_location {
11972 __map.serialize_entry("storage_location", __v)?;
11973 }
11974 if let ::core::option::Option::Some(__v) = self.comment {
11975 __map.serialize_entry("comment", __v)?;
11976 }
11977 if !self.properties.is_empty() {
11978 struct _WM<'__a, '__x>(
11979 &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
11980 );
11981 impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
11982 fn serialize<__S: ::serde::Serializer>(
11983 &self,
11984 __s: __S,
11985 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11986 use ::serde::ser::SerializeMap as _;
11987 let mut __m = __s
11988 .serialize_map(::core::option::Option::Some(self.0.len()))?;
11989 for (k, v) in self.0.iter_unique() {
11990 __m.serialize_entry(k, v)?;
11991 }
11992 __m.end()
11993 }
11994 }
11995 __map.serialize_entry("properties", &_WM(&self.properties))?;
11996 }
11997 if let ::core::option::Option::Some(__v) = self.view_definition {
11998 __map.serialize_entry("view_definition", __v)?;
11999 }
12000 {
12001 if let ::core::option::Option::Some(__v) = self
12002 .view_dependencies
12003 .as_option()
12004 {
12005 __map.serialize_entry("view_dependencies", __v)?;
12006 }
12007 }
12008 __map.end()
12009 }
12010 }
12011 impl<'a> ::buffa::MessageName for CreateTableRequestView<'a> {
12012 const PACKAGE: &'static str = "unitycatalog.tables.v1";
12013 const NAME: &'static str = "CreateTableRequest";
12014 const FULL_NAME: &'static str = "unitycatalog.tables.v1.CreateTableRequest";
12015 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.CreateTableRequest";
12016 }
12017 impl<'v> ::buffa::DefaultViewInstance for CreateTableRequestView<'v> {
12018 fn default_view_instance<'a>() -> &'a Self
12019 where
12020 Self: 'a,
12021 {
12022 static VALUE: ::buffa::__private::OnceBox<
12023 CreateTableRequestView<'static>,
12024 > = ::buffa::__private::OnceBox::new();
12025 VALUE
12026 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
12027 <CreateTableRequestView<'static>>::default(),
12028 ))
12029 }
12030 }
12031 impl ::buffa::ViewReborrow for CreateTableRequestView<'static> {
12032 type Reborrowed<'b> = CreateTableRequestView<'b>;
12033 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
12034 this
12035 }
12036 }
12037 #[derive(Clone, Debug)]
12043 pub struct CreateTableRequestOwnedView(
12044 ::buffa::OwnedView<CreateTableRequestView<'static>>,
12045 );
12046 impl CreateTableRequestOwnedView {
12047 pub fn decode(
12057 bytes: ::buffa::bytes::Bytes,
12058 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12059 ::core::result::Result::Ok(
12060 CreateTableRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
12061 )
12062 }
12063 pub fn decode_with_options(
12071 bytes: ::buffa::bytes::Bytes,
12072 opts: &::buffa::DecodeOptions,
12073 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12074 ::core::result::Result::Ok(
12075 CreateTableRequestOwnedView(
12076 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12077 ),
12078 )
12079 }
12080 pub fn from_owned(
12087 msg: &super::super::CreateTableRequest,
12088 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12089 ::core::result::Result::Ok(
12090 CreateTableRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
12091 )
12092 }
12093 #[must_use]
12095 pub fn view(&self) -> &CreateTableRequestView<'_> {
12096 self.0.reborrow()
12097 }
12098 #[must_use]
12100 pub fn to_owned_message(&self) -> super::super::CreateTableRequest {
12101 self.0.to_owned_message()
12102 }
12103 #[must_use]
12105 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12106 self.0.bytes()
12107 }
12108 #[must_use]
12110 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12111 self.0.into_bytes()
12112 }
12113 #[must_use]
12117 pub fn name(&self) -> &'_ str {
12118 self.0.reborrow().name
12119 }
12120 #[must_use]
12124 pub fn schema_name(&self) -> &'_ str {
12125 self.0.reborrow().schema_name
12126 }
12127 #[must_use]
12131 pub fn catalog_name(&self) -> &'_ str {
12132 self.0.reborrow().catalog_name
12133 }
12134 #[must_use]
12136 pub fn table_type(&self) -> ::buffa::EnumValue<super::super::TableType> {
12137 self.0.reborrow().table_type
12138 }
12139 #[must_use]
12141 pub fn data_source_format(
12142 &self,
12143 ) -> ::buffa::EnumValue<super::super::DataSourceFormat> {
12144 self.0.reborrow().data_source_format
12145 }
12146 #[must_use]
12150 pub fn columns(
12151 &self,
12152 ) -> &::buffa::RepeatedView<
12153 '_,
12154 super::super::__buffa::view::ColumnView<'_>,
12155 > {
12156 &self.0.reborrow().columns
12157 }
12158 #[must_use]
12162 pub fn storage_location(&self) -> ::core::option::Option<&'_ str> {
12163 self.0.reborrow().storage_location
12164 }
12165 #[must_use]
12169 pub fn comment(&self) -> ::core::option::Option<&'_ str> {
12170 self.0.reborrow().comment
12171 }
12172 #[must_use]
12176 pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
12177 &self.0.reborrow().properties
12178 }
12179 #[must_use]
12185 pub fn view_definition(&self) -> ::core::option::Option<&'_ str> {
12186 self.0.reborrow().view_definition
12187 }
12188 #[must_use]
12194 pub fn view_dependencies(
12195 &self,
12196 ) -> &::buffa::MessageFieldView<
12197 super::super::__buffa::view::DependencyListView<'_>,
12198 > {
12199 &self.0.reborrow().view_dependencies
12200 }
12201 }
12202 impl ::core::convert::From<::buffa::OwnedView<CreateTableRequestView<'static>>>
12203 for CreateTableRequestOwnedView {
12204 fn from(inner: ::buffa::OwnedView<CreateTableRequestView<'static>>) -> Self {
12205 CreateTableRequestOwnedView(inner)
12206 }
12207 }
12208 impl ::core::convert::From<CreateTableRequestOwnedView>
12209 for ::buffa::OwnedView<CreateTableRequestView<'static>> {
12210 fn from(wrapper: CreateTableRequestOwnedView) -> Self {
12211 wrapper.0
12212 }
12213 }
12214 impl ::core::convert::AsRef<::buffa::OwnedView<CreateTableRequestView<'static>>>
12215 for CreateTableRequestOwnedView {
12216 fn as_ref(&self) -> &::buffa::OwnedView<CreateTableRequestView<'static>> {
12217 &self.0
12218 }
12219 }
12220 impl ::buffa::HasMessageView for super::super::CreateTableRequest {
12221 type View<'a> = CreateTableRequestView<'a>;
12222 type ViewHandle = CreateTableRequestOwnedView;
12223 }
12224 impl ::serde::Serialize for CreateTableRequestOwnedView {
12225 fn serialize<__S: ::serde::Serializer>(
12226 &self,
12227 __s: __S,
12228 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12229 ::serde::Serialize::serialize(&self.0, __s)
12230 }
12231 }
12232 #[derive(Clone, Debug, Default)]
12234 pub struct GetTableRequestView<'a> {
12235 pub full_name: &'a str,
12239 pub include_delta_metadata: ::core::option::Option<bool>,
12243 pub include_browse: ::core::option::Option<bool>,
12247 pub include_manifest_capabilities: ::core::option::Option<bool>,
12251 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12252 }
12253 impl<'a> GetTableRequestView<'a> {
12254 #[doc(hidden)]
12262 pub fn _decode_depth(
12263 buf: &'a [u8],
12264 depth: u32,
12265 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12266 let mut view = Self::default();
12267 view._merge_into_view(buf, depth)?;
12268 ::core::result::Result::Ok(view)
12269 }
12270 #[doc(hidden)]
12278 pub fn _merge_into_view(
12279 &mut self,
12280 buf: &'a [u8],
12281 depth: u32,
12282 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
12283 let _ = depth;
12284 #[allow(unused_variables)]
12285 let view = self;
12286 let mut cur: &'a [u8] = buf;
12287 while !cur.is_empty() {
12288 let before_tag = cur;
12289 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
12290 match tag.field_number() {
12291 1u32 => {
12292 if tag.wire_type()
12293 != ::buffa::encoding::WireType::LengthDelimited
12294 {
12295 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12296 field_number: 1u32,
12297 expected: 2u8,
12298 actual: tag.wire_type() as u8,
12299 });
12300 }
12301 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
12302 }
12303 2u32 => {
12304 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
12305 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12306 field_number: 2u32,
12307 expected: 0u8,
12308 actual: tag.wire_type() as u8,
12309 });
12310 }
12311 view.include_delta_metadata = Some(
12312 ::buffa::types::decode_bool(&mut cur)?,
12313 );
12314 }
12315 3u32 => {
12316 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
12317 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12318 field_number: 3u32,
12319 expected: 0u8,
12320 actual: tag.wire_type() as u8,
12321 });
12322 }
12323 view.include_browse = Some(
12324 ::buffa::types::decode_bool(&mut cur)?,
12325 );
12326 }
12327 4u32 => {
12328 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
12329 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12330 field_number: 4u32,
12331 expected: 0u8,
12332 actual: tag.wire_type() as u8,
12333 });
12334 }
12335 view.include_manifest_capabilities = Some(
12336 ::buffa::types::decode_bool(&mut cur)?,
12337 );
12338 }
12339 _ => {
12340 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
12341 let span_len = before_tag.len() - cur.len();
12342 view.__buffa_unknown_fields
12343 .push_raw(&before_tag[..span_len]);
12344 }
12345 }
12346 }
12347 ::core::result::Result::Ok(())
12348 }
12349 }
12350 impl<'a> ::buffa::MessageView<'a> for GetTableRequestView<'a> {
12351 type Owned = super::super::GetTableRequest;
12352 fn decode_view(
12353 buf: &'a [u8],
12354 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12355 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
12356 }
12357 fn decode_view_with_limit(
12358 buf: &'a [u8],
12359 depth: u32,
12360 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12361 Self::_decode_depth(buf, depth)
12362 }
12363 fn to_owned_message(&self) -> super::super::GetTableRequest {
12364 self.to_owned_from_source(None)
12365 }
12366 #[allow(clippy::useless_conversion, clippy::needless_update)]
12367 fn to_owned_from_source(
12368 &self,
12369 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12370 ) -> super::super::GetTableRequest {
12371 #[allow(unused_imports)]
12372 use ::buffa::alloc::string::ToString as _;
12373 let _ = __buffa_src;
12374 super::super::GetTableRequest {
12375 full_name: self.full_name.to_string(),
12376 include_delta_metadata: self.include_delta_metadata,
12377 include_browse: self.include_browse,
12378 include_manifest_capabilities: self.include_manifest_capabilities,
12379 __buffa_unknown_fields: self
12380 .__buffa_unknown_fields
12381 .to_owned()
12382 .unwrap_or_default()
12383 .into(),
12384 ..::core::default::Default::default()
12385 }
12386 }
12387 }
12388 impl<'a> ::buffa::ViewEncode<'a> for GetTableRequestView<'a> {
12389 #[allow(clippy::needless_borrow, clippy::let_and_return)]
12390 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
12391 #[allow(unused_imports)]
12392 use ::buffa::Enumeration as _;
12393 let mut size = 0u32;
12394 if !self.full_name.is_empty() {
12395 size
12396 += 1u32
12397 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
12398 }
12399 if self.include_delta_metadata.is_some() {
12400 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
12401 }
12402 if self.include_browse.is_some() {
12403 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
12404 }
12405 if self.include_manifest_capabilities.is_some() {
12406 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
12407 }
12408 size += self.__buffa_unknown_fields.encoded_len() as u32;
12409 size
12410 }
12411 #[allow(clippy::needless_borrow)]
12412 fn write_to(
12413 &self,
12414 _cache: &mut ::buffa::SizeCache,
12415 buf: &mut impl ::buffa::bytes::BufMut,
12416 ) {
12417 #[allow(unused_imports)]
12418 use ::buffa::Enumeration as _;
12419 if !self.full_name.is_empty() {
12420 ::buffa::encoding::Tag::new(
12421 1u32,
12422 ::buffa::encoding::WireType::LengthDelimited,
12423 )
12424 .encode(buf);
12425 ::buffa::types::encode_string(&self.full_name, buf);
12426 }
12427 if let Some(v) = self.include_delta_metadata {
12428 ::buffa::encoding::Tag::new(
12429 2u32,
12430 ::buffa::encoding::WireType::Varint,
12431 )
12432 .encode(buf);
12433 ::buffa::types::encode_bool(v, buf);
12434 }
12435 if let Some(v) = self.include_browse {
12436 ::buffa::encoding::Tag::new(
12437 3u32,
12438 ::buffa::encoding::WireType::Varint,
12439 )
12440 .encode(buf);
12441 ::buffa::types::encode_bool(v, buf);
12442 }
12443 if let Some(v) = self.include_manifest_capabilities {
12444 ::buffa::encoding::Tag::new(
12445 4u32,
12446 ::buffa::encoding::WireType::Varint,
12447 )
12448 .encode(buf);
12449 ::buffa::types::encode_bool(v, buf);
12450 }
12451 self.__buffa_unknown_fields.write_to(buf);
12452 }
12453 }
12454 impl<'__a> ::serde::Serialize for GetTableRequestView<'__a> {
12466 fn serialize<__S: ::serde::Serializer>(
12467 &self,
12468 __s: __S,
12469 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12470 use ::serde::ser::SerializeMap as _;
12471 let mut __map = __s.serialize_map(::core::option::Option::None)?;
12472 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
12473 __map.serialize_entry("full_name", self.full_name)?;
12474 }
12475 if let ::core::option::Option::Some(__v) = self.include_delta_metadata {
12476 __map.serialize_entry("include_delta_metadata", &__v)?;
12477 }
12478 if let ::core::option::Option::Some(__v) = self.include_browse {
12479 __map.serialize_entry("include_browse", &__v)?;
12480 }
12481 if let ::core::option::Option::Some(__v) = self
12482 .include_manifest_capabilities
12483 {
12484 __map.serialize_entry("include_manifest_capabilities", &__v)?;
12485 }
12486 __map.end()
12487 }
12488 }
12489 impl<'a> ::buffa::MessageName for GetTableRequestView<'a> {
12490 const PACKAGE: &'static str = "unitycatalog.tables.v1";
12491 const NAME: &'static str = "GetTableRequest";
12492 const FULL_NAME: &'static str = "unitycatalog.tables.v1.GetTableRequest";
12493 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableRequest";
12494 }
12495 impl<'v> ::buffa::DefaultViewInstance for GetTableRequestView<'v> {
12496 fn default_view_instance<'a>() -> &'a Self
12497 where
12498 Self: 'a,
12499 {
12500 static VALUE: ::buffa::__private::OnceBox<
12501 GetTableRequestView<'static>,
12502 > = ::buffa::__private::OnceBox::new();
12503 VALUE
12504 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
12505 <GetTableRequestView<'static>>::default(),
12506 ))
12507 }
12508 }
12509 impl ::buffa::ViewReborrow for GetTableRequestView<'static> {
12510 type Reborrowed<'b> = GetTableRequestView<'b>;
12511 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
12512 this
12513 }
12514 }
12515 #[derive(Clone, Debug)]
12521 pub struct GetTableRequestOwnedView(
12522 ::buffa::OwnedView<GetTableRequestView<'static>>,
12523 );
12524 impl GetTableRequestOwnedView {
12525 pub fn decode(
12535 bytes: ::buffa::bytes::Bytes,
12536 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12537 ::core::result::Result::Ok(
12538 GetTableRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
12539 )
12540 }
12541 pub fn decode_with_options(
12549 bytes: ::buffa::bytes::Bytes,
12550 opts: &::buffa::DecodeOptions,
12551 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12552 ::core::result::Result::Ok(
12553 GetTableRequestOwnedView(
12554 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12555 ),
12556 )
12557 }
12558 pub fn from_owned(
12565 msg: &super::super::GetTableRequest,
12566 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12567 ::core::result::Result::Ok(
12568 GetTableRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
12569 )
12570 }
12571 #[must_use]
12573 pub fn view(&self) -> &GetTableRequestView<'_> {
12574 self.0.reborrow()
12575 }
12576 #[must_use]
12578 pub fn to_owned_message(&self) -> super::super::GetTableRequest {
12579 self.0.to_owned_message()
12580 }
12581 #[must_use]
12583 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12584 self.0.bytes()
12585 }
12586 #[must_use]
12588 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12589 self.0.into_bytes()
12590 }
12591 #[must_use]
12595 pub fn full_name(&self) -> &'_ str {
12596 self.0.reborrow().full_name
12597 }
12598 #[must_use]
12602 pub fn include_delta_metadata(&self) -> ::core::option::Option<bool> {
12603 self.0.reborrow().include_delta_metadata
12604 }
12605 #[must_use]
12609 pub fn include_browse(&self) -> ::core::option::Option<bool> {
12610 self.0.reborrow().include_browse
12611 }
12612 #[must_use]
12616 pub fn include_manifest_capabilities(&self) -> ::core::option::Option<bool> {
12617 self.0.reborrow().include_manifest_capabilities
12618 }
12619 }
12620 impl ::core::convert::From<::buffa::OwnedView<GetTableRequestView<'static>>>
12621 for GetTableRequestOwnedView {
12622 fn from(inner: ::buffa::OwnedView<GetTableRequestView<'static>>) -> Self {
12623 GetTableRequestOwnedView(inner)
12624 }
12625 }
12626 impl ::core::convert::From<GetTableRequestOwnedView>
12627 for ::buffa::OwnedView<GetTableRequestView<'static>> {
12628 fn from(wrapper: GetTableRequestOwnedView) -> Self {
12629 wrapper.0
12630 }
12631 }
12632 impl ::core::convert::AsRef<::buffa::OwnedView<GetTableRequestView<'static>>>
12633 for GetTableRequestOwnedView {
12634 fn as_ref(&self) -> &::buffa::OwnedView<GetTableRequestView<'static>> {
12635 &self.0
12636 }
12637 }
12638 impl ::buffa::HasMessageView for super::super::GetTableRequest {
12639 type View<'a> = GetTableRequestView<'a>;
12640 type ViewHandle = GetTableRequestOwnedView;
12641 }
12642 impl ::serde::Serialize for GetTableRequestOwnedView {
12643 fn serialize<__S: ::serde::Serializer>(
12644 &self,
12645 __s: __S,
12646 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12647 ::serde::Serialize::serialize(&self.0, __s)
12648 }
12649 }
12650 #[derive(Clone, Debug, Default)]
12652 pub struct GetTableExistsRequestView<'a> {
12653 pub full_name: &'a str,
12657 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12658 }
12659 impl<'a> GetTableExistsRequestView<'a> {
12660 #[doc(hidden)]
12668 pub fn _decode_depth(
12669 buf: &'a [u8],
12670 depth: u32,
12671 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12672 let mut view = Self::default();
12673 view._merge_into_view(buf, depth)?;
12674 ::core::result::Result::Ok(view)
12675 }
12676 #[doc(hidden)]
12684 pub fn _merge_into_view(
12685 &mut self,
12686 buf: &'a [u8],
12687 depth: u32,
12688 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
12689 let _ = depth;
12690 #[allow(unused_variables)]
12691 let view = self;
12692 let mut cur: &'a [u8] = buf;
12693 while !cur.is_empty() {
12694 let before_tag = cur;
12695 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
12696 match tag.field_number() {
12697 1u32 => {
12698 if tag.wire_type()
12699 != ::buffa::encoding::WireType::LengthDelimited
12700 {
12701 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12702 field_number: 1u32,
12703 expected: 2u8,
12704 actual: tag.wire_type() as u8,
12705 });
12706 }
12707 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
12708 }
12709 _ => {
12710 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
12711 let span_len = before_tag.len() - cur.len();
12712 view.__buffa_unknown_fields
12713 .push_raw(&before_tag[..span_len]);
12714 }
12715 }
12716 }
12717 ::core::result::Result::Ok(())
12718 }
12719 }
12720 impl<'a> ::buffa::MessageView<'a> for GetTableExistsRequestView<'a> {
12721 type Owned = super::super::GetTableExistsRequest;
12722 fn decode_view(
12723 buf: &'a [u8],
12724 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12725 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
12726 }
12727 fn decode_view_with_limit(
12728 buf: &'a [u8],
12729 depth: u32,
12730 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12731 Self::_decode_depth(buf, depth)
12732 }
12733 fn to_owned_message(&self) -> super::super::GetTableExistsRequest {
12734 self.to_owned_from_source(None)
12735 }
12736 #[allow(clippy::useless_conversion, clippy::needless_update)]
12737 fn to_owned_from_source(
12738 &self,
12739 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12740 ) -> super::super::GetTableExistsRequest {
12741 #[allow(unused_imports)]
12742 use ::buffa::alloc::string::ToString as _;
12743 let _ = __buffa_src;
12744 super::super::GetTableExistsRequest {
12745 full_name: self.full_name.to_string(),
12746 __buffa_unknown_fields: self
12747 .__buffa_unknown_fields
12748 .to_owned()
12749 .unwrap_or_default()
12750 .into(),
12751 ..::core::default::Default::default()
12752 }
12753 }
12754 }
12755 impl<'a> ::buffa::ViewEncode<'a> for GetTableExistsRequestView<'a> {
12756 #[allow(clippy::needless_borrow, clippy::let_and_return)]
12757 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
12758 #[allow(unused_imports)]
12759 use ::buffa::Enumeration as _;
12760 let mut size = 0u32;
12761 if !self.full_name.is_empty() {
12762 size
12763 += 1u32
12764 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
12765 }
12766 size += self.__buffa_unknown_fields.encoded_len() as u32;
12767 size
12768 }
12769 #[allow(clippy::needless_borrow)]
12770 fn write_to(
12771 &self,
12772 _cache: &mut ::buffa::SizeCache,
12773 buf: &mut impl ::buffa::bytes::BufMut,
12774 ) {
12775 #[allow(unused_imports)]
12776 use ::buffa::Enumeration as _;
12777 if !self.full_name.is_empty() {
12778 ::buffa::encoding::Tag::new(
12779 1u32,
12780 ::buffa::encoding::WireType::LengthDelimited,
12781 )
12782 .encode(buf);
12783 ::buffa::types::encode_string(&self.full_name, buf);
12784 }
12785 self.__buffa_unknown_fields.write_to(buf);
12786 }
12787 }
12788 impl<'__a> ::serde::Serialize for GetTableExistsRequestView<'__a> {
12800 fn serialize<__S: ::serde::Serializer>(
12801 &self,
12802 __s: __S,
12803 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12804 use ::serde::ser::SerializeMap as _;
12805 let mut __map = __s.serialize_map(::core::option::Option::None)?;
12806 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
12807 __map.serialize_entry("full_name", self.full_name)?;
12808 }
12809 __map.end()
12810 }
12811 }
12812 impl<'a> ::buffa::MessageName for GetTableExistsRequestView<'a> {
12813 const PACKAGE: &'static str = "unitycatalog.tables.v1";
12814 const NAME: &'static str = "GetTableExistsRequest";
12815 const FULL_NAME: &'static str = "unitycatalog.tables.v1.GetTableExistsRequest";
12816 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsRequest";
12817 }
12818 impl<'v> ::buffa::DefaultViewInstance for GetTableExistsRequestView<'v> {
12819 fn default_view_instance<'a>() -> &'a Self
12820 where
12821 Self: 'a,
12822 {
12823 static VALUE: ::buffa::__private::OnceBox<
12824 GetTableExistsRequestView<'static>,
12825 > = ::buffa::__private::OnceBox::new();
12826 VALUE
12827 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
12828 <GetTableExistsRequestView<'static>>::default(),
12829 ))
12830 }
12831 }
12832 impl ::buffa::ViewReborrow for GetTableExistsRequestView<'static> {
12833 type Reborrowed<'b> = GetTableExistsRequestView<'b>;
12834 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
12835 this
12836 }
12837 }
12838 #[derive(Clone, Debug)]
12844 pub struct GetTableExistsRequestOwnedView(
12845 ::buffa::OwnedView<GetTableExistsRequestView<'static>>,
12846 );
12847 impl GetTableExistsRequestOwnedView {
12848 pub fn decode(
12858 bytes: ::buffa::bytes::Bytes,
12859 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12860 ::core::result::Result::Ok(
12861 GetTableExistsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
12862 )
12863 }
12864 pub fn decode_with_options(
12872 bytes: ::buffa::bytes::Bytes,
12873 opts: &::buffa::DecodeOptions,
12874 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12875 ::core::result::Result::Ok(
12876 GetTableExistsRequestOwnedView(
12877 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12878 ),
12879 )
12880 }
12881 pub fn from_owned(
12888 msg: &super::super::GetTableExistsRequest,
12889 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12890 ::core::result::Result::Ok(
12891 GetTableExistsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
12892 )
12893 }
12894 #[must_use]
12896 pub fn view(&self) -> &GetTableExistsRequestView<'_> {
12897 self.0.reborrow()
12898 }
12899 #[must_use]
12901 pub fn to_owned_message(&self) -> super::super::GetTableExistsRequest {
12902 self.0.to_owned_message()
12903 }
12904 #[must_use]
12906 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12907 self.0.bytes()
12908 }
12909 #[must_use]
12911 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12912 self.0.into_bytes()
12913 }
12914 #[must_use]
12918 pub fn full_name(&self) -> &'_ str {
12919 self.0.reborrow().full_name
12920 }
12921 }
12922 impl ::core::convert::From<
12923 ::buffa::OwnedView<GetTableExistsRequestView<'static>>,
12924 > for GetTableExistsRequestOwnedView {
12925 fn from(
12926 inner: ::buffa::OwnedView<GetTableExistsRequestView<'static>>,
12927 ) -> Self {
12928 GetTableExistsRequestOwnedView(inner)
12929 }
12930 }
12931 impl ::core::convert::From<GetTableExistsRequestOwnedView>
12932 for ::buffa::OwnedView<GetTableExistsRequestView<'static>> {
12933 fn from(wrapper: GetTableExistsRequestOwnedView) -> Self {
12934 wrapper.0
12935 }
12936 }
12937 impl ::core::convert::AsRef<
12938 ::buffa::OwnedView<GetTableExistsRequestView<'static>>,
12939 > for GetTableExistsRequestOwnedView {
12940 fn as_ref(&self) -> &::buffa::OwnedView<GetTableExistsRequestView<'static>> {
12941 &self.0
12942 }
12943 }
12944 impl ::buffa::HasMessageView for super::super::GetTableExistsRequest {
12945 type View<'a> = GetTableExistsRequestView<'a>;
12946 type ViewHandle = GetTableExistsRequestOwnedView;
12947 }
12948 impl ::serde::Serialize for GetTableExistsRequestOwnedView {
12949 fn serialize<__S: ::serde::Serializer>(
12950 &self,
12951 __s: __S,
12952 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12953 ::serde::Serialize::serialize(&self.0, __s)
12954 }
12955 }
12956 #[derive(Clone, Debug, Default)]
12957 pub struct GetTableExistsResponseView<'a> {
12958 pub table_exists: bool,
12962 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12963 }
12964 impl<'a> GetTableExistsResponseView<'a> {
12965 #[doc(hidden)]
12973 pub fn _decode_depth(
12974 buf: &'a [u8],
12975 depth: u32,
12976 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12977 let mut view = Self::default();
12978 view._merge_into_view(buf, depth)?;
12979 ::core::result::Result::Ok(view)
12980 }
12981 #[doc(hidden)]
12989 pub fn _merge_into_view(
12990 &mut self,
12991 buf: &'a [u8],
12992 depth: u32,
12993 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
12994 let _ = depth;
12995 #[allow(unused_variables)]
12996 let view = self;
12997 let mut cur: &'a [u8] = buf;
12998 while !cur.is_empty() {
12999 let before_tag = cur;
13000 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
13001 match tag.field_number() {
13002 1u32 => {
13003 if tag.wire_type() != ::buffa::encoding::WireType::Varint {
13004 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13005 field_number: 1u32,
13006 expected: 0u8,
13007 actual: tag.wire_type() as u8,
13008 });
13009 }
13010 view.table_exists = ::buffa::types::decode_bool(&mut cur)?;
13011 }
13012 _ => {
13013 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
13014 let span_len = before_tag.len() - cur.len();
13015 view.__buffa_unknown_fields
13016 .push_raw(&before_tag[..span_len]);
13017 }
13018 }
13019 }
13020 ::core::result::Result::Ok(())
13021 }
13022 }
13023 impl<'a> ::buffa::MessageView<'a> for GetTableExistsResponseView<'a> {
13024 type Owned = super::super::GetTableExistsResponse;
13025 fn decode_view(
13026 buf: &'a [u8],
13027 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13028 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
13029 }
13030 fn decode_view_with_limit(
13031 buf: &'a [u8],
13032 depth: u32,
13033 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13034 Self::_decode_depth(buf, depth)
13035 }
13036 fn to_owned_message(&self) -> super::super::GetTableExistsResponse {
13037 self.to_owned_from_source(None)
13038 }
13039 #[allow(clippy::useless_conversion, clippy::needless_update)]
13040 fn to_owned_from_source(
13041 &self,
13042 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
13043 ) -> super::super::GetTableExistsResponse {
13044 #[allow(unused_imports)]
13045 use ::buffa::alloc::string::ToString as _;
13046 let _ = __buffa_src;
13047 super::super::GetTableExistsResponse {
13048 table_exists: self.table_exists,
13049 __buffa_unknown_fields: self
13050 .__buffa_unknown_fields
13051 .to_owned()
13052 .unwrap_or_default()
13053 .into(),
13054 ..::core::default::Default::default()
13055 }
13056 }
13057 }
13058 impl<'a> ::buffa::ViewEncode<'a> for GetTableExistsResponseView<'a> {
13059 #[allow(clippy::needless_borrow, clippy::let_and_return)]
13060 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
13061 #[allow(unused_imports)]
13062 use ::buffa::Enumeration as _;
13063 let mut size = 0u32;
13064 if self.table_exists {
13065 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13066 }
13067 size += self.__buffa_unknown_fields.encoded_len() as u32;
13068 size
13069 }
13070 #[allow(clippy::needless_borrow)]
13071 fn write_to(
13072 &self,
13073 _cache: &mut ::buffa::SizeCache,
13074 buf: &mut impl ::buffa::bytes::BufMut,
13075 ) {
13076 #[allow(unused_imports)]
13077 use ::buffa::Enumeration as _;
13078 if self.table_exists {
13079 ::buffa::encoding::Tag::new(
13080 1u32,
13081 ::buffa::encoding::WireType::Varint,
13082 )
13083 .encode(buf);
13084 ::buffa::types::encode_bool(self.table_exists, buf);
13085 }
13086 self.__buffa_unknown_fields.write_to(buf);
13087 }
13088 }
13089 impl<'__a> ::serde::Serialize for GetTableExistsResponseView<'__a> {
13101 fn serialize<__S: ::serde::Serializer>(
13102 &self,
13103 __s: __S,
13104 ) -> ::core::result::Result<__S::Ok, __S::Error> {
13105 use ::serde::ser::SerializeMap as _;
13106 let mut __map = __s.serialize_map(::core::option::Option::None)?;
13107 if self.table_exists {
13108 __map.serialize_entry("table_exists", &self.table_exists)?;
13109 }
13110 __map.end()
13111 }
13112 }
13113 impl<'a> ::buffa::MessageName for GetTableExistsResponseView<'a> {
13114 const PACKAGE: &'static str = "unitycatalog.tables.v1";
13115 const NAME: &'static str = "GetTableExistsResponse";
13116 const FULL_NAME: &'static str = "unitycatalog.tables.v1.GetTableExistsResponse";
13117 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.GetTableExistsResponse";
13118 }
13119 impl<'v> ::buffa::DefaultViewInstance for GetTableExistsResponseView<'v> {
13120 fn default_view_instance<'a>() -> &'a Self
13121 where
13122 Self: 'a,
13123 {
13124 static VALUE: ::buffa::__private::OnceBox<
13125 GetTableExistsResponseView<'static>,
13126 > = ::buffa::__private::OnceBox::new();
13127 VALUE
13128 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
13129 <GetTableExistsResponseView<'static>>::default(),
13130 ))
13131 }
13132 }
13133 impl ::buffa::ViewReborrow for GetTableExistsResponseView<'static> {
13134 type Reborrowed<'b> = GetTableExistsResponseView<'b>;
13135 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
13136 this
13137 }
13138 }
13139 #[derive(Clone, Debug)]
13145 pub struct GetTableExistsResponseOwnedView(
13146 ::buffa::OwnedView<GetTableExistsResponseView<'static>>,
13147 );
13148 impl GetTableExistsResponseOwnedView {
13149 pub fn decode(
13159 bytes: ::buffa::bytes::Bytes,
13160 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13161 ::core::result::Result::Ok(
13162 GetTableExistsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
13163 )
13164 }
13165 pub fn decode_with_options(
13173 bytes: ::buffa::bytes::Bytes,
13174 opts: &::buffa::DecodeOptions,
13175 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13176 ::core::result::Result::Ok(
13177 GetTableExistsResponseOwnedView(
13178 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
13179 ),
13180 )
13181 }
13182 pub fn from_owned(
13189 msg: &super::super::GetTableExistsResponse,
13190 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13191 ::core::result::Result::Ok(
13192 GetTableExistsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
13193 )
13194 }
13195 #[must_use]
13197 pub fn view(&self) -> &GetTableExistsResponseView<'_> {
13198 self.0.reborrow()
13199 }
13200 #[must_use]
13202 pub fn to_owned_message(&self) -> super::super::GetTableExistsResponse {
13203 self.0.to_owned_message()
13204 }
13205 #[must_use]
13207 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
13208 self.0.bytes()
13209 }
13210 #[must_use]
13212 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
13213 self.0.into_bytes()
13214 }
13215 #[must_use]
13219 pub fn table_exists(&self) -> bool {
13220 self.0.reborrow().table_exists
13221 }
13222 }
13223 impl ::core::convert::From<
13224 ::buffa::OwnedView<GetTableExistsResponseView<'static>>,
13225 > for GetTableExistsResponseOwnedView {
13226 fn from(
13227 inner: ::buffa::OwnedView<GetTableExistsResponseView<'static>>,
13228 ) -> Self {
13229 GetTableExistsResponseOwnedView(inner)
13230 }
13231 }
13232 impl ::core::convert::From<GetTableExistsResponseOwnedView>
13233 for ::buffa::OwnedView<GetTableExistsResponseView<'static>> {
13234 fn from(wrapper: GetTableExistsResponseOwnedView) -> Self {
13235 wrapper.0
13236 }
13237 }
13238 impl ::core::convert::AsRef<
13239 ::buffa::OwnedView<GetTableExistsResponseView<'static>>,
13240 > for GetTableExistsResponseOwnedView {
13241 fn as_ref(
13242 &self,
13243 ) -> &::buffa::OwnedView<GetTableExistsResponseView<'static>> {
13244 &self.0
13245 }
13246 }
13247 impl ::buffa::HasMessageView for super::super::GetTableExistsResponse {
13248 type View<'a> = GetTableExistsResponseView<'a>;
13249 type ViewHandle = GetTableExistsResponseOwnedView;
13250 }
13251 impl ::serde::Serialize for GetTableExistsResponseOwnedView {
13252 fn serialize<__S: ::serde::Serializer>(
13253 &self,
13254 __s: __S,
13255 ) -> ::core::result::Result<__S::Ok, __S::Error> {
13256 ::serde::Serialize::serialize(&self.0, __s)
13257 }
13258 }
13259 #[derive(Clone, Debug, Default)]
13261 pub struct DeleteTableRequestView<'a> {
13262 pub full_name: &'a str,
13266 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
13267 }
13268 impl<'a> DeleteTableRequestView<'a> {
13269 #[doc(hidden)]
13277 pub fn _decode_depth(
13278 buf: &'a [u8],
13279 depth: u32,
13280 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13281 let mut view = Self::default();
13282 view._merge_into_view(buf, depth)?;
13283 ::core::result::Result::Ok(view)
13284 }
13285 #[doc(hidden)]
13293 pub fn _merge_into_view(
13294 &mut self,
13295 buf: &'a [u8],
13296 depth: u32,
13297 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
13298 let _ = depth;
13299 #[allow(unused_variables)]
13300 let view = self;
13301 let mut cur: &'a [u8] = buf;
13302 while !cur.is_empty() {
13303 let before_tag = cur;
13304 let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
13305 match tag.field_number() {
13306 1u32 => {
13307 if tag.wire_type()
13308 != ::buffa::encoding::WireType::LengthDelimited
13309 {
13310 return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13311 field_number: 1u32,
13312 expected: 2u8,
13313 actual: tag.wire_type() as u8,
13314 });
13315 }
13316 view.full_name = ::buffa::types::borrow_str(&mut cur)?;
13317 }
13318 _ => {
13319 ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
13320 let span_len = before_tag.len() - cur.len();
13321 view.__buffa_unknown_fields
13322 .push_raw(&before_tag[..span_len]);
13323 }
13324 }
13325 }
13326 ::core::result::Result::Ok(())
13327 }
13328 }
13329 impl<'a> ::buffa::MessageView<'a> for DeleteTableRequestView<'a> {
13330 type Owned = super::super::DeleteTableRequest;
13331 fn decode_view(
13332 buf: &'a [u8],
13333 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13334 Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
13335 }
13336 fn decode_view_with_limit(
13337 buf: &'a [u8],
13338 depth: u32,
13339 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13340 Self::_decode_depth(buf, depth)
13341 }
13342 fn to_owned_message(&self) -> super::super::DeleteTableRequest {
13343 self.to_owned_from_source(None)
13344 }
13345 #[allow(clippy::useless_conversion, clippy::needless_update)]
13346 fn to_owned_from_source(
13347 &self,
13348 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
13349 ) -> super::super::DeleteTableRequest {
13350 #[allow(unused_imports)]
13351 use ::buffa::alloc::string::ToString as _;
13352 let _ = __buffa_src;
13353 super::super::DeleteTableRequest {
13354 full_name: self.full_name.to_string(),
13355 __buffa_unknown_fields: self
13356 .__buffa_unknown_fields
13357 .to_owned()
13358 .unwrap_or_default()
13359 .into(),
13360 ..::core::default::Default::default()
13361 }
13362 }
13363 }
13364 impl<'a> ::buffa::ViewEncode<'a> for DeleteTableRequestView<'a> {
13365 #[allow(clippy::needless_borrow, clippy::let_and_return)]
13366 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
13367 #[allow(unused_imports)]
13368 use ::buffa::Enumeration as _;
13369 let mut size = 0u32;
13370 if !self.full_name.is_empty() {
13371 size
13372 += 1u32
13373 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
13374 }
13375 size += self.__buffa_unknown_fields.encoded_len() as u32;
13376 size
13377 }
13378 #[allow(clippy::needless_borrow)]
13379 fn write_to(
13380 &self,
13381 _cache: &mut ::buffa::SizeCache,
13382 buf: &mut impl ::buffa::bytes::BufMut,
13383 ) {
13384 #[allow(unused_imports)]
13385 use ::buffa::Enumeration as _;
13386 if !self.full_name.is_empty() {
13387 ::buffa::encoding::Tag::new(
13388 1u32,
13389 ::buffa::encoding::WireType::LengthDelimited,
13390 )
13391 .encode(buf);
13392 ::buffa::types::encode_string(&self.full_name, buf);
13393 }
13394 self.__buffa_unknown_fields.write_to(buf);
13395 }
13396 }
13397 impl<'__a> ::serde::Serialize for DeleteTableRequestView<'__a> {
13409 fn serialize<__S: ::serde::Serializer>(
13410 &self,
13411 __s: __S,
13412 ) -> ::core::result::Result<__S::Ok, __S::Error> {
13413 use ::serde::ser::SerializeMap as _;
13414 let mut __map = __s.serialize_map(::core::option::Option::None)?;
13415 if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
13416 __map.serialize_entry("full_name", self.full_name)?;
13417 }
13418 __map.end()
13419 }
13420 }
13421 impl<'a> ::buffa::MessageName for DeleteTableRequestView<'a> {
13422 const PACKAGE: &'static str = "unitycatalog.tables.v1";
13423 const NAME: &'static str = "DeleteTableRequest";
13424 const FULL_NAME: &'static str = "unitycatalog.tables.v1.DeleteTableRequest";
13425 const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.tables.v1.DeleteTableRequest";
13426 }
13427 impl<'v> ::buffa::DefaultViewInstance for DeleteTableRequestView<'v> {
13428 fn default_view_instance<'a>() -> &'a Self
13429 where
13430 Self: 'a,
13431 {
13432 static VALUE: ::buffa::__private::OnceBox<
13433 DeleteTableRequestView<'static>,
13434 > = ::buffa::__private::OnceBox::new();
13435 VALUE
13436 .get_or_init(|| ::buffa::alloc::boxed::Box::new(
13437 <DeleteTableRequestView<'static>>::default(),
13438 ))
13439 }
13440 }
13441 impl ::buffa::ViewReborrow for DeleteTableRequestView<'static> {
13442 type Reborrowed<'b> = DeleteTableRequestView<'b>;
13443 fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
13444 this
13445 }
13446 }
13447 #[derive(Clone, Debug)]
13453 pub struct DeleteTableRequestOwnedView(
13454 ::buffa::OwnedView<DeleteTableRequestView<'static>>,
13455 );
13456 impl DeleteTableRequestOwnedView {
13457 pub fn decode(
13467 bytes: ::buffa::bytes::Bytes,
13468 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13469 ::core::result::Result::Ok(
13470 DeleteTableRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
13471 )
13472 }
13473 pub fn decode_with_options(
13481 bytes: ::buffa::bytes::Bytes,
13482 opts: &::buffa::DecodeOptions,
13483 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13484 ::core::result::Result::Ok(
13485 DeleteTableRequestOwnedView(
13486 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
13487 ),
13488 )
13489 }
13490 pub fn from_owned(
13497 msg: &super::super::DeleteTableRequest,
13498 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13499 ::core::result::Result::Ok(
13500 DeleteTableRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
13501 )
13502 }
13503 #[must_use]
13505 pub fn view(&self) -> &DeleteTableRequestView<'_> {
13506 self.0.reborrow()
13507 }
13508 #[must_use]
13510 pub fn to_owned_message(&self) -> super::super::DeleteTableRequest {
13511 self.0.to_owned_message()
13512 }
13513 #[must_use]
13515 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
13516 self.0.bytes()
13517 }
13518 #[must_use]
13520 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
13521 self.0.into_bytes()
13522 }
13523 #[must_use]
13527 pub fn full_name(&self) -> &'_ str {
13528 self.0.reborrow().full_name
13529 }
13530 }
13531 impl ::core::convert::From<::buffa::OwnedView<DeleteTableRequestView<'static>>>
13532 for DeleteTableRequestOwnedView {
13533 fn from(inner: ::buffa::OwnedView<DeleteTableRequestView<'static>>) -> Self {
13534 DeleteTableRequestOwnedView(inner)
13535 }
13536 }
13537 impl ::core::convert::From<DeleteTableRequestOwnedView>
13538 for ::buffa::OwnedView<DeleteTableRequestView<'static>> {
13539 fn from(wrapper: DeleteTableRequestOwnedView) -> Self {
13540 wrapper.0
13541 }
13542 }
13543 impl ::core::convert::AsRef<::buffa::OwnedView<DeleteTableRequestView<'static>>>
13544 for DeleteTableRequestOwnedView {
13545 fn as_ref(&self) -> &::buffa::OwnedView<DeleteTableRequestView<'static>> {
13546 &self.0
13547 }
13548 }
13549 impl ::buffa::HasMessageView for super::super::DeleteTableRequest {
13550 type View<'a> = DeleteTableRequestView<'a>;
13551 type ViewHandle = DeleteTableRequestOwnedView;
13552 }
13553 impl ::serde::Serialize for DeleteTableRequestOwnedView {
13554 fn serialize<__S: ::serde::Serializer>(
13555 &self,
13556 __s: __S,
13557 ) -> ::core::result::Result<__S::Ok, __S::Error> {
13558 ::serde::Serialize::serialize(&self.0, __s)
13559 }
13560 }
13561 pub mod oneof {
13562 #[allow(unused_imports)]
13563 use super::*;
13564 pub mod dependency {
13565 #[allow(unused_imports)]
13566 use super::*;
13567 #[derive(Clone, Debug)]
13568 pub enum Dependency<'a> {
13569 Table(
13570 ::buffa::alloc::boxed::Box<
13571 super::super::super::super::__buffa::view::TableDependencyView<
13572 'a,
13573 >,
13574 >,
13575 ),
13576 Function(
13577 ::buffa::alloc::boxed::Box<
13578 super::super::super::super::__buffa::view::FunctionDependencyView<
13579 'a,
13580 >,
13581 >,
13582 ),
13583 }
13584 }
13585 }
13586 }
13587 pub mod oneof {
13588 #[allow(unused_imports)]
13589 use super::*;
13590 pub mod dependency {
13591 #[allow(unused_imports)]
13592 use super::*;
13593 #[derive(Clone, PartialEq, Debug)]
13594 pub enum Dependency {
13595 Table(::buffa::alloc::boxed::Box<super::super::super::TableDependency>),
13596 Function(
13597 ::buffa::alloc::boxed::Box<super::super::super::FunctionDependency>,
13598 ),
13599 }
13600 impl ::buffa::Oneof for Dependency {}
13601 impl From<super::super::super::TableDependency> for Dependency {
13602 fn from(v: super::super::super::TableDependency) -> Self {
13603 Self::Table(::buffa::alloc::boxed::Box::new(v))
13604 }
13605 }
13606 impl From<super::super::super::TableDependency>
13607 for ::core::option::Option<Dependency> {
13608 fn from(v: super::super::super::TableDependency) -> Self {
13609 Self::Some(Dependency::from(v))
13610 }
13611 }
13612 impl From<super::super::super::FunctionDependency> for Dependency {
13613 fn from(v: super::super::super::FunctionDependency) -> Self {
13614 Self::Function(::buffa::alloc::boxed::Box::new(v))
13615 }
13616 }
13617 impl From<super::super::super::FunctionDependency>
13618 for ::core::option::Option<Dependency> {
13619 fn from(v: super::super::super::FunctionDependency) -> Self {
13620 Self::Some(Dependency::from(v))
13621 }
13622 }
13623 impl serde::Serialize for Dependency {
13624 fn serialize<S: serde::Serializer>(
13625 &self,
13626 s: S,
13627 ) -> ::core::result::Result<S::Ok, S::Error> {
13628 use serde::ser::SerializeMap;
13629 let mut map = s.serialize_map(Some(1))?;
13630 match self {
13631 Self::Table(v) => {
13632 map.serialize_entry("table", v)?;
13633 }
13634 Self::Function(v) => {
13635 map.serialize_entry("function", v)?;
13636 }
13637 }
13638 map.end()
13639 }
13640 }
13641 }
13642 }
13643 pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
13645 reg.register_json_any(super::__TABLE_SUMMARY_JSON_ANY);
13646 reg.register_json_any(super::__COLUMN_JSON_ANY);
13647 reg.register_json_any(super::__TABLE_DEPENDENCY_JSON_ANY);
13648 reg.register_json_any(super::__FUNCTION_DEPENDENCY_JSON_ANY);
13649 reg.register_json_any(super::__DEPENDENCY_JSON_ANY);
13650 reg.register_json_any(super::__DEPENDENCY_LIST_JSON_ANY);
13651 reg.register_json_any(super::__TABLE_JSON_ANY);
13652 reg.register_json_any(super::__LIST_TABLE_SUMMARIES_REQUEST_JSON_ANY);
13653 reg.register_json_any(super::__LIST_TABLE_SUMMARIES_RESPONSE_JSON_ANY);
13654 reg.register_json_any(super::__LIST_TABLES_REQUEST_JSON_ANY);
13655 reg.register_json_any(super::__LIST_TABLES_RESPONSE_JSON_ANY);
13656 reg.register_json_any(super::__CREATE_TABLE_REQUEST_JSON_ANY);
13657 reg.register_json_any(super::__GET_TABLE_REQUEST_JSON_ANY);
13658 reg.register_json_any(super::__GET_TABLE_EXISTS_REQUEST_JSON_ANY);
13659 reg.register_json_any(super::__GET_TABLE_EXISTS_RESPONSE_JSON_ANY);
13660 reg.register_json_any(super::__DELETE_TABLE_REQUEST_JSON_ANY);
13661 }
13662}
13663#[doc(inline)]
13664pub use self::__buffa::view::TableSummaryView;
13665#[doc(inline)]
13666pub use self::__buffa::view::TableSummaryOwnedView;
13667#[doc(inline)]
13668pub use self::__buffa::view::ColumnView;
13669#[doc(inline)]
13670pub use self::__buffa::view::ColumnOwnedView;
13671#[doc(inline)]
13672pub use self::__buffa::view::TableDependencyView;
13673#[doc(inline)]
13674pub use self::__buffa::view::TableDependencyOwnedView;
13675#[doc(inline)]
13676pub use self::__buffa::view::FunctionDependencyView;
13677#[doc(inline)]
13678pub use self::__buffa::view::FunctionDependencyOwnedView;
13679#[doc(inline)]
13680pub use self::__buffa::view::DependencyView;
13681#[doc(inline)]
13682pub use self::__buffa::view::DependencyOwnedView;
13683#[doc(inline)]
13684pub use self::__buffa::view::DependencyListView;
13685#[doc(inline)]
13686pub use self::__buffa::view::DependencyListOwnedView;
13687#[doc(inline)]
13688pub use self::__buffa::view::TableView;
13689#[doc(inline)]
13690pub use self::__buffa::view::TableOwnedView;
13691#[doc(inline)]
13692pub use self::__buffa::view::ListTableSummariesRequestView;
13693#[doc(inline)]
13694pub use self::__buffa::view::ListTableSummariesRequestOwnedView;
13695#[doc(inline)]
13696pub use self::__buffa::view::ListTableSummariesResponseView;
13697#[doc(inline)]
13698pub use self::__buffa::view::ListTableSummariesResponseOwnedView;
13699#[doc(inline)]
13700pub use self::__buffa::view::ListTablesRequestView;
13701#[doc(inline)]
13702pub use self::__buffa::view::ListTablesRequestOwnedView;
13703#[doc(inline)]
13704pub use self::__buffa::view::ListTablesResponseView;
13705#[doc(inline)]
13706pub use self::__buffa::view::ListTablesResponseOwnedView;
13707#[doc(inline)]
13708pub use self::__buffa::view::CreateTableRequestView;
13709#[doc(inline)]
13710pub use self::__buffa::view::CreateTableRequestOwnedView;
13711#[doc(inline)]
13712pub use self::__buffa::view::GetTableRequestView;
13713#[doc(inline)]
13714pub use self::__buffa::view::GetTableRequestOwnedView;
13715#[doc(inline)]
13716pub use self::__buffa::view::GetTableExistsRequestView;
13717#[doc(inline)]
13718pub use self::__buffa::view::GetTableExistsRequestOwnedView;
13719#[doc(inline)]
13720pub use self::__buffa::view::GetTableExistsResponseView;
13721#[doc(inline)]
13722pub use self::__buffa::view::GetTableExistsResponseOwnedView;
13723#[doc(inline)]
13724pub use self::__buffa::view::DeleteTableRequestView;
13725#[doc(inline)]
13726pub use self::__buffa::view::DeleteTableRequestOwnedView;
13727#[doc(inline)]
13728pub use self::__buffa::register_types;