@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
168 lines (167 loc) • 7.51 kB
JavaScript
/* 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.
*/
import { SoSMlsListingEntityDataParkingFromJSON, SoSMlsListingEntityDataParkingToJSON, } from './SoSMlsListingEntityDataParking';
/**
* Check if a given object implements the SoSMlsListingEntityDataProperty interface.
*/
export function instanceOfSoSMlsListingEntityDataProperty(value) {
if (!('roof' in value) || value['roof'] === undefined)
return false;
if (!('type' in value) || value['type'] === undefined)
return false;
if (!('acres' in value) || value['acres'] === undefined)
return false;
if (!('style' in value) || value['style'] === undefined)
return false;
if (!('cooling' in value) || value['cooling'] === undefined)
return false;
if (!('heating' in value) || value['heating'] === undefined)
return false;
if (!('lotSize' in value) || value['lotSize'] === undefined)
return false;
if (!('parking' in value) || value['parking'] === undefined)
return false;
if (!('stories' in value) || value['stories'] === undefined)
return false;
if (!('subType' in value) || value['subType'] === undefined)
return false;
if (!('bedrooms' in value) || value['bedrooms'] === undefined)
return false;
if (!('flooring' in value) || value['flooring'] === undefined)
return false;
if (!('bathsFull' in value) || value['bathsFull'] === undefined)
return false;
if (!('bathsHalf' in value) || value['bathsHalf'] === undefined)
return false;
if (!('yearBuilt' in value) || value['yearBuilt'] === undefined)
return false;
if (!('fireplaces' in value) || value['fireplaces'] === undefined)
return false;
if (!('lotSizeArea' in value) || value['lotSizeArea'] === undefined)
return false;
if (!('subTypeText' in value) || value['subTypeText'] === undefined)
return false;
if (!('subdivision' in value) || value['subdivision'] === undefined)
return false;
if (!('construction' in value) || value['construction'] === undefined)
return false;
if (!('occupantType' in value) || value['occupantType'] === undefined)
return false;
if (!('interiorFeatures' in value) || value['interiorFeatures'] === undefined)
return false;
if (!('lotSizeAreaUnits' in value) || value['lotSizeAreaUnits'] === undefined)
return false;
return true;
}
export function SoSMlsListingEntityDataPropertyFromJSON(json) {
return SoSMlsListingEntityDataPropertyFromJSONTyped(json, false);
}
export function SoSMlsListingEntityDataPropertyFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'area': json['area'] == null ? undefined : json['area'],
'pool': json['pool'] == null ? undefined : json['pool'],
'roof': json['roof'],
'type': json['type'],
'view': json['view'] == null ? undefined : json['view'],
'acres': json['acres'],
'style': json['style'],
'water': json['water'] == null ? undefined : json['water'],
'cooling': json['cooling'],
'heating': json['heating'],
'lotSize': json['lotSize'],
'parking': SoSMlsListingEntityDataParkingFromJSON(json['parking']),
'stories': json['stories'],
'subType': json['subType'],
'bedrooms': json['bedrooms'],
'flooring': json['flooring'],
'bathrooms': json['bathrooms'] == null ? undefined : json['bathrooms'],
'bathsFull': json['bathsFull'],
'bathsHalf': json['bathsHalf'],
'ownerName': json['ownerName'] == null ? undefined : json['ownerName'],
'yearBuilt': json['yearBuilt'],
'areaSource': json['areaSource'] == null ? undefined : json['areaSource'],
'fireplaces': json['fireplaces'],
'foundation': json['foundation'] == null ? undefined : json['foundation'],
'lotSizeArea': json['lotSizeArea'],
'subTypeText': json['subTypeText'],
'subdivision': json['subdivision'],
'construction': json['construction'],
'garageSpaces': json['garageSpaces'] == null ? undefined : json['garageSpaces'],
'occupantName': json['occupantName'] == null ? undefined : json['occupantName'],
'occupantType': json['occupantType'],
'accessibility': json['accessibility'] == null ? undefined : json['accessibility'],
'lotDescription': json['lotDescription'] == null ? undefined : json['lotDescription'],
'additionalRooms': json['additionalRooms'] == null ? undefined : json['additionalRooms'],
'laundryFeatures': json['laundryFeatures'] == null ? undefined : json['laundryFeatures'],
'exteriorFeatures': json['exteriorFeatures'] == null ? undefined : json['exteriorFeatures'],
'interiorFeatures': json['interiorFeatures'],
'lotSizeAreaUnits': json['lotSizeAreaUnits'],
'bathsThreeQuarter': json['bathsThreeQuarter'] == null ? undefined : json['bathsThreeQuarter'],
'maintenanceExpense': json['maintenanceExpense'] == null ? undefined : json['maintenanceExpense'],
};
}
export function SoSMlsListingEntityDataPropertyToJSON(json) {
return SoSMlsListingEntityDataPropertyToJSONTyped(json, false);
}
export function SoSMlsListingEntityDataPropertyToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'area': value['area'],
'pool': value['pool'],
'roof': value['roof'],
'type': value['type'],
'view': value['view'],
'acres': value['acres'],
'style': value['style'],
'water': value['water'],
'cooling': value['cooling'],
'heating': value['heating'],
'lotSize': value['lotSize'],
'parking': SoSMlsListingEntityDataParkingToJSON(value['parking']),
'stories': value['stories'],
'subType': value['subType'],
'bedrooms': value['bedrooms'],
'flooring': value['flooring'],
'bathrooms': value['bathrooms'],
'bathsFull': value['bathsFull'],
'bathsHalf': value['bathsHalf'],
'ownerName': value['ownerName'],
'yearBuilt': value['yearBuilt'],
'areaSource': value['areaSource'],
'fireplaces': value['fireplaces'],
'foundation': value['foundation'],
'lotSizeArea': value['lotSizeArea'],
'subTypeText': value['subTypeText'],
'subdivision': value['subdivision'],
'construction': value['construction'],
'garageSpaces': value['garageSpaces'],
'occupantName': value['occupantName'],
'occupantType': value['occupantType'],
'accessibility': value['accessibility'],
'lotDescription': value['lotDescription'],
'additionalRooms': value['additionalRooms'],
'laundryFeatures': value['laundryFeatures'],
'exteriorFeatures': value['exteriorFeatures'],
'interiorFeatures': value['interiorFeatures'],
'lotSizeAreaUnits': value['lotSizeAreaUnits'],
'bathsThreeQuarter': value['bathsThreeQuarter'],
'maintenanceExpense': value['maintenanceExpense'],
};
}