@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
66 lines (65 loc) • 2.56 kB
JavaScript
/* 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 { SoSPropertyEntityAttomAllEventDetailDataGeoIdV4FromJSON, SoSPropertyEntityAttomAllEventDetailDataGeoIdV4ToJSON, } from './SoSPropertyEntityAttomAllEventDetailDataGeoIdV4';
/**
* Check if a given object implements the SoSPropertyEntityAttomAllEventDetailDataLocation interface.
*/
export function instanceOfSoSPropertyEntityAttomAllEventDetailDataLocation(value) {
if (!('geoid' in value) || value['geoid'] === undefined)
return false;
if (!('geoIdV4' in value) || value['geoIdV4'] === undefined)
return false;
if (!('accuracy' in value) || value['accuracy'] === undefined)
return false;
if (!('distance' in value) || value['distance'] === undefined)
return false;
if (!('latitude' in value) || value['latitude'] === undefined)
return false;
if (!('longitude' in value) || value['longitude'] === undefined)
return false;
return true;
}
export function SoSPropertyEntityAttomAllEventDetailDataLocationFromJSON(json) {
return SoSPropertyEntityAttomAllEventDetailDataLocationFromJSONTyped(json, false);
}
export function SoSPropertyEntityAttomAllEventDetailDataLocationFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'geoid': json['geoid'],
'geoIdV4': SoSPropertyEntityAttomAllEventDetailDataGeoIdV4FromJSON(json['geoIdV4']),
'accuracy': json['accuracy'],
'distance': json['distance'],
'latitude': json['latitude'],
'longitude': json['longitude'],
};
}
export function SoSPropertyEntityAttomAllEventDetailDataLocationToJSON(json) {
return SoSPropertyEntityAttomAllEventDetailDataLocationToJSONTyped(json, false);
}
export function SoSPropertyEntityAttomAllEventDetailDataLocationToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'geoid': value['geoid'],
'geoIdV4': SoSPropertyEntityAttomAllEventDetailDataGeoIdV4ToJSON(value['geoIdV4']),
'accuracy': value['accuracy'],
'distance': value['distance'],
'latitude': value['latitude'],
'longitude': value['longitude'],
};
}