@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
57 lines (56 loc) • 1.87 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 SoSContactEntityBase interface.
*/
export function instanceOfSoSContactEntityBase(value) {
if (!('cid' in value) || value['cid'] === undefined)
return false;
if (!('email' in value) || value['email'] === undefined)
return false;
return true;
}
export function SoSContactEntityBaseFromJSON(json) {
return SoSContactEntityBaseFromJSONTyped(json, false);
}
export function SoSContactEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'cid': json['cid'],
'email': json['email'],
'phonePrimary': json['phonePrimary'] == null ? undefined : json['phonePrimary'],
'phoneSecondary': json['phoneSecondary'] == null ? undefined : json['phoneSecondary'],
'name': json['name'] == null ? undefined : json['name'],
'organizationId': json['organizationId'] == null ? undefined : json['organizationId'],
};
}
export function SoSContactEntityBaseToJSON(json) {
return SoSContactEntityBaseToJSONTyped(json, false);
}
export function SoSContactEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'cid': value['cid'],
'email': value['email'],
'phonePrimary': value['phonePrimary'],
'phoneSecondary': value['phoneSecondary'],
'name': value['name'],
'organizationId': value['organizationId'],
};
}