/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IProcessAction, ProcessAction } from './process-action.model'; import { IReinsuranceContract, ReinsuranceContract } from './reinsurance-contract.model'; import { IPrimaryInsuranceContract, PrimaryInsuranceContract } from './primary-insurance-contract.model'; import { IInsuranceContractNegotiation, InsuranceContractNegotiation } from './insurance-contract-negotiation.model'; import { IReportingDataExchange, ReportingDataExchange } from './reporting-data-exchange.model'; import { IRiskPlacement, RiskPlacement } from './risk-placement.model'; export interface IEurapcoSummary { availableActions?: Array; canBePlaced?: boolean; contract?: IReinsuranceContract; nrOfUnreadMessages?: number; originalPolicy?: IPrimaryInsuranceContract; process?: IInsuranceContractNegotiation | IReportingDataExchange | IRiskPlacement; signingInProgress?: boolean; transitory?: boolean; } export class EurapcoSummary extends BaseModel implements IEurapcoSummary { static AVAILABLE_ACTIONS_FIELD_NAME = 'availableActions'; static CAN_BE_PLACED_FIELD_NAME = 'canBePlaced'; static CONTRACT_FIELD_NAME = 'contract'; static NR_OF_UNREAD_MESSAGES_FIELD_NAME = 'nrOfUnreadMessages'; static ORIGINAL_POLICY_FIELD_NAME = 'originalPolicy'; static PROCESS_FIELD_NAME = 'process'; static SIGNING_IN_PROGRESS_FIELD_NAME = 'signingInProgress'; static TRANSITORY_FIELD_NAME = 'transitory'; availableActions: Array; canBePlaced: boolean; contract: ReinsuranceContract; nrOfUnreadMessages: number; originalPolicy: PrimaryInsuranceContract; process: InsuranceContractNegotiation | ReportingDataExchange | RiskPlacement; signingInProgress: boolean; transitory: boolean; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.availableActions = new Array(); this.contract = new ReinsuranceContract(); this.originalPolicy = new PrimaryInsuranceContract(); this.process = new InsuranceContractNegotiation(); 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, EurapcoSummary.AVAILABLE_ACTIONS_FIELD_NAME, rawValues.availableActions, ProcessAction, SubTypeFactory.createSubTypeInstance); this.canBePlaced = this.getValue(rawValues, EurapcoSummary.CAN_BE_PLACED_FIELD_NAME); this.contract.setValues(rawValues.contract); this.nrOfUnreadMessages = this.getValue(rawValues, EurapcoSummary.NR_OF_UNREAD_MESSAGES_FIELD_NAME); this.originalPolicy.setValues(rawValues.originalPolicy); if (rawValues.process && rawValues.process.typeSelector && this.process.typeSelector !== rawValues.process.typeSelector) { this.process = SubTypeFactory.createSubTypeInstance(rawValues.process) as InsuranceContractNegotiation | ReportingDataExchange | RiskPlacement; } this.process.setValues(rawValues.process); this.signingInProgress = this.getValue(rawValues, EurapcoSummary.SIGNING_IN_PROGRESS_FIELD_NAME); this.transitory = this.getValue(rawValues, EurapcoSummary.TRANSITORY_FIELD_NAME); } } }