@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
53 lines (52 loc) • 1.88 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 { SoSZipcodeEntityCenterFromJSON, SoSZipcodeEntityCenterToJSON, } from './SoSZipcodeEntityCenter';
import { SoSZipcodeEntityAreaFromJSON, SoSZipcodeEntityAreaToJSON, } from './SoSZipcodeEntityArea';
/**
* Check if a given object implements the SoSZipcodeEntityBase interface.
*/
export function instanceOfSoSZipcodeEntityBase(value) {
if (!('zipcode' in value) || value['zipcode'] === undefined)
return false;
return true;
}
export function SoSZipcodeEntityBaseFromJSON(json) {
return SoSZipcodeEntityBaseFromJSONTyped(json, false);
}
export function SoSZipcodeEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'zipcode': json['zipcode'],
'area': json['area'] == null ? undefined : SoSZipcodeEntityAreaFromJSON(json['area']),
'blacklisted': json['blacklisted'] == null ? undefined : json['blacklisted'],
'center': json['center'] == null ? undefined : SoSZipcodeEntityCenterFromJSON(json['center']),
};
}
export function SoSZipcodeEntityBaseToJSON(json) {
return SoSZipcodeEntityBaseToJSONTyped(json, false);
}
export function SoSZipcodeEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'zipcode': value['zipcode'],
'area': SoSZipcodeEntityAreaToJSON(value['area']),
'blacklisted': value['blacklisted'],
'center': SoSZipcodeEntityCenterToJSON(value['center']),
};
}