/** * 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 { ISoftReference, SoftReference } from './soft-reference.model'; import { IInsuredIndustryClassification, InsuredIndustryClassification } from './insured-industry-classification.model'; export interface ICompany extends IParty{ name?: string; parentOrganisation?: ISoftReference; activityDescription?: string; insuredIndustryClassification?: IInsuredIndustryClassification; } export class Company extends Party implements ICompany { static TYPE_SELECTOR = 'Company'; static NAME_FIELD_NAME = 'name'; static PARENT_ORGANISATION_FIELD_NAME = 'parentOrganisation'; static ACTIVITY_DESCRIPTION_FIELD_NAME = 'activityDescription'; static INSURED_INDUSTRY_CLASSIFICATION_FIELD_NAME = 'insuredIndustryClassification'; name: string; parentOrganisation: SoftReference; activityDescription: string; insuredIndustryClassification: InsuredIndustryClassification; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = Company.TYPE_SELECTOR; this.parentOrganisation = new SoftReference(); this.insuredIndustryClassification = new InsuredIndustryClassification(); 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.name = this.getValue(rawValues, Company.NAME_FIELD_NAME); this.parentOrganisation.setValues(rawValues.parentOrganisation); this.activityDescription = this.getValue(rawValues, Company.ACTIVITY_DESCRIPTION_FIELD_NAME); this.insuredIndustryClassification.setValues(rawValues.insuredIndustryClassification); } } }