/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IBureauLeader, BureauLeader } from './bureau-leader.model'; import { ICedent, Cedent } from './cedent.model'; import { ICoAgreementParty, CoAgreementParty } from './co-agreement-party.model'; import { IContractHolder, ContractHolder } from './contract-holder.model'; import { ICoverHolder, CoverHolder } from './cover-holder.model'; import { IFinancialBroker, FinancialBroker } from './financial-broker.model'; import { IInsuranceBroker, InsuranceBroker } from './insurance-broker.model'; import { IInsured, Insured } from './insured.model'; import { IPricingLeader, PricingLeader } from './pricing-leader.model'; import { IPrimaryInsurer, PrimaryInsurer } from './primary-insurer.model'; import { IProducingBroker, ProducingBroker } from './producing-broker.model'; import { IProducingContractHolder, ProducingContractHolder } from './producing-contract-holder.model'; import { IProducingInsurer, ProducingInsurer } from './producing-insurer.model'; import { IReinsurer, Reinsurer } from './reinsurer.model'; import { ISlipLeader, SlipLeader } from './slip-leader.model'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { ReinsuranceOverviewDirection } from './enums'; import { ReinsuranceRiskPlacementStatus } from './enums'; import { ReinsuranceOverviewType } from './enums'; export interface IReinsuranceOverview { brokers?: Array; cedent?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; direction?: ReinsuranceOverviewDirection; effectivePeriod?: IBoundedPeriod; id?: string; lastModifiedAt?: Date; myCompanyParticipantRole?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; name?: string; nrOfOpenTasks?: number; nrOfUnreadMessages?: number; reinsurers?: Array; status?: ReinsuranceRiskPlacementStatus; type?: ReinsuranceOverviewType; } export class ReinsuranceOverview extends BaseModel implements IReinsuranceOverview { static BROKERS_FIELD_NAME = 'brokers'; static CEDENT_FIELD_NAME = 'cedent'; static DIRECTION_FIELD_NAME = 'direction'; static EFFECTIVE_PERIOD_FIELD_NAME = 'effectivePeriod'; static ID_FIELD_NAME = 'id'; static LAST_MODIFIED_AT_FIELD_NAME = 'lastModifiedAt'; static MY_COMPANY_PARTICIPANT_ROLE_FIELD_NAME = 'myCompanyParticipantRole'; static NAME_FIELD_NAME = 'name'; static NR_OF_OPEN_TASKS_FIELD_NAME = 'nrOfOpenTasks'; static NR_OF_UNREAD_MESSAGES_FIELD_NAME = 'nrOfUnreadMessages'; static REINSURERS_FIELD_NAME = 'reinsurers'; static STATUS_FIELD_NAME = 'status'; static TYPE_FIELD_NAME = 'type'; brokers: Array; cedent: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; direction: ReinsuranceOverviewDirection; effectivePeriod: BoundedPeriod; id: string; lastModifiedAt: Date; myCompanyParticipantRole: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; name: string; nrOfOpenTasks: number; nrOfUnreadMessages: number; reinsurers: Array; status: ReinsuranceRiskPlacementStatus; type: ReinsuranceOverviewType; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.brokers = new Array(); this.cedent = new BureauLeader(); this.effectivePeriod = new BoundedPeriod(); this.myCompanyParticipantRole = new BureauLeader(); this.reinsurers = 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, ReinsuranceOverview.BROKERS_FIELD_NAME, rawValues.brokers, BureauLeader, SubTypeFactory.createSubTypeInstance); if (rawValues.cedent && rawValues.cedent.typeSelector && this.cedent.typeSelector !== rawValues.cedent.typeSelector) { this.cedent = SubTypeFactory.createSubTypeInstance(rawValues.cedent) as BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; } this.cedent.setValues(rawValues.cedent); this.direction = this.getValue(rawValues, ReinsuranceOverview.DIRECTION_FIELD_NAME); this.effectivePeriod.setValues(rawValues.effectivePeriod); this.id = this.getValue(rawValues, ReinsuranceOverview.ID_FIELD_NAME); this.lastModifiedAt = this.getValue(rawValues, ReinsuranceOverview.LAST_MODIFIED_AT_FIELD_NAME); if (rawValues.myCompanyParticipantRole && rawValues.myCompanyParticipantRole.typeSelector && this.myCompanyParticipantRole.typeSelector !== rawValues.myCompanyParticipantRole.typeSelector) { this.myCompanyParticipantRole = SubTypeFactory.createSubTypeInstance(rawValues.myCompanyParticipantRole) as BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; } this.myCompanyParticipantRole.setValues(rawValues.myCompanyParticipantRole); this.name = this.getValue(rawValues, ReinsuranceOverview.NAME_FIELD_NAME); this.nrOfOpenTasks = this.getValue(rawValues, ReinsuranceOverview.NR_OF_OPEN_TASKS_FIELD_NAME); this.nrOfUnreadMessages = this.getValue(rawValues, ReinsuranceOverview.NR_OF_UNREAD_MESSAGES_FIELD_NAME); this.fillModelArray(this, ReinsuranceOverview.REINSURERS_FIELD_NAME, rawValues.reinsurers, BureauLeader, SubTypeFactory.createSubTypeInstance); this.status = this.getValue(rawValues, ReinsuranceOverview.STATUS_FIELD_NAME); this.type = this.getValue(rawValues, ReinsuranceOverview.TYPE_FIELD_NAME); } } }