UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

55 lines (54 loc) 1.73 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 SoSRelSourcePropertyEntityBase interface. */ export function instanceOfSoSRelSourcePropertyEntityBase(value) { if (!('pid' in value) || value['pid'] === undefined) return false; if (!('sourceId' in value) || value['sourceId'] === undefined) return false; if (!('price' in value) || value['price'] === undefined) return false; return true; } export function SoSRelSourcePropertyEntityBaseFromJSON(json) { return SoSRelSourcePropertyEntityBaseFromJSONTyped(json, false); } export function SoSRelSourcePropertyEntityBaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'pid': json['pid'], 'sourceId': json['sourceId'], 'price': json['price'], 'mlsListingId': json['mlsListingId'] == null ? undefined : json['mlsListingId'], }; } export function SoSRelSourcePropertyEntityBaseToJSON(json) { return SoSRelSourcePropertyEntityBaseToJSONTyped(json, false); } export function SoSRelSourcePropertyEntityBaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'pid': value['pid'], 'sourceId': value['sourceId'], 'price': value['price'], 'mlsListingId': value['mlsListingId'], }; }