/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IMessage, Message } from './message.model'; import { WebSocketEventType } from './enums'; export interface IWebSocketMessageReceived { body?: string; data?: IMessage; tag?: string; webSocketEventType?: WebSocketEventType; } export class WebSocketMessageReceived extends BaseModel implements IWebSocketMessageReceived { static BODY_FIELD_NAME = 'body'; static DATA_FIELD_NAME = 'data'; static TAG_FIELD_NAME = 'tag'; static WEB_SOCKET_EVENT_TYPE_FIELD_NAME = 'webSocketEventType'; body: string; data: Message; tag: string; webSocketEventType: WebSocketEventType; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.data = new Message(); if (values) { this.setValues(values); } } /** * set the values. * @param values Can be used to set a webapi response to this newly constructed model */ setValues(values: Partial): void { if (values) { const rawValues = values this.body = this.getValue(rawValues, WebSocketMessageReceived.BODY_FIELD_NAME); this.data.setValues(rawValues.data); this.tag = this.getValue(rawValues, WebSocketMessageReceived.TAG_FIELD_NAME); this.webSocketEventType = this.getValue(rawValues, WebSocketMessageReceived.WEB_SOCKET_EVENT_TYPE_FIELD_NAME); } } }