@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
51 lines (50 loc) • 1.72 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.
*/
/**
* Check if a given object implements the SoSMlsListingEntityDataSchool interface.
*/
export function instanceOfSoSMlsListingEntityDataSchool(value) {
if (!('district' in value) || value['district'] === undefined)
return false;
return true;
}
export function SoSMlsListingEntityDataSchoolFromJSON(json) {
return SoSMlsListingEntityDataSchoolFromJSONTyped(json, false);
}
export function SoSMlsListingEntityDataSchoolFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'district': json['district'],
'highSchool': json['highSchool'] == null ? undefined : json['highSchool'],
'middleSchool': json['middleSchool'] == null ? undefined : json['middleSchool'],
'elementarySchool': json['elementarySchool'] == null ? undefined : json['elementarySchool'],
};
}
export function SoSMlsListingEntityDataSchoolToJSON(json) {
return SoSMlsListingEntityDataSchoolToJSONTyped(json, false);
}
export function SoSMlsListingEntityDataSchoolToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'district': value['district'],
'highSchool': value['highSchool'],
'middleSchool': value['middleSchool'],
'elementarySchool': value['elementarySchool'],
};
}