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

/// [CurrentFinancing Lookups](https://ddwiki.reso.org/display/DDW17/CurrentFinancing+Lookups)
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum CurrentFinancing {
    /// "[Assumable](https://ddwiki.reso.org/display/DDW17/Assumable)": The financing currently in place may be assumed.
    Assumable,

    /// "[Contract](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244381)": The purchase of a property involves an agreement to perform services, provide product, share of income, or some other agreement as the method of payment for the property.
    Contract,

    /// "[Conventional](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244382)": The buyer is using conventional financing to purchase the home.
    Conventional,

    /// "[FHA](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244383)": A loan from an approved provider that follows the guidelines of, and is insured by, the Federal Housing Administration.
    FHA,

    /// "[FHA 203(b)](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244384)": The basic home mortgage loan from an approved provider that follows the guidelines of, and is insured by, the Federal Housing Administration.
    FHA203b,

    /// "[FHA 203(k)](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244385)": A loan, for the rehabilitation and repair of single family residence, from an approved provider that follows the guidelines of, and is insured by, the Federal Housing Administration.
    FHA203k,

    /// "[Leased Renewables](https://ddwiki.reso.org/display/DDW17/Leased+Renewables)": Definition:  Renewable system (i.e., solar or wind) belonging to a third-party is installed on a customer’s property at little or no cost to the property owner. Property owner has entered an agreement to pay for the lease of the equipment. Structure:  Fee model is based on equipment to generate power, not power itself.  Transfer: If requirements are met it may be possible to transfer lease from home seller to buyer with the approval of the system owner. If being transferred, see Fannie Mae guidelines for more info: since lease is for equipment it must be included in the buyers DTI calculation.  If a buyer cannot or will not adopt a lease, then the seller is required to pay the remaining contract amount in full and the system would be removed.Real or Personal Property:  Renewable system is typically considered personal property.  All tax credits as well as maintenance responsibilities, etc. belong to the third-party owner. Some leases require the homeowner to pay the personal property tax.  Terms:  Lease should provide items homeowner is responsible for paying. In a solar lease model, a customer will sign a contract with an installer/developer and pay for the solar energy equipment over a period of years or decades. Solar leases can be structured so customers pay no up-front costs, some up-front costs (partially prepaid) or can be fully prepaid (the leasing company is then able to depreciate the equipment over time and offers a lower fee for pre-paid leases).  The homeowner may have the option to purchase the system during or at the end of the lease term (most leases are for 20-year terms) at its fair market value or terms set in the original lease contract.
    LeasedRenewables,

    /// "[None](https://ddwiki.reso.org/display/DDW17/None)": The is no current financing on the property.
    None,

    /// "[Other](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244388)": The current owner is using another form of financing that is not included in the options provided in this list.
    Other,

    /// "[Power Purchase Agreement](https://ddwiki.reso.org/display/DDW17/Power+Purchase+Agreement)": Definition:  Renewable system belonging to a third-party is installed on a customer’s property at little or no up-front cost to the property owner. Property owner is in an agreement to buy all the power generated at a fixed rate whether it is actually used or not.  This is typically lower than the local utility rate. Structure:  Fee model is based on power, not equipment to generate it. Transfer: A PPA may be transferred to a homebuyer with approval from the system owner. If a buyer will not adopt a PPA, then the seller is required to pay the remaining contract amount in full and the system would be removed. If being transferred, see Fannie Mae guidelines for more info:  portion of the purchase towards equipment must be included in the buyers DTI calculation.  Real or Personal Property: Renewable system is typically considered personal property.  All tax credits as well as maintenance responsibilities, etc. belong to the third-party owner. Terms: The customer agrees to purchase all energy produced by the system.  At the end of the PPA contract term (usually between 10-25 years), property owners can extend the contract and even buy the solar energy system from the developer based on terms in the contract.Additional info on SEIA.org.
    PowerPurchaseAgreement,

    /// "[Private](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244390)": Financing is provided by a private party.
    Private,

    /// "[Property-Assessed Clean Energy](https://ddwiki.reso.org/display/DDW17/Property-Assessed+Clean+Energy)": Definition: Property-assessed clean energy (PACE) is a financing tool for property owners to fund energy or water efficiency or renewable energy installations. Structure: PACE is a secured loan that attaches to the property as a voluntary assessment on the property taxes.  To be eligible for a PACE loan, the building must be located in a local jurisdiction where the City or County has passed a resolution to participate in a PACE program. PACE financing is often a public-private partnership between a private finance company and a public agency.Transfer? The loan may be transferred to the new owner upon sale of the property with the approval of the system owner. Real or Personal Property? If seller owns and not a third-party, then renewable system is typically considered real property and tax credits and maintenance requirements, etc. belong to the property owner.  Terms:  Loan terms can vary between 5 and 30 years. Some programs also allow PACE to finance solar leases and power purchase agreements (PPAs). Due to the complexities of PACE financing, NAR and states like California have provided statements which are worth further consideration. NAR -  http://www.realtor.org/articles/administration-issues-pace-guidance; CAR - http://www.car.org/newsstand/newsreleases/2015releases/fhapacelien
    PropertyAssessedCleanEnergy,

    /// "[Trust Deed](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244392)": Financing where title of the property is placed with a trustee who secures payment of the loan for a beneficiary.
    TrustDeed,

    /// "[USDA](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244393)": A loan from an approved provider that follows the guidelines of, and is insured by, the US Department of Agriculture.
    USDA,

    /// "[VA](https://ddwiki.reso.org/pages/viewpage.action?pageId=29244394)": A loan from an approved provider that follows the guidelines of, and is insured by, the US Department of Veteran's Affairs.
    VA,

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

impl crate::ResoEnumeration for CurrentFinancing {
    fn from_str(s: &str) -> CurrentFinancing {
        match s {
            "Assumable" => CurrentFinancing::Assumable,

            "Contract" => CurrentFinancing::Contract,

            "Conventional" => CurrentFinancing::Conventional,

            "FHA" => CurrentFinancing::FHA,

            "FHA 203(b)" => CurrentFinancing::FHA203b,

            "FHA 203(k)" => CurrentFinancing::FHA203k,

            "Leased Renewables" => CurrentFinancing::LeasedRenewables,

            "None" => CurrentFinancing::None,

            "Other" => CurrentFinancing::Other,

            "Power Purchase Agreement" => CurrentFinancing::PowerPurchaseAgreement,

            "Private" => CurrentFinancing::Private,

            "Property-Assessed Clean Energy" => CurrentFinancing::PropertyAssessedCleanEnergy,

            "Trust Deed" => CurrentFinancing::TrustDeed,

            "USDA" => CurrentFinancing::USDA,

            "VA" => CurrentFinancing::VA,

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

    fn from_string(s: String) -> CurrentFinancing {
        match s.as_ref() {
            "Assumable" => CurrentFinancing::Assumable,

            "Contract" => CurrentFinancing::Contract,

            "Conventional" => CurrentFinancing::Conventional,

            "FHA" => CurrentFinancing::FHA,

            "FHA 203(b)" => CurrentFinancing::FHA203b,

            "FHA 203(k)" => CurrentFinancing::FHA203k,

            "Leased Renewables" => CurrentFinancing::LeasedRenewables,

            "None" => CurrentFinancing::None,

            "Other" => CurrentFinancing::Other,

            "Power Purchase Agreement" => CurrentFinancing::PowerPurchaseAgreement,

            "Private" => CurrentFinancing::Private,

            "Property-Assessed Clean Energy" => CurrentFinancing::PropertyAssessedCleanEnergy,

            "Trust Deed" => CurrentFinancing::TrustDeed,

            "USDA" => CurrentFinancing::USDA,

            "VA" => CurrentFinancing::VA,

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

    fn to_str(&self) -> &str {
        match self {
            CurrentFinancing::Assumable => "Assumable",

            CurrentFinancing::Contract => "Contract",

            CurrentFinancing::Conventional => "Conventional",

            CurrentFinancing::FHA => "FHA",

            CurrentFinancing::FHA203b => "FHA 203(b)",

            CurrentFinancing::FHA203k => "FHA 203(k)",

            CurrentFinancing::LeasedRenewables => "Leased Renewables",

            CurrentFinancing::None => "None",

            CurrentFinancing::Other => "Other",

            CurrentFinancing::PowerPurchaseAgreement => "Power Purchase Agreement",

            CurrentFinancing::Private => "Private",

            CurrentFinancing::PropertyAssessedCleanEnergy => "Property-Assessed Clean Energy",

            CurrentFinancing::TrustDeed => "Trust Deed",

            CurrentFinancing::USDA => "USDA",

            CurrentFinancing::VA => "VA",

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

    fn into_string(self) -> String {
        match self {
            CurrentFinancing::Assumable => "Assumable".into(),

            CurrentFinancing::Contract => "Contract".into(),

            CurrentFinancing::Conventional => "Conventional".into(),

            CurrentFinancing::FHA => "FHA".into(),

            CurrentFinancing::FHA203b => "FHA 203(b)".into(),

            CurrentFinancing::FHA203k => "FHA 203(k)".into(),

            CurrentFinancing::LeasedRenewables => "Leased Renewables".into(),

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

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

            CurrentFinancing::PowerPurchaseAgreement => "Power Purchase Agreement".into(),

            CurrentFinancing::Private => "Private".into(),

            CurrentFinancing::PropertyAssessedCleanEnergy => {
                "Property-Assessed Clean Energy".into()
            }

            CurrentFinancing::TrustDeed => "Trust Deed".into(),

            CurrentFinancing::USDA => "USDA".into(),

            CurrentFinancing::VA => "VA".into(),

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

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

impl From<String> for CurrentFinancing {
    fn from(s: String) -> CurrentFinancing {
        match s.as_ref() {
            "Assumable" => CurrentFinancing::Assumable,

            "Contract" => CurrentFinancing::Contract,

            "Conventional" => CurrentFinancing::Conventional,

            "FHA" => CurrentFinancing::FHA,

            "FHA 203(b)" => CurrentFinancing::FHA203b,

            "FHA 203(k)" => CurrentFinancing::FHA203k,

            "Leased Renewables" => CurrentFinancing::LeasedRenewables,

            "None" => CurrentFinancing::None,

            "Other" => CurrentFinancing::Other,

            "Power Purchase Agreement" => CurrentFinancing::PowerPurchaseAgreement,

            "Private" => CurrentFinancing::Private,

            "Property-Assessed Clean Energy" => CurrentFinancing::PropertyAssessedCleanEnergy,

            "Trust Deed" => CurrentFinancing::TrustDeed,

            "USDA" => CurrentFinancing::USDA,

            "VA" => CurrentFinancing::VA,

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

impl From<&str> for CurrentFinancing {
    fn from(s: &str) -> CurrentFinancing {
        match s {
            "Assumable" => CurrentFinancing::Assumable,

            "Contract" => CurrentFinancing::Contract,

            "Conventional" => CurrentFinancing::Conventional,

            "FHA" => CurrentFinancing::FHA,

            "FHA 203(b)" => CurrentFinancing::FHA203b,

            "FHA 203(k)" => CurrentFinancing::FHA203k,

            "Leased Renewables" => CurrentFinancing::LeasedRenewables,

            "None" => CurrentFinancing::None,

            "Other" => CurrentFinancing::Other,

            "Power Purchase Agreement" => CurrentFinancing::PowerPurchaseAgreement,

            "Private" => CurrentFinancing::Private,

            "Property-Assessed Clean Energy" => CurrentFinancing::PropertyAssessedCleanEnergy,

            "Trust Deed" => CurrentFinancing::TrustDeed,

            "USDA" => CurrentFinancing::USDA,

            "VA" => CurrentFinancing::VA,

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

impl<'a> From<&'a CurrentFinancing> for &'a str {
    fn from(s: &'a CurrentFinancing) -> &'a str {
        match s {
            CurrentFinancing::Assumable => "Assumable",

            CurrentFinancing::Contract => "Contract",

            CurrentFinancing::Conventional => "Conventional",

            CurrentFinancing::FHA => "FHA",

            CurrentFinancing::FHA203b => "FHA 203(b)",

            CurrentFinancing::FHA203k => "FHA 203(k)",

            CurrentFinancing::LeasedRenewables => "Leased Renewables",

            CurrentFinancing::None => "None",

            CurrentFinancing::Other => "Other",

            CurrentFinancing::PowerPurchaseAgreement => "Power Purchase Agreement",

            CurrentFinancing::Private => "Private",

            CurrentFinancing::PropertyAssessedCleanEnergy => "Property-Assessed Clean Energy",

            CurrentFinancing::TrustDeed => "Trust Deed",

            CurrentFinancing::USDA => "USDA",

            CurrentFinancing::VA => "VA",

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

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