/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IMoney, Money } from './money.model'; import { BomVariableRatePremiumLoadingType } from './enums'; import { BomFlatPremium } from './enums'; export interface IBomFlatOrRatePremium { amount?: IMoney; loadingFactorDenominator?: number; loadingFactorNumerator?: number; loadingType?: BomVariableRatePremiumLoadingType; lowerBoundRate?: string; rate?: string; type?: BomFlatPremium; upperBoundRate?: string; } export class BomFlatOrRatePremium extends BaseModel implements IBomFlatOrRatePremium { static AMOUNT_FIELD_NAME = 'amount'; static LOADING_FACTOR_DENOMINATOR_FIELD_NAME = 'loadingFactorDenominator'; static LOADING_FACTOR_NUMERATOR_FIELD_NAME = 'loadingFactorNumerator'; static LOADING_TYPE_FIELD_NAME = 'loadingType'; static LOWER_BOUND_RATE_FIELD_NAME = 'lowerBoundRate'; static RATE_FIELD_NAME = 'rate'; static TYPE_FIELD_NAME = 'type'; static UPPER_BOUND_RATE_FIELD_NAME = 'upperBoundRate'; amount: Money; loadingFactorDenominator: number; loadingFactorNumerator: number; loadingType: BomVariableRatePremiumLoadingType; lowerBoundRate: string; rate: string; type: BomFlatPremium; upperBoundRate: string; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.amount = new Money(); 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.amount.setValues(rawValues.amount); this.loadingFactorDenominator = this.getValue(rawValues, BomFlatOrRatePremium.LOADING_FACTOR_DENOMINATOR_FIELD_NAME); this.loadingFactorNumerator = this.getValue(rawValues, BomFlatOrRatePremium.LOADING_FACTOR_NUMERATOR_FIELD_NAME); this.loadingType = this.getValue(rawValues, BomFlatOrRatePremium.LOADING_TYPE_FIELD_NAME); this.lowerBoundRate = this.getValue(rawValues, BomFlatOrRatePremium.LOWER_BOUND_RATE_FIELD_NAME); this.rate = this.getValue(rawValues, BomFlatOrRatePremium.RATE_FIELD_NAME); this.type = this.getValue(rawValues, BomFlatOrRatePremium.TYPE_FIELD_NAME); this.upperBoundRate = this.getValue(rawValues, BomFlatOrRatePremium.UPPER_BOUND_RATE_FIELD_NAME); } } }