UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

158 lines (157 loc) 8.21 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. */ import { SoSMlsListingEntityDataPropertyFromJSON, SoSMlsListingEntityDataPropertyToJSON, } from './SoSMlsListingEntityDataProperty'; import { SoSMlsListingEntityDataGeoFromJSON, SoSMlsListingEntityDataGeoToJSON, } from './SoSMlsListingEntityDataGeo'; import { SoSMlsListingEntityDataAgentFromJSON, SoSMlsListingEntityDataAgentToJSON, } from './SoSMlsListingEntityDataAgent'; import { SoSMlsListingEntityDataAssociationFromJSON, SoSMlsListingEntityDataAssociationToJSON, } from './SoSMlsListingEntityDataAssociation'; import { SoSMlsListingEntityDataTaxFromJSON, SoSMlsListingEntityDataTaxToJSON, } from './SoSMlsListingEntityDataTax'; import { SoSMlsListingEntityDataOfficeFromJSON, SoSMlsListingEntityDataOfficeToJSON, } from './SoSMlsListingEntityDataOffice'; import { SoSMlsListingEntityDataAddressFromJSON, SoSMlsListingEntityDataAddressToJSON, } from './SoSMlsListingEntityDataAddress'; import { SoSMlsListingEntityDataSchoolFromJSON, SoSMlsListingEntityDataSchoolToJSON, } from './SoSMlsListingEntityDataSchool'; import { SoSMlsListingEntityDataMlsFromJSON, SoSMlsListingEntityDataMlsToJSON, } from './SoSMlsListingEntityDataMls'; /** * Check if a given object implements the SoSMlsListingEntityData interface. */ export function instanceOfSoSMlsListingEntityData(value) { if (!('geo' in value) || value['geo'] === undefined) return false; if (!('mls' in value) || value['mls'] === undefined) return false; if (!('tax' in value) || value['tax'] === undefined) return false; if (!('agent' in value) || value['agent'] === undefined) return false; if (!('mlsId' in value) || value['mlsId'] === undefined) return false; if (!('office' in value) || value['office'] === undefined) return false; if (!('photos' in value) || value['photos'] === undefined) return false; if (!('school' in value) || value['school'] === undefined) return false; if (!('address' in value) || value['address'] === undefined) return false; if (!('remarks' in value) || value['remarks'] === undefined) return false; if (!('modified' in value) || value['modified'] === undefined) return false; if (!('property' in value) || value['property'] === undefined) return false; if (!('listPrice' in value) || value['listPrice'] === undefined) return false; if (!('listingId' in value) || value['listingId'] === undefined) return false; if (!('disclaimer' in value) || value['disclaimer'] === undefined) return false; if (!('association' in value) || value['association'] === undefined) return false; if (!('originalListPrice' in value) || value['originalListPrice'] === undefined) return false; if (!('showingContactName' in value) || value['showingContactName'] === undefined) return false; if (!('showingContactPhone' in value) || value['showingContactPhone'] === undefined) return false; if (!('internetAddressDisplay' in value) || value['internetAddressDisplay'] === undefined) return false; if (!('internetEntireListingDisplay' in value) || value['internetEntireListingDisplay'] === undefined) return false; return true; } export function SoSMlsListingEntityDataFromJSON(json) { return SoSMlsListingEntityDataFromJSONTyped(json, false); } export function SoSMlsListingEntityDataFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'geo': SoSMlsListingEntityDataGeoFromJSON(json['geo']), 'mls': SoSMlsListingEntityDataMlsFromJSON(json['mls']), 'tax': SoSMlsListingEntityDataTaxFromJSON(json['tax']), 'agent': SoSMlsListingEntityDataAgentFromJSON(json['agent']), 'mlsId': json['mlsId'], 'sales': json['sales'] == null ? undefined : json['sales'], 'terms': json['terms'] == null ? undefined : json['terms'], 'office': SoSMlsListingEntityDataOfficeFromJSON(json['office']), 'photos': json['photos'], 'school': SoSMlsListingEntityDataSchoolFromJSON(json['school']), 'address': SoSMlsListingEntityDataAddressFromJSON(json['address']), 'coAgent': json['coAgent'] == null ? undefined : json['coAgent'], 'remarks': json['remarks'], 'listDate': json['listDate'] == null ? undefined : json['listDate'], 'modified': json['modified'], 'property': SoSMlsListingEntityDataPropertyFromJSON(json['property']), 'agreement': json['agreement'] == null ? undefined : json['agreement'], 'leaseTerm': json['leaseTerm'] == null ? undefined : json['leaseTerm'], 'leaseType': json['leaseType'] == null ? undefined : json['leaseType'], 'listPrice': json['listPrice'], 'listingId': json['listingId'], 'ownership': json['ownership'] == null ? undefined : json['ownership'], 'disclaimer': json['disclaimer'], 'association': SoSMlsListingEntityDataAssociationFromJSON(json['association']), 'privateRemarks': json['privateRemarks'] == null ? undefined : json['privateRemarks'], 'virtualTourUrl': json['virtualTourUrl'] == null ? undefined : json['virtualTourUrl'], 'originalListPrice': json['originalListPrice'], 'showingContactName': json['showingContactName'], 'showingContactPhone': json['showingContactPhone'], 'showingInstructions': json['showingInstructions'] == null ? undefined : json['showingInstructions'], 'internetAddressDisplay': json['internetAddressDisplay'], 'specialListingConditions': json['specialListingConditions'] == null ? undefined : json['specialListingConditions'], 'internetEntireListingDisplay': json['internetEntireListingDisplay'], }; } export function SoSMlsListingEntityDataToJSON(json) { return SoSMlsListingEntityDataToJSONTyped(json, false); } export function SoSMlsListingEntityDataToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'geo': SoSMlsListingEntityDataGeoToJSON(value['geo']), 'mls': SoSMlsListingEntityDataMlsToJSON(value['mls']), 'tax': SoSMlsListingEntityDataTaxToJSON(value['tax']), 'agent': SoSMlsListingEntityDataAgentToJSON(value['agent']), 'mlsId': value['mlsId'], 'sales': value['sales'], 'terms': value['terms'], 'office': SoSMlsListingEntityDataOfficeToJSON(value['office']), 'photos': value['photos'], 'school': SoSMlsListingEntityDataSchoolToJSON(value['school']), 'address': SoSMlsListingEntityDataAddressToJSON(value['address']), 'coAgent': value['coAgent'], 'remarks': value['remarks'], 'listDate': value['listDate'], 'modified': value['modified'], 'property': SoSMlsListingEntityDataPropertyToJSON(value['property']), 'agreement': value['agreement'], 'leaseTerm': value['leaseTerm'], 'leaseType': value['leaseType'], 'listPrice': value['listPrice'], 'listingId': value['listingId'], 'ownership': value['ownership'], 'disclaimer': value['disclaimer'], 'association': SoSMlsListingEntityDataAssociationToJSON(value['association']), 'privateRemarks': value['privateRemarks'], 'virtualTourUrl': value['virtualTourUrl'], 'originalListPrice': value['originalListPrice'], 'showingContactName': value['showingContactName'], 'showingContactPhone': value['showingContactPhone'], 'showingInstructions': value['showingInstructions'], 'internetAddressDisplay': value['internetAddressDisplay'], 'specialListingConditions': value['specialListingConditions'], 'internetEntireListingDisplay': value['internetEntireListingDisplay'], }; }