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
// 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};

/// [LaundryFeatures Lookups](https://ddwiki.reso.org/display/DDW17/LaundryFeatures+Lookups)
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum LaundryFeatures {
    /// "[Common Area](https://ddwiki.reso.org/pages/viewpage.action?pageId=29245476)": Laundry facilities are in a common area.
    CommonArea,

    /// "[Electric Dryer Hookup](https://ddwiki.reso.org/display/DDW17/Electric+Dryer+Hookup)": The property has electric cloths dryer connections.
    ElectricDryerHookup,

    /// "[Gas Dryer Hookup](https://ddwiki.reso.org/display/DDW17/Gas+Dryer+Hookup)": The property has gas cloths dryer connections.
    GasDryerHookup,

    /// "[In Basement](https://ddwiki.reso.org/display/DDW17/In+Basement)": Laundry is located in the basement.
    InBasement,

    /// "[In Bathroom](https://ddwiki.reso.org/display/DDW17/In+Bathroom)": Laundry is located in the bathroom.
    InBathroom,

    /// "[In Carport](https://ddwiki.reso.org/display/DDW17/In+Carport)": Laundry is located in the carport.
    InCarport,

    /// "[In Garage](https://ddwiki.reso.org/display/DDW17/In+Garage)": Laundry is located in the garage.
    InGarage,

    /// "[In Hall](https://ddwiki.reso.org/display/DDW17/In+Hall)": Laundry is located in the hall.
    InHall,

    /// "[In Kitchen](https://ddwiki.reso.org/display/DDW17/In+Kitchen)": Laundry is located in the kitchen.
    InKitchen,

    /// "[In Unit](https://ddwiki.reso.org/display/DDW17/In+Unit)": Laundry is located within the unit.
    InUnit,

    /// "[Inside](https://ddwiki.reso.org/display/DDW17/Inside)": Laundry is located indoors.
    Inside,

    /// "[Laundry Chute](https://ddwiki.reso.org/display/DDW17/Laundry+Chute)": The property has a laundry chute.
    LaundryChute,

    /// "[Laundry Closet](https://ddwiki.reso.org/display/DDW17/Laundry+Closet)": The property has a laundry closet.
    LaundryCloset,

    /// "[Laundry Room](https://ddwiki.reso.org/display/DDW17/Laundry+Room)": The property has a laundry room.
    LaundryRoom,

    /// "[Lower Level](https://ddwiki.reso.org/display/DDW17/Lower+Level)": Laundry is on the lower level.
    LowerLevel,

    /// "[Main Level](https://ddwiki.reso.org/display/DDW17/Main+Level)": Laundry is on the main level.
    MainLevel,

    /// "[Multiple Locations](https://ddwiki.reso.org/display/DDW17/Multiple+Locations)": Laundry is in multiple locations.
    MultipleLocations,

    /// "[None](https://ddwiki.reso.org/pages/viewpage.action?pageId=29245493)": There are no laundry features.
    None,

    /// "[Other](https://ddwiki.reso.org/pages/viewpage.action?pageId=29245494)": There are laundry features other than those in this list.
    Other,

    /// "[Outside](https://ddwiki.reso.org/pages/viewpage.action?pageId=29245495)": Laundry is located outside.
    Outside,

    /// "[See Remarks](https://ddwiki.reso.org/pages/viewpage.action?pageId=29245496)": See remarks for additional information about laundry.
    SeeRemarks,

    /// "[Sink](https://ddwiki.reso.org/display/DDW17/Sink)": The laundry area has a sink.
    Sink,

    /// "[Upper Level](https://ddwiki.reso.org/display/DDW17/Upper+Level)": Laundry is on the upper level.
    UpperLevel,

    /// "[Washer Hookup](https://ddwiki.reso.org/display/DDW17/Washer+Hookup)": The property has a hookups for a cloths washer.
    WasherHookup,

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

impl crate::ResoEnumeration for LaundryFeatures {
    fn from_str(s: &str) -> LaundryFeatures {
        match s {
            "Common Area" => LaundryFeatures::CommonArea,

            "Electric Dryer Hookup" => LaundryFeatures::ElectricDryerHookup,

            "Gas Dryer Hookup" => LaundryFeatures::GasDryerHookup,

            "In Basement" => LaundryFeatures::InBasement,

            "In Bathroom" => LaundryFeatures::InBathroom,

            "In Carport" => LaundryFeatures::InCarport,

            "In Garage" => LaundryFeatures::InGarage,

            "In Hall" => LaundryFeatures::InHall,

            "In Kitchen" => LaundryFeatures::InKitchen,

            "In Unit" => LaundryFeatures::InUnit,

            "Inside" => LaundryFeatures::Inside,

            "Laundry Chute" => LaundryFeatures::LaundryChute,

            "Laundry Closet" => LaundryFeatures::LaundryCloset,

            "Laundry Room" => LaundryFeatures::LaundryRoom,

            "Lower Level" => LaundryFeatures::LowerLevel,

            "Main Level" => LaundryFeatures::MainLevel,

            "Multiple Locations" => LaundryFeatures::MultipleLocations,

            "None" => LaundryFeatures::None,

            "Other" => LaundryFeatures::Other,

            "Outside" => LaundryFeatures::Outside,

            "See Remarks" => LaundryFeatures::SeeRemarks,

            "Sink" => LaundryFeatures::Sink,

            "Upper Level" => LaundryFeatures::UpperLevel,

            "Washer Hookup" => LaundryFeatures::WasherHookup,

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

    fn from_string(s: String) -> LaundryFeatures {
        match s.as_ref() {
            "Common Area" => LaundryFeatures::CommonArea,

            "Electric Dryer Hookup" => LaundryFeatures::ElectricDryerHookup,

            "Gas Dryer Hookup" => LaundryFeatures::GasDryerHookup,

            "In Basement" => LaundryFeatures::InBasement,

            "In Bathroom" => LaundryFeatures::InBathroom,

            "In Carport" => LaundryFeatures::InCarport,

            "In Garage" => LaundryFeatures::InGarage,

            "In Hall" => LaundryFeatures::InHall,

            "In Kitchen" => LaundryFeatures::InKitchen,

            "In Unit" => LaundryFeatures::InUnit,

            "Inside" => LaundryFeatures::Inside,

            "Laundry Chute" => LaundryFeatures::LaundryChute,

            "Laundry Closet" => LaundryFeatures::LaundryCloset,

            "Laundry Room" => LaundryFeatures::LaundryRoom,

            "Lower Level" => LaundryFeatures::LowerLevel,

            "Main Level" => LaundryFeatures::MainLevel,

            "Multiple Locations" => LaundryFeatures::MultipleLocations,

            "None" => LaundryFeatures::None,

            "Other" => LaundryFeatures::Other,

            "Outside" => LaundryFeatures::Outside,

            "See Remarks" => LaundryFeatures::SeeRemarks,

            "Sink" => LaundryFeatures::Sink,

            "Upper Level" => LaundryFeatures::UpperLevel,

            "Washer Hookup" => LaundryFeatures::WasherHookup,

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

    fn to_str(&self) -> &str {
        match self {
            LaundryFeatures::CommonArea => "Common Area",

            LaundryFeatures::ElectricDryerHookup => "Electric Dryer Hookup",

            LaundryFeatures::GasDryerHookup => "Gas Dryer Hookup",

            LaundryFeatures::InBasement => "In Basement",

            LaundryFeatures::InBathroom => "In Bathroom",

            LaundryFeatures::InCarport => "In Carport",

            LaundryFeatures::InGarage => "In Garage",

            LaundryFeatures::InHall => "In Hall",

            LaundryFeatures::InKitchen => "In Kitchen",

            LaundryFeatures::InUnit => "In Unit",

            LaundryFeatures::Inside => "Inside",

            LaundryFeatures::LaundryChute => "Laundry Chute",

            LaundryFeatures::LaundryCloset => "Laundry Closet",

            LaundryFeatures::LaundryRoom => "Laundry Room",

            LaundryFeatures::LowerLevel => "Lower Level",

            LaundryFeatures::MainLevel => "Main Level",

            LaundryFeatures::MultipleLocations => "Multiple Locations",

            LaundryFeatures::None => "None",

            LaundryFeatures::Other => "Other",

            LaundryFeatures::Outside => "Outside",

            LaundryFeatures::SeeRemarks => "See Remarks",

            LaundryFeatures::Sink => "Sink",

            LaundryFeatures::UpperLevel => "Upper Level",

            LaundryFeatures::WasherHookup => "Washer Hookup",

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

    fn into_string(self) -> String {
        match self {
            LaundryFeatures::CommonArea => "Common Area".into(),

            LaundryFeatures::ElectricDryerHookup => "Electric Dryer Hookup".into(),

            LaundryFeatures::GasDryerHookup => "Gas Dryer Hookup".into(),

            LaundryFeatures::InBasement => "In Basement".into(),

            LaundryFeatures::InBathroom => "In Bathroom".into(),

            LaundryFeatures::InCarport => "In Carport".into(),

            LaundryFeatures::InGarage => "In Garage".into(),

            LaundryFeatures::InHall => "In Hall".into(),

            LaundryFeatures::InKitchen => "In Kitchen".into(),

            LaundryFeatures::InUnit => "In Unit".into(),

            LaundryFeatures::Inside => "Inside".into(),

            LaundryFeatures::LaundryChute => "Laundry Chute".into(),

            LaundryFeatures::LaundryCloset => "Laundry Closet".into(),

            LaundryFeatures::LaundryRoom => "Laundry Room".into(),

            LaundryFeatures::LowerLevel => "Lower Level".into(),

            LaundryFeatures::MainLevel => "Main Level".into(),

            LaundryFeatures::MultipleLocations => "Multiple Locations".into(),

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

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

            LaundryFeatures::Outside => "Outside".into(),

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

            LaundryFeatures::Sink => "Sink".into(),

            LaundryFeatures::UpperLevel => "Upper Level".into(),

            LaundryFeatures::WasherHookup => "Washer Hookup".into(),

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

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

impl From<String> for LaundryFeatures {
    fn from(s: String) -> LaundryFeatures {
        match s.as_ref() {
            "Common Area" => LaundryFeatures::CommonArea,

            "Electric Dryer Hookup" => LaundryFeatures::ElectricDryerHookup,

            "Gas Dryer Hookup" => LaundryFeatures::GasDryerHookup,

            "In Basement" => LaundryFeatures::InBasement,

            "In Bathroom" => LaundryFeatures::InBathroom,

            "In Carport" => LaundryFeatures::InCarport,

            "In Garage" => LaundryFeatures::InGarage,

            "In Hall" => LaundryFeatures::InHall,

            "In Kitchen" => LaundryFeatures::InKitchen,

            "In Unit" => LaundryFeatures::InUnit,

            "Inside" => LaundryFeatures::Inside,

            "Laundry Chute" => LaundryFeatures::LaundryChute,

            "Laundry Closet" => LaundryFeatures::LaundryCloset,

            "Laundry Room" => LaundryFeatures::LaundryRoom,

            "Lower Level" => LaundryFeatures::LowerLevel,

            "Main Level" => LaundryFeatures::MainLevel,

            "Multiple Locations" => LaundryFeatures::MultipleLocations,

            "None" => LaundryFeatures::None,

            "Other" => LaundryFeatures::Other,

            "Outside" => LaundryFeatures::Outside,

            "See Remarks" => LaundryFeatures::SeeRemarks,

            "Sink" => LaundryFeatures::Sink,

            "Upper Level" => LaundryFeatures::UpperLevel,

            "Washer Hookup" => LaundryFeatures::WasherHookup,

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

impl From<&str> for LaundryFeatures {
    fn from(s: &str) -> LaundryFeatures {
        match s {
            "Common Area" => LaundryFeatures::CommonArea,

            "Electric Dryer Hookup" => LaundryFeatures::ElectricDryerHookup,

            "Gas Dryer Hookup" => LaundryFeatures::GasDryerHookup,

            "In Basement" => LaundryFeatures::InBasement,

            "In Bathroom" => LaundryFeatures::InBathroom,

            "In Carport" => LaundryFeatures::InCarport,

            "In Garage" => LaundryFeatures::InGarage,

            "In Hall" => LaundryFeatures::InHall,

            "In Kitchen" => LaundryFeatures::InKitchen,

            "In Unit" => LaundryFeatures::InUnit,

            "Inside" => LaundryFeatures::Inside,

            "Laundry Chute" => LaundryFeatures::LaundryChute,

            "Laundry Closet" => LaundryFeatures::LaundryCloset,

            "Laundry Room" => LaundryFeatures::LaundryRoom,

            "Lower Level" => LaundryFeatures::LowerLevel,

            "Main Level" => LaundryFeatures::MainLevel,

            "Multiple Locations" => LaundryFeatures::MultipleLocations,

            "None" => LaundryFeatures::None,

            "Other" => LaundryFeatures::Other,

            "Outside" => LaundryFeatures::Outside,

            "See Remarks" => LaundryFeatures::SeeRemarks,

            "Sink" => LaundryFeatures::Sink,

            "Upper Level" => LaundryFeatures::UpperLevel,

            "Washer Hookup" => LaundryFeatures::WasherHookup,

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

impl<'a> From<&'a LaundryFeatures> for &'a str {
    fn from(s: &'a LaundryFeatures) -> &'a str {
        match s {
            LaundryFeatures::CommonArea => "Common Area",

            LaundryFeatures::ElectricDryerHookup => "Electric Dryer Hookup",

            LaundryFeatures::GasDryerHookup => "Gas Dryer Hookup",

            LaundryFeatures::InBasement => "In Basement",

            LaundryFeatures::InBathroom => "In Bathroom",

            LaundryFeatures::InCarport => "In Carport",

            LaundryFeatures::InGarage => "In Garage",

            LaundryFeatures::InHall => "In Hall",

            LaundryFeatures::InKitchen => "In Kitchen",

            LaundryFeatures::InUnit => "In Unit",

            LaundryFeatures::Inside => "Inside",

            LaundryFeatures::LaundryChute => "Laundry Chute",

            LaundryFeatures::LaundryCloset => "Laundry Closet",

            LaundryFeatures::LaundryRoom => "Laundry Room",

            LaundryFeatures::LowerLevel => "Lower Level",

            LaundryFeatures::MainLevel => "Main Level",

            LaundryFeatures::MultipleLocations => "Multiple Locations",

            LaundryFeatures::None => "None",

            LaundryFeatures::Other => "Other",

            LaundryFeatures::Outside => "Outside",

            LaundryFeatures::SeeRemarks => "See Remarks",

            LaundryFeatures::Sink => "Sink",

            LaundryFeatures::UpperLevel => "Upper Level",

            LaundryFeatures::WasherHookup => "Washer Hookup",

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

impl Serialize for LaundryFeatures {
    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 LaundryFeatures {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        Ok(From::from(s))
    }
}