UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

99 lines (98 loc) 5.26 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 { SoSMlsListingEntityTypeFromJSON, SoSMlsListingEntityTypeToJSON, } from './SoSMlsListingEntityType'; import { SoSMlsListingEntityDataFromJSON, SoSMlsListingEntityDataToJSON, } from './SoSMlsListingEntityData'; /** * Check if a given object implements the SoSMlsListingEntityBase interface. */ export function instanceOfSoSMlsListingEntityBase(value) { if (!('lid' in value) || value['lid'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('data' in value) || value['data'] === undefined) return false; return true; } export function SoSMlsListingEntityBaseFromJSON(json) { return SoSMlsListingEntityBaseFromJSONTyped(json, false); } export function SoSMlsListingEntityBaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'lid': json['lid'], 'type': SoSMlsListingEntityTypeFromJSON(json['type']), 'createdAt': json['createdAt'], 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'], 'data': SoSMlsListingEntityDataFromJSON(json['data']), 'propertyId': json['propertyId'] == null ? undefined : json['propertyId'], 'simplyretsListPrice': json['simplyretsListPrice'] == null ? undefined : json['simplyretsListPrice'], 'simplyretsOriginalListPrice': json['simplyretsOriginalListPrice'] == null ? undefined : json['simplyretsOriginalListPrice'], 'simplyretsYearBuilt': json['simplyretsYearBuilt'] == null ? undefined : json['simplyretsYearBuilt'], 'simplyretsBedrooms': json['simplyretsBedrooms'] == null ? undefined : json['simplyretsBedrooms'], 'simplyretsBathrooms': json['simplyretsBathrooms'] == null ? undefined : json['simplyretsBathrooms'], 'simplyretsType': json['simplyretsType'] == null ? undefined : json['simplyretsType'], 'simplyretsSubType': json['simplyretsSubType'] == null ? undefined : json['simplyretsSubType'], 'simplyretsSubTypeText': json['simplyretsSubTypeText'] == null ? undefined : json['simplyretsSubTypeText'], 'simplyretsAddress': json['simplyretsAddress'] == null ? undefined : json['simplyretsAddress'], 'propertySourcePrice': json['propertySourcePrice'] == null ? undefined : json['propertySourcePrice'], 'deltaPrice': json['deltaPrice'] == null ? undefined : json['deltaPrice'], 'deltaPricePercentage': json['deltaPricePercentage'] == null ? undefined : json['deltaPricePercentage'], 'simplyretsState': json['simplyretsState'] == null ? undefined : json['simplyretsState'], 'simplyretsStatus': json['simplyretsStatus'] == null ? undefined : json['simplyretsStatus'], 'propertyStatus': json['propertyStatus'] == null ? undefined : json['propertyStatus'], 'processedAt': json['processedAt'] == null ? undefined : json['processedAt'], 'propertyCapRate': json['propertyCapRate'] == null ? undefined : json['propertyCapRate'], 'isBlacklisted': json['isBlacklisted'] == null ? undefined : json['isBlacklisted'], }; } export function SoSMlsListingEntityBaseToJSON(json) { return SoSMlsListingEntityBaseToJSONTyped(json, false); } export function SoSMlsListingEntityBaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'lid': value['lid'], 'type': SoSMlsListingEntityTypeToJSON(value['type']), 'createdAt': value['createdAt'], 'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'], 'data': SoSMlsListingEntityDataToJSON(value['data']), 'propertyId': value['propertyId'], 'simplyretsListPrice': value['simplyretsListPrice'], 'simplyretsOriginalListPrice': value['simplyretsOriginalListPrice'], 'simplyretsYearBuilt': value['simplyretsYearBuilt'], 'simplyretsBedrooms': value['simplyretsBedrooms'], 'simplyretsBathrooms': value['simplyretsBathrooms'], 'simplyretsType': value['simplyretsType'], 'simplyretsSubType': value['simplyretsSubType'], 'simplyretsSubTypeText': value['simplyretsSubTypeText'], 'simplyretsAddress': value['simplyretsAddress'], 'propertySourcePrice': value['propertySourcePrice'], 'deltaPrice': value['deltaPrice'], 'deltaPricePercentage': value['deltaPricePercentage'], 'simplyretsState': value['simplyretsState'], 'simplyretsStatus': value['simplyretsStatus'], 'propertyStatus': value['propertyStatus'], 'processedAt': value['processedAt'] == null ? value['processedAt'] : value['processedAt'], 'propertyCapRate': value['propertyCapRate'], 'isBlacklisted': value['isBlacklisted'], }; }