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
// THIS IS A GENERATED FILE
// If anything in this file needs to be updated, it needs to be fixed in reso_dd_generator
use serde::{Deserialize, Serialize};

/// [Heating Lookups](https://ddwiki.reso.org/display/DDW17/Heating+Lookups)
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum Heating {
    /// "[Active Solar](https://ddwiki.reso.org/display/DDW17/Active+Solar)": Active solar heating systems use solar energy to heat a fluid -- either liquid or air -- and then transfer the solar heat directly to the interior space or to a storage system for later use.
    ActiveSolar,

    /// "[Baseboard](https://ddwiki.reso.org/display/DDW17/Baseboard)": Baseboard heating utilizes convection, as cold air drops from the window, it enters the baseboard heating unit where the air is warmed by heating elements, typically fins.
    Baseboard,

    /// "[Ceiling](https://ddwiki.reso.org/display/DDW17/Ceiling)": A heating unit that is installed into, or upon the surface, of the ceiling.
    Ceiling,

    /// "[Central](https://ddwiki.reso.org/display/DDW17/Central)": A system where heat is generated in one or more locations in the structure and distributed throughout the structure.  The term "Central" is commonly understood as distribution done by ducting air.  Piping a fluid to radiators is also a central type of heating, but this can be clarified with the options "Radiator" and "Forced Air".
    Central,

    /// "[Coal](https://ddwiki.reso.org/display/DDW17/Coal)": The heating system uses coal as its fuel to generate heat.
    Coal,

    /// "[Coal Stove](https://ddwiki.reso.org/display/DDW17/Coal+Stove)": A coal burning stove that is used for heat.
    CoalStove,

    /// "[Ductless](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244958)": The heating system does not have ducting like that found in central forced air systems.
    Ductless,

    /// "[Electric](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244959)": A heating system that utilizes electricity and heating elements, such as coils or fins, to generate heat.
    Electric,

    /// "[ENERGY STAR Qualified Equipment](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244961)": The heating system is ENERGY STAR Qualified.  Specific performance information must be determined by review of the actual unit.
    ENERGYSTARQualifiedEquipment,

    /// "[ENERGY STAR/ACCA RSI Qualified Installation](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244960)": The heating system installation was done by an ENERGY STAR or ACCA RSI qualified contractor.
    ENERGYSTARACCARSIQualifiedInstallation,

    /// "[Exhaust Fan](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244962)": The property has an exhaust fan.
    ExhaustFan,

    /// "[Fireplace Insert](https://ddwiki.reso.org/display/DDW17/Fireplace+Insert)": The property has a fireplace insert for generating heat.
    FireplaceInsert,

    /// "[Fireplace(s)](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244963)": The property has one or more fireplaces used to generate heat.
    Fireplaces,

    /// "[Floor Furnace](https://ddwiki.reso.org/display/DDW17/Floor+Furnace)": A radiant heating system that is mounted into the floor and distributes the heat via convection.
    FloorFurnace,

    /// "[Forced Air](https://ddwiki.reso.org/display/DDW17/Forced+Air)": The property has a forced air system, typically via ducting throughout the structure.
    ForcedAir,

    /// "[Geothermal](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244967)": A geothermal heating system, also known as a ground source heat pump, transfers heat from below ground into the structure.
    Geothermal,

    /// "[Gravity](https://ddwiki.reso.org/display/DDW17/Gravity)": A gravity heating system, also known as an octopus furnace, is typically a ducted system that doesn't use a fan, but rather is designed to allow the heat to rise naturally thought the ducts to the different areas of the structure.
    Gravity,

    /// "[Heat Pump](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244969)": A system that exchanges heat between a warm and cool space.  The heat exchange is done between the dwelling and another air space, like outdoors; or a water source; or below ground (geothermal).
    HeatPump,

    /// "[Hot Water](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244970)": The heating system uses a boiler and pipes to deliver hot water to radiators throughout the dwelling.
    HotWater,

    /// "[Humidity Control](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244971)": The heating system has humidity control.
    HumidityControl,

    /// "[Kerosene](https://ddwiki.reso.org/display/DDW17/Kerosene)": The heating system uses kerosene as its fuel to generate heat.
    Kerosene,

    /// "[Natural Gas](https://ddwiki.reso.org/display/DDW17/Natural+Gas)": The heating system uses natural gas as its fuel to generate heat.
    NaturalGas,

    /// "[None](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244974)": The property does not have a heating system.
    None,

    /// "[Oil](https://ddwiki.reso.org/display/DDW17/Oil)": The heating system uses oil as its fuel to generate heat.
    Oil,

    /// "[Other](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244976)": The property has a heating system or features that are not included in this list.
    Other,

    /// "[Passive Solar](https://ddwiki.reso.org/display/DDW17/Passive+Solar)": Passive solar is a building design where the walls, windows, floors, etc., are made to collect heat and warm the dwelling.
    PassiveSolar,

    /// "[Pellet Stove](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244978)": The property has a stove that burns compressed wood or biomass pellets to generate heat.
    PelletStove,

    /// "[Propane](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244979)": The heating system uses propane as its fuel to generate heat.
    Propane,

    /// "[Propane Stove](https://ddwiki.reso.org/display/DDW17/Propane+Stove)": The property has a stove that burns propane to generate heat.
    PropaneStove,

    /// "[Radiant](https://ddwiki.reso.org/display/DDW17/Radiant)": The heating system uses radiators to release heat within the dwelling.  The heat is typically delivered to the radiator(s) by water/steam or electricity.
    Radiant,

    /// "[Radiant Ceiling](https://ddwiki.reso.org/display/DDW17/Radiant+Ceiling)": The radiant heating element(s) are located in the ceiling.
    RadiantCeiling,

    /// "[Radiant Floor](https://ddwiki.reso.org/display/DDW17/Radiant+Floor)": The radiant heating element(s) are located in the floor.
    RadiantFloor,

    /// "[See Remarks](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244984)": See the remarks fields for additional information about the heating system included with the property.
    SeeRemarks,

    /// "[Separate Meters](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244985)": The heating system has multiple units and/or is zoned with separate meters for each zone/unit.
    SeparateMeters,

    /// "[Solar](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244986)": The property has a heating system or method that uses an unspecified type of solar heating.
    Solar,

    /// "[Space Heater](https://ddwiki.reso.org/display/DDW17/Space+Heater)": The property comes with a stand-alone space heater.
    SpaceHeater,

    /// "[Steam](https://ddwiki.reso.org/display/DDW17/Steam)": The heating system uses a boiler and pipes to deliver hot water to radiators throughout the dwelling.
    Steam,

    /// "[Varies by Unit](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244989)": The type of heating or heating features vary from unit to unit.
    VariesbyUnit,

    /// "[Wall Furnace](https://ddwiki.reso.org/display/DDW17/Wall+Furnace)": Typically a ductless system that is built into a wall to deliver to the room in which it's installed.
    WallFurnace,

    /// "[Wood](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244991)": The heating system uses wood as its fuel to generate heat.
    Wood,

    /// "[Wood Stove](https://ddwiki.reso.org/display/DDW17/Wood+Stove)": The property has a stove that burns wood to generate heat.
    WoodStove,

    /// "[Zoned](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244993)": The heating system is zoned allowing for indepenant control of two or more parts of the structure.
    Zoned,

    /// A value that was not defined by the enumeration
    OpenEnumeration(String),
}

impl crate::ResoEnumeration for Heating {
    fn from_str(s: &str) -> Heating {
        match s {
            "Active Solar" => Heating::ActiveSolar,

            "Baseboard" => Heating::Baseboard,

            "Ceiling" => Heating::Ceiling,

            "Central" => Heating::Central,

            "Coal" => Heating::Coal,

            "Coal Stove" => Heating::CoalStove,

            "Ductless" => Heating::Ductless,

            "Electric" => Heating::Electric,

            "ENERGY STAR Qualified Equipment" => Heating::ENERGYSTARQualifiedEquipment,

            "ENERGY STAR/ACCA RSI Qualified Installation" => {
                Heating::ENERGYSTARACCARSIQualifiedInstallation
            }

            "Exhaust Fan" => Heating::ExhaustFan,

            "Fireplace Insert" => Heating::FireplaceInsert,

            "Fireplace(s)" => Heating::Fireplaces,

            "Floor Furnace" => Heating::FloorFurnace,

            "Forced Air" => Heating::ForcedAir,

            "Geothermal" => Heating::Geothermal,

            "Gravity" => Heating::Gravity,

            "Heat Pump" => Heating::HeatPump,

            "Hot Water" => Heating::HotWater,

            "Humidity Control" => Heating::HumidityControl,

            "Kerosene" => Heating::Kerosene,

            "Natural Gas" => Heating::NaturalGas,

            "None" => Heating::None,

            "Oil" => Heating::Oil,

            "Other" => Heating::Other,

            "Passive Solar" => Heating::PassiveSolar,

            "Pellet Stove" => Heating::PelletStove,

            "Propane" => Heating::Propane,

            "Propane Stove" => Heating::PropaneStove,

            "Radiant" => Heating::Radiant,

            "Radiant Ceiling" => Heating::RadiantCeiling,

            "Radiant Floor" => Heating::RadiantFloor,

            "See Remarks" => Heating::SeeRemarks,

            "Separate Meters" => Heating::SeparateMeters,

            "Solar" => Heating::Solar,

            "Space Heater" => Heating::SpaceHeater,

            "Steam" => Heating::Steam,

            "Varies by Unit" => Heating::VariesbyUnit,

            "Wall Furnace" => Heating::WallFurnace,

            "Wood" => Heating::Wood,

            "Wood Stove" => Heating::WoodStove,

            "Zoned" => Heating::Zoned,

            _ => Heating::OpenEnumeration(s.into()),
        }
    }

    fn from_string(s: String) -> Heating {
        match s.as_ref() {
            "Active Solar" => Heating::ActiveSolar,

            "Baseboard" => Heating::Baseboard,

            "Ceiling" => Heating::Ceiling,

            "Central" => Heating::Central,

            "Coal" => Heating::Coal,

            "Coal Stove" => Heating::CoalStove,

            "Ductless" => Heating::Ductless,

            "Electric" => Heating::Electric,

            "ENERGY STAR Qualified Equipment" => Heating::ENERGYSTARQualifiedEquipment,

            "ENERGY STAR/ACCA RSI Qualified Installation" => {
                Heating::ENERGYSTARACCARSIQualifiedInstallation
            }

            "Exhaust Fan" => Heating::ExhaustFan,

            "Fireplace Insert" => Heating::FireplaceInsert,

            "Fireplace(s)" => Heating::Fireplaces,

            "Floor Furnace" => Heating::FloorFurnace,

            "Forced Air" => Heating::ForcedAir,

            "Geothermal" => Heating::Geothermal,

            "Gravity" => Heating::Gravity,

            "Heat Pump" => Heating::HeatPump,

            "Hot Water" => Heating::HotWater,

            "Humidity Control" => Heating::HumidityControl,

            "Kerosene" => Heating::Kerosene,

            "Natural Gas" => Heating::NaturalGas,

            "None" => Heating::None,

            "Oil" => Heating::Oil,

            "Other" => Heating::Other,

            "Passive Solar" => Heating::PassiveSolar,

            "Pellet Stove" => Heating::PelletStove,

            "Propane" => Heating::Propane,

            "Propane Stove" => Heating::PropaneStove,

            "Radiant" => Heating::Radiant,

            "Radiant Ceiling" => Heating::RadiantCeiling,

            "Radiant Floor" => Heating::RadiantFloor,

            "See Remarks" => Heating::SeeRemarks,

            "Separate Meters" => Heating::SeparateMeters,

            "Solar" => Heating::Solar,

            "Space Heater" => Heating::SpaceHeater,

            "Steam" => Heating::Steam,

            "Varies by Unit" => Heating::VariesbyUnit,

            "Wall Furnace" => Heating::WallFurnace,

            "Wood" => Heating::Wood,

            "Wood Stove" => Heating::WoodStove,

            "Zoned" => Heating::Zoned,

            _ => Heating::OpenEnumeration(s),
        }
    }

    fn to_str(&self) -> &str {
        match self {
            Heating::ActiveSolar => "Active Solar",

            Heating::Baseboard => "Baseboard",

            Heating::Ceiling => "Ceiling",

            Heating::Central => "Central",

            Heating::Coal => "Coal",

            Heating::CoalStove => "Coal Stove",

            Heating::Ductless => "Ductless",

            Heating::Electric => "Electric",

            Heating::ENERGYSTARQualifiedEquipment => "ENERGY STAR Qualified Equipment",

            Heating::ENERGYSTARACCARSIQualifiedInstallation => {
                "ENERGY STAR/ACCA RSI Qualified Installation"
            }

            Heating::ExhaustFan => "Exhaust Fan",

            Heating::FireplaceInsert => "Fireplace Insert",

            Heating::Fireplaces => "Fireplace(s)",

            Heating::FloorFurnace => "Floor Furnace",

            Heating::ForcedAir => "Forced Air",

            Heating::Geothermal => "Geothermal",

            Heating::Gravity => "Gravity",

            Heating::HeatPump => "Heat Pump",

            Heating::HotWater => "Hot Water",

            Heating::HumidityControl => "Humidity Control",

            Heating::Kerosene => "Kerosene",

            Heating::NaturalGas => "Natural Gas",

            Heating::None => "None",

            Heating::Oil => "Oil",

            Heating::Other => "Other",

            Heating::PassiveSolar => "Passive Solar",

            Heating::PelletStove => "Pellet Stove",

            Heating::Propane => "Propane",

            Heating::PropaneStove => "Propane Stove",

            Heating::Radiant => "Radiant",

            Heating::RadiantCeiling => "Radiant Ceiling",

            Heating::RadiantFloor => "Radiant Floor",

            Heating::SeeRemarks => "See Remarks",

            Heating::SeparateMeters => "Separate Meters",

            Heating::Solar => "Solar",

            Heating::SpaceHeater => "Space Heater",

            Heating::Steam => "Steam",

            Heating::VariesbyUnit => "Varies by Unit",

            Heating::WallFurnace => "Wall Furnace",

            Heating::Wood => "Wood",

            Heating::WoodStove => "Wood Stove",

            Heating::Zoned => "Zoned",

            Heating::OpenEnumeration(ref s) => s,
        }
    }

    fn into_string(self) -> String {
        match self {
            Heating::ActiveSolar => "Active Solar".into(),

            Heating::Baseboard => "Baseboard".into(),

            Heating::Ceiling => "Ceiling".into(),

            Heating::Central => "Central".into(),

            Heating::Coal => "Coal".into(),

            Heating::CoalStove => "Coal Stove".into(),

            Heating::Ductless => "Ductless".into(),

            Heating::Electric => "Electric".into(),

            Heating::ENERGYSTARQualifiedEquipment => "ENERGY STAR Qualified Equipment".into(),

            Heating::ENERGYSTARACCARSIQualifiedInstallation => {
                "ENERGY STAR/ACCA RSI Qualified Installation".into()
            }

            Heating::ExhaustFan => "Exhaust Fan".into(),

            Heating::FireplaceInsert => "Fireplace Insert".into(),

            Heating::Fireplaces => "Fireplace(s)".into(),

            Heating::FloorFurnace => "Floor Furnace".into(),

            Heating::ForcedAir => "Forced Air".into(),

            Heating::Geothermal => "Geothermal".into(),

            Heating::Gravity => "Gravity".into(),

            Heating::HeatPump => "Heat Pump".into(),

            Heating::HotWater => "Hot Water".into(),

            Heating::HumidityControl => "Humidity Control".into(),

            Heating::Kerosene => "Kerosene".into(),

            Heating::NaturalGas => "Natural Gas".into(),

            Heating::None => "None".into(),

            Heating::Oil => "Oil".into(),

            Heating::Other => "Other".into(),

            Heating::PassiveSolar => "Passive Solar".into(),

            Heating::PelletStove => "Pellet Stove".into(),

            Heating::Propane => "Propane".into(),

            Heating::PropaneStove => "Propane Stove".into(),

            Heating::Radiant => "Radiant".into(),

            Heating::RadiantCeiling => "Radiant Ceiling".into(),

            Heating::RadiantFloor => "Radiant Floor".into(),

            Heating::SeeRemarks => "See Remarks".into(),

            Heating::SeparateMeters => "Separate Meters".into(),

            Heating::Solar => "Solar".into(),

            Heating::SpaceHeater => "Space Heater".into(),

            Heating::Steam => "Steam".into(),

            Heating::VariesbyUnit => "Varies by Unit".into(),

            Heating::WallFurnace => "Wall Furnace".into(),

            Heating::Wood => "Wood".into(),

            Heating::WoodStove => "Wood Stove".into(),

            Heating::Zoned => "Zoned".into(),

            Heating::OpenEnumeration(s) => s,
        }
    }

    fn fallback_value(&self) -> Option<&str> {
        match self {
            Heating::OpenEnumeration(ref s) => Some(s),
            _ => None,
        }
    }
}

impl From<String> for Heating {
    fn from(s: String) -> Heating {
        match s.as_ref() {
            "Active Solar" => Heating::ActiveSolar,

            "Baseboard" => Heating::Baseboard,

            "Ceiling" => Heating::Ceiling,

            "Central" => Heating::Central,

            "Coal" => Heating::Coal,

            "Coal Stove" => Heating::CoalStove,

            "Ductless" => Heating::Ductless,

            "Electric" => Heating::Electric,

            "ENERGY STAR Qualified Equipment" => Heating::ENERGYSTARQualifiedEquipment,

            "ENERGY STAR/ACCA RSI Qualified Installation" => {
                Heating::ENERGYSTARACCARSIQualifiedInstallation
            }

            "Exhaust Fan" => Heating::ExhaustFan,

            "Fireplace Insert" => Heating::FireplaceInsert,

            "Fireplace(s)" => Heating::Fireplaces,

            "Floor Furnace" => Heating::FloorFurnace,

            "Forced Air" => Heating::ForcedAir,

            "Geothermal" => Heating::Geothermal,

            "Gravity" => Heating::Gravity,

            "Heat Pump" => Heating::HeatPump,

            "Hot Water" => Heating::HotWater,

            "Humidity Control" => Heating::HumidityControl,

            "Kerosene" => Heating::Kerosene,

            "Natural Gas" => Heating::NaturalGas,

            "None" => Heating::None,

            "Oil" => Heating::Oil,

            "Other" => Heating::Other,

            "Passive Solar" => Heating::PassiveSolar,

            "Pellet Stove" => Heating::PelletStove,

            "Propane" => Heating::Propane,

            "Propane Stove" => Heating::PropaneStove,

            "Radiant" => Heating::Radiant,

            "Radiant Ceiling" => Heating::RadiantCeiling,

            "Radiant Floor" => Heating::RadiantFloor,

            "See Remarks" => Heating::SeeRemarks,

            "Separate Meters" => Heating::SeparateMeters,

            "Solar" => Heating::Solar,

            "Space Heater" => Heating::SpaceHeater,

            "Steam" => Heating::Steam,

            "Varies by Unit" => Heating::VariesbyUnit,

            "Wall Furnace" => Heating::WallFurnace,

            "Wood" => Heating::Wood,

            "Wood Stove" => Heating::WoodStove,

            "Zoned" => Heating::Zoned,

            _ => Heating::OpenEnumeration(s),
        }
    }
}

impl From<&str> for Heating {
    fn from(s: &str) -> Heating {
        match s {
            "Active Solar" => Heating::ActiveSolar,

            "Baseboard" => Heating::Baseboard,

            "Ceiling" => Heating::Ceiling,

            "Central" => Heating::Central,

            "Coal" => Heating::Coal,

            "Coal Stove" => Heating::CoalStove,

            "Ductless" => Heating::Ductless,

            "Electric" => Heating::Electric,

            "ENERGY STAR Qualified Equipment" => Heating::ENERGYSTARQualifiedEquipment,

            "ENERGY STAR/ACCA RSI Qualified Installation" => {
                Heating::ENERGYSTARACCARSIQualifiedInstallation
            }

            "Exhaust Fan" => Heating::ExhaustFan,

            "Fireplace Insert" => Heating::FireplaceInsert,

            "Fireplace(s)" => Heating::Fireplaces,

            "Floor Furnace" => Heating::FloorFurnace,

            "Forced Air" => Heating::ForcedAir,

            "Geothermal" => Heating::Geothermal,

            "Gravity" => Heating::Gravity,

            "Heat Pump" => Heating::HeatPump,

            "Hot Water" => Heating::HotWater,

            "Humidity Control" => Heating::HumidityControl,

            "Kerosene" => Heating::Kerosene,

            "Natural Gas" => Heating::NaturalGas,

            "None" => Heating::None,

            "Oil" => Heating::Oil,

            "Other" => Heating::Other,

            "Passive Solar" => Heating::PassiveSolar,

            "Pellet Stove" => Heating::PelletStove,

            "Propane" => Heating::Propane,

            "Propane Stove" => Heating::PropaneStove,

            "Radiant" => Heating::Radiant,

            "Radiant Ceiling" => Heating::RadiantCeiling,

            "Radiant Floor" => Heating::RadiantFloor,

            "See Remarks" => Heating::SeeRemarks,

            "Separate Meters" => Heating::SeparateMeters,

            "Solar" => Heating::Solar,

            "Space Heater" => Heating::SpaceHeater,

            "Steam" => Heating::Steam,

            "Varies by Unit" => Heating::VariesbyUnit,

            "Wall Furnace" => Heating::WallFurnace,

            "Wood" => Heating::Wood,

            "Wood Stove" => Heating::WoodStove,

            "Zoned" => Heating::Zoned,

            _ => Heating::OpenEnumeration(s.into()),
        }
    }
}

impl<'a> From<&'a Heating> for &'a str {
    fn from(s: &'a Heating) -> &'a str {
        match s {
            Heating::ActiveSolar => "Active Solar",

            Heating::Baseboard => "Baseboard",

            Heating::Ceiling => "Ceiling",

            Heating::Central => "Central",

            Heating::Coal => "Coal",

            Heating::CoalStove => "Coal Stove",

            Heating::Ductless => "Ductless",

            Heating::Electric => "Electric",

            Heating::ENERGYSTARQualifiedEquipment => "ENERGY STAR Qualified Equipment",

            Heating::ENERGYSTARACCARSIQualifiedInstallation => {
                "ENERGY STAR/ACCA RSI Qualified Installation"
            }

            Heating::ExhaustFan => "Exhaust Fan",

            Heating::FireplaceInsert => "Fireplace Insert",

            Heating::Fireplaces => "Fireplace(s)",

            Heating::FloorFurnace => "Floor Furnace",

            Heating::ForcedAir => "Forced Air",

            Heating::Geothermal => "Geothermal",

            Heating::Gravity => "Gravity",

            Heating::HeatPump => "Heat Pump",

            Heating::HotWater => "Hot Water",

            Heating::HumidityControl => "Humidity Control",

            Heating::Kerosene => "Kerosene",

            Heating::NaturalGas => "Natural Gas",

            Heating::None => "None",

            Heating::Oil => "Oil",

            Heating::Other => "Other",

            Heating::PassiveSolar => "Passive Solar",

            Heating::PelletStove => "Pellet Stove",

            Heating::Propane => "Propane",

            Heating::PropaneStove => "Propane Stove",

            Heating::Radiant => "Radiant",

            Heating::RadiantCeiling => "Radiant Ceiling",

            Heating::RadiantFloor => "Radiant Floor",

            Heating::SeeRemarks => "See Remarks",

            Heating::SeparateMeters => "Separate Meters",

            Heating::Solar => "Solar",

            Heating::SpaceHeater => "Space Heater",

            Heating::Steam => "Steam",

            Heating::VariesbyUnit => "Varies by Unit",

            Heating::WallFurnace => "Wall Furnace",

            Heating::Wood => "Wood",

            Heating::WoodStove => "Wood Stove",

            Heating::Zoned => "Zoned",

            Heating::OpenEnumeration(s) => s,
        }
    }
}

impl Serialize for Heating {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        serializer.serialize_str(self.into())
    }
}

impl<'de> Deserialize<'de> for Heating {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        Ok(From::from(s))
    }
}