/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IMessageContext, MessageContext } from './message-context.model'; export interface IMessage { context: Array; id?: string; message: string; pseudonymousSender?: string; readTime?: Date; reason?: string; receivingPartyId: string; seen?: boolean; senderNickname?: string; sendingPartyId: string; sendingPerson?: string; timeSent?: Date; } export class Message extends BaseModel implements IMessage { static CONTEXT_FIELD_NAME = 'context'; static ID_FIELD_NAME = 'id'; static MESSAGE_FIELD_NAME = 'message'; static PSEUDONYMOUS_SENDER_FIELD_NAME = 'pseudonymousSender'; static READ_TIME_FIELD_NAME = 'readTime'; static REASON_FIELD_NAME = 'reason'; static RECEIVING_PARTY_ID_FIELD_NAME = 'receivingPartyId'; static SEEN_FIELD_NAME = 'seen'; static SENDER_NICKNAME_FIELD_NAME = 'senderNickname'; static SENDING_PARTY_ID_FIELD_NAME = 'sendingPartyId'; static SENDING_PERSON_FIELD_NAME = 'sendingPerson'; static TIME_SENT_FIELD_NAME = 'timeSent'; context: Array; id: string; message: string; pseudonymousSender: string; readTime: Date; reason: string; receivingPartyId: string; seen: boolean; senderNickname: string; sendingPartyId: string; sendingPerson: string; timeSent: Date; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.context = new Array(); 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.fillModelArray(this, Message.CONTEXT_FIELD_NAME, rawValues.context, MessageContext, SubTypeFactory.createSubTypeInstance); this.id = this.getValue(rawValues, Message.ID_FIELD_NAME); this.message = this.getValue(rawValues, Message.MESSAGE_FIELD_NAME); this.pseudonymousSender = this.getValue(rawValues, Message.PSEUDONYMOUS_SENDER_FIELD_NAME); this.readTime = this.getValue(rawValues, Message.READ_TIME_FIELD_NAME); this.reason = this.getValue(rawValues, Message.REASON_FIELD_NAME); this.receivingPartyId = this.getValue(rawValues, Message.RECEIVING_PARTY_ID_FIELD_NAME); this.seen = this.getValue(rawValues, Message.SEEN_FIELD_NAME); this.senderNickname = this.getValue(rawValues, Message.SENDER_NICKNAME_FIELD_NAME); this.sendingPartyId = this.getValue(rawValues, Message.SENDING_PARTY_ID_FIELD_NAME); this.sendingPerson = this.getValue(rawValues, Message.SENDING_PERSON_FIELD_NAME); this.timeSent = this.getValue(rawValues, Message.TIME_SENT_FIELD_NAME); } } }