/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IBomBaseReinsuranceSection, BomBaseReinsuranceSection } from './bom-base-reinsurance-section.model'; import { ILimit, Limit } from './limit.model'; import { IDeductible, Deductible } from './deductible.model'; import { IMoney, Money } from './money.model'; import { IBomFlatOrRatePremium, BomFlatOrRatePremium } from './bom-flat-or-rate-premium.model'; import { IBomReinsuranceReinstatement, BomReinsuranceReinstatement } from './bom-reinsurance-reinstatement.model'; import { IBomReinsuranceInstalment, BomReinsuranceInstalment } from './bom-reinsurance-instalment.model'; import { IBomReinsurancePortfolio, BomReinsurancePortfolio } from './bom-reinsurance-portfolio.model'; import { IBomCatXolReinsuranceSection, BomCatXolReinsuranceSection } from './bom-cat-xol-reinsurance-section.model'; import { BomPremiumIncomeType } from './enums'; import { BomApplicableLawCode } from './enums'; export interface IBomCatXolReinsuranceLayer extends IBomBaseReinsuranceSection{ limit?: ILimit; attachmentPoint?: IDeductible; aggregatedDeductibleAmount?: IMoney; premium?: IBomFlatOrRatePremium; premiumBrokerage?: IBomFlatOrRatePremium; hasBrokerageOnPremium?: boolean; rateOnLine?: string; minimumPremiumPercentage?: string; minimumPremiumAmount?: IMoney; depositPremiumPercentage?: string; depositPremiumAmount?: IMoney; noClaimsBonusPercentage?: string; hasBrokerageOnReinstatements?: boolean; reinstatementBrokerage?: IBomFlatOrRatePremium; hasInfiniteReinstatements?: boolean; numberOfReinstatements?: number; reinstatements?: Array; aggregatedLimit?: IMoney; maximumLossPerEvent?: IMoney; maximumLoss?: IMoney; depositPremiumIncome?: IMoney; minimumPremiumIncome?: IMoney; estimatedSubjectPremium?: IMoney; finalSubjectPremium?: IMoney; finalSubjectPremiumDueDate?: Date; instalments?: Array; adjustmentInstalments?: Array; premiumIncomeType?: BomPremiumIncomeType; portfolios?: Array; applicableLaw?: BomApplicableLawCode; sections?: Array; } export class BomCatXolReinsuranceLayer extends BomBaseReinsuranceSection implements IBomCatXolReinsuranceLayer { static TYPE_SELECTOR = 'BomCatXolReinsuranceLayer'; static LIMIT_FIELD_NAME = 'limit'; static ATTACHMENT_POINT_FIELD_NAME = 'attachmentPoint'; static AGGREGATED_DEDUCTIBLE_AMOUNT_FIELD_NAME = 'aggregatedDeductibleAmount'; static PREMIUM_FIELD_NAME = 'premium'; static PREMIUM_BROKERAGE_FIELD_NAME = 'premiumBrokerage'; static HAS_BROKERAGE_ON_PREMIUM_FIELD_NAME = 'hasBrokerageOnPremium'; static RATE_ON_LINE_FIELD_NAME = 'rateOnLine'; static MINIMUM_PREMIUM_PERCENTAGE_FIELD_NAME = 'minimumPremiumPercentage'; static MINIMUM_PREMIUM_AMOUNT_FIELD_NAME = 'minimumPremiumAmount'; static DEPOSIT_PREMIUM_PERCENTAGE_FIELD_NAME = 'depositPremiumPercentage'; static DEPOSIT_PREMIUM_AMOUNT_FIELD_NAME = 'depositPremiumAmount'; static NO_CLAIMS_BONUS_PERCENTAGE_FIELD_NAME = 'noClaimsBonusPercentage'; static HAS_BROKERAGE_ON_REINSTATEMENTS_FIELD_NAME = 'hasBrokerageOnReinstatements'; static REINSTATEMENT_BROKERAGE_FIELD_NAME = 'reinstatementBrokerage'; static HAS_INFINITE_REINSTATEMENTS_FIELD_NAME = 'hasInfiniteReinstatements'; static NUMBER_OF_REINSTATEMENTS_FIELD_NAME = 'numberOfReinstatements'; static REINSTATEMENTS_FIELD_NAME = 'reinstatements'; static AGGREGATED_LIMIT_FIELD_NAME = 'aggregatedLimit'; static MAXIMUM_LOSS_PER_EVENT_FIELD_NAME = 'maximumLossPerEvent'; static MAXIMUM_LOSS_FIELD_NAME = 'maximumLoss'; static DEPOSIT_PREMIUM_INCOME_FIELD_NAME = 'depositPremiumIncome'; static MINIMUM_PREMIUM_INCOME_FIELD_NAME = 'minimumPremiumIncome'; static ESTIMATED_SUBJECT_PREMIUM_FIELD_NAME = 'estimatedSubjectPremium'; static FINAL_SUBJECT_PREMIUM_FIELD_NAME = 'finalSubjectPremium'; static FINAL_SUBJECT_PREMIUM_DUE_DATE_FIELD_NAME = 'finalSubjectPremiumDueDate'; static INSTALMENTS_FIELD_NAME = 'instalments'; static ADJUSTMENT_INSTALMENTS_FIELD_NAME = 'adjustmentInstalments'; static PREMIUM_INCOME_TYPE_FIELD_NAME = 'premiumIncomeType'; static PORTFOLIOS_FIELD_NAME = 'portfolios'; static APPLICABLE_LAW_FIELD_NAME = 'applicableLaw'; static SECTIONS_FIELD_NAME = 'sections'; limit: Limit; attachmentPoint: Deductible; aggregatedDeductibleAmount: Money; premium: BomFlatOrRatePremium; premiumBrokerage: BomFlatOrRatePremium; hasBrokerageOnPremium: boolean; rateOnLine: string; minimumPremiumPercentage: string; minimumPremiumAmount: Money; depositPremiumPercentage: string; depositPremiumAmount: Money; noClaimsBonusPercentage: string; hasBrokerageOnReinstatements: boolean; reinstatementBrokerage: BomFlatOrRatePremium; hasInfiniteReinstatements: boolean; numberOfReinstatements: number; reinstatements: Array; aggregatedLimit: Money; maximumLossPerEvent: Money; maximumLoss: Money; depositPremiumIncome: Money; minimumPremiumIncome: Money; estimatedSubjectPremium: Money; finalSubjectPremium: Money; finalSubjectPremiumDueDate: Date; instalments: Array; adjustmentInstalments: Array; premiumIncomeType: BomPremiumIncomeType; portfolios: Array; applicableLaw: BomApplicableLawCode; sections: 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 = BomCatXolReinsuranceLayer.TYPE_SELECTOR; this.limit = new Limit(); // baseTypes should not be instantiated this.attachmentPoint = new Deductible(); // baseTypes should not be instantiated this.aggregatedDeductibleAmount = new Money(); this.premium = new BomFlatOrRatePremium(); this.premiumBrokerage = new BomFlatOrRatePremium(); this.minimumPremiumAmount = new Money(); this.depositPremiumAmount = new Money(); this.reinstatementBrokerage = new BomFlatOrRatePremium(); this.reinstatements = new Array(); this.aggregatedLimit = new Money(); this.maximumLossPerEvent = new Money(); this.maximumLoss = new Money(); this.depositPremiumIncome = new Money(); this.minimumPremiumIncome = new Money(); this.estimatedSubjectPremium = new Money(); this.finalSubjectPremium = new Money(); this.instalments = new Array(); this.adjustmentInstalments = new Array(); this.portfolios = new Array(); this.sections = 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 if (rawValues.limit && rawValues.limit.typeSelector && this.limit.typeSelector !== rawValues.limit.typeSelector) { this.limit = SubTypeFactory.createSubTypeInstance(rawValues.limit) as Limit; } this.limit.setValues(rawValues.limit); if (rawValues.attachmentPoint && rawValues.attachmentPoint.typeSelector && this.attachmentPoint.typeSelector !== rawValues.attachmentPoint.typeSelector) { this.attachmentPoint = SubTypeFactory.createSubTypeInstance(rawValues.attachmentPoint) as Deductible; } this.attachmentPoint.setValues(rawValues.attachmentPoint); this.aggregatedDeductibleAmount.setValues(rawValues.aggregatedDeductibleAmount); this.premium.setValues(rawValues.premium); this.premiumBrokerage.setValues(rawValues.premiumBrokerage); this.hasBrokerageOnPremium = this.getValue(rawValues, BomCatXolReinsuranceLayer.HAS_BROKERAGE_ON_PREMIUM_FIELD_NAME); this.rateOnLine = this.getValue(rawValues, BomCatXolReinsuranceLayer.RATE_ON_LINE_FIELD_NAME); this.minimumPremiumPercentage = this.getValue(rawValues, BomCatXolReinsuranceLayer.MINIMUM_PREMIUM_PERCENTAGE_FIELD_NAME); this.minimumPremiumAmount.setValues(rawValues.minimumPremiumAmount); this.depositPremiumPercentage = this.getValue(rawValues, BomCatXolReinsuranceLayer.DEPOSIT_PREMIUM_PERCENTAGE_FIELD_NAME); this.depositPremiumAmount.setValues(rawValues.depositPremiumAmount); this.noClaimsBonusPercentage = this.getValue(rawValues, BomCatXolReinsuranceLayer.NO_CLAIMS_BONUS_PERCENTAGE_FIELD_NAME); this.hasBrokerageOnReinstatements = this.getValue(rawValues, BomCatXolReinsuranceLayer.HAS_BROKERAGE_ON_REINSTATEMENTS_FIELD_NAME); this.reinstatementBrokerage.setValues(rawValues.reinstatementBrokerage); this.hasInfiniteReinstatements = this.getValue(rawValues, BomCatXolReinsuranceLayer.HAS_INFINITE_REINSTATEMENTS_FIELD_NAME); this.numberOfReinstatements = this.getValue(rawValues, BomCatXolReinsuranceLayer.NUMBER_OF_REINSTATEMENTS_FIELD_NAME); this.fillModelArray(this, BomCatXolReinsuranceLayer.REINSTATEMENTS_FIELD_NAME, rawValues.reinstatements, BomReinsuranceReinstatement, SubTypeFactory.createSubTypeInstance); this.aggregatedLimit.setValues(rawValues.aggregatedLimit); this.maximumLossPerEvent.setValues(rawValues.maximumLossPerEvent); this.maximumLoss.setValues(rawValues.maximumLoss); this.depositPremiumIncome.setValues(rawValues.depositPremiumIncome); this.minimumPremiumIncome.setValues(rawValues.minimumPremiumIncome); this.estimatedSubjectPremium.setValues(rawValues.estimatedSubjectPremium); this.finalSubjectPremium.setValues(rawValues.finalSubjectPremium); this.finalSubjectPremiumDueDate = this.getValue(rawValues, BomCatXolReinsuranceLayer.FINAL_SUBJECT_PREMIUM_DUE_DATE_FIELD_NAME); this.fillModelArray(this, BomCatXolReinsuranceLayer.INSTALMENTS_FIELD_NAME, rawValues.instalments, BomReinsuranceInstalment, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, BomCatXolReinsuranceLayer.ADJUSTMENT_INSTALMENTS_FIELD_NAME, rawValues.adjustmentInstalments, BomReinsuranceInstalment, SubTypeFactory.createSubTypeInstance); this.premiumIncomeType = this.getValue(rawValues, BomCatXolReinsuranceLayer.PREMIUM_INCOME_TYPE_FIELD_NAME); this.fillModelArray(this, BomCatXolReinsuranceLayer.PORTFOLIOS_FIELD_NAME, rawValues.portfolios, BomReinsurancePortfolio, SubTypeFactory.createSubTypeInstance); this.applicableLaw = this.getValue(rawValues, BomCatXolReinsuranceLayer.APPLICABLE_LAW_FIELD_NAME); this.fillModelArray(this, BomCatXolReinsuranceLayer.SECTIONS_FIELD_NAME, rawValues.sections, BomCatXolReinsuranceSection, SubTypeFactory.createSubTypeInstance); } } }