yara-x 1.19.0

A pure Rust implementation of YARA.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
// This file is generated by rust-protobuf 3.7.2. Do not edit
// .proto file is parsed by pure
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `vba.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;

// @@protoc_insertion_point(message:vba.Vba)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Vba {
    // message fields
    // @@protoc_insertion_point(field:vba.Vba.has_macros)
    pub has_macros: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:vba.Vba.modules)
    pub modules: ::std::vec::Vec<vba::Module>,
    // @@protoc_insertion_point(field:vba.Vba.project_info)
    pub project_info: ::protobuf::MessageField<vba::ProjectInfo>,
    // special fields
    // @@protoc_insertion_point(special_field:vba.Vba.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Vba {
    fn default() -> &'a Vba {
        <Vba as ::protobuf::Message>::default_instance()
    }
}

impl Vba {
    pub fn new() -> Vba {
        ::std::default::Default::default()
    }

    // optional bool has_macros = 1;

    pub fn has_macros(&self) -> bool {
        self.has_macros.unwrap_or(false)
    }

    pub fn clear_has_macros(&mut self) {
        self.has_macros = ::std::option::Option::None;
    }

    pub fn has_has_macros(&self) -> bool {
        self.has_macros.is_some()
    }

    // Param is passed by value, moved
    pub fn set_has_macros(&mut self, v: bool) {
        self.has_macros = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "has_macros",
            |m: &Vba| { &m.has_macros },
            |m: &mut Vba| { &mut m.has_macros },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "modules",
            |m: &Vba| { &m.modules },
            |m: &mut Vba| { &mut m.modules },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, vba::ProjectInfo>(
            "project_info",
            |m: &Vba| { &m.project_info },
            |m: &mut Vba| { &mut m.project_info },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Vba>(
            "Vba",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Vba {
    const NAME: &'static str = "Vba";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.has_macros = ::std::option::Option::Some(is.read_bool()?);
                },
                18 => {
                    self.modules.push(is.read_message()?);
                },
                42 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.project_info)?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.has_macros {
            my_size += 1 + 1;
        }
        for value in &self.modules {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        if let Some(v) = self.project_info.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.has_macros {
            os.write_bool(1, v)?;
        }
        for v in &self.modules {
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        };
        if let Some(v) = self.project_info.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Vba {
        Vba::new()
    }

    fn clear(&mut self) {
        self.has_macros = ::std::option::Option::None;
        self.modules.clear();
        self.project_info.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Vba {
        static instance: Vba = Vba {
            has_macros: ::std::option::Option::None,
            modules: ::std::vec::Vec::new(),
            project_info: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Vba {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Vba").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Vba {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Vba {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `Vba`
pub mod vba {
    // @@protoc_insertion_point(message:vba.Vba.Module)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct Module {
        // message fields
        // @@protoc_insertion_point(field:vba.Vba.Module.name)
        pub name: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:vba.Vba.Module.type)
        pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<super::ModuleType>>,
        // @@protoc_insertion_point(field:vba.Vba.Module.code)
        pub code: ::std::option::Option<::std::string::String>,
        // special fields
        // @@protoc_insertion_point(special_field:vba.Vba.Module.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a Module {
        fn default() -> &'a Module {
            <Module as ::protobuf::Message>::default_instance()
        }
    }

    impl Module {
        pub fn new() -> Module {
            ::std::default::Default::default()
        }

        // optional string name = 1;

        pub fn name(&self) -> &str {
            match self.name.as_ref() {
                Some(v) => v,
                None => "",
            }
        }

        pub fn clear_name(&mut self) {
            self.name = ::std::option::Option::None;
        }

        pub fn has_name(&self) -> bool {
            self.name.is_some()
        }

        // Param is passed by value, moved
        pub fn set_name(&mut self, v: ::std::string::String) {
            self.name = ::std::option::Option::Some(v);
        }

        // Mutable pointer to the field.
        // If field is not initialized, it is initialized with default value first.
        pub fn mut_name(&mut self) -> &mut ::std::string::String {
            if self.name.is_none() {
                self.name = ::std::option::Option::Some(::std::string::String::new());
            }
            self.name.as_mut().unwrap()
        }

        // Take field
        pub fn take_name(&mut self) -> ::std::string::String {
            self.name.take().unwrap_or_else(|| ::std::string::String::new())
        }

        // optional .vba.ModuleType type = 2;

        pub fn type_(&self) -> super::ModuleType {
            match self.type_ {
                Some(e) => e.enum_value_or(super::ModuleType::MODULE_TYPE_STANDARD),
                None => super::ModuleType::MODULE_TYPE_STANDARD,
            }
        }

        pub fn clear_type_(&mut self) {
            self.type_ = ::std::option::Option::None;
        }

        pub fn has_type(&self) -> bool {
            self.type_.is_some()
        }

        // Param is passed by value, moved
        pub fn set_type(&mut self, v: super::ModuleType) {
            self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
        }

        // optional string code = 3;

        pub fn code(&self) -> &str {
            match self.code.as_ref() {
                Some(v) => v,
                None => "",
            }
        }

        pub fn clear_code(&mut self) {
            self.code = ::std::option::Option::None;
        }

        pub fn has_code(&self) -> bool {
            self.code.is_some()
        }

        // Param is passed by value, moved
        pub fn set_code(&mut self, v: ::std::string::String) {
            self.code = ::std::option::Option::Some(v);
        }

        // Mutable pointer to the field.
        // If field is not initialized, it is initialized with default value first.
        pub fn mut_code(&mut self) -> &mut ::std::string::String {
            if self.code.is_none() {
                self.code = ::std::option::Option::Some(::std::string::String::new());
            }
            self.code.as_mut().unwrap()
        }

        // Take field
        pub fn take_code(&mut self) -> ::std::string::String {
            self.code.take().unwrap_or_else(|| ::std::string::String::new())
        }

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(3);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "name",
                |m: &Module| { &m.name },
                |m: &mut Module| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "type",
                |m: &Module| { &m.type_ },
                |m: &mut Module| { &mut m.type_ },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "code",
                |m: &Module| { &m.code },
                |m: &mut Module| { &mut m.code },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Module>(
                "Vba.Module",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for Module {
        const NAME: &'static str = "Module";

        fn is_initialized(&self) -> bool {
            true
        }

        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
            while let Some(tag) = is.read_raw_tag_or_eof()? {
                match tag {
                    10 => {
                        self.name = ::std::option::Option::Some(is.read_string()?);
                    },
                    16 => {
                        self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                    },
                    26 => {
                        self.code = ::std::option::Option::Some(is.read_string()?);
                    },
                    tag => {
                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                    },
                };
            }
            ::std::result::Result::Ok(())
        }

        // Compute sizes of nested messages
        #[allow(unused_variables)]
        fn compute_size(&self) -> u64 {
            let mut my_size = 0;
            if let Some(v) = self.name.as_ref() {
                my_size += ::protobuf::rt::string_size(1, &v);
            }
            if let Some(v) = self.type_ {
                my_size += ::protobuf::rt::int32_size(2, v.value());
            }
            if let Some(v) = self.code.as_ref() {
                my_size += ::protobuf::rt::string_size(3, &v);
            }
            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
            self.special_fields.cached_size().set(my_size as u32);
            my_size
        }

        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
            if let Some(v) = self.name.as_ref() {
                os.write_string(1, v)?;
            }
            if let Some(v) = self.type_ {
                os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?;
            }
            if let Some(v) = self.code.as_ref() {
                os.write_string(3, v)?;
            }
            os.write_unknown_fields(self.special_fields.unknown_fields())?;
            ::std::result::Result::Ok(())
        }

        fn special_fields(&self) -> &::protobuf::SpecialFields {
            &self.special_fields
        }

        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
            &mut self.special_fields
        }

        fn new() -> Module {
            Module::new()
        }

        fn clear(&mut self) {
            self.name = ::std::option::Option::None;
            self.type_ = ::std::option::Option::None;
            self.code = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static Module {
            static instance: Module = Module {
                name: ::std::option::Option::None,
                type_: ::std::option::Option::None,
                code: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for Module {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Vba.Module").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for Module {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for Module {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }

    // @@protoc_insertion_point(message:vba.Vba.ProjectInfo)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct ProjectInfo {
        // message fields
        // @@protoc_insertion_point(field:vba.Vba.ProjectInfo.name)
        pub name: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:vba.Vba.ProjectInfo.version)
        pub version: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:vba.Vba.ProjectInfo.references)
        pub references: ::std::vec::Vec<::std::string::String>,
        // @@protoc_insertion_point(field:vba.Vba.ProjectInfo.module_count)
        pub module_count: ::std::option::Option<i32>,
        // special fields
        // @@protoc_insertion_point(special_field:vba.Vba.ProjectInfo.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a ProjectInfo {
        fn default() -> &'a ProjectInfo {
            <ProjectInfo as ::protobuf::Message>::default_instance()
        }
    }

    impl ProjectInfo {
        pub fn new() -> ProjectInfo {
            ::std::default::Default::default()
        }

        // optional string name = 1;

        pub fn name(&self) -> &str {
            match self.name.as_ref() {
                Some(v) => v,
                None => "",
            }
        }

        pub fn clear_name(&mut self) {
            self.name = ::std::option::Option::None;
        }

        pub fn has_name(&self) -> bool {
            self.name.is_some()
        }

        // Param is passed by value, moved
        pub fn set_name(&mut self, v: ::std::string::String) {
            self.name = ::std::option::Option::Some(v);
        }

        // Mutable pointer to the field.
        // If field is not initialized, it is initialized with default value first.
        pub fn mut_name(&mut self) -> &mut ::std::string::String {
            if self.name.is_none() {
                self.name = ::std::option::Option::Some(::std::string::String::new());
            }
            self.name.as_mut().unwrap()
        }

        // Take field
        pub fn take_name(&mut self) -> ::std::string::String {
            self.name.take().unwrap_or_else(|| ::std::string::String::new())
        }

        // optional string version = 2;

        pub fn version(&self) -> &str {
            match self.version.as_ref() {
                Some(v) => v,
                None => "",
            }
        }

        pub fn clear_version(&mut self) {
            self.version = ::std::option::Option::None;
        }

        pub fn has_version(&self) -> bool {
            self.version.is_some()
        }

        // Param is passed by value, moved
        pub fn set_version(&mut self, v: ::std::string::String) {
            self.version = ::std::option::Option::Some(v);
        }

        // Mutable pointer to the field.
        // If field is not initialized, it is initialized with default value first.
        pub fn mut_version(&mut self) -> &mut ::std::string::String {
            if self.version.is_none() {
                self.version = ::std::option::Option::Some(::std::string::String::new());
            }
            self.version.as_mut().unwrap()
        }

        // Take field
        pub fn take_version(&mut self) -> ::std::string::String {
            self.version.take().unwrap_or_else(|| ::std::string::String::new())
        }

        // optional int32 module_count = 4;

        pub fn module_count(&self) -> i32 {
            self.module_count.unwrap_or(0)
        }

        pub fn clear_module_count(&mut self) {
            self.module_count = ::std::option::Option::None;
        }

        pub fn has_module_count(&self) -> bool {
            self.module_count.is_some()
        }

        // Param is passed by value, moved
        pub fn set_module_count(&mut self, v: i32) {
            self.module_count = ::std::option::Option::Some(v);
        }

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(4);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "name",
                |m: &ProjectInfo| { &m.name },
                |m: &mut ProjectInfo| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "version",
                |m: &ProjectInfo| { &m.version },
                |m: &mut ProjectInfo| { &mut m.version },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "references",
                |m: &ProjectInfo| { &m.references },
                |m: &mut ProjectInfo| { &mut m.references },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "module_count",
                |m: &ProjectInfo| { &m.module_count },
                |m: &mut ProjectInfo| { &mut m.module_count },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ProjectInfo>(
                "Vba.ProjectInfo",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for ProjectInfo {
        const NAME: &'static str = "ProjectInfo";

        fn is_initialized(&self) -> bool {
            true
        }

        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
            while let Some(tag) = is.read_raw_tag_or_eof()? {
                match tag {
                    10 => {
                        self.name = ::std::option::Option::Some(is.read_string()?);
                    },
                    18 => {
                        self.version = ::std::option::Option::Some(is.read_string()?);
                    },
                    26 => {
                        self.references.push(is.read_string()?);
                    },
                    32 => {
                        self.module_count = ::std::option::Option::Some(is.read_int32()?);
                    },
                    tag => {
                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                    },
                };
            }
            ::std::result::Result::Ok(())
        }

        // Compute sizes of nested messages
        #[allow(unused_variables)]
        fn compute_size(&self) -> u64 {
            let mut my_size = 0;
            if let Some(v) = self.name.as_ref() {
                my_size += ::protobuf::rt::string_size(1, &v);
            }
            if let Some(v) = self.version.as_ref() {
                my_size += ::protobuf::rt::string_size(2, &v);
            }
            for value in &self.references {
                my_size += ::protobuf::rt::string_size(3, &value);
            };
            if let Some(v) = self.module_count {
                my_size += ::protobuf::rt::int32_size(4, v);
            }
            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
            self.special_fields.cached_size().set(my_size as u32);
            my_size
        }

        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
            if let Some(v) = self.name.as_ref() {
                os.write_string(1, v)?;
            }
            if let Some(v) = self.version.as_ref() {
                os.write_string(2, v)?;
            }
            for v in &self.references {
                os.write_string(3, &v)?;
            };
            if let Some(v) = self.module_count {
                os.write_int32(4, v)?;
            }
            os.write_unknown_fields(self.special_fields.unknown_fields())?;
            ::std::result::Result::Ok(())
        }

        fn special_fields(&self) -> &::protobuf::SpecialFields {
            &self.special_fields
        }

        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
            &mut self.special_fields
        }

        fn new() -> ProjectInfo {
            ProjectInfo::new()
        }

        fn clear(&mut self) {
            self.name = ::std::option::Option::None;
            self.version = ::std::option::Option::None;
            self.references.clear();
            self.module_count = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static ProjectInfo {
            static instance: ProjectInfo = ProjectInfo {
                name: ::std::option::Option::None,
                version: ::std::option::Option::None,
                references: ::std::vec::Vec::new(),
                module_count: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for ProjectInfo {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Vba.ProjectInfo").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for ProjectInfo {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for ProjectInfo {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:vba.ModuleType)
pub enum ModuleType {
    // @@protoc_insertion_point(enum_value:vba.ModuleType.MODULE_TYPE_STANDARD)
    MODULE_TYPE_STANDARD = 1,
    // @@protoc_insertion_point(enum_value:vba.ModuleType.MODULE_TYPE_CLASS)
    MODULE_TYPE_CLASS = 2,
    // @@protoc_insertion_point(enum_value:vba.ModuleType.MODULE_TYPE_UNKNOWN)
    MODULE_TYPE_UNKNOWN = 3,
}

impl ::protobuf::Enum for ModuleType {
    const NAME: &'static str = "ModuleType";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<ModuleType> {
        match value {
            1 => ::std::option::Option::Some(ModuleType::MODULE_TYPE_STANDARD),
            2 => ::std::option::Option::Some(ModuleType::MODULE_TYPE_CLASS),
            3 => ::std::option::Option::Some(ModuleType::MODULE_TYPE_UNKNOWN),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<ModuleType> {
        match str {
            "MODULE_TYPE_STANDARD" => ::std::option::Option::Some(ModuleType::MODULE_TYPE_STANDARD),
            "MODULE_TYPE_CLASS" => ::std::option::Option::Some(ModuleType::MODULE_TYPE_CLASS),
            "MODULE_TYPE_UNKNOWN" => ::std::option::Option::Some(ModuleType::MODULE_TYPE_UNKNOWN),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [ModuleType] = &[
        ModuleType::MODULE_TYPE_STANDARD,
        ModuleType::MODULE_TYPE_CLASS,
        ModuleType::MODULE_TYPE_UNKNOWN,
    ];
}

impl ::protobuf::EnumFull for ModuleType {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("ModuleType").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = match self {
            ModuleType::MODULE_TYPE_STANDARD => 0,
            ModuleType::MODULE_TYPE_CLASS => 1,
            ModuleType::MODULE_TYPE_UNKNOWN => 2,
        };
        Self::enum_descriptor().value_by_index(index)
    }
}

// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for ModuleType {
    fn default() -> Self {
        ModuleType::MODULE_TYPE_STANDARD
    }
}

impl ModuleType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<ModuleType>("ModuleType")
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\tvba.proto\x12\x03vba\x1a\nyara.proto\"\xdf\x02\n\x03Vba\x12\x1d\n\nh\
    as_macros\x18\x01\x20\x01(\x08R\thasMacros\x12)\n\x07modules\x18\x02\x20\
    \x03(\x0b2\x0f.vba.Vba.ModuleR\x07modules\x127\n\x0cproject_info\x18\x05\
    \x20\x01(\x0b2\x14.vba.Vba.ProjectInfoR\x0bprojectInfo\x1aU\n\x06Module\
    \x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12#\n\x04type\x18\x02\
    \x20\x01(\x0e2\x0f.vba.ModuleTypeR\x04type\x12\x12\n\x04code\x18\x03\x20\
    \x01(\tR\x04code\x1a~\n\x0bProjectInfo\x12\x12\n\x04name\x18\x01\x20\x01\
    (\tR\x04name\x12\x18\n\x07version\x18\x02\x20\x01(\tR\x07version\x12\x1e\
    \n\nreferences\x18\x03\x20\x03(\tR\nreferences\x12!\n\x0cmodule_count\
    \x18\x04\x20\x01(\x05R\x0bmoduleCount*^\n\nModuleType\x12\x18\n\x14MODUL\
    E_TYPE_STANDARD\x10\x01\x12\x15\n\x11MODULE_TYPE_CLASS\x10\x02\x12\x17\n\
    \x13MODULE_TYPE_UNKNOWN\x10\x03\x1a\x06\x92\x93\x19\x02\x10\x01B\x1e\xfa\
    \x92\x19\x1a\n\x03vba\x12\x07vba.Vba\x1a\nvba-moduleb\x06proto2\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(1);
            deps.push(super::yara::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(3);
            messages.push(Vba::generated_message_descriptor_data());
            messages.push(vba::Module::generated_message_descriptor_data());
            messages.push(vba::ProjectInfo::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(ModuleType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}