UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

66 lines (65 loc) 2.37 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 { SoSMlsListingEntityDataContactFromJSON, SoSMlsListingEntityDataContactToJSON, } from './SoSMlsListingEntityDataContact'; /** * Check if a given object implements the SoSMlsListingEntityDataAgent interface. */ export function instanceOfSoSMlsListingEntityDataAgent(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('contact' in value) || value['contact'] === undefined) return false; if (!('lastName' in value) || value['lastName'] === undefined) return false; if (!('firstName' in value) || value['firstName'] === undefined) return false; if (!('officeMlsId' in value) || value['officeMlsId'] === undefined) return false; return true; } export function SoSMlsListingEntityDataAgentFromJSON(json) { return SoSMlsListingEntityDataAgentFromJSONTyped(json, false); } export function SoSMlsListingEntityDataAgentFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'id': json['id'], 'address': json['address'] == null ? undefined : json['address'], 'contact': SoSMlsListingEntityDataContactFromJSON(json['contact']), 'lastName': json['lastName'], 'modified': json['modified'] == null ? undefined : json['modified'], 'firstName': json['firstName'], 'officeMlsId': json['officeMlsId'], }; } export function SoSMlsListingEntityDataAgentToJSON(json) { return SoSMlsListingEntityDataAgentToJSONTyped(json, false); } export function SoSMlsListingEntityDataAgentToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'id': value['id'], 'address': value['address'], 'contact': SoSMlsListingEntityDataContactToJSON(value['contact']), 'lastName': value['lastName'], 'modified': value['modified'], 'firstName': value['firstName'], 'officeMlsId': value['officeMlsId'], }; }