/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IRisk, Risk } from './risk.model'; import { IExposureBase, ExposureBase } from './exposure-base.model'; export interface IPrimaryRisk extends IRisk{ exposureBase?: IExposureBase; description?: string; } export class PrimaryRisk extends Risk implements IPrimaryRisk { static TYPE_SELECTOR = 'PrimaryRisk'; static EXPOSURE_BASE_FIELD_NAME = 'exposureBase'; static DESCRIPTION_FIELD_NAME = 'description'; exposureBase: ExposureBase; description: string; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = PrimaryRisk.TYPE_SELECTOR; this.exposureBase = new ExposureBase(); 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.exposureBase.setValues(rawValues.exposureBase); this.description = this.getValue(rawValues, PrimaryRisk.DESCRIPTION_FIELD_NAME); } } }