UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

81 lines (80 loc) 3.41 kB
/* tslint:disable */ /* eslint-disable */ /** * API v4 * Swagger documentation for API v4 * * The version of the OpenAPI document: 4.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Check if a given object implements the SoSPropertyEntityUnderwritingModelsCalculated interface. */ export function instanceOfSoSPropertyEntityUnderwritingModelsCalculated(value) { if (!('cap_rate' in value) || value['cap_rate'] === undefined) return false; if (!('max_price_cap_rate' in value) || value['max_price_cap_rate'] === undefined) return false; if (!('max_price_cap_rate_tries' in value) || value['max_price_cap_rate_tries'] === undefined) return false; if (!('arv_uplift' in value) || value['arv_uplift'] === undefined) return false; if (!('max_price_arv_uplift' in value) || value['max_price_arv_uplift'] === undefined) return false; if (!('max_price_arv_uplift_tries' in value) || value['max_price_arv_uplift_tries'] === undefined) return false; if (!('noi_monthly' in value) || value['noi_monthly'] === undefined) return false; if (!('pm_fees_monthly' in value) || value['pm_fees_monthly'] === undefined) return false; if (!('am_fees_monthly' in value) || value['am_fees_monthly'] === undefined) return false; if (!('vacancy_monthly' in value) || value['vacancy_monthly'] === undefined) return false; return true; } export function SoSPropertyEntityUnderwritingModelsCalculatedFromJSON(json) { return SoSPropertyEntityUnderwritingModelsCalculatedFromJSONTyped(json, false); } export function SoSPropertyEntityUnderwritingModelsCalculatedFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'cap_rate': json['cap_rate'], 'max_price_cap_rate': json['max_price_cap_rate'], 'max_price_cap_rate_tries': json['max_price_cap_rate_tries'], 'arv_uplift': json['arv_uplift'], 'max_price_arv_uplift': json['max_price_arv_uplift'], 'max_price_arv_uplift_tries': json['max_price_arv_uplift_tries'], 'noi_monthly': json['noi_monthly'], 'pm_fees_monthly': json['pm_fees_monthly'], 'am_fees_monthly': json['am_fees_monthly'], 'vacancy_monthly': json['vacancy_monthly'], }; } export function SoSPropertyEntityUnderwritingModelsCalculatedToJSON(json) { return SoSPropertyEntityUnderwritingModelsCalculatedToJSONTyped(json, false); } export function SoSPropertyEntityUnderwritingModelsCalculatedToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'cap_rate': value['cap_rate'], 'max_price_cap_rate': value['max_price_cap_rate'], 'max_price_cap_rate_tries': value['max_price_cap_rate_tries'], 'arv_uplift': value['arv_uplift'], 'max_price_arv_uplift': value['max_price_arv_uplift'], 'max_price_arv_uplift_tries': value['max_price_arv_uplift_tries'], 'noi_monthly': value['noi_monthly'], 'pm_fees_monthly': value['pm_fees_monthly'], 'am_fees_monthly': value['am_fees_monthly'], 'vacancy_monthly': value['vacancy_monthly'], }; }