gz_msgs/ign_msgs8/
version_range.rs

1// This file is generated by rust-protobuf 3.3.0. Do not edit
2// .proto file is parsed by protoc 3.12.4
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(box_pointers)]
13#![allow(dead_code)]
14#![allow(missing_docs)]
15#![allow(non_camel_case_types)]
16#![allow(non_snake_case)]
17#![allow(non_upper_case_globals)]
18#![allow(trivial_casts)]
19#![allow(unused_results)]
20#![allow(unused_mut)]
21
22//! Generated file from `ignition/msgs/version_range.proto`
23
24/// Generated files are compatible only with the same version
25/// of protobuf runtime.
26const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
27
28#[derive(::gz_msgs_common::IgnMessage)]
29// @@protoc_insertion_point(message:ignition.msgs.VersionRange)
30#[derive(PartialEq,Clone,Default,Debug)]
31pub struct VersionRange {
32    // message fields
33    // @@protoc_insertion_point(field:ignition.msgs.VersionRange.min)
34    pub min: ::protobuf::MessageField<super::version::Version>,
35    // @@protoc_insertion_point(field:ignition.msgs.VersionRange.max)
36    pub max: ::protobuf::MessageField<super::version::Version>,
37    // special fields
38    // @@protoc_insertion_point(special_field:ignition.msgs.VersionRange.special_fields)
39    pub special_fields: ::protobuf::SpecialFields,
40}
41
42impl<'a> ::std::default::Default for &'a VersionRange {
43    fn default() -> &'a VersionRange {
44        <VersionRange as ::protobuf::Message>::default_instance()
45    }
46}
47
48impl VersionRange {
49    pub fn new() -> VersionRange {
50        ::std::default::Default::default()
51    }
52
53    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
54        let mut fields = ::std::vec::Vec::with_capacity(2);
55        let mut oneofs = ::std::vec::Vec::with_capacity(0);
56        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::version::Version>(
57            "min",
58            |m: &VersionRange| { &m.min },
59            |m: &mut VersionRange| { &mut m.min },
60        ));
61        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::version::Version>(
62            "max",
63            |m: &VersionRange| { &m.max },
64            |m: &mut VersionRange| { &mut m.max },
65        ));
66        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<VersionRange>(
67            "VersionRange",
68            fields,
69            oneofs,
70        )
71    }
72}
73
74impl ::protobuf::Message for VersionRange {
75    const NAME: &'static str = "VersionRange";
76
77    fn is_initialized(&self) -> bool {
78        true
79    }
80
81    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
82        while let Some(tag) = is.read_raw_tag_or_eof()? {
83            match tag {
84                10 => {
85                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.min)?;
86                },
87                18 => {
88                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.max)?;
89                },
90                tag => {
91                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
92                },
93            };
94        }
95        ::std::result::Result::Ok(())
96    }
97
98    // Compute sizes of nested messages
99    #[allow(unused_variables)]
100    fn compute_size(&self) -> u64 {
101        let mut my_size = 0;
102        if let Some(v) = self.min.as_ref() {
103            let len = v.compute_size();
104            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
105        }
106        if let Some(v) = self.max.as_ref() {
107            let len = v.compute_size();
108            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
109        }
110        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
111        self.special_fields.cached_size().set(my_size as u32);
112        my_size
113    }
114
115    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
116        if let Some(v) = self.min.as_ref() {
117            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
118        }
119        if let Some(v) = self.max.as_ref() {
120            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
121        }
122        os.write_unknown_fields(self.special_fields.unknown_fields())?;
123        ::std::result::Result::Ok(())
124    }
125
126    fn special_fields(&self) -> &::protobuf::SpecialFields {
127        &self.special_fields
128    }
129
130    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
131        &mut self.special_fields
132    }
133
134    fn new() -> VersionRange {
135        VersionRange::new()
136    }
137
138    fn clear(&mut self) {
139        self.min.clear();
140        self.max.clear();
141        self.special_fields.clear();
142    }
143
144    fn default_instance() -> &'static VersionRange {
145        static instance: VersionRange = VersionRange {
146            min: ::protobuf::MessageField::none(),
147            max: ::protobuf::MessageField::none(),
148            special_fields: ::protobuf::SpecialFields::new(),
149        };
150        &instance
151    }
152}
153
154impl ::protobuf::MessageFull for VersionRange {
155    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
156        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
157        descriptor.get(|| file_descriptor().message_by_package_relative_name("VersionRange").unwrap()).clone()
158    }
159}
160
161impl ::std::fmt::Display for VersionRange {
162    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
163        ::protobuf::text_format::fmt(self, f)
164    }
165}
166
167impl ::protobuf::reflect::ProtobufValue for VersionRange {
168    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
169}
170
171static file_descriptor_proto_data: &'static [u8] = b"\
172    \n!ignition/msgs/version_range.proto\x12\rignition.msgs\x1a\x1bignition/\
173    msgs/version.proto\"b\n\x0cVersionRange\x12(\n\x03min\x18\x01\x20\x01(\
174    \x0b2\x16.ignition.msgs.VersionR\x03min\x12(\n\x03max\x18\x02\x20\x01(\
175    \x0b2\x16.ignition.msgs.VersionR\x03maxB!\n\x11com.ignition.msgsB\x0cVer\
176    sionRangeb\x06proto3\
177";
178
179/// `FileDescriptorProto` object which was a source for this generated file
180fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
181    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
182    file_descriptor_proto_lazy.get(|| {
183        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
184    })
185}
186
187/// `FileDescriptor` object which allows dynamic access to files
188pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
189    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
190    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
191    file_descriptor.get(|| {
192        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
193            let mut deps = ::std::vec::Vec::with_capacity(1);
194            deps.push(super::version::file_descriptor().clone());
195            let mut messages = ::std::vec::Vec::with_capacity(1);
196            messages.push(VersionRange::generated_message_descriptor_data());
197            let mut enums = ::std::vec::Vec::with_capacity(0);
198            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
199                file_descriptor_proto(),
200                deps,
201                messages,
202                enums,
203            )
204        });
205        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
206    })
207}