dfhack_proto/generated/messages/
ItemdefInstrument.rs

1// This file is generated by rust-protobuf 3.4.0. Do not edit
2// .proto file is parsed by pure
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 `ItemdefInstrument.proto`
23
24/// Generated files are compatible only with the same version
25/// of protobuf runtime.
26const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
27
28// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentFlags)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct InstrumentFlags {
31    // message fields
32    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.indefinite_pitch)
33    pub indefinite_pitch: ::std::option::Option<bool>,
34    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.placed_as_building)
35    pub placed_as_building: ::std::option::Option<bool>,
36    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.metal_mat)
37    pub metal_mat: ::std::option::Option<bool>,
38    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.stone_mat)
39    pub stone_mat: ::std::option::Option<bool>,
40    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.wood_mat)
41    pub wood_mat: ::std::option::Option<bool>,
42    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.glass_mat)
43    pub glass_mat: ::std::option::Option<bool>,
44    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.ceramic_mat)
45    pub ceramic_mat: ::std::option::Option<bool>,
46    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.shell_mat)
47    pub shell_mat: ::std::option::Option<bool>,
48    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.bone_mat)
49    pub bone_mat: ::std::option::Option<bool>,
50    // special fields
51    // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentFlags.special_fields)
52    pub special_fields: ::protobuf::SpecialFields,
53}
54
55impl<'a> ::std::default::Default for &'a InstrumentFlags {
56    fn default() -> &'a InstrumentFlags {
57        <InstrumentFlags as ::protobuf::Message>::default_instance()
58    }
59}
60
61impl InstrumentFlags {
62    pub fn new() -> InstrumentFlags {
63        ::std::default::Default::default()
64    }
65
66    // optional bool indefinite_pitch = 1;
67
68    pub fn indefinite_pitch(&self) -> bool {
69        self.indefinite_pitch.unwrap_or(false)
70    }
71
72    pub fn clear_indefinite_pitch(&mut self) {
73        self.indefinite_pitch = ::std::option::Option::None;
74    }
75
76    pub fn has_indefinite_pitch(&self) -> bool {
77        self.indefinite_pitch.is_some()
78    }
79
80    // Param is passed by value, moved
81    pub fn set_indefinite_pitch(&mut self, v: bool) {
82        self.indefinite_pitch = ::std::option::Option::Some(v);
83    }
84
85    // optional bool placed_as_building = 2;
86
87    pub fn placed_as_building(&self) -> bool {
88        self.placed_as_building.unwrap_or(false)
89    }
90
91    pub fn clear_placed_as_building(&mut self) {
92        self.placed_as_building = ::std::option::Option::None;
93    }
94
95    pub fn has_placed_as_building(&self) -> bool {
96        self.placed_as_building.is_some()
97    }
98
99    // Param is passed by value, moved
100    pub fn set_placed_as_building(&mut self, v: bool) {
101        self.placed_as_building = ::std::option::Option::Some(v);
102    }
103
104    // optional bool metal_mat = 3;
105
106    pub fn metal_mat(&self) -> bool {
107        self.metal_mat.unwrap_or(false)
108    }
109
110    pub fn clear_metal_mat(&mut self) {
111        self.metal_mat = ::std::option::Option::None;
112    }
113
114    pub fn has_metal_mat(&self) -> bool {
115        self.metal_mat.is_some()
116    }
117
118    // Param is passed by value, moved
119    pub fn set_metal_mat(&mut self, v: bool) {
120        self.metal_mat = ::std::option::Option::Some(v);
121    }
122
123    // optional bool stone_mat = 4;
124
125    pub fn stone_mat(&self) -> bool {
126        self.stone_mat.unwrap_or(false)
127    }
128
129    pub fn clear_stone_mat(&mut self) {
130        self.stone_mat = ::std::option::Option::None;
131    }
132
133    pub fn has_stone_mat(&self) -> bool {
134        self.stone_mat.is_some()
135    }
136
137    // Param is passed by value, moved
138    pub fn set_stone_mat(&mut self, v: bool) {
139        self.stone_mat = ::std::option::Option::Some(v);
140    }
141
142    // optional bool wood_mat = 5;
143
144    pub fn wood_mat(&self) -> bool {
145        self.wood_mat.unwrap_or(false)
146    }
147
148    pub fn clear_wood_mat(&mut self) {
149        self.wood_mat = ::std::option::Option::None;
150    }
151
152    pub fn has_wood_mat(&self) -> bool {
153        self.wood_mat.is_some()
154    }
155
156    // Param is passed by value, moved
157    pub fn set_wood_mat(&mut self, v: bool) {
158        self.wood_mat = ::std::option::Option::Some(v);
159    }
160
161    // optional bool glass_mat = 6;
162
163    pub fn glass_mat(&self) -> bool {
164        self.glass_mat.unwrap_or(false)
165    }
166
167    pub fn clear_glass_mat(&mut self) {
168        self.glass_mat = ::std::option::Option::None;
169    }
170
171    pub fn has_glass_mat(&self) -> bool {
172        self.glass_mat.is_some()
173    }
174
175    // Param is passed by value, moved
176    pub fn set_glass_mat(&mut self, v: bool) {
177        self.glass_mat = ::std::option::Option::Some(v);
178    }
179
180    // optional bool ceramic_mat = 7;
181
182    pub fn ceramic_mat(&self) -> bool {
183        self.ceramic_mat.unwrap_or(false)
184    }
185
186    pub fn clear_ceramic_mat(&mut self) {
187        self.ceramic_mat = ::std::option::Option::None;
188    }
189
190    pub fn has_ceramic_mat(&self) -> bool {
191        self.ceramic_mat.is_some()
192    }
193
194    // Param is passed by value, moved
195    pub fn set_ceramic_mat(&mut self, v: bool) {
196        self.ceramic_mat = ::std::option::Option::Some(v);
197    }
198
199    // optional bool shell_mat = 8;
200
201    pub fn shell_mat(&self) -> bool {
202        self.shell_mat.unwrap_or(false)
203    }
204
205    pub fn clear_shell_mat(&mut self) {
206        self.shell_mat = ::std::option::Option::None;
207    }
208
209    pub fn has_shell_mat(&self) -> bool {
210        self.shell_mat.is_some()
211    }
212
213    // Param is passed by value, moved
214    pub fn set_shell_mat(&mut self, v: bool) {
215        self.shell_mat = ::std::option::Option::Some(v);
216    }
217
218    // optional bool bone_mat = 9;
219
220    pub fn bone_mat(&self) -> bool {
221        self.bone_mat.unwrap_or(false)
222    }
223
224    pub fn clear_bone_mat(&mut self) {
225        self.bone_mat = ::std::option::Option::None;
226    }
227
228    pub fn has_bone_mat(&self) -> bool {
229        self.bone_mat.is_some()
230    }
231
232    // Param is passed by value, moved
233    pub fn set_bone_mat(&mut self, v: bool) {
234        self.bone_mat = ::std::option::Option::Some(v);
235    }
236
237    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
238        let mut fields = ::std::vec::Vec::with_capacity(9);
239        let mut oneofs = ::std::vec::Vec::with_capacity(0);
240        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
241            "indefinite_pitch",
242            |m: &InstrumentFlags| { &m.indefinite_pitch },
243            |m: &mut InstrumentFlags| { &mut m.indefinite_pitch },
244        ));
245        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
246            "placed_as_building",
247            |m: &InstrumentFlags| { &m.placed_as_building },
248            |m: &mut InstrumentFlags| { &mut m.placed_as_building },
249        ));
250        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
251            "metal_mat",
252            |m: &InstrumentFlags| { &m.metal_mat },
253            |m: &mut InstrumentFlags| { &mut m.metal_mat },
254        ));
255        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
256            "stone_mat",
257            |m: &InstrumentFlags| { &m.stone_mat },
258            |m: &mut InstrumentFlags| { &mut m.stone_mat },
259        ));
260        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
261            "wood_mat",
262            |m: &InstrumentFlags| { &m.wood_mat },
263            |m: &mut InstrumentFlags| { &mut m.wood_mat },
264        ));
265        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
266            "glass_mat",
267            |m: &InstrumentFlags| { &m.glass_mat },
268            |m: &mut InstrumentFlags| { &mut m.glass_mat },
269        ));
270        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
271            "ceramic_mat",
272            |m: &InstrumentFlags| { &m.ceramic_mat },
273            |m: &mut InstrumentFlags| { &mut m.ceramic_mat },
274        ));
275        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
276            "shell_mat",
277            |m: &InstrumentFlags| { &m.shell_mat },
278            |m: &mut InstrumentFlags| { &mut m.shell_mat },
279        ));
280        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
281            "bone_mat",
282            |m: &InstrumentFlags| { &m.bone_mat },
283            |m: &mut InstrumentFlags| { &mut m.bone_mat },
284        ));
285        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<InstrumentFlags>(
286            "InstrumentFlags",
287            fields,
288            oneofs,
289        )
290    }
291}
292
293impl ::protobuf::Message for InstrumentFlags {
294    const NAME: &'static str = "InstrumentFlags";
295
296    fn is_initialized(&self) -> bool {
297        true
298    }
299
300    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
301        while let Some(tag) = is.read_raw_tag_or_eof()? {
302            match tag {
303                8 => {
304                    self.indefinite_pitch = ::std::option::Option::Some(is.read_bool()?);
305                },
306                16 => {
307                    self.placed_as_building = ::std::option::Option::Some(is.read_bool()?);
308                },
309                24 => {
310                    self.metal_mat = ::std::option::Option::Some(is.read_bool()?);
311                },
312                32 => {
313                    self.stone_mat = ::std::option::Option::Some(is.read_bool()?);
314                },
315                40 => {
316                    self.wood_mat = ::std::option::Option::Some(is.read_bool()?);
317                },
318                48 => {
319                    self.glass_mat = ::std::option::Option::Some(is.read_bool()?);
320                },
321                56 => {
322                    self.ceramic_mat = ::std::option::Option::Some(is.read_bool()?);
323                },
324                64 => {
325                    self.shell_mat = ::std::option::Option::Some(is.read_bool()?);
326                },
327                72 => {
328                    self.bone_mat = ::std::option::Option::Some(is.read_bool()?);
329                },
330                tag => {
331                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
332                },
333            };
334        }
335        ::std::result::Result::Ok(())
336    }
337
338    // Compute sizes of nested messages
339    #[allow(unused_variables)]
340    fn compute_size(&self) -> u64 {
341        let mut my_size = 0;
342        if let Some(v) = self.indefinite_pitch {
343            my_size += 1 + 1;
344        }
345        if let Some(v) = self.placed_as_building {
346            my_size += 1 + 1;
347        }
348        if let Some(v) = self.metal_mat {
349            my_size += 1 + 1;
350        }
351        if let Some(v) = self.stone_mat {
352            my_size += 1 + 1;
353        }
354        if let Some(v) = self.wood_mat {
355            my_size += 1 + 1;
356        }
357        if let Some(v) = self.glass_mat {
358            my_size += 1 + 1;
359        }
360        if let Some(v) = self.ceramic_mat {
361            my_size += 1 + 1;
362        }
363        if let Some(v) = self.shell_mat {
364            my_size += 1 + 1;
365        }
366        if let Some(v) = self.bone_mat {
367            my_size += 1 + 1;
368        }
369        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
370        self.special_fields.cached_size().set(my_size as u32);
371        my_size
372    }
373
374    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
375        if let Some(v) = self.indefinite_pitch {
376            os.write_bool(1, v)?;
377        }
378        if let Some(v) = self.placed_as_building {
379            os.write_bool(2, v)?;
380        }
381        if let Some(v) = self.metal_mat {
382            os.write_bool(3, v)?;
383        }
384        if let Some(v) = self.stone_mat {
385            os.write_bool(4, v)?;
386        }
387        if let Some(v) = self.wood_mat {
388            os.write_bool(5, v)?;
389        }
390        if let Some(v) = self.glass_mat {
391            os.write_bool(6, v)?;
392        }
393        if let Some(v) = self.ceramic_mat {
394            os.write_bool(7, v)?;
395        }
396        if let Some(v) = self.shell_mat {
397            os.write_bool(8, v)?;
398        }
399        if let Some(v) = self.bone_mat {
400            os.write_bool(9, v)?;
401        }
402        os.write_unknown_fields(self.special_fields.unknown_fields())?;
403        ::std::result::Result::Ok(())
404    }
405
406    fn special_fields(&self) -> &::protobuf::SpecialFields {
407        &self.special_fields
408    }
409
410    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
411        &mut self.special_fields
412    }
413
414    fn new() -> InstrumentFlags {
415        InstrumentFlags::new()
416    }
417
418    fn clear(&mut self) {
419        self.indefinite_pitch = ::std::option::Option::None;
420        self.placed_as_building = ::std::option::Option::None;
421        self.metal_mat = ::std::option::Option::None;
422        self.stone_mat = ::std::option::Option::None;
423        self.wood_mat = ::std::option::Option::None;
424        self.glass_mat = ::std::option::Option::None;
425        self.ceramic_mat = ::std::option::Option::None;
426        self.shell_mat = ::std::option::Option::None;
427        self.bone_mat = ::std::option::Option::None;
428        self.special_fields.clear();
429    }
430
431    fn default_instance() -> &'static InstrumentFlags {
432        static instance: InstrumentFlags = InstrumentFlags {
433            indefinite_pitch: ::std::option::Option::None,
434            placed_as_building: ::std::option::Option::None,
435            metal_mat: ::std::option::Option::None,
436            stone_mat: ::std::option::Option::None,
437            wood_mat: ::std::option::Option::None,
438            glass_mat: ::std::option::Option::None,
439            ceramic_mat: ::std::option::Option::None,
440            shell_mat: ::std::option::Option::None,
441            bone_mat: ::std::option::Option::None,
442            special_fields: ::protobuf::SpecialFields::new(),
443        };
444        &instance
445    }
446}
447
448impl ::protobuf::MessageFull for InstrumentFlags {
449    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
450        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
451        descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentFlags").unwrap()).clone()
452    }
453}
454
455impl ::std::fmt::Display for InstrumentFlags {
456    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
457        ::protobuf::text_format::fmt(self, f)
458    }
459}
460
461impl ::protobuf::reflect::ProtobufValue for InstrumentFlags {
462    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
463}
464
465// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentPiece)
466#[derive(PartialEq,Clone,Default,Debug)]
467pub struct InstrumentPiece {
468    // message fields
469    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.type)
470    pub type_: ::std::option::Option<::std::string::String>,
471    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.id)
472    pub id: ::std::option::Option<::std::string::String>,
473    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.name)
474    pub name: ::std::option::Option<::std::string::String>,
475    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.name_plural)
476    pub name_plural: ::std::option::Option<::std::string::String>,
477    // special fields
478    // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentPiece.special_fields)
479    pub special_fields: ::protobuf::SpecialFields,
480}
481
482impl<'a> ::std::default::Default for &'a InstrumentPiece {
483    fn default() -> &'a InstrumentPiece {
484        <InstrumentPiece as ::protobuf::Message>::default_instance()
485    }
486}
487
488impl InstrumentPiece {
489    pub fn new() -> InstrumentPiece {
490        ::std::default::Default::default()
491    }
492
493    // optional string type = 1;
494
495    pub fn type_(&self) -> &str {
496        match self.type_.as_ref() {
497            Some(v) => v,
498            None => "",
499        }
500    }
501
502    pub fn clear_type_(&mut self) {
503        self.type_ = ::std::option::Option::None;
504    }
505
506    pub fn has_type(&self) -> bool {
507        self.type_.is_some()
508    }
509
510    // Param is passed by value, moved
511    pub fn set_type(&mut self, v: ::std::string::String) {
512        self.type_ = ::std::option::Option::Some(v);
513    }
514
515    // Mutable pointer to the field.
516    // If field is not initialized, it is initialized with default value first.
517    pub fn mut_type(&mut self) -> &mut ::std::string::String {
518        if self.type_.is_none() {
519            self.type_ = ::std::option::Option::Some(::std::string::String::new());
520        }
521        self.type_.as_mut().unwrap()
522    }
523
524    // Take field
525    pub fn take_type_(&mut self) -> ::std::string::String {
526        self.type_.take().unwrap_or_else(|| ::std::string::String::new())
527    }
528
529    // optional string id = 2;
530
531    pub fn id(&self) -> &str {
532        match self.id.as_ref() {
533            Some(v) => v,
534            None => "",
535        }
536    }
537
538    pub fn clear_id(&mut self) {
539        self.id = ::std::option::Option::None;
540    }
541
542    pub fn has_id(&self) -> bool {
543        self.id.is_some()
544    }
545
546    // Param is passed by value, moved
547    pub fn set_id(&mut self, v: ::std::string::String) {
548        self.id = ::std::option::Option::Some(v);
549    }
550
551    // Mutable pointer to the field.
552    // If field is not initialized, it is initialized with default value first.
553    pub fn mut_id(&mut self) -> &mut ::std::string::String {
554        if self.id.is_none() {
555            self.id = ::std::option::Option::Some(::std::string::String::new());
556        }
557        self.id.as_mut().unwrap()
558    }
559
560    // Take field
561    pub fn take_id(&mut self) -> ::std::string::String {
562        self.id.take().unwrap_or_else(|| ::std::string::String::new())
563    }
564
565    // optional string name = 3;
566
567    pub fn name(&self) -> &str {
568        match self.name.as_ref() {
569            Some(v) => v,
570            None => "",
571        }
572    }
573
574    pub fn clear_name(&mut self) {
575        self.name = ::std::option::Option::None;
576    }
577
578    pub fn has_name(&self) -> bool {
579        self.name.is_some()
580    }
581
582    // Param is passed by value, moved
583    pub fn set_name(&mut self, v: ::std::string::String) {
584        self.name = ::std::option::Option::Some(v);
585    }
586
587    // Mutable pointer to the field.
588    // If field is not initialized, it is initialized with default value first.
589    pub fn mut_name(&mut self) -> &mut ::std::string::String {
590        if self.name.is_none() {
591            self.name = ::std::option::Option::Some(::std::string::String::new());
592        }
593        self.name.as_mut().unwrap()
594    }
595
596    // Take field
597    pub fn take_name(&mut self) -> ::std::string::String {
598        self.name.take().unwrap_or_else(|| ::std::string::String::new())
599    }
600
601    // optional string name_plural = 4;
602
603    pub fn name_plural(&self) -> &str {
604        match self.name_plural.as_ref() {
605            Some(v) => v,
606            None => "",
607        }
608    }
609
610    pub fn clear_name_plural(&mut self) {
611        self.name_plural = ::std::option::Option::None;
612    }
613
614    pub fn has_name_plural(&self) -> bool {
615        self.name_plural.is_some()
616    }
617
618    // Param is passed by value, moved
619    pub fn set_name_plural(&mut self, v: ::std::string::String) {
620        self.name_plural = ::std::option::Option::Some(v);
621    }
622
623    // Mutable pointer to the field.
624    // If field is not initialized, it is initialized with default value first.
625    pub fn mut_name_plural(&mut self) -> &mut ::std::string::String {
626        if self.name_plural.is_none() {
627            self.name_plural = ::std::option::Option::Some(::std::string::String::new());
628        }
629        self.name_plural.as_mut().unwrap()
630    }
631
632    // Take field
633    pub fn take_name_plural(&mut self) -> ::std::string::String {
634        self.name_plural.take().unwrap_or_else(|| ::std::string::String::new())
635    }
636
637    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
638        let mut fields = ::std::vec::Vec::with_capacity(4);
639        let mut oneofs = ::std::vec::Vec::with_capacity(0);
640        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
641            "type",
642            |m: &InstrumentPiece| { &m.type_ },
643            |m: &mut InstrumentPiece| { &mut m.type_ },
644        ));
645        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
646            "id",
647            |m: &InstrumentPiece| { &m.id },
648            |m: &mut InstrumentPiece| { &mut m.id },
649        ));
650        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
651            "name",
652            |m: &InstrumentPiece| { &m.name },
653            |m: &mut InstrumentPiece| { &mut m.name },
654        ));
655        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
656            "name_plural",
657            |m: &InstrumentPiece| { &m.name_plural },
658            |m: &mut InstrumentPiece| { &mut m.name_plural },
659        ));
660        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<InstrumentPiece>(
661            "InstrumentPiece",
662            fields,
663            oneofs,
664        )
665    }
666}
667
668impl ::protobuf::Message for InstrumentPiece {
669    const NAME: &'static str = "InstrumentPiece";
670
671    fn is_initialized(&self) -> bool {
672        true
673    }
674
675    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
676        while let Some(tag) = is.read_raw_tag_or_eof()? {
677            match tag {
678                10 => {
679                    self.type_ = ::std::option::Option::Some(is.read_string()?);
680                },
681                18 => {
682                    self.id = ::std::option::Option::Some(is.read_string()?);
683                },
684                26 => {
685                    self.name = ::std::option::Option::Some(is.read_string()?);
686                },
687                34 => {
688                    self.name_plural = ::std::option::Option::Some(is.read_string()?);
689                },
690                tag => {
691                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
692                },
693            };
694        }
695        ::std::result::Result::Ok(())
696    }
697
698    // Compute sizes of nested messages
699    #[allow(unused_variables)]
700    fn compute_size(&self) -> u64 {
701        let mut my_size = 0;
702        if let Some(v) = self.type_.as_ref() {
703            my_size += ::protobuf::rt::string_size(1, &v);
704        }
705        if let Some(v) = self.id.as_ref() {
706            my_size += ::protobuf::rt::string_size(2, &v);
707        }
708        if let Some(v) = self.name.as_ref() {
709            my_size += ::protobuf::rt::string_size(3, &v);
710        }
711        if let Some(v) = self.name_plural.as_ref() {
712            my_size += ::protobuf::rt::string_size(4, &v);
713        }
714        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
715        self.special_fields.cached_size().set(my_size as u32);
716        my_size
717    }
718
719    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
720        if let Some(v) = self.type_.as_ref() {
721            os.write_string(1, v)?;
722        }
723        if let Some(v) = self.id.as_ref() {
724            os.write_string(2, v)?;
725        }
726        if let Some(v) = self.name.as_ref() {
727            os.write_string(3, v)?;
728        }
729        if let Some(v) = self.name_plural.as_ref() {
730            os.write_string(4, v)?;
731        }
732        os.write_unknown_fields(self.special_fields.unknown_fields())?;
733        ::std::result::Result::Ok(())
734    }
735
736    fn special_fields(&self) -> &::protobuf::SpecialFields {
737        &self.special_fields
738    }
739
740    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
741        &mut self.special_fields
742    }
743
744    fn new() -> InstrumentPiece {
745        InstrumentPiece::new()
746    }
747
748    fn clear(&mut self) {
749        self.type_ = ::std::option::Option::None;
750        self.id = ::std::option::Option::None;
751        self.name = ::std::option::Option::None;
752        self.name_plural = ::std::option::Option::None;
753        self.special_fields.clear();
754    }
755
756    fn default_instance() -> &'static InstrumentPiece {
757        static instance: InstrumentPiece = InstrumentPiece {
758            type_: ::std::option::Option::None,
759            id: ::std::option::Option::None,
760            name: ::std::option::Option::None,
761            name_plural: ::std::option::Option::None,
762            special_fields: ::protobuf::SpecialFields::new(),
763        };
764        &instance
765    }
766}
767
768impl ::protobuf::MessageFull for InstrumentPiece {
769    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
770        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
771        descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentPiece").unwrap()).clone()
772    }
773}
774
775impl ::std::fmt::Display for InstrumentPiece {
776    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
777        ::protobuf::text_format::fmt(self, f)
778    }
779}
780
781impl ::protobuf::reflect::ProtobufValue for InstrumentPiece {
782    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
783}
784
785// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentRegister)
786#[derive(PartialEq,Clone,Default,Debug)]
787pub struct InstrumentRegister {
788    // message fields
789    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentRegister.pitch_range_min)
790    pub pitch_range_min: ::std::option::Option<i32>,
791    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentRegister.pitch_range_max)
792    pub pitch_range_max: ::std::option::Option<i32>,
793    // special fields
794    // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentRegister.special_fields)
795    pub special_fields: ::protobuf::SpecialFields,
796}
797
798impl<'a> ::std::default::Default for &'a InstrumentRegister {
799    fn default() -> &'a InstrumentRegister {
800        <InstrumentRegister as ::protobuf::Message>::default_instance()
801    }
802}
803
804impl InstrumentRegister {
805    pub fn new() -> InstrumentRegister {
806        ::std::default::Default::default()
807    }
808
809    // optional int32 pitch_range_min = 1;
810
811    pub fn pitch_range_min(&self) -> i32 {
812        self.pitch_range_min.unwrap_or(0)
813    }
814
815    pub fn clear_pitch_range_min(&mut self) {
816        self.pitch_range_min = ::std::option::Option::None;
817    }
818
819    pub fn has_pitch_range_min(&self) -> bool {
820        self.pitch_range_min.is_some()
821    }
822
823    // Param is passed by value, moved
824    pub fn set_pitch_range_min(&mut self, v: i32) {
825        self.pitch_range_min = ::std::option::Option::Some(v);
826    }
827
828    // optional int32 pitch_range_max = 2;
829
830    pub fn pitch_range_max(&self) -> i32 {
831        self.pitch_range_max.unwrap_or(0)
832    }
833
834    pub fn clear_pitch_range_max(&mut self) {
835        self.pitch_range_max = ::std::option::Option::None;
836    }
837
838    pub fn has_pitch_range_max(&self) -> bool {
839        self.pitch_range_max.is_some()
840    }
841
842    // Param is passed by value, moved
843    pub fn set_pitch_range_max(&mut self, v: i32) {
844        self.pitch_range_max = ::std::option::Option::Some(v);
845    }
846
847    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
848        let mut fields = ::std::vec::Vec::with_capacity(2);
849        let mut oneofs = ::std::vec::Vec::with_capacity(0);
850        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
851            "pitch_range_min",
852            |m: &InstrumentRegister| { &m.pitch_range_min },
853            |m: &mut InstrumentRegister| { &mut m.pitch_range_min },
854        ));
855        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
856            "pitch_range_max",
857            |m: &InstrumentRegister| { &m.pitch_range_max },
858            |m: &mut InstrumentRegister| { &mut m.pitch_range_max },
859        ));
860        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<InstrumentRegister>(
861            "InstrumentRegister",
862            fields,
863            oneofs,
864        )
865    }
866}
867
868impl ::protobuf::Message for InstrumentRegister {
869    const NAME: &'static str = "InstrumentRegister";
870
871    fn is_initialized(&self) -> bool {
872        true
873    }
874
875    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
876        while let Some(tag) = is.read_raw_tag_or_eof()? {
877            match tag {
878                8 => {
879                    self.pitch_range_min = ::std::option::Option::Some(is.read_int32()?);
880                },
881                16 => {
882                    self.pitch_range_max = ::std::option::Option::Some(is.read_int32()?);
883                },
884                tag => {
885                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
886                },
887            };
888        }
889        ::std::result::Result::Ok(())
890    }
891
892    // Compute sizes of nested messages
893    #[allow(unused_variables)]
894    fn compute_size(&self) -> u64 {
895        let mut my_size = 0;
896        if let Some(v) = self.pitch_range_min {
897            my_size += ::protobuf::rt::int32_size(1, v);
898        }
899        if let Some(v) = self.pitch_range_max {
900            my_size += ::protobuf::rt::int32_size(2, v);
901        }
902        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
903        self.special_fields.cached_size().set(my_size as u32);
904        my_size
905    }
906
907    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
908        if let Some(v) = self.pitch_range_min {
909            os.write_int32(1, v)?;
910        }
911        if let Some(v) = self.pitch_range_max {
912            os.write_int32(2, v)?;
913        }
914        os.write_unknown_fields(self.special_fields.unknown_fields())?;
915        ::std::result::Result::Ok(())
916    }
917
918    fn special_fields(&self) -> &::protobuf::SpecialFields {
919        &self.special_fields
920    }
921
922    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
923        &mut self.special_fields
924    }
925
926    fn new() -> InstrumentRegister {
927        InstrumentRegister::new()
928    }
929
930    fn clear(&mut self) {
931        self.pitch_range_min = ::std::option::Option::None;
932        self.pitch_range_max = ::std::option::Option::None;
933        self.special_fields.clear();
934    }
935
936    fn default_instance() -> &'static InstrumentRegister {
937        static instance: InstrumentRegister = InstrumentRegister {
938            pitch_range_min: ::std::option::Option::None,
939            pitch_range_max: ::std::option::Option::None,
940            special_fields: ::protobuf::SpecialFields::new(),
941        };
942        &instance
943    }
944}
945
946impl ::protobuf::MessageFull for InstrumentRegister {
947    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
948        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
949        descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentRegister").unwrap()).clone()
950    }
951}
952
953impl ::std::fmt::Display for InstrumentRegister {
954    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
955        ::protobuf::text_format::fmt(self, f)
956    }
957}
958
959impl ::protobuf::reflect::ProtobufValue for InstrumentRegister {
960    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
961}
962
963// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentDef)
964#[derive(PartialEq,Clone,Default,Debug)]
965pub struct InstrumentDef {
966    // message fields
967    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.flags)
968    pub flags: ::protobuf::MessageField<InstrumentFlags>,
969    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.size)
970    pub size: ::std::option::Option<i32>,
971    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.value)
972    pub value: ::std::option::Option<i32>,
973    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.material_size)
974    pub material_size: ::std::option::Option<i32>,
975    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pieces)
976    pub pieces: ::std::vec::Vec<InstrumentPiece>,
977    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_range_min)
978    pub pitch_range_min: ::std::option::Option<i32>,
979    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_range_max)
980    pub pitch_range_max: ::std::option::Option<i32>,
981    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.volume_mb_min)
982    pub volume_mb_min: ::std::option::Option<i32>,
983    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.volume_mb_max)
984    pub volume_mb_max: ::std::option::Option<i32>,
985    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.sound_production)
986    pub sound_production: ::std::vec::Vec<::protobuf::EnumOrUnknown<SoundProductionType>>,
987    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.sound_production_parm1)
988    pub sound_production_parm1: ::std::vec::Vec<::std::string::String>,
989    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.sound_production_parm2)
990    pub sound_production_parm2: ::std::vec::Vec<::std::string::String>,
991    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_choice)
992    pub pitch_choice: ::std::vec::Vec<::protobuf::EnumOrUnknown<PitchChoiceType>>,
993    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_choice_parm1)
994    pub pitch_choice_parm1: ::std::vec::Vec<::std::string::String>,
995    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_choice_parm2)
996    pub pitch_choice_parm2: ::std::vec::Vec<::std::string::String>,
997    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.tuning)
998    pub tuning: ::std::vec::Vec<::protobuf::EnumOrUnknown<TuningType>>,
999    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.tuning_parm)
1000    pub tuning_parm: ::std::vec::Vec<::std::string::String>,
1001    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.registers)
1002    pub registers: ::std::vec::Vec<InstrumentRegister>,
1003    // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.description)
1004    pub description: ::std::option::Option<::std::string::String>,
1005    // special fields
1006    // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentDef.special_fields)
1007    pub special_fields: ::protobuf::SpecialFields,
1008}
1009
1010impl<'a> ::std::default::Default for &'a InstrumentDef {
1011    fn default() -> &'a InstrumentDef {
1012        <InstrumentDef as ::protobuf::Message>::default_instance()
1013    }
1014}
1015
1016impl InstrumentDef {
1017    pub fn new() -> InstrumentDef {
1018        ::std::default::Default::default()
1019    }
1020
1021    // optional int32 size = 2;
1022
1023    pub fn size(&self) -> i32 {
1024        self.size.unwrap_or(0)
1025    }
1026
1027    pub fn clear_size(&mut self) {
1028        self.size = ::std::option::Option::None;
1029    }
1030
1031    pub fn has_size(&self) -> bool {
1032        self.size.is_some()
1033    }
1034
1035    // Param is passed by value, moved
1036    pub fn set_size(&mut self, v: i32) {
1037        self.size = ::std::option::Option::Some(v);
1038    }
1039
1040    // optional int32 value = 3;
1041
1042    pub fn value(&self) -> i32 {
1043        self.value.unwrap_or(0)
1044    }
1045
1046    pub fn clear_value(&mut self) {
1047        self.value = ::std::option::Option::None;
1048    }
1049
1050    pub fn has_value(&self) -> bool {
1051        self.value.is_some()
1052    }
1053
1054    // Param is passed by value, moved
1055    pub fn set_value(&mut self, v: i32) {
1056        self.value = ::std::option::Option::Some(v);
1057    }
1058
1059    // optional int32 material_size = 4;
1060
1061    pub fn material_size(&self) -> i32 {
1062        self.material_size.unwrap_or(0)
1063    }
1064
1065    pub fn clear_material_size(&mut self) {
1066        self.material_size = ::std::option::Option::None;
1067    }
1068
1069    pub fn has_material_size(&self) -> bool {
1070        self.material_size.is_some()
1071    }
1072
1073    // Param is passed by value, moved
1074    pub fn set_material_size(&mut self, v: i32) {
1075        self.material_size = ::std::option::Option::Some(v);
1076    }
1077
1078    // optional int32 pitch_range_min = 6;
1079
1080    pub fn pitch_range_min(&self) -> i32 {
1081        self.pitch_range_min.unwrap_or(0)
1082    }
1083
1084    pub fn clear_pitch_range_min(&mut self) {
1085        self.pitch_range_min = ::std::option::Option::None;
1086    }
1087
1088    pub fn has_pitch_range_min(&self) -> bool {
1089        self.pitch_range_min.is_some()
1090    }
1091
1092    // Param is passed by value, moved
1093    pub fn set_pitch_range_min(&mut self, v: i32) {
1094        self.pitch_range_min = ::std::option::Option::Some(v);
1095    }
1096
1097    // optional int32 pitch_range_max = 7;
1098
1099    pub fn pitch_range_max(&self) -> i32 {
1100        self.pitch_range_max.unwrap_or(0)
1101    }
1102
1103    pub fn clear_pitch_range_max(&mut self) {
1104        self.pitch_range_max = ::std::option::Option::None;
1105    }
1106
1107    pub fn has_pitch_range_max(&self) -> bool {
1108        self.pitch_range_max.is_some()
1109    }
1110
1111    // Param is passed by value, moved
1112    pub fn set_pitch_range_max(&mut self, v: i32) {
1113        self.pitch_range_max = ::std::option::Option::Some(v);
1114    }
1115
1116    // optional int32 volume_mb_min = 8;
1117
1118    pub fn volume_mb_min(&self) -> i32 {
1119        self.volume_mb_min.unwrap_or(0)
1120    }
1121
1122    pub fn clear_volume_mb_min(&mut self) {
1123        self.volume_mb_min = ::std::option::Option::None;
1124    }
1125
1126    pub fn has_volume_mb_min(&self) -> bool {
1127        self.volume_mb_min.is_some()
1128    }
1129
1130    // Param is passed by value, moved
1131    pub fn set_volume_mb_min(&mut self, v: i32) {
1132        self.volume_mb_min = ::std::option::Option::Some(v);
1133    }
1134
1135    // optional int32 volume_mb_max = 9;
1136
1137    pub fn volume_mb_max(&self) -> i32 {
1138        self.volume_mb_max.unwrap_or(0)
1139    }
1140
1141    pub fn clear_volume_mb_max(&mut self) {
1142        self.volume_mb_max = ::std::option::Option::None;
1143    }
1144
1145    pub fn has_volume_mb_max(&self) -> bool {
1146        self.volume_mb_max.is_some()
1147    }
1148
1149    // Param is passed by value, moved
1150    pub fn set_volume_mb_max(&mut self, v: i32) {
1151        self.volume_mb_max = ::std::option::Option::Some(v);
1152    }
1153
1154    // optional string description = 19;
1155
1156    pub fn description(&self) -> &str {
1157        match self.description.as_ref() {
1158            Some(v) => v,
1159            None => "",
1160        }
1161    }
1162
1163    pub fn clear_description(&mut self) {
1164        self.description = ::std::option::Option::None;
1165    }
1166
1167    pub fn has_description(&self) -> bool {
1168        self.description.is_some()
1169    }
1170
1171    // Param is passed by value, moved
1172    pub fn set_description(&mut self, v: ::std::string::String) {
1173        self.description = ::std::option::Option::Some(v);
1174    }
1175
1176    // Mutable pointer to the field.
1177    // If field is not initialized, it is initialized with default value first.
1178    pub fn mut_description(&mut self) -> &mut ::std::string::String {
1179        if self.description.is_none() {
1180            self.description = ::std::option::Option::Some(::std::string::String::new());
1181        }
1182        self.description.as_mut().unwrap()
1183    }
1184
1185    // Take field
1186    pub fn take_description(&mut self) -> ::std::string::String {
1187        self.description.take().unwrap_or_else(|| ::std::string::String::new())
1188    }
1189
1190    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
1191        let mut fields = ::std::vec::Vec::with_capacity(19);
1192        let mut oneofs = ::std::vec::Vec::with_capacity(0);
1193        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, InstrumentFlags>(
1194            "flags",
1195            |m: &InstrumentDef| { &m.flags },
1196            |m: &mut InstrumentDef| { &mut m.flags },
1197        ));
1198        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1199            "size",
1200            |m: &InstrumentDef| { &m.size },
1201            |m: &mut InstrumentDef| { &mut m.size },
1202        ));
1203        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1204            "value",
1205            |m: &InstrumentDef| { &m.value },
1206            |m: &mut InstrumentDef| { &mut m.value },
1207        ));
1208        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1209            "material_size",
1210            |m: &InstrumentDef| { &m.material_size },
1211            |m: &mut InstrumentDef| { &mut m.material_size },
1212        ));
1213        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1214            "pieces",
1215            |m: &InstrumentDef| { &m.pieces },
1216            |m: &mut InstrumentDef| { &mut m.pieces },
1217        ));
1218        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1219            "pitch_range_min",
1220            |m: &InstrumentDef| { &m.pitch_range_min },
1221            |m: &mut InstrumentDef| { &mut m.pitch_range_min },
1222        ));
1223        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1224            "pitch_range_max",
1225            |m: &InstrumentDef| { &m.pitch_range_max },
1226            |m: &mut InstrumentDef| { &mut m.pitch_range_max },
1227        ));
1228        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1229            "volume_mb_min",
1230            |m: &InstrumentDef| { &m.volume_mb_min },
1231            |m: &mut InstrumentDef| { &mut m.volume_mb_min },
1232        ));
1233        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1234            "volume_mb_max",
1235            |m: &InstrumentDef| { &m.volume_mb_max },
1236            |m: &mut InstrumentDef| { &mut m.volume_mb_max },
1237        ));
1238        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1239            "sound_production",
1240            |m: &InstrumentDef| { &m.sound_production },
1241            |m: &mut InstrumentDef| { &mut m.sound_production },
1242        ));
1243        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1244            "sound_production_parm1",
1245            |m: &InstrumentDef| { &m.sound_production_parm1 },
1246            |m: &mut InstrumentDef| { &mut m.sound_production_parm1 },
1247        ));
1248        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1249            "sound_production_parm2",
1250            |m: &InstrumentDef| { &m.sound_production_parm2 },
1251            |m: &mut InstrumentDef| { &mut m.sound_production_parm2 },
1252        ));
1253        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1254            "pitch_choice",
1255            |m: &InstrumentDef| { &m.pitch_choice },
1256            |m: &mut InstrumentDef| { &mut m.pitch_choice },
1257        ));
1258        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1259            "pitch_choice_parm1",
1260            |m: &InstrumentDef| { &m.pitch_choice_parm1 },
1261            |m: &mut InstrumentDef| { &mut m.pitch_choice_parm1 },
1262        ));
1263        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1264            "pitch_choice_parm2",
1265            |m: &InstrumentDef| { &m.pitch_choice_parm2 },
1266            |m: &mut InstrumentDef| { &mut m.pitch_choice_parm2 },
1267        ));
1268        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1269            "tuning",
1270            |m: &InstrumentDef| { &m.tuning },
1271            |m: &mut InstrumentDef| { &mut m.tuning },
1272        ));
1273        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1274            "tuning_parm",
1275            |m: &InstrumentDef| { &m.tuning_parm },
1276            |m: &mut InstrumentDef| { &mut m.tuning_parm },
1277        ));
1278        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1279            "registers",
1280            |m: &InstrumentDef| { &m.registers },
1281            |m: &mut InstrumentDef| { &mut m.registers },
1282        ));
1283        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1284            "description",
1285            |m: &InstrumentDef| { &m.description },
1286            |m: &mut InstrumentDef| { &mut m.description },
1287        ));
1288        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<InstrumentDef>(
1289            "InstrumentDef",
1290            fields,
1291            oneofs,
1292        )
1293    }
1294}
1295
1296impl ::protobuf::Message for InstrumentDef {
1297    const NAME: &'static str = "InstrumentDef";
1298
1299    fn is_initialized(&self) -> bool {
1300        true
1301    }
1302
1303    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1304        while let Some(tag) = is.read_raw_tag_or_eof()? {
1305            match tag {
1306                10 => {
1307                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.flags)?;
1308                },
1309                16 => {
1310                    self.size = ::std::option::Option::Some(is.read_int32()?);
1311                },
1312                24 => {
1313                    self.value = ::std::option::Option::Some(is.read_int32()?);
1314                },
1315                32 => {
1316                    self.material_size = ::std::option::Option::Some(is.read_int32()?);
1317                },
1318                42 => {
1319                    self.pieces.push(is.read_message()?);
1320                },
1321                48 => {
1322                    self.pitch_range_min = ::std::option::Option::Some(is.read_int32()?);
1323                },
1324                56 => {
1325                    self.pitch_range_max = ::std::option::Option::Some(is.read_int32()?);
1326                },
1327                64 => {
1328                    self.volume_mb_min = ::std::option::Option::Some(is.read_int32()?);
1329                },
1330                72 => {
1331                    self.volume_mb_max = ::std::option::Option::Some(is.read_int32()?);
1332                },
1333                80 => {
1334                    self.sound_production.push(is.read_enum_or_unknown()?);
1335                },
1336                82 => {
1337                    ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.sound_production)?
1338                },
1339                90 => {
1340                    self.sound_production_parm1.push(is.read_string()?);
1341                },
1342                98 => {
1343                    self.sound_production_parm2.push(is.read_string()?);
1344                },
1345                104 => {
1346                    self.pitch_choice.push(is.read_enum_or_unknown()?);
1347                },
1348                106 => {
1349                    ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.pitch_choice)?
1350                },
1351                114 => {
1352                    self.pitch_choice_parm1.push(is.read_string()?);
1353                },
1354                122 => {
1355                    self.pitch_choice_parm2.push(is.read_string()?);
1356                },
1357                128 => {
1358                    self.tuning.push(is.read_enum_or_unknown()?);
1359                },
1360                130 => {
1361                    ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.tuning)?
1362                },
1363                138 => {
1364                    self.tuning_parm.push(is.read_string()?);
1365                },
1366                146 => {
1367                    self.registers.push(is.read_message()?);
1368                },
1369                154 => {
1370                    self.description = ::std::option::Option::Some(is.read_string()?);
1371                },
1372                tag => {
1373                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1374                },
1375            };
1376        }
1377        ::std::result::Result::Ok(())
1378    }
1379
1380    // Compute sizes of nested messages
1381    #[allow(unused_variables)]
1382    fn compute_size(&self) -> u64 {
1383        let mut my_size = 0;
1384        if let Some(v) = self.flags.as_ref() {
1385            let len = v.compute_size();
1386            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1387        }
1388        if let Some(v) = self.size {
1389            my_size += ::protobuf::rt::int32_size(2, v);
1390        }
1391        if let Some(v) = self.value {
1392            my_size += ::protobuf::rt::int32_size(3, v);
1393        }
1394        if let Some(v) = self.material_size {
1395            my_size += ::protobuf::rt::int32_size(4, v);
1396        }
1397        for value in &self.pieces {
1398            let len = value.compute_size();
1399            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1400        };
1401        if let Some(v) = self.pitch_range_min {
1402            my_size += ::protobuf::rt::int32_size(6, v);
1403        }
1404        if let Some(v) = self.pitch_range_max {
1405            my_size += ::protobuf::rt::int32_size(7, v);
1406        }
1407        if let Some(v) = self.volume_mb_min {
1408            my_size += ::protobuf::rt::int32_size(8, v);
1409        }
1410        if let Some(v) = self.volume_mb_max {
1411            my_size += ::protobuf::rt::int32_size(9, v);
1412        }
1413        for value in &self.sound_production {
1414            my_size += ::protobuf::rt::int32_size(10, value.value());
1415        };
1416        for value in &self.sound_production_parm1 {
1417            my_size += ::protobuf::rt::string_size(11, &value);
1418        };
1419        for value in &self.sound_production_parm2 {
1420            my_size += ::protobuf::rt::string_size(12, &value);
1421        };
1422        for value in &self.pitch_choice {
1423            my_size += ::protobuf::rt::int32_size(13, value.value());
1424        };
1425        for value in &self.pitch_choice_parm1 {
1426            my_size += ::protobuf::rt::string_size(14, &value);
1427        };
1428        for value in &self.pitch_choice_parm2 {
1429            my_size += ::protobuf::rt::string_size(15, &value);
1430        };
1431        for value in &self.tuning {
1432            my_size += ::protobuf::rt::int32_size(16, value.value());
1433        };
1434        for value in &self.tuning_parm {
1435            my_size += ::protobuf::rt::string_size(17, &value);
1436        };
1437        for value in &self.registers {
1438            let len = value.compute_size();
1439            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1440        };
1441        if let Some(v) = self.description.as_ref() {
1442            my_size += ::protobuf::rt::string_size(19, &v);
1443        }
1444        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1445        self.special_fields.cached_size().set(my_size as u32);
1446        my_size
1447    }
1448
1449    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1450        if let Some(v) = self.flags.as_ref() {
1451            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
1452        }
1453        if let Some(v) = self.size {
1454            os.write_int32(2, v)?;
1455        }
1456        if let Some(v) = self.value {
1457            os.write_int32(3, v)?;
1458        }
1459        if let Some(v) = self.material_size {
1460            os.write_int32(4, v)?;
1461        }
1462        for v in &self.pieces {
1463            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
1464        };
1465        if let Some(v) = self.pitch_range_min {
1466            os.write_int32(6, v)?;
1467        }
1468        if let Some(v) = self.pitch_range_max {
1469            os.write_int32(7, v)?;
1470        }
1471        if let Some(v) = self.volume_mb_min {
1472            os.write_int32(8, v)?;
1473        }
1474        if let Some(v) = self.volume_mb_max {
1475            os.write_int32(9, v)?;
1476        }
1477        for v in &self.sound_production {
1478            os.write_enum(10, ::protobuf::EnumOrUnknown::value(v))?;
1479        };
1480        for v in &self.sound_production_parm1 {
1481            os.write_string(11, &v)?;
1482        };
1483        for v in &self.sound_production_parm2 {
1484            os.write_string(12, &v)?;
1485        };
1486        for v in &self.pitch_choice {
1487            os.write_enum(13, ::protobuf::EnumOrUnknown::value(v))?;
1488        };
1489        for v in &self.pitch_choice_parm1 {
1490            os.write_string(14, &v)?;
1491        };
1492        for v in &self.pitch_choice_parm2 {
1493            os.write_string(15, &v)?;
1494        };
1495        for v in &self.tuning {
1496            os.write_enum(16, ::protobuf::EnumOrUnknown::value(v))?;
1497        };
1498        for v in &self.tuning_parm {
1499            os.write_string(17, &v)?;
1500        };
1501        for v in &self.registers {
1502            ::protobuf::rt::write_message_field_with_cached_size(18, v, os)?;
1503        };
1504        if let Some(v) = self.description.as_ref() {
1505            os.write_string(19, v)?;
1506        }
1507        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1508        ::std::result::Result::Ok(())
1509    }
1510
1511    fn special_fields(&self) -> &::protobuf::SpecialFields {
1512        &self.special_fields
1513    }
1514
1515    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1516        &mut self.special_fields
1517    }
1518
1519    fn new() -> InstrumentDef {
1520        InstrumentDef::new()
1521    }
1522
1523    fn clear(&mut self) {
1524        self.flags.clear();
1525        self.size = ::std::option::Option::None;
1526        self.value = ::std::option::Option::None;
1527        self.material_size = ::std::option::Option::None;
1528        self.pieces.clear();
1529        self.pitch_range_min = ::std::option::Option::None;
1530        self.pitch_range_max = ::std::option::Option::None;
1531        self.volume_mb_min = ::std::option::Option::None;
1532        self.volume_mb_max = ::std::option::Option::None;
1533        self.sound_production.clear();
1534        self.sound_production_parm1.clear();
1535        self.sound_production_parm2.clear();
1536        self.pitch_choice.clear();
1537        self.pitch_choice_parm1.clear();
1538        self.pitch_choice_parm2.clear();
1539        self.tuning.clear();
1540        self.tuning_parm.clear();
1541        self.registers.clear();
1542        self.description = ::std::option::Option::None;
1543        self.special_fields.clear();
1544    }
1545
1546    fn default_instance() -> &'static InstrumentDef {
1547        static instance: InstrumentDef = InstrumentDef {
1548            flags: ::protobuf::MessageField::none(),
1549            size: ::std::option::Option::None,
1550            value: ::std::option::Option::None,
1551            material_size: ::std::option::Option::None,
1552            pieces: ::std::vec::Vec::new(),
1553            pitch_range_min: ::std::option::Option::None,
1554            pitch_range_max: ::std::option::Option::None,
1555            volume_mb_min: ::std::option::Option::None,
1556            volume_mb_max: ::std::option::Option::None,
1557            sound_production: ::std::vec::Vec::new(),
1558            sound_production_parm1: ::std::vec::Vec::new(),
1559            sound_production_parm2: ::std::vec::Vec::new(),
1560            pitch_choice: ::std::vec::Vec::new(),
1561            pitch_choice_parm1: ::std::vec::Vec::new(),
1562            pitch_choice_parm2: ::std::vec::Vec::new(),
1563            tuning: ::std::vec::Vec::new(),
1564            tuning_parm: ::std::vec::Vec::new(),
1565            registers: ::std::vec::Vec::new(),
1566            description: ::std::option::Option::None,
1567            special_fields: ::protobuf::SpecialFields::new(),
1568        };
1569        &instance
1570    }
1571}
1572
1573impl ::protobuf::MessageFull for InstrumentDef {
1574    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1575        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1576        descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentDef").unwrap()).clone()
1577    }
1578}
1579
1580impl ::std::fmt::Display for InstrumentDef {
1581    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1582        ::protobuf::text_format::fmt(self, f)
1583    }
1584}
1585
1586impl ::protobuf::reflect::ProtobufValue for InstrumentDef {
1587    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1588}
1589
1590#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
1591// @@protoc_insertion_point(enum:ItemdefInstrument.PitchChoiceType)
1592pub enum PitchChoiceType {
1593    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.MEMBRANE_POSITION)
1594    MEMBRANE_POSITION = 0,
1595    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.SUBPART_CHOICE)
1596    SUBPART_CHOICE = 1,
1597    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.KEYBOARD)
1598    KEYBOARD = 2,
1599    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_FRET)
1600    STOPPING_FRET = 3,
1601    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_AGAINST_BODY)
1602    STOPPING_AGAINST_BODY = 4,
1603    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_HOLE)
1604    STOPPING_HOLE = 5,
1605    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_HOLE_KEY)
1606    STOPPING_HOLE_KEY = 6,
1607    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.SLIDE)
1608    SLIDE = 7,
1609    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.HARMONIC_SERIES)
1610    HARMONIC_SERIES = 8,
1611    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.VALVE_ROUTES_AIR)
1612    VALVE_ROUTES_AIR = 9,
1613    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.BP_IN_BELL)
1614    BP_IN_BELL = 10,
1615    // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.FOOT_PEDALS)
1616    FOOT_PEDALS = 11,
1617}
1618
1619impl ::protobuf::Enum for PitchChoiceType {
1620    const NAME: &'static str = "PitchChoiceType";
1621
1622    fn value(&self) -> i32 {
1623        *self as i32
1624    }
1625
1626    fn from_i32(value: i32) -> ::std::option::Option<PitchChoiceType> {
1627        match value {
1628            0 => ::std::option::Option::Some(PitchChoiceType::MEMBRANE_POSITION),
1629            1 => ::std::option::Option::Some(PitchChoiceType::SUBPART_CHOICE),
1630            2 => ::std::option::Option::Some(PitchChoiceType::KEYBOARD),
1631            3 => ::std::option::Option::Some(PitchChoiceType::STOPPING_FRET),
1632            4 => ::std::option::Option::Some(PitchChoiceType::STOPPING_AGAINST_BODY),
1633            5 => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE),
1634            6 => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE_KEY),
1635            7 => ::std::option::Option::Some(PitchChoiceType::SLIDE),
1636            8 => ::std::option::Option::Some(PitchChoiceType::HARMONIC_SERIES),
1637            9 => ::std::option::Option::Some(PitchChoiceType::VALVE_ROUTES_AIR),
1638            10 => ::std::option::Option::Some(PitchChoiceType::BP_IN_BELL),
1639            11 => ::std::option::Option::Some(PitchChoiceType::FOOT_PEDALS),
1640            _ => ::std::option::Option::None
1641        }
1642    }
1643
1644    fn from_str(str: &str) -> ::std::option::Option<PitchChoiceType> {
1645        match str {
1646            "MEMBRANE_POSITION" => ::std::option::Option::Some(PitchChoiceType::MEMBRANE_POSITION),
1647            "SUBPART_CHOICE" => ::std::option::Option::Some(PitchChoiceType::SUBPART_CHOICE),
1648            "KEYBOARD" => ::std::option::Option::Some(PitchChoiceType::KEYBOARD),
1649            "STOPPING_FRET" => ::std::option::Option::Some(PitchChoiceType::STOPPING_FRET),
1650            "STOPPING_AGAINST_BODY" => ::std::option::Option::Some(PitchChoiceType::STOPPING_AGAINST_BODY),
1651            "STOPPING_HOLE" => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE),
1652            "STOPPING_HOLE_KEY" => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE_KEY),
1653            "SLIDE" => ::std::option::Option::Some(PitchChoiceType::SLIDE),
1654            "HARMONIC_SERIES" => ::std::option::Option::Some(PitchChoiceType::HARMONIC_SERIES),
1655            "VALVE_ROUTES_AIR" => ::std::option::Option::Some(PitchChoiceType::VALVE_ROUTES_AIR),
1656            "BP_IN_BELL" => ::std::option::Option::Some(PitchChoiceType::BP_IN_BELL),
1657            "FOOT_PEDALS" => ::std::option::Option::Some(PitchChoiceType::FOOT_PEDALS),
1658            _ => ::std::option::Option::None
1659        }
1660    }
1661
1662    const VALUES: &'static [PitchChoiceType] = &[
1663        PitchChoiceType::MEMBRANE_POSITION,
1664        PitchChoiceType::SUBPART_CHOICE,
1665        PitchChoiceType::KEYBOARD,
1666        PitchChoiceType::STOPPING_FRET,
1667        PitchChoiceType::STOPPING_AGAINST_BODY,
1668        PitchChoiceType::STOPPING_HOLE,
1669        PitchChoiceType::STOPPING_HOLE_KEY,
1670        PitchChoiceType::SLIDE,
1671        PitchChoiceType::HARMONIC_SERIES,
1672        PitchChoiceType::VALVE_ROUTES_AIR,
1673        PitchChoiceType::BP_IN_BELL,
1674        PitchChoiceType::FOOT_PEDALS,
1675    ];
1676}
1677
1678impl ::protobuf::EnumFull for PitchChoiceType {
1679    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
1680        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
1681        descriptor.get(|| file_descriptor().enum_by_package_relative_name("PitchChoiceType").unwrap()).clone()
1682    }
1683
1684    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
1685        let index = *self as usize;
1686        Self::enum_descriptor().value_by_index(index)
1687    }
1688}
1689
1690impl ::std::default::Default for PitchChoiceType {
1691    fn default() -> Self {
1692        PitchChoiceType::MEMBRANE_POSITION
1693    }
1694}
1695
1696impl PitchChoiceType {
1697    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
1698        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<PitchChoiceType>("PitchChoiceType")
1699    }
1700}
1701
1702#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
1703// @@protoc_insertion_point(enum:ItemdefInstrument.SoundProductionType)
1704pub enum SoundProductionType {
1705    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.PLUCKED_BY_BP)
1706    PLUCKED_BY_BP = 0,
1707    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.PLUCKED)
1708    PLUCKED = 1,
1709    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BOWED)
1710    BOWED = 2,
1711    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.STRUCK_BY_BP)
1712    STRUCK_BY_BP = 3,
1713    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.STRUCK)
1714    STRUCK = 4,
1715    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.VIBRATE_BP_AGAINST_OPENING)
1716    VIBRATE_BP_AGAINST_OPENING = 5,
1717    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_AGAINST_FIPPLE)
1718    BLOW_AGAINST_FIPPLE = 6,
1719    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_OPENING_SIDE)
1720    BLOW_OVER_OPENING_SIDE = 7,
1721    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_OPENING_END)
1722    BLOW_OVER_OPENING_END = 8,
1723    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_SINGLE_REED)
1724    BLOW_OVER_SINGLE_REED = 9,
1725    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_DOUBLE_REED)
1726    BLOW_OVER_DOUBLE_REED = 10,
1727    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_FREE_REED)
1728    BLOW_OVER_FREE_REED = 11,
1729    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.STRUCK_TOGETHER)
1730    STRUCK_TOGETHER = 12,
1731    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.SHAKEN)
1732    SHAKEN = 13,
1733    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.SCRAPED)
1734    SCRAPED = 14,
1735    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.FRICTION)
1736    FRICTION = 15,
1737    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.RESONATOR)
1738    RESONATOR = 16,
1739    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BAG_OVER_REED)
1740    BAG_OVER_REED = 17,
1741    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.AIR_OVER_REED)
1742    AIR_OVER_REED = 18,
1743    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.AIR_OVER_FREE_REED)
1744    AIR_OVER_FREE_REED = 19,
1745    // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.AIR_AGAINST_FIPPLE)
1746    AIR_AGAINST_FIPPLE = 20,
1747}
1748
1749impl ::protobuf::Enum for SoundProductionType {
1750    const NAME: &'static str = "SoundProductionType";
1751
1752    fn value(&self) -> i32 {
1753        *self as i32
1754    }
1755
1756    fn from_i32(value: i32) -> ::std::option::Option<SoundProductionType> {
1757        match value {
1758            0 => ::std::option::Option::Some(SoundProductionType::PLUCKED_BY_BP),
1759            1 => ::std::option::Option::Some(SoundProductionType::PLUCKED),
1760            2 => ::std::option::Option::Some(SoundProductionType::BOWED),
1761            3 => ::std::option::Option::Some(SoundProductionType::STRUCK_BY_BP),
1762            4 => ::std::option::Option::Some(SoundProductionType::STRUCK),
1763            5 => ::std::option::Option::Some(SoundProductionType::VIBRATE_BP_AGAINST_OPENING),
1764            6 => ::std::option::Option::Some(SoundProductionType::BLOW_AGAINST_FIPPLE),
1765            7 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_SIDE),
1766            8 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_END),
1767            9 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_SINGLE_REED),
1768            10 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_DOUBLE_REED),
1769            11 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_FREE_REED),
1770            12 => ::std::option::Option::Some(SoundProductionType::STRUCK_TOGETHER),
1771            13 => ::std::option::Option::Some(SoundProductionType::SHAKEN),
1772            14 => ::std::option::Option::Some(SoundProductionType::SCRAPED),
1773            15 => ::std::option::Option::Some(SoundProductionType::FRICTION),
1774            16 => ::std::option::Option::Some(SoundProductionType::RESONATOR),
1775            17 => ::std::option::Option::Some(SoundProductionType::BAG_OVER_REED),
1776            18 => ::std::option::Option::Some(SoundProductionType::AIR_OVER_REED),
1777            19 => ::std::option::Option::Some(SoundProductionType::AIR_OVER_FREE_REED),
1778            20 => ::std::option::Option::Some(SoundProductionType::AIR_AGAINST_FIPPLE),
1779            _ => ::std::option::Option::None
1780        }
1781    }
1782
1783    fn from_str(str: &str) -> ::std::option::Option<SoundProductionType> {
1784        match str {
1785            "PLUCKED_BY_BP" => ::std::option::Option::Some(SoundProductionType::PLUCKED_BY_BP),
1786            "PLUCKED" => ::std::option::Option::Some(SoundProductionType::PLUCKED),
1787            "BOWED" => ::std::option::Option::Some(SoundProductionType::BOWED),
1788            "STRUCK_BY_BP" => ::std::option::Option::Some(SoundProductionType::STRUCK_BY_BP),
1789            "STRUCK" => ::std::option::Option::Some(SoundProductionType::STRUCK),
1790            "VIBRATE_BP_AGAINST_OPENING" => ::std::option::Option::Some(SoundProductionType::VIBRATE_BP_AGAINST_OPENING),
1791            "BLOW_AGAINST_FIPPLE" => ::std::option::Option::Some(SoundProductionType::BLOW_AGAINST_FIPPLE),
1792            "BLOW_OVER_OPENING_SIDE" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_SIDE),
1793            "BLOW_OVER_OPENING_END" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_END),
1794            "BLOW_OVER_SINGLE_REED" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_SINGLE_REED),
1795            "BLOW_OVER_DOUBLE_REED" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_DOUBLE_REED),
1796            "BLOW_OVER_FREE_REED" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_FREE_REED),
1797            "STRUCK_TOGETHER" => ::std::option::Option::Some(SoundProductionType::STRUCK_TOGETHER),
1798            "SHAKEN" => ::std::option::Option::Some(SoundProductionType::SHAKEN),
1799            "SCRAPED" => ::std::option::Option::Some(SoundProductionType::SCRAPED),
1800            "FRICTION" => ::std::option::Option::Some(SoundProductionType::FRICTION),
1801            "RESONATOR" => ::std::option::Option::Some(SoundProductionType::RESONATOR),
1802            "BAG_OVER_REED" => ::std::option::Option::Some(SoundProductionType::BAG_OVER_REED),
1803            "AIR_OVER_REED" => ::std::option::Option::Some(SoundProductionType::AIR_OVER_REED),
1804            "AIR_OVER_FREE_REED" => ::std::option::Option::Some(SoundProductionType::AIR_OVER_FREE_REED),
1805            "AIR_AGAINST_FIPPLE" => ::std::option::Option::Some(SoundProductionType::AIR_AGAINST_FIPPLE),
1806            _ => ::std::option::Option::None
1807        }
1808    }
1809
1810    const VALUES: &'static [SoundProductionType] = &[
1811        SoundProductionType::PLUCKED_BY_BP,
1812        SoundProductionType::PLUCKED,
1813        SoundProductionType::BOWED,
1814        SoundProductionType::STRUCK_BY_BP,
1815        SoundProductionType::STRUCK,
1816        SoundProductionType::VIBRATE_BP_AGAINST_OPENING,
1817        SoundProductionType::BLOW_AGAINST_FIPPLE,
1818        SoundProductionType::BLOW_OVER_OPENING_SIDE,
1819        SoundProductionType::BLOW_OVER_OPENING_END,
1820        SoundProductionType::BLOW_OVER_SINGLE_REED,
1821        SoundProductionType::BLOW_OVER_DOUBLE_REED,
1822        SoundProductionType::BLOW_OVER_FREE_REED,
1823        SoundProductionType::STRUCK_TOGETHER,
1824        SoundProductionType::SHAKEN,
1825        SoundProductionType::SCRAPED,
1826        SoundProductionType::FRICTION,
1827        SoundProductionType::RESONATOR,
1828        SoundProductionType::BAG_OVER_REED,
1829        SoundProductionType::AIR_OVER_REED,
1830        SoundProductionType::AIR_OVER_FREE_REED,
1831        SoundProductionType::AIR_AGAINST_FIPPLE,
1832    ];
1833}
1834
1835impl ::protobuf::EnumFull for SoundProductionType {
1836    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
1837        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
1838        descriptor.get(|| file_descriptor().enum_by_package_relative_name("SoundProductionType").unwrap()).clone()
1839    }
1840
1841    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
1842        let index = *self as usize;
1843        Self::enum_descriptor().value_by_index(index)
1844    }
1845}
1846
1847impl ::std::default::Default for SoundProductionType {
1848    fn default() -> Self {
1849        SoundProductionType::PLUCKED_BY_BP
1850    }
1851}
1852
1853impl SoundProductionType {
1854    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
1855        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<SoundProductionType>("SoundProductionType")
1856    }
1857}
1858
1859#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
1860// @@protoc_insertion_point(enum:ItemdefInstrument.TuningType)
1861pub enum TuningType {
1862    // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.PEGS)
1863    PEGS = 0,
1864    // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.ADJUSTABLE_BRIDGES)
1865    ADJUSTABLE_BRIDGES = 1,
1866    // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.CROOKS)
1867    CROOKS = 2,
1868    // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.TIGHTENING)
1869    TIGHTENING = 3,
1870    // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.LEVERS)
1871    LEVERS = 4,
1872}
1873
1874impl ::protobuf::Enum for TuningType {
1875    const NAME: &'static str = "TuningType";
1876
1877    fn value(&self) -> i32 {
1878        *self as i32
1879    }
1880
1881    fn from_i32(value: i32) -> ::std::option::Option<TuningType> {
1882        match value {
1883            0 => ::std::option::Option::Some(TuningType::PEGS),
1884            1 => ::std::option::Option::Some(TuningType::ADJUSTABLE_BRIDGES),
1885            2 => ::std::option::Option::Some(TuningType::CROOKS),
1886            3 => ::std::option::Option::Some(TuningType::TIGHTENING),
1887            4 => ::std::option::Option::Some(TuningType::LEVERS),
1888            _ => ::std::option::Option::None
1889        }
1890    }
1891
1892    fn from_str(str: &str) -> ::std::option::Option<TuningType> {
1893        match str {
1894            "PEGS" => ::std::option::Option::Some(TuningType::PEGS),
1895            "ADJUSTABLE_BRIDGES" => ::std::option::Option::Some(TuningType::ADJUSTABLE_BRIDGES),
1896            "CROOKS" => ::std::option::Option::Some(TuningType::CROOKS),
1897            "TIGHTENING" => ::std::option::Option::Some(TuningType::TIGHTENING),
1898            "LEVERS" => ::std::option::Option::Some(TuningType::LEVERS),
1899            _ => ::std::option::Option::None
1900        }
1901    }
1902
1903    const VALUES: &'static [TuningType] = &[
1904        TuningType::PEGS,
1905        TuningType::ADJUSTABLE_BRIDGES,
1906        TuningType::CROOKS,
1907        TuningType::TIGHTENING,
1908        TuningType::LEVERS,
1909    ];
1910}
1911
1912impl ::protobuf::EnumFull for TuningType {
1913    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
1914        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
1915        descriptor.get(|| file_descriptor().enum_by_package_relative_name("TuningType").unwrap()).clone()
1916    }
1917
1918    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
1919        let index = *self as usize;
1920        Self::enum_descriptor().value_by_index(index)
1921    }
1922}
1923
1924impl ::std::default::Default for TuningType {
1925    fn default() -> Self {
1926        TuningType::PEGS
1927    }
1928}
1929
1930impl TuningType {
1931    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
1932        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<TuningType>("TuningType")
1933    }
1934}
1935
1936static file_descriptor_proto_data: &'static [u8] = b"\
1937    \n\x17ItemdefInstrument.proto\x12\x11ItemdefInstrument\"\xb5\x02\n\x0fIn\
1938    strumentFlags\x12)\n\x10indefinite_pitch\x18\x01\x20\x01(\x08R\x0findefi\
1939    nitePitch\x12,\n\x12placed_as_building\x18\x02\x20\x01(\x08R\x10placedAs\
1940    Building\x12\x1b\n\tmetal_mat\x18\x03\x20\x01(\x08R\x08metalMat\x12\x1b\
1941    \n\tstone_mat\x18\x04\x20\x01(\x08R\x08stoneMat\x12\x19\n\x08wood_mat\
1942    \x18\x05\x20\x01(\x08R\x07woodMat\x12\x1b\n\tglass_mat\x18\x06\x20\x01(\
1943    \x08R\x08glassMat\x12\x1f\n\x0bceramic_mat\x18\x07\x20\x01(\x08R\ncerami\
1944    cMat\x12\x1b\n\tshell_mat\x18\x08\x20\x01(\x08R\x08shellMat\x12\x19\n\
1945    \x08bone_mat\x18\t\x20\x01(\x08R\x07boneMat\"j\n\x0fInstrumentPiece\x12\
1946    \x12\n\x04type\x18\x01\x20\x01(\tR\x04type\x12\x0e\n\x02id\x18\x02\x20\
1947    \x01(\tR\x02id\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x1f\n\
1948    \x0bname_plural\x18\x04\x20\x01(\tR\nnamePlural\"d\n\x12InstrumentRegist\
1949    er\x12&\n\x0fpitch_range_min\x18\x01\x20\x01(\x05R\rpitchRangeMin\x12&\n\
1950    \x0fpitch_range_max\x18\x02\x20\x01(\x05R\rpitchRangeMax\"\x8d\x07\n\rIn\
1951    strumentDef\x128\n\x05flags\x18\x01\x20\x01(\x0b2\".ItemdefInstrument.In\
1952    strumentFlagsR\x05flags\x12\x12\n\x04size\x18\x02\x20\x01(\x05R\x04size\
1953    \x12\x14\n\x05value\x18\x03\x20\x01(\x05R\x05value\x12#\n\rmaterial_size\
1954    \x18\x04\x20\x01(\x05R\x0cmaterialSize\x12:\n\x06pieces\x18\x05\x20\x03(\
1955    \x0b2\".ItemdefInstrument.InstrumentPieceR\x06pieces\x12&\n\x0fpitch_ran\
1956    ge_min\x18\x06\x20\x01(\x05R\rpitchRangeMin\x12&\n\x0fpitch_range_max\
1957    \x18\x07\x20\x01(\x05R\rpitchRangeMax\x12\"\n\rvolume_mb_min\x18\x08\x20\
1958    \x01(\x05R\x0bvolumeMbMin\x12\"\n\rvolume_mb_max\x18\t\x20\x01(\x05R\x0b\
1959    volumeMbMax\x12Q\n\x10sound_production\x18\n\x20\x03(\x0e2&.ItemdefInstr\
1960    ument.SoundProductionTypeR\x0fsoundProduction\x124\n\x16sound_production\
1961    _parm1\x18\x0b\x20\x03(\tR\x14soundProductionParm1\x124\n\x16sound_produ\
1962    ction_parm2\x18\x0c\x20\x03(\tR\x14soundProductionParm2\x12E\n\x0cpitch_\
1963    choice\x18\r\x20\x03(\x0e2\".ItemdefInstrument.PitchChoiceTypeR\x0bpitch\
1964    Choice\x12,\n\x12pitch_choice_parm1\x18\x0e\x20\x03(\tR\x10pitchChoicePa\
1965    rm1\x12,\n\x12pitch_choice_parm2\x18\x0f\x20\x03(\tR\x10pitchChoiceParm2\
1966    \x125\n\x06tuning\x18\x10\x20\x03(\x0e2\x1d.ItemdefInstrument.TuningType\
1967    R\x06tuning\x12\x1f\n\x0btuning_parm\x18\x11\x20\x03(\tR\ntuningParm\x12\
1968    C\n\tregisters\x18\x12\x20\x03(\x0b2%.ItemdefInstrument.InstrumentRegist\
1969    erR\tregisters\x12\x20\n\x0bdescription\x18\x13\x20\x01(\tR\x0bdescripti\
1970    on*\xf9\x01\n\x0fPitchChoiceType\x12\x15\n\x11MEMBRANE_POSITION\x10\0\
1971    \x12\x12\n\x0eSUBPART_CHOICE\x10\x01\x12\x0c\n\x08KEYBOARD\x10\x02\x12\
1972    \x11\n\rSTOPPING_FRET\x10\x03\x12\x19\n\x15STOPPING_AGAINST_BODY\x10\x04\
1973    \x12\x11\n\rSTOPPING_HOLE\x10\x05\x12\x15\n\x11STOPPING_HOLE_KEY\x10\x06\
1974    \x12\t\n\x05SLIDE\x10\x07\x12\x13\n\x0fHARMONIC_SERIES\x10\x08\x12\x14\n\
1975    \x10VALVE_ROUTES_AIR\x10\t\x12\x0e\n\nBP_IN_BELL\x10\n\x12\x0f\n\x0bFOOT\
1976    _PEDALS\x10\x0b*\xbe\x03\n\x13SoundProductionType\x12\x11\n\rPLUCKED_BY_\
1977    BP\x10\0\x12\x0b\n\x07PLUCKED\x10\x01\x12\t\n\x05BOWED\x10\x02\x12\x10\n\
1978    \x0cSTRUCK_BY_BP\x10\x03\x12\n\n\x06STRUCK\x10\x04\x12\x1e\n\x1aVIBRATE_\
1979    BP_AGAINST_OPENING\x10\x05\x12\x17\n\x13BLOW_AGAINST_FIPPLE\x10\x06\x12\
1980    \x1a\n\x16BLOW_OVER_OPENING_SIDE\x10\x07\x12\x19\n\x15BLOW_OVER_OPENING_\
1981    END\x10\x08\x12\x19\n\x15BLOW_OVER_SINGLE_REED\x10\t\x12\x19\n\x15BLOW_O\
1982    VER_DOUBLE_REED\x10\n\x12\x17\n\x13BLOW_OVER_FREE_REED\x10\x0b\x12\x13\n\
1983    \x0fSTRUCK_TOGETHER\x10\x0c\x12\n\n\x06SHAKEN\x10\r\x12\x0b\n\x07SCRAPED\
1984    \x10\x0e\x12\x0c\n\x08FRICTION\x10\x0f\x12\r\n\tRESONATOR\x10\x10\x12\
1985    \x11\n\rBAG_OVER_REED\x10\x11\x12\x11\n\rAIR_OVER_REED\x10\x12\x12\x16\n\
1986    \x12AIR_OVER_FREE_REED\x10\x13\x12\x16\n\x12AIR_AGAINST_FIPPLE\x10\x14*V\
1987    \n\nTuningType\x12\x08\n\x04PEGS\x10\0\x12\x16\n\x12ADJUSTABLE_BRIDGES\
1988    \x10\x01\x12\n\n\x06CROOKS\x10\x02\x12\x0e\n\nTIGHTENING\x10\x03\x12\n\n\
1989    \x06LEVERS\x10\x04B\x02H\x03b\x06proto2\
1990";
1991
1992/// `FileDescriptorProto` object which was a source for this generated file
1993fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
1994    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
1995    file_descriptor_proto_lazy.get(|| {
1996        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
1997    })
1998}
1999
2000/// `FileDescriptor` object which allows dynamic access to files
2001pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
2002    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
2003    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
2004    file_descriptor.get(|| {
2005        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
2006            let mut deps = ::std::vec::Vec::with_capacity(0);
2007            let mut messages = ::std::vec::Vec::with_capacity(4);
2008            messages.push(InstrumentFlags::generated_message_descriptor_data());
2009            messages.push(InstrumentPiece::generated_message_descriptor_data());
2010            messages.push(InstrumentRegister::generated_message_descriptor_data());
2011            messages.push(InstrumentDef::generated_message_descriptor_data());
2012            let mut enums = ::std::vec::Vec::with_capacity(3);
2013            enums.push(PitchChoiceType::generated_enum_descriptor_data());
2014            enums.push(SoundProductionType::generated_enum_descriptor_data());
2015            enums.push(TuningType::generated_enum_descriptor_data());
2016            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
2017                file_descriptor_proto(),
2018                deps,
2019                messages,
2020                enums,
2021            )
2022        });
2023        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
2024    })
2025}