UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

75 lines (74 loc) 2.83 kB
/* 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 SoSUserEntityBase interface. */ export function instanceOfSoSUserEntityBase(value) { if (!('uid' in value) || value['uid'] === undefined) return false; if (!('email' in value) || value['email'] === undefined) return false; if (!('socketIds' in value) || value['socketIds'] === undefined) return false; if (!('isPlaceholderId' in value) || value['isPlaceholderId'] === undefined) return false; return true; } export function SoSUserEntityBaseFromJSON(json) { return SoSUserEntityBaseFromJSONTyped(json, false); } export function SoSUserEntityBaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'uid': json['uid'], 'email': json['email'], 'subscribedApps': json['subscribedApps'] == null ? undefined : json['subscribedApps'], 'roles': json['roles'] == null ? undefined : json['roles'], 'name': json['name'] == null ? undefined : json['name'], 'picture': json['picture'] == null ? undefined : json['picture'], 'socketIds': json['socketIds'], 'notifyToSlack': json['notifyToSlack'] == null ? undefined : json['notifyToSlack'], 'notifyToEmail': json['notifyToEmail'] == null ? undefined : json['notifyToEmail'], 'avatarImageUploadId': json['avatarImageUploadId'] == null ? undefined : json['avatarImageUploadId'], 'phone': json['phone'] == null ? undefined : json['phone'], 'slackEmail': json['slackEmail'] == null ? undefined : json['slackEmail'], 'isPlaceholderId': json['isPlaceholderId'], }; } export function SoSUserEntityBaseToJSON(json) { return SoSUserEntityBaseToJSONTyped(json, false); } export function SoSUserEntityBaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'uid': value['uid'], 'email': value['email'], 'subscribedApps': value['subscribedApps'], 'roles': value['roles'], 'name': value['name'], 'picture': value['picture'], 'socketIds': value['socketIds'], 'notifyToSlack': value['notifyToSlack'], 'notifyToEmail': value['notifyToEmail'], 'avatarImageUploadId': value['avatarImageUploadId'], 'phone': value['phone'], 'slackEmail': value['slackEmail'], 'isPlaceholderId': value['isPlaceholderId'], }; }