@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
81 lines (80 loc) • 2.9 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 SoSPropertyEntityAttomAllEventDetailDataAddress interface.
*/
export function instanceOfSoSPropertyEntityAttomAllEventDetailDataAddress(value) {
if (!('line1' in value) || value['line1'] === undefined)
return false;
if (!('line2' in value) || value['line2'] === undefined)
return false;
if (!('country' in value) || value['country'] === undefined)
return false;
if (!('oneLine' in value) || value['oneLine'] === undefined)
return false;
if (!('postal1' in value) || value['postal1'] === undefined)
return false;
if (!('postal2' in value) || value['postal2'] === undefined)
return false;
if (!('postal3' in value) || value['postal3'] === undefined)
return false;
if (!('locality' in value) || value['locality'] === undefined)
return false;
if (!('matchCode' in value) || value['matchCode'] === undefined)
return false;
if (!('countrySubd' in value) || value['countrySubd'] === undefined)
return false;
return true;
}
export function SoSPropertyEntityAttomAllEventDetailDataAddressFromJSON(json) {
return SoSPropertyEntityAttomAllEventDetailDataAddressFromJSONTyped(json, false);
}
export function SoSPropertyEntityAttomAllEventDetailDataAddressFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'line1': json['line1'],
'line2': json['line2'],
'country': json['country'],
'oneLine': json['oneLine'],
'postal1': json['postal1'],
'postal2': json['postal2'],
'postal3': json['postal3'],
'locality': json['locality'],
'matchCode': json['matchCode'],
'countrySubd': json['countrySubd'],
};
}
export function SoSPropertyEntityAttomAllEventDetailDataAddressToJSON(json) {
return SoSPropertyEntityAttomAllEventDetailDataAddressToJSONTyped(json, false);
}
export function SoSPropertyEntityAttomAllEventDetailDataAddressToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'line1': value['line1'],
'line2': value['line2'],
'country': value['country'],
'oneLine': value['oneLine'],
'postal1': value['postal1'],
'postal2': value['postal2'],
'postal3': value['postal3'],
'locality': value['locality'],
'matchCode': value['matchCode'],
'countrySubd': value['countrySubd'],
};
}