/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IClause, Clause } from './clause.model'; import { ICustomClause, CustomClause } from './custom-clause.model'; import { IPredefinedClause, PredefinedClause } from './predefined-clause.model'; import { IFee, Fee } from './fee.model'; import { ReinstatementType } from './enums'; export interface IReinstatement { capacityRate?: string; clauses?: Array; fees?: Array; sequenceNumber?: number; type?: ReinstatementType; } export class Reinstatement extends BaseModel implements IReinstatement { static CAPACITY_RATE_FIELD_NAME = 'capacityRate'; static CLAUSES_FIELD_NAME = 'clauses'; static FEES_FIELD_NAME = 'fees'; static SEQUENCE_NUMBER_FIELD_NAME = 'sequenceNumber'; static TYPE_FIELD_NAME = 'type'; capacityRate: string; clauses: Array; fees: Array; sequenceNumber: number; type: ReinstatementType; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.clauses = new Array(); this.fees = 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.capacityRate = this.getValue(rawValues, Reinstatement.CAPACITY_RATE_FIELD_NAME); this.fillModelArray(this, Reinstatement.CLAUSES_FIELD_NAME, rawValues.clauses, Clause, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, Reinstatement.FEES_FIELD_NAME, rawValues.fees, Fee, SubTypeFactory.createSubTypeInstance); this.sequenceNumber = this.getValue(rawValues, Reinstatement.SEQUENCE_NUMBER_FIELD_NAME); this.type = this.getValue(rawValues, Reinstatement.TYPE_FIELD_NAME); } } }