/** * 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 { IRisk, Risk } from './risk.model'; import { IFacultativeReinsuranceRisk, FacultativeReinsuranceRisk } from './facultative-reinsurance-risk.model'; import { IPrimaryRisk, PrimaryRisk } from './primary-risk.model'; import { IReinsuranceRisk, ReinsuranceRisk } from './reinsurance-risk.model'; import { IPerEventDeductible, PerEventDeductible } from './per-event-deductible.model'; import { IPerLossDeductible, PerLossDeductible } from './per-loss-deductible.model'; import { IPerPeriodDeductible, PerPeriodDeductible } from './per-period-deductible.model'; import { IPerPolicyDeductible, PerPolicyDeductible } from './per-policy-deductible.model'; import { IPerRiskDeductible, PerRiskDeductible } from './per-risk-deductible.model'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { ICommission, Commission } from './commission.model'; import { IPremium, Premium } from './premium.model'; import { ILegalJurisdiction, LegalJurisdiction } from './legal-jurisdiction.model'; import { IPerEventLimit, PerEventLimit } from './per-event-limit.model'; import { IPerLossLimit, PerLossLimit } from './per-loss-limit.model'; import { IPerPeriodLimit, PerPeriodLimit } from './per-period-limit.model'; import { IPerPolicyLimit, PerPolicyLimit } from './per-policy-limit.model'; import { IPerRiskLimit, PerRiskLimit } from './per-risk-limit.model'; import { ICashCallTerms, CashCallTerms } from './cash-call-terms.model'; import { ILossAdviceTerms, LossAdviceTerms } from './loss-advice-terms.model'; import { IMoney, Money } from './money.model'; import { IReinstatementPlan, ReinstatementPlan } from './reinstatement-plan.model'; import { IRiskScope, RiskScope } from './risk-scope.model'; import { IShare, Share } from './share.model'; export interface IRiskCoverage { clauses?: Array; coveredRisks?: Array; deductibles?: Array; effectivePeriod?: IBoundedPeriod; fees?: Array; id?: string; legalJurisdiction?: ILegalJurisdiction; limits?: Array; lossTerms?: Array; maximumLoss?: IMoney; name?: string; reinstatementPlan?: IReinstatementPlan; scopes?: Array; shares?: Array; typeSelector?: string; } export class RiskCoverage extends BaseModel implements IRiskCoverage { static TYPE_SELECTOR = 'RiskCoverage'; static CLAUSES_FIELD_NAME = 'clauses'; static COVERED_RISKS_FIELD_NAME = 'coveredRisks'; static DEDUCTIBLES_FIELD_NAME = 'deductibles'; static EFFECTIVE_PERIOD_FIELD_NAME = 'effectivePeriod'; static FEES_FIELD_NAME = 'fees'; static ID_FIELD_NAME = 'id'; static LEGAL_JURISDICTION_FIELD_NAME = 'legalJurisdiction'; static LIMITS_FIELD_NAME = 'limits'; static LOSS_TERMS_FIELD_NAME = 'lossTerms'; static MAXIMUM_LOSS_FIELD_NAME = 'maximumLoss'; static NAME_FIELD_NAME = 'name'; static REINSTATEMENT_PLAN_FIELD_NAME = 'reinstatementPlan'; static SCOPES_FIELD_NAME = 'scopes'; static SHARES_FIELD_NAME = 'shares'; static TYPE_SELECTOR_FIELD_NAME = 'typeSelector'; clauses: Array; coveredRisks: Array; deductibles: Array; effectivePeriod: BoundedPeriod; fees: Array; id: string; legalJurisdiction: LegalJurisdiction; limits: Array; lossTerms: Array; maximumLoss: Money; name: string; reinstatementPlan: ReinstatementPlan; scopes: Array; shares: Array; typeSelector: 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 = RiskCoverage.TYPE_SELECTOR; this.clauses = new Array(); this.coveredRisks = new Array(); this.deductibles = new Array(); this.effectivePeriod = new BoundedPeriod(); this.fees = new Array(); this.legalJurisdiction = new LegalJurisdiction(); this.limits = new Array(); this.lossTerms = new Array(); this.maximumLoss = new Money(); this.reinstatementPlan = new ReinstatementPlan(); this.scopes = new Array(); this.shares = 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.fillModelArray(this, RiskCoverage.CLAUSES_FIELD_NAME, rawValues.clauses, Clause, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskCoverage.COVERED_RISKS_FIELD_NAME, rawValues.coveredRisks, Risk, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskCoverage.DEDUCTIBLES_FIELD_NAME, rawValues.deductibles, PerEventDeductible, SubTypeFactory.createSubTypeInstance); this.effectivePeriod.setValues(rawValues.effectivePeriod); this.fillModelArray(this, RiskCoverage.FEES_FIELD_NAME, rawValues.fees, Commission, SubTypeFactory.createSubTypeInstance); this.id = this.getValue(rawValues, RiskCoverage.ID_FIELD_NAME); this.legalJurisdiction.setValues(rawValues.legalJurisdiction); this.fillModelArray(this, RiskCoverage.LIMITS_FIELD_NAME, rawValues.limits, PerEventLimit, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskCoverage.LOSS_TERMS_FIELD_NAME, rawValues.lossTerms, CashCallTerms, SubTypeFactory.createSubTypeInstance); this.maximumLoss.setValues(rawValues.maximumLoss); this.name = this.getValue(rawValues, RiskCoverage.NAME_FIELD_NAME); this.reinstatementPlan.setValues(rawValues.reinstatementPlan); this.fillModelArray(this, RiskCoverage.SCOPES_FIELD_NAME, rawValues.scopes, RiskScope, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskCoverage.SHARES_FIELD_NAME, rawValues.shares, Share, SubTypeFactory.createSubTypeInstance); this.typeSelector = this.getValue(rawValues, RiskCoverage.TYPE_SELECTOR_FIELD_NAME); } } }