UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

59 lines (58 loc) 2.46 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 { SoSPropertyEntityGeocodingDataBoundsFromJSON, SoSPropertyEntityGeocodingDataBoundsToJSON, } from './SoSPropertyEntityGeocodingDataBounds'; import { SoSPropertyEntityGeocodingDataLocationFromJSON, SoSPropertyEntityGeocodingDataLocationToJSON, } from './SoSPropertyEntityGeocodingDataLocation'; /** * Check if a given object implements the SoSPropertyEntityGeocodingDataGeometry interface. */ export function instanceOfSoSPropertyEntityGeocodingDataGeometry(value) { if (!('bounds' in value) || value['bounds'] === undefined) return false; if (!('location' in value) || value['location'] === undefined) return false; if (!('viewport' in value) || value['viewport'] === undefined) return false; if (!('location_type' in value) || value['location_type'] === undefined) return false; return true; } export function SoSPropertyEntityGeocodingDataGeometryFromJSON(json) { return SoSPropertyEntityGeocodingDataGeometryFromJSONTyped(json, false); } export function SoSPropertyEntityGeocodingDataGeometryFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'bounds': SoSPropertyEntityGeocodingDataBoundsFromJSON(json['bounds']), 'location': SoSPropertyEntityGeocodingDataLocationFromJSON(json['location']), 'viewport': SoSPropertyEntityGeocodingDataBoundsFromJSON(json['viewport']), 'location_type': json['location_type'], }; } export function SoSPropertyEntityGeocodingDataGeometryToJSON(json) { return SoSPropertyEntityGeocodingDataGeometryToJSONTyped(json, false); } export function SoSPropertyEntityGeocodingDataGeometryToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'bounds': SoSPropertyEntityGeocodingDataBoundsToJSON(value['bounds']), 'location': SoSPropertyEntityGeocodingDataLocationToJSON(value['location']), 'viewport': SoSPropertyEntityGeocodingDataBoundsToJSON(value['viewport']), 'location_type': value['location_type'], }; }