/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IParty, Party } from './party.model'; import { IElectronicAddress, ElectronicAddress } from './electronic-address.model'; export interface IPerson extends IParty{ title?: string; firstName?: string; lastName?: string; electronicAddress?: Array; } export class Person extends Party implements IPerson { static TYPE_SELECTOR = 'Person'; static TITLE_FIELD_NAME = 'title'; static FIRST_NAME_FIELD_NAME = 'firstName'; static LAST_NAME_FIELD_NAME = 'lastName'; static ELECTRONIC_ADDRESS_FIELD_NAME = 'electronicAddress'; title: string; firstName: string; lastName: string; electronicAddress: Array; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = Person.TYPE_SELECTOR; this.electronicAddress = 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) { super.setValues(values) const rawValues = values this.title = this.getValue(rawValues, Person.TITLE_FIELD_NAME); this.firstName = this.getValue(rawValues, Person.FIRST_NAME_FIELD_NAME); this.lastName = this.getValue(rawValues, Person.LAST_NAME_FIELD_NAME); this.fillModelArray(this, Person.ELECTRONIC_ADDRESS_FIELD_NAME, rawValues.electronicAddress, ElectronicAddress, SubTypeFactory.createSubTypeInstance); } } }