UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

55 lines (54 loc) 1.66 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 SoSOptionEntityBase interface. */ export function instanceOfSoSOptionEntityBase(value) { if (!('moid' in value) || value['moid'] === undefined) return false; if (!('soid' in value) || value['soid'] === undefined) return false; return true; } export function SoSOptionEntityBaseFromJSON(json) { return SoSOptionEntityBaseFromJSONTyped(json, false); } export function SoSOptionEntityBaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'moid': json['moid'], 'soid': json['soid'], 'label': json['label'] == null ? undefined : json['label'], 'priority': json['priority'] == null ? undefined : json['priority'], 'color': json['color'] == null ? undefined : json['color'], }; } export function SoSOptionEntityBaseToJSON(json) { return SoSOptionEntityBaseToJSONTyped(json, false); } export function SoSOptionEntityBaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'moid': value['moid'], 'soid': value['soid'], 'label': value['label'], 'priority': value['priority'], 'color': value['color'], }; }