@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
59 lines (58 loc) • 1.91 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 SoSTenantEntityBase interface.
*/
export function instanceOfSoSTenantEntityBase(value) {
if (!('tid' in value) || value['tid'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('organizationId' in value) || value['organizationId'] === undefined)
return false;
return true;
}
export function SoSTenantEntityBaseFromJSON(json) {
return SoSTenantEntityBaseFromJSONTyped(json, false);
}
export function SoSTenantEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'tid': json['tid'],
'name': json['name'],
'email': json['email'] == null ? undefined : json['email'],
'phone': json['phone'] == null ? undefined : json['phone'],
'organizationId': json['organizationId'],
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
};
}
export function SoSTenantEntityBaseToJSON(json) {
return SoSTenantEntityBaseToJSONTyped(json, false);
}
export function SoSTenantEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'tid': value['tid'],
'name': value['name'],
'email': value['email'],
'phone': value['phone'],
'organizationId': value['organizationId'],
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'],
};
}