google_cloud_rust_raw/spanner/v1/
keys.rs

1// This file is generated by rust-protobuf 2.28.0. Do not edit
2// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `google/spanner/v1/keys.proto`
21
22/// Generated files are compatible only with the same version
23/// of protobuf runtime.
24// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0;
25
26#[derive(PartialEq,Clone,Default)]
27pub struct KeyRange {
28    // message oneof groups
29    pub start_key_type: ::std::option::Option<KeyRange_oneof_start_key_type>,
30    pub end_key_type: ::std::option::Option<KeyRange_oneof_end_key_type>,
31    // special fields
32    pub unknown_fields: ::protobuf::UnknownFields,
33    pub cached_size: ::protobuf::CachedSize,
34}
35
36impl<'a> ::std::default::Default for &'a KeyRange {
37    fn default() -> &'a KeyRange {
38        <KeyRange as ::protobuf::Message>::default_instance()
39    }
40}
41
42#[derive(Clone,PartialEq,Debug)]
43pub enum KeyRange_oneof_start_key_type {
44    start_closed(::protobuf::well_known_types::ListValue),
45    start_open(::protobuf::well_known_types::ListValue),
46}
47
48#[derive(Clone,PartialEq,Debug)]
49pub enum KeyRange_oneof_end_key_type {
50    end_closed(::protobuf::well_known_types::ListValue),
51    end_open(::protobuf::well_known_types::ListValue),
52}
53
54impl KeyRange {
55    pub fn new() -> KeyRange {
56        ::std::default::Default::default()
57    }
58
59    // .google.protobuf.ListValue start_closed = 1;
60
61
62    pub fn get_start_closed(&self) -> &::protobuf::well_known_types::ListValue {
63        match self.start_key_type {
64            ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(ref v)) => v,
65            _ => <::protobuf::well_known_types::ListValue as ::protobuf::Message>::default_instance(),
66        }
67    }
68    pub fn clear_start_closed(&mut self) {
69        self.start_key_type = ::std::option::Option::None;
70    }
71
72    pub fn has_start_closed(&self) -> bool {
73        match self.start_key_type {
74            ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(..)) => true,
75            _ => false,
76        }
77    }
78
79    // Param is passed by value, moved
80    pub fn set_start_closed(&mut self, v: ::protobuf::well_known_types::ListValue) {
81        self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(v))
82    }
83
84    // Mutable pointer to the field.
85    pub fn mut_start_closed(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
86        if let ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(_)) = self.start_key_type {
87        } else {
88            self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(::protobuf::well_known_types::ListValue::new()));
89        }
90        match self.start_key_type {
91            ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(ref mut v)) => v,
92            _ => panic!(),
93        }
94    }
95
96    // Take field
97    pub fn take_start_closed(&mut self) -> ::protobuf::well_known_types::ListValue {
98        if self.has_start_closed() {
99            match self.start_key_type.take() {
100                ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(v)) => v,
101                _ => panic!(),
102            }
103        } else {
104            ::protobuf::well_known_types::ListValue::new()
105        }
106    }
107
108    // .google.protobuf.ListValue start_open = 2;
109
110
111    pub fn get_start_open(&self) -> &::protobuf::well_known_types::ListValue {
112        match self.start_key_type {
113            ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(ref v)) => v,
114            _ => <::protobuf::well_known_types::ListValue as ::protobuf::Message>::default_instance(),
115        }
116    }
117    pub fn clear_start_open(&mut self) {
118        self.start_key_type = ::std::option::Option::None;
119    }
120
121    pub fn has_start_open(&self) -> bool {
122        match self.start_key_type {
123            ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(..)) => true,
124            _ => false,
125        }
126    }
127
128    // Param is passed by value, moved
129    pub fn set_start_open(&mut self, v: ::protobuf::well_known_types::ListValue) {
130        self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(v))
131    }
132
133    // Mutable pointer to the field.
134    pub fn mut_start_open(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
135        if let ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(_)) = self.start_key_type {
136        } else {
137            self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(::protobuf::well_known_types::ListValue::new()));
138        }
139        match self.start_key_type {
140            ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(ref mut v)) => v,
141            _ => panic!(),
142        }
143    }
144
145    // Take field
146    pub fn take_start_open(&mut self) -> ::protobuf::well_known_types::ListValue {
147        if self.has_start_open() {
148            match self.start_key_type.take() {
149                ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(v)) => v,
150                _ => panic!(),
151            }
152        } else {
153            ::protobuf::well_known_types::ListValue::new()
154        }
155    }
156
157    // .google.protobuf.ListValue end_closed = 3;
158
159
160    pub fn get_end_closed(&self) -> &::protobuf::well_known_types::ListValue {
161        match self.end_key_type {
162            ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(ref v)) => v,
163            _ => <::protobuf::well_known_types::ListValue as ::protobuf::Message>::default_instance(),
164        }
165    }
166    pub fn clear_end_closed(&mut self) {
167        self.end_key_type = ::std::option::Option::None;
168    }
169
170    pub fn has_end_closed(&self) -> bool {
171        match self.end_key_type {
172            ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(..)) => true,
173            _ => false,
174        }
175    }
176
177    // Param is passed by value, moved
178    pub fn set_end_closed(&mut self, v: ::protobuf::well_known_types::ListValue) {
179        self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(v))
180    }
181
182    // Mutable pointer to the field.
183    pub fn mut_end_closed(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
184        if let ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(_)) = self.end_key_type {
185        } else {
186            self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(::protobuf::well_known_types::ListValue::new()));
187        }
188        match self.end_key_type {
189            ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(ref mut v)) => v,
190            _ => panic!(),
191        }
192    }
193
194    // Take field
195    pub fn take_end_closed(&mut self) -> ::protobuf::well_known_types::ListValue {
196        if self.has_end_closed() {
197            match self.end_key_type.take() {
198                ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(v)) => v,
199                _ => panic!(),
200            }
201        } else {
202            ::protobuf::well_known_types::ListValue::new()
203        }
204    }
205
206    // .google.protobuf.ListValue end_open = 4;
207
208
209    pub fn get_end_open(&self) -> &::protobuf::well_known_types::ListValue {
210        match self.end_key_type {
211            ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(ref v)) => v,
212            _ => <::protobuf::well_known_types::ListValue as ::protobuf::Message>::default_instance(),
213        }
214    }
215    pub fn clear_end_open(&mut self) {
216        self.end_key_type = ::std::option::Option::None;
217    }
218
219    pub fn has_end_open(&self) -> bool {
220        match self.end_key_type {
221            ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(..)) => true,
222            _ => false,
223        }
224    }
225
226    // Param is passed by value, moved
227    pub fn set_end_open(&mut self, v: ::protobuf::well_known_types::ListValue) {
228        self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(v))
229    }
230
231    // Mutable pointer to the field.
232    pub fn mut_end_open(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
233        if let ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(_)) = self.end_key_type {
234        } else {
235            self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(::protobuf::well_known_types::ListValue::new()));
236        }
237        match self.end_key_type {
238            ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(ref mut v)) => v,
239            _ => panic!(),
240        }
241    }
242
243    // Take field
244    pub fn take_end_open(&mut self) -> ::protobuf::well_known_types::ListValue {
245        if self.has_end_open() {
246            match self.end_key_type.take() {
247                ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(v)) => v,
248                _ => panic!(),
249            }
250        } else {
251            ::protobuf::well_known_types::ListValue::new()
252        }
253    }
254}
255
256impl ::protobuf::Message for KeyRange {
257    fn is_initialized(&self) -> bool {
258        if let Some(KeyRange_oneof_start_key_type::start_closed(ref v)) = self.start_key_type {
259            if !v.is_initialized() {
260                return false;
261            }
262        }
263        if let Some(KeyRange_oneof_start_key_type::start_open(ref v)) = self.start_key_type {
264            if !v.is_initialized() {
265                return false;
266            }
267        }
268        if let Some(KeyRange_oneof_end_key_type::end_closed(ref v)) = self.end_key_type {
269            if !v.is_initialized() {
270                return false;
271            }
272        }
273        if let Some(KeyRange_oneof_end_key_type::end_open(ref v)) = self.end_key_type {
274            if !v.is_initialized() {
275                return false;
276            }
277        }
278        true
279    }
280
281    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
282        while !is.eof()? {
283            let (field_number, wire_type) = is.read_tag_unpack()?;
284            match field_number {
285                1 => {
286                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
287                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
288                    }
289                    self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(is.read_message()?));
290                },
291                2 => {
292                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
293                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
294                    }
295                    self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(is.read_message()?));
296                },
297                3 => {
298                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
299                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
300                    }
301                    self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(is.read_message()?));
302                },
303                4 => {
304                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
305                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
306                    }
307                    self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(is.read_message()?));
308                },
309                _ => {
310                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
311                },
312            };
313        }
314        ::std::result::Result::Ok(())
315    }
316
317    // Compute sizes of nested messages
318    #[allow(unused_variables)]
319    fn compute_size(&self) -> u32 {
320        let mut my_size = 0;
321        if let ::std::option::Option::Some(ref v) = self.start_key_type {
322            match v {
323                &KeyRange_oneof_start_key_type::start_closed(ref v) => {
324                    let len = v.compute_size();
325                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
326                },
327                &KeyRange_oneof_start_key_type::start_open(ref v) => {
328                    let len = v.compute_size();
329                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
330                },
331            };
332        }
333        if let ::std::option::Option::Some(ref v) = self.end_key_type {
334            match v {
335                &KeyRange_oneof_end_key_type::end_closed(ref v) => {
336                    let len = v.compute_size();
337                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
338                },
339                &KeyRange_oneof_end_key_type::end_open(ref v) => {
340                    let len = v.compute_size();
341                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
342                },
343            };
344        }
345        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
346        self.cached_size.set(my_size);
347        my_size
348    }
349
350    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
351        if let ::std::option::Option::Some(ref v) = self.start_key_type {
352            match v {
353                &KeyRange_oneof_start_key_type::start_closed(ref v) => {
354                    os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
355                    os.write_raw_varint32(v.get_cached_size())?;
356                    v.write_to_with_cached_sizes(os)?;
357                },
358                &KeyRange_oneof_start_key_type::start_open(ref v) => {
359                    os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
360                    os.write_raw_varint32(v.get_cached_size())?;
361                    v.write_to_with_cached_sizes(os)?;
362                },
363            };
364        }
365        if let ::std::option::Option::Some(ref v) = self.end_key_type {
366            match v {
367                &KeyRange_oneof_end_key_type::end_closed(ref v) => {
368                    os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
369                    os.write_raw_varint32(v.get_cached_size())?;
370                    v.write_to_with_cached_sizes(os)?;
371                },
372                &KeyRange_oneof_end_key_type::end_open(ref v) => {
373                    os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
374                    os.write_raw_varint32(v.get_cached_size())?;
375                    v.write_to_with_cached_sizes(os)?;
376                },
377            };
378        }
379        os.write_unknown_fields(self.get_unknown_fields())?;
380        ::std::result::Result::Ok(())
381    }
382
383    fn get_cached_size(&self) -> u32 {
384        self.cached_size.get()
385    }
386
387    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
388        &self.unknown_fields
389    }
390
391    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
392        &mut self.unknown_fields
393    }
394
395    fn as_any(&self) -> &dyn (::std::any::Any) {
396        self as &dyn (::std::any::Any)
397    }
398    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
399        self as &mut dyn (::std::any::Any)
400    }
401    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
402        self
403    }
404
405    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
406        Self::descriptor_static()
407    }
408
409    fn new() -> KeyRange {
410        KeyRange::new()
411    }
412
413    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
414        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
415        descriptor.get(|| {
416            let mut fields = ::std::vec::Vec::new();
417            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
418                "start_closed",
419                KeyRange::has_start_closed,
420                KeyRange::get_start_closed,
421            ));
422            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
423                "start_open",
424                KeyRange::has_start_open,
425                KeyRange::get_start_open,
426            ));
427            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
428                "end_closed",
429                KeyRange::has_end_closed,
430                KeyRange::get_end_closed,
431            ));
432            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
433                "end_open",
434                KeyRange::has_end_open,
435                KeyRange::get_end_open,
436            ));
437            ::protobuf::reflect::MessageDescriptor::new_pb_name::<KeyRange>(
438                "KeyRange",
439                fields,
440                file_descriptor_proto()
441            )
442        })
443    }
444
445    fn default_instance() -> &'static KeyRange {
446        static instance: ::protobuf::rt::LazyV2<KeyRange> = ::protobuf::rt::LazyV2::INIT;
447        instance.get(KeyRange::new)
448    }
449}
450
451impl ::protobuf::Clear for KeyRange {
452    fn clear(&mut self) {
453        self.start_key_type = ::std::option::Option::None;
454        self.start_key_type = ::std::option::Option::None;
455        self.end_key_type = ::std::option::Option::None;
456        self.end_key_type = ::std::option::Option::None;
457        self.unknown_fields.clear();
458    }
459}
460
461impl ::std::fmt::Debug for KeyRange {
462    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
463        ::protobuf::text_format::fmt(self, f)
464    }
465}
466
467impl ::protobuf::reflect::ProtobufValue for KeyRange {
468    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
469        ::protobuf::reflect::ReflectValueRef::Message(self)
470    }
471}
472
473#[derive(PartialEq,Clone,Default)]
474pub struct KeySet {
475    // message fields
476    pub keys: ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue>,
477    pub ranges: ::protobuf::RepeatedField<KeyRange>,
478    pub all: bool,
479    // special fields
480    pub unknown_fields: ::protobuf::UnknownFields,
481    pub cached_size: ::protobuf::CachedSize,
482}
483
484impl<'a> ::std::default::Default for &'a KeySet {
485    fn default() -> &'a KeySet {
486        <KeySet as ::protobuf::Message>::default_instance()
487    }
488}
489
490impl KeySet {
491    pub fn new() -> KeySet {
492        ::std::default::Default::default()
493    }
494
495    // repeated .google.protobuf.ListValue keys = 1;
496
497
498    pub fn get_keys(&self) -> &[::protobuf::well_known_types::ListValue] {
499        &self.keys
500    }
501    pub fn clear_keys(&mut self) {
502        self.keys.clear();
503    }
504
505    // Param is passed by value, moved
506    pub fn set_keys(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue>) {
507        self.keys = v;
508    }
509
510    // Mutable pointer to the field.
511    pub fn mut_keys(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue> {
512        &mut self.keys
513    }
514
515    // Take field
516    pub fn take_keys(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue> {
517        ::std::mem::replace(&mut self.keys, ::protobuf::RepeatedField::new())
518    }
519
520    // repeated .google.spanner.v1.KeyRange ranges = 2;
521
522
523    pub fn get_ranges(&self) -> &[KeyRange] {
524        &self.ranges
525    }
526    pub fn clear_ranges(&mut self) {
527        self.ranges.clear();
528    }
529
530    // Param is passed by value, moved
531    pub fn set_ranges(&mut self, v: ::protobuf::RepeatedField<KeyRange>) {
532        self.ranges = v;
533    }
534
535    // Mutable pointer to the field.
536    pub fn mut_ranges(&mut self) -> &mut ::protobuf::RepeatedField<KeyRange> {
537        &mut self.ranges
538    }
539
540    // Take field
541    pub fn take_ranges(&mut self) -> ::protobuf::RepeatedField<KeyRange> {
542        ::std::mem::replace(&mut self.ranges, ::protobuf::RepeatedField::new())
543    }
544
545    // bool all = 3;
546
547
548    pub fn get_all(&self) -> bool {
549        self.all
550    }
551    pub fn clear_all(&mut self) {
552        self.all = false;
553    }
554
555    // Param is passed by value, moved
556    pub fn set_all(&mut self, v: bool) {
557        self.all = v;
558    }
559}
560
561impl ::protobuf::Message for KeySet {
562    fn is_initialized(&self) -> bool {
563        for v in &self.keys {
564            if !v.is_initialized() {
565                return false;
566            }
567        };
568        for v in &self.ranges {
569            if !v.is_initialized() {
570                return false;
571            }
572        };
573        true
574    }
575
576    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
577        while !is.eof()? {
578            let (field_number, wire_type) = is.read_tag_unpack()?;
579            match field_number {
580                1 => {
581                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.keys)?;
582                },
583                2 => {
584                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ranges)?;
585                },
586                3 => {
587                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
588                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
589                    }
590                    let tmp = is.read_bool()?;
591                    self.all = tmp;
592                },
593                _ => {
594                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
595                },
596            };
597        }
598        ::std::result::Result::Ok(())
599    }
600
601    // Compute sizes of nested messages
602    #[allow(unused_variables)]
603    fn compute_size(&self) -> u32 {
604        let mut my_size = 0;
605        for value in &self.keys {
606            let len = value.compute_size();
607            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
608        };
609        for value in &self.ranges {
610            let len = value.compute_size();
611            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
612        };
613        if self.all != false {
614            my_size += 2;
615        }
616        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
617        self.cached_size.set(my_size);
618        my_size
619    }
620
621    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
622        for v in &self.keys {
623            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
624            os.write_raw_varint32(v.get_cached_size())?;
625            v.write_to_with_cached_sizes(os)?;
626        };
627        for v in &self.ranges {
628            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
629            os.write_raw_varint32(v.get_cached_size())?;
630            v.write_to_with_cached_sizes(os)?;
631        };
632        if self.all != false {
633            os.write_bool(3, self.all)?;
634        }
635        os.write_unknown_fields(self.get_unknown_fields())?;
636        ::std::result::Result::Ok(())
637    }
638
639    fn get_cached_size(&self) -> u32 {
640        self.cached_size.get()
641    }
642
643    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
644        &self.unknown_fields
645    }
646
647    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
648        &mut self.unknown_fields
649    }
650
651    fn as_any(&self) -> &dyn (::std::any::Any) {
652        self as &dyn (::std::any::Any)
653    }
654    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
655        self as &mut dyn (::std::any::Any)
656    }
657    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
658        self
659    }
660
661    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
662        Self::descriptor_static()
663    }
664
665    fn new() -> KeySet {
666        KeySet::new()
667    }
668
669    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
670        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
671        descriptor.get(|| {
672            let mut fields = ::std::vec::Vec::new();
673            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::ListValue>>(
674                "keys",
675                |m: &KeySet| { &m.keys },
676                |m: &mut KeySet| { &mut m.keys },
677            ));
678            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<KeyRange>>(
679                "ranges",
680                |m: &KeySet| { &m.ranges },
681                |m: &mut KeySet| { &mut m.ranges },
682            ));
683            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
684                "all",
685                |m: &KeySet| { &m.all },
686                |m: &mut KeySet| { &mut m.all },
687            ));
688            ::protobuf::reflect::MessageDescriptor::new_pb_name::<KeySet>(
689                "KeySet",
690                fields,
691                file_descriptor_proto()
692            )
693        })
694    }
695
696    fn default_instance() -> &'static KeySet {
697        static instance: ::protobuf::rt::LazyV2<KeySet> = ::protobuf::rt::LazyV2::INIT;
698        instance.get(KeySet::new)
699    }
700}
701
702impl ::protobuf::Clear for KeySet {
703    fn clear(&mut self) {
704        self.keys.clear();
705        self.ranges.clear();
706        self.all = false;
707        self.unknown_fields.clear();
708    }
709}
710
711impl ::std::fmt::Debug for KeySet {
712    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
713        ::protobuf::text_format::fmt(self, f)
714    }
715}
716
717impl ::protobuf::reflect::ProtobufValue for KeySet {
718    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
719        ::protobuf::reflect::ReflectValueRef::Message(self)
720    }
721}
722
723static file_descriptor_proto_data: &'static [u8] = b"\
724    \n\x1cgoogle/spanner/v1/keys.proto\x12\x11google.spanner.v1\x1a\x1cgoogl\
725    e/protobuf/struct.proto\"\xa0\x02\n\x08KeyRange\x12?\n\x0cstart_closed\
726    \x18\x01\x20\x01(\x0b2\x1a.google.protobuf.ListValueH\0R\x0bstartClosed\
727    \x12;\n\nstart_open\x18\x02\x20\x01(\x0b2\x1a.google.protobuf.ListValueH\
728    \0R\tstartOpen\x12;\n\nend_closed\x18\x03\x20\x01(\x0b2\x1a.google.proto\
729    buf.ListValueH\x01R\tendClosed\x127\n\x08end_open\x18\x04\x20\x01(\x0b2\
730    \x1a.google.protobuf.ListValueH\x01R\x07endOpenB\x10\n\x0estart_key_type\
731    B\x0e\n\x0cend_key_type\"\x7f\n\x06KeySet\x12.\n\x04keys\x18\x01\x20\x03\
732    (\x0b2\x1a.google.protobuf.ListValueR\x04keys\x123\n\x06ranges\x18\x02\
733    \x20\x03(\x0b2\x1b.google.spanner.v1.KeyRangeR\x06ranges\x12\x10\n\x03al\
734    l\x18\x03\x20\x01(\x08R\x03allB\xac\x01\n\x15com.google.spanner.v1B\tKey\
735    sProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\
736    \x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\
737    \xea\x02\x1aGoogle::Cloud::Spanner::V1J\xfc+\n\x07\x12\x05\x0e\0\xa2\x01\
738    \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202022\
739    \x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\
740    \x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20us\
741    e\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20Licens\
742    e.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\
743    \n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\
744    \x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\
745    \x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\x20Licen\
746    se\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHO\
747    UT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20\
748    express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20sp\
749    ecific\x20language\x20governing\x20permissions\x20and\n\x20limitations\
750    \x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x1a\n\t\n\
751    \x02\x03\0\x12\x03\x12\0&\n\x08\n\x01\x08\x12\x03\x14\04\n\t\n\x02\x08%\
752    \x12\x03\x14\04\n\x08\n\x01\x08\x12\x03\x15\0L\n\t\n\x02\x08\x0b\x12\x03\
753    \x15\0L\n\x08\n\x01\x08\x12\x03\x16\0\"\n\t\n\x02\x08\n\x12\x03\x16\0\"\
754    \n\x08\n\x01\x08\x12\x03\x17\0*\n\t\n\x02\x08\x08\x12\x03\x17\0*\n\x08\n\
755    \x01\x08\x12\x03\x18\0.\n\t\n\x02\x08\x01\x12\x03\x18\0.\n\x08\n\x01\x08\
756    \x12\x03\x19\04\n\t\n\x02\x08)\x12\x03\x19\04\n\x08\n\x01\x08\x12\x03\
757    \x1a\03\n\t\n\x02\x08-\x12\x03\x1a\03\n\xb5\x15\n\x02\x04\0\x12\x05t\0\
758    \x8a\x01\x01\x1a\xa7\x15\x20KeyRange\x20represents\x20a\x20range\x20of\
759    \x20rows\x20in\x20a\x20table\x20or\x20index.\n\n\x20A\x20range\x20has\
760    \x20a\x20start\x20key\x20and\x20an\x20end\x20key.\x20These\x20keys\x20ca\
761    n\x20be\x20open\x20or\n\x20closed,\x20indicating\x20if\x20the\x20range\
762    \x20includes\x20rows\x20with\x20that\x20key.\n\n\x20Keys\x20are\x20repre\
763    sented\x20by\x20lists,\x20where\x20the\x20ith\x20value\x20in\x20the\x20l\
764    ist\n\x20corresponds\x20to\x20the\x20ith\x20component\x20of\x20the\x20ta\
765    ble\x20or\x20index\x20primary\x20key.\n\x20Individual\x20values\x20are\
766    \x20encoded\x20as\x20described\n\x20[here][google.spanner.v1.TypeCode].\
767    \n\n\x20For\x20example,\x20consider\x20the\x20following\x20table\x20defi\
768    nition:\n\n\x20\x20\x20\x20\x20CREATE\x20TABLE\x20UserEvents\x20(\n\x20\
769    \x20\x20\x20\x20\x20\x20UserName\x20STRING(MAX),\n\x20\x20\x20\x20\x20\
770    \x20\x20EventDate\x20STRING(10)\n\x20\x20\x20\x20\x20)\x20PRIMARY\x20KEY\
771    (UserName,\x20EventDate);\n\n\x20The\x20following\x20keys\x20name\x20row\
772    s\x20in\x20this\x20table:\n\n\x20\x20\x20\x20\x20[\"Bob\",\x20\"2014-09-\
773    23\"]\n\x20\x20\x20\x20\x20[\"Alfred\",\x20\"2015-06-12\"]\n\n\x20Since\
774    \x20the\x20`UserEvents`\x20table's\x20`PRIMARY\x20KEY`\x20clause\x20name\
775    s\x20two\n\x20columns,\x20each\x20`UserEvents`\x20key\x20has\x20two\x20e\
776    lements;\x20the\x20first\x20is\x20the\n\x20`UserName`,\x20and\x20the\x20\
777    second\x20is\x20the\x20`EventDate`.\n\n\x20Key\x20ranges\x20with\x20mult\
778    iple\x20components\x20are\x20interpreted\n\x20lexicographically\x20by\
779    \x20component\x20using\x20the\x20table\x20or\x20index\x20key's\x20declar\
780    ed\n\x20sort\x20order.\x20For\x20example,\x20the\x20following\x20range\
781    \x20returns\x20all\x20events\x20for\n\x20user\x20`\"Bob\"`\x20that\x20oc\
782    curred\x20in\x20the\x20year\x202015:\n\n\x20\x20\x20\x20\x20\"start_clos\
783    ed\":\x20[\"Bob\",\x20\"2015-01-01\"]\n\x20\x20\x20\x20\x20\"end_closed\
784    \":\x20[\"Bob\",\x20\"2015-12-31\"]\n\n\x20Start\x20and\x20end\x20keys\
785    \x20can\x20omit\x20trailing\x20key\x20components.\x20This\x20affects\x20\
786    the\n\x20inclusion\x20and\x20exclusion\x20of\x20rows\x20that\x20exactly\
787    \x20match\x20the\x20provided\x20key\n\x20components:\x20if\x20the\x20key\
788    \x20is\x20closed,\x20then\x20rows\x20that\x20exactly\x20match\x20the\n\
789    \x20provided\x20components\x20are\x20included;\x20if\x20the\x20key\x20is\
790    \x20open,\x20then\x20rows\n\x20that\x20exactly\x20match\x20are\x20not\
791    \x20included.\n\n\x20For\x20example,\x20the\x20following\x20range\x20inc\
792    ludes\x20all\x20events\x20for\x20`\"Bob\"`\x20that\n\x20occurred\x20duri\
793    ng\x20and\x20after\x20the\x20year\x202000:\n\n\x20\x20\x20\x20\x20\"star\
794    t_closed\":\x20[\"Bob\",\x20\"2000-01-01\"]\n\x20\x20\x20\x20\x20\"end_c\
795    losed\":\x20[\"Bob\"]\n\n\x20The\x20next\x20example\x20retrieves\x20all\
796    \x20events\x20for\x20`\"Bob\"`:\n\n\x20\x20\x20\x20\x20\"start_closed\":\
797    \x20[\"Bob\"]\n\x20\x20\x20\x20\x20\"end_closed\":\x20[\"Bob\"]\n\n\x20T\
798    o\x20retrieve\x20events\x20before\x20the\x20year\x202000:\n\n\x20\x20\
799    \x20\x20\x20\"start_closed\":\x20[\"Bob\"]\n\x20\x20\x20\x20\x20\"end_op\
800    en\":\x20[\"Bob\",\x20\"2000-01-01\"]\n\n\x20The\x20following\x20range\
801    \x20includes\x20all\x20rows\x20in\x20the\x20table:\n\n\x20\x20\x20\x20\
802    \x20\"start_closed\":\x20[]\n\x20\x20\x20\x20\x20\"end_closed\":\x20[]\n\
803    \n\x20This\x20range\x20returns\x20all\x20users\x20whose\x20`UserName`\
804    \x20begins\x20with\x20any\n\x20character\x20from\x20A\x20to\x20C:\n\n\
805    \x20\x20\x20\x20\x20\"start_closed\":\x20[\"A\"]\n\x20\x20\x20\x20\x20\"\
806    end_open\":\x20[\"D\"]\n\n\x20This\x20range\x20returns\x20all\x20users\
807    \x20whose\x20`UserName`\x20begins\x20with\x20B:\n\n\x20\x20\x20\x20\x20\
808    \"start_closed\":\x20[\"B\"]\n\x20\x20\x20\x20\x20\"end_open\":\x20[\"C\
809    \"]\n\n\x20Key\x20ranges\x20honor\x20column\x20sort\x20order.\x20For\x20\
810    example,\x20suppose\x20a\x20table\x20is\n\x20defined\x20as\x20follows:\n\
811    \n\x20\x20\x20\x20\x20CREATE\x20TABLE\x20DescendingSortedTable\x20{\n\
812    \x20\x20\x20\x20\x20\x20\x20Key\x20INT64,\n\x20\x20\x20\x20\x20\x20\x20.\
813    ..\n\x20\x20\x20\x20\x20)\x20PRIMARY\x20KEY(Key\x20DESC);\n\n\x20The\x20\
814    following\x20range\x20retrieves\x20all\x20rows\x20with\x20key\x20values\
815    \x20between\x201\n\x20and\x20100\x20inclusive:\n\n\x20\x20\x20\x20\x20\"\
816    start_closed\":\x20[\"100\"]\n\x20\x20\x20\x20\x20\"end_closed\":\x20[\"\
817    1\"]\n\n\x20Note\x20that\x20100\x20is\x20passed\x20as\x20the\x20start,\
818    \x20and\x201\x20is\x20passed\x20as\x20the\x20end,\n\x20because\x20`Key`\
819    \x20is\x20a\x20descending\x20column\x20in\x20the\x20schema.\n\n\n\n\x03\
820    \x04\0\x01\x12\x03t\x08\x10\nP\n\x04\x04\0\x08\0\x12\x04v\x02~\x03\x1aB\
821    \x20The\x20start\x20key\x20must\x20be\x20provided.\x20It\x20can\x20be\
822    \x20either\x20closed\x20or\x20open.\n\n\x0c\n\x05\x04\0\x08\0\x01\x12\
823    \x03v\x08\x16\n\x93\x01\n\x04\x04\0\x02\0\x12\x03y\x04/\x1a\x85\x01\x20I\
824    f\x20the\x20start\x20is\x20closed,\x20then\x20the\x20range\x20includes\
825    \x20all\x20rows\x20whose\n\x20first\x20`len(start_closed)`\x20key\x20col\
826    umns\x20exactly\x20match\x20`start_closed`.\n\n\x0c\n\x05\x04\0\x02\0\
827    \x06\x12\x03y\x04\x1d\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03y\x1e*\n\x0c\n\
828    \x05\x04\0\x02\0\x03\x12\x03y-.\n\x88\x01\n\x04\x04\0\x02\x01\x12\x03}\
829    \x04-\x1a{\x20If\x20the\x20start\x20is\x20open,\x20then\x20the\x20range\
830    \x20excludes\x20rows\x20whose\x20first\n\x20`len(start_open)`\x20key\x20\
831    columns\x20exactly\x20match\x20`start_open`.\n\n\x0c\n\x05\x04\0\x02\x01\
832    \x06\x12\x03}\x04\x1d\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03}\x1e(\n\x0c\
833    \n\x05\x04\0\x02\x01\x03\x12\x03}+,\nP\n\x04\x04\0\x08\x01\x12\x06\x81\
834    \x01\x02\x89\x01\x03\x1a@\x20The\x20end\x20key\x20must\x20be\x20provided\
835    .\x20It\x20can\x20be\x20either\x20closed\x20or\x20open.\n\n\r\n\x05\x04\
836    \0\x08\x01\x01\x12\x04\x81\x01\x08\x14\n\x8d\x01\n\x04\x04\0\x02\x02\x12\
837    \x04\x84\x01\x04-\x1a\x7f\x20If\x20the\x20end\x20is\x20closed,\x20then\
838    \x20the\x20range\x20includes\x20all\x20rows\x20whose\n\x20first\x20`len(\
839    end_closed)`\x20key\x20columns\x20exactly\x20match\x20`end_closed`.\n\n\
840    \r\n\x05\x04\0\x02\x02\x06\x12\x04\x84\x01\x04\x1d\n\r\n\x05\x04\0\x02\
841    \x02\x01\x12\x04\x84\x01\x1e(\n\r\n\x05\x04\0\x02\x02\x03\x12\x04\x84\
842    \x01+,\n\x83\x01\n\x04\x04\0\x02\x03\x12\x04\x88\x01\x04+\x1au\x20If\x20\
843    the\x20end\x20is\x20open,\x20then\x20the\x20range\x20excludes\x20rows\
844    \x20whose\x20first\n\x20`len(end_open)`\x20key\x20columns\x20exactly\x20\
845    match\x20`end_open`.\n\n\r\n\x05\x04\0\x02\x03\x06\x12\x04\x88\x01\x04\
846    \x1d\n\r\n\x05\x04\0\x02\x03\x01\x12\x04\x88\x01\x1e&\n\r\n\x05\x04\0\
847    \x02\x03\x03\x12\x04\x88\x01)*\n\x86\x03\n\x02\x04\x01\x12\x06\x93\x01\0\
848    \xa2\x01\x01\x1a\xf7\x02\x20`KeySet`\x20defines\x20a\x20collection\x20of\
849    \x20Cloud\x20Spanner\x20keys\x20and/or\x20key\x20ranges.\x20All\n\x20the\
850    \x20keys\x20are\x20expected\x20to\x20be\x20in\x20the\x20same\x20table\
851    \x20or\x20index.\x20The\x20keys\x20need\n\x20not\x20be\x20sorted\x20in\
852    \x20any\x20particular\x20way.\n\n\x20If\x20the\x20same\x20key\x20is\x20s\
853    pecified\x20multiple\x20times\x20in\x20the\x20set\x20(for\x20example\n\
854    \x20if\x20two\x20ranges,\x20two\x20keys,\x20or\x20a\x20key\x20and\x20a\
855    \x20range\x20overlap),\x20Cloud\x20Spanner\n\x20behaves\x20as\x20if\x20t\
856    he\x20key\x20were\x20only\x20specified\x20once.\n\n\x0b\n\x03\x04\x01\
857    \x01\x12\x04\x93\x01\x08\x0e\n\x8a\x02\n\x04\x04\x01\x02\0\x12\x04\x98\
858    \x01\x02.\x1a\xfb\x01\x20A\x20list\x20of\x20specific\x20keys.\x20Entries\
859    \x20in\x20`keys`\x20should\x20have\x20exactly\x20as\n\x20many\x20element\
860    s\x20as\x20there\x20are\x20columns\x20in\x20the\x20primary\x20or\x20inde\
861    x\x20key\n\x20with\x20which\x20this\x20`KeySet`\x20is\x20used.\x20\x20In\
862    dividual\x20key\x20values\x20are\n\x20encoded\x20as\x20described\x20[her\
863    e][google.spanner.v1.TypeCode].\n\n\r\n\x05\x04\x01\x02\0\x04\x12\x04\
864    \x98\x01\x02\n\n\r\n\x05\x04\x01\x02\0\x06\x12\x04\x98\x01\x0b$\n\r\n\
865    \x05\x04\x01\x02\0\x01\x12\x04\x98\x01%)\n\r\n\x05\x04\x01\x02\0\x03\x12\
866    \x04\x98\x01,-\n\x86\x01\n\x04\x04\x01\x02\x01\x12\x04\x9c\x01\x02\x1f\
867    \x1ax\x20A\x20list\x20of\x20key\x20ranges.\x20See\x20[KeyRange][google.s\
868    panner.v1.KeyRange]\x20for\x20more\x20information\x20about\n\x20key\x20r\
869    ange\x20specifications.\n\n\r\n\x05\x04\x01\x02\x01\x04\x12\x04\x9c\x01\
870    \x02\n\n\r\n\x05\x04\x01\x02\x01\x06\x12\x04\x9c\x01\x0b\x13\n\r\n\x05\
871    \x04\x01\x02\x01\x01\x12\x04\x9c\x01\x14\x1a\n\r\n\x05\x04\x01\x02\x01\
872    \x03\x12\x04\x9c\x01\x1d\x1e\n\xce\x01\n\x04\x04\x01\x02\x02\x12\x04\xa1\
873    \x01\x02\x0f\x1a\xbf\x01\x20For\x20convenience\x20`all`\x20can\x20be\x20\
874    set\x20to\x20`true`\x20to\x20indicate\x20that\x20this\n\x20`KeySet`\x20m\
875    atches\x20all\x20keys\x20in\x20the\x20table\x20or\x20index.\x20Note\x20t\
876    hat\x20any\x20keys\n\x20specified\x20in\x20`keys`\x20or\x20`ranges`\x20a\
877    re\x20only\x20yielded\x20once.\n\n\r\n\x05\x04\x01\x02\x02\x05\x12\x04\
878    \xa1\x01\x02\x06\n\r\n\x05\x04\x01\x02\x02\x01\x12\x04\xa1\x01\x07\n\n\r\
879    \n\x05\x04\x01\x02\x02\x03\x12\x04\xa1\x01\r\x0eb\x06proto3\
880";
881
882static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
883
884fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
885    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
886}
887
888pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
889    file_descriptor_proto_lazy.get(|| {
890        parse_descriptor_proto()
891    })
892}