/** * 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 { IPrimaryInsuranceContract, PrimaryInsuranceContract } from './primary-insurance-contract.model'; import { IStateChangeRecord, StateChangeRecord } from './state-change-record.model'; import { I3ptPolicyNegotiationProcessAction } from './enums'; import { I3ptPolicyNegotiationProcessStatus } from './enums'; export interface IPolicyNegotiationProcessContainer { action?: I3ptPolicyNegotiationProcessAction; actionExpected?: boolean; hasUnreadMessages?: boolean; nextActionExpectedFrom?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; participants?: Array; policy?: IPrimaryInsuranceContract; policyNegotiationId?: string; stateChangeRecordDtos?: Array; status?: I3ptPolicyNegotiationProcessStatus; transitory?: boolean; version?: number; } export class PolicyNegotiationProcessContainer extends BaseModel implements IPolicyNegotiationProcessContainer { static ACTION_FIELD_NAME = 'action'; static ACTION_EXPECTED_FIELD_NAME = 'actionExpected'; static HAS_UNREAD_MESSAGES_FIELD_NAME = 'hasUnreadMessages'; static NEXT_ACTION_EXPECTED_FROM_FIELD_NAME = 'nextActionExpectedFrom'; static PARTICIPANTS_FIELD_NAME = 'participants'; static POLICY_FIELD_NAME = 'policy'; static POLICY_NEGOTIATION_ID_FIELD_NAME = 'policyNegotiationId'; static STATE_CHANGE_RECORD_DTOS_FIELD_NAME = 'stateChangeRecordDtos'; static STATUS_FIELD_NAME = 'status'; static TRANSITORY_FIELD_NAME = 'transitory'; static VERSION_FIELD_NAME = 'version'; action: I3ptPolicyNegotiationProcessAction; actionExpected: boolean; hasUnreadMessages: boolean; nextActionExpectedFrom: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; participants: Array; policy: PrimaryInsuranceContract; policyNegotiationId: string; stateChangeRecordDtos: Array; status: I3ptPolicyNegotiationProcessStatus; transitory: boolean; version: number; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.nextActionExpectedFrom = new BureauLeader(); this.participants = new Array(); this.policy = new PrimaryInsuranceContract(); this.stateChangeRecordDtos = 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.action = this.getValue(rawValues, PolicyNegotiationProcessContainer.ACTION_FIELD_NAME); this.actionExpected = this.getValue(rawValues, PolicyNegotiationProcessContainer.ACTION_EXPECTED_FIELD_NAME); this.hasUnreadMessages = this.getValue(rawValues, PolicyNegotiationProcessContainer.HAS_UNREAD_MESSAGES_FIELD_NAME); if (rawValues.nextActionExpectedFrom && rawValues.nextActionExpectedFrom.typeSelector && this.nextActionExpectedFrom.typeSelector !== rawValues.nextActionExpectedFrom.typeSelector) { this.nextActionExpectedFrom = SubTypeFactory.createSubTypeInstance(rawValues.nextActionExpectedFrom) as BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; } this.nextActionExpectedFrom.setValues(rawValues.nextActionExpectedFrom); this.fillModelArray(this, PolicyNegotiationProcessContainer.PARTICIPANTS_FIELD_NAME, rawValues.participants, BureauLeader, SubTypeFactory.createSubTypeInstance); this.policy.setValues(rawValues.policy); this.policyNegotiationId = this.getValue(rawValues, PolicyNegotiationProcessContainer.POLICY_NEGOTIATION_ID_FIELD_NAME); this.fillModelArray(this, PolicyNegotiationProcessContainer.STATE_CHANGE_RECORD_DTOS_FIELD_NAME, rawValues.stateChangeRecordDtos, StateChangeRecord, SubTypeFactory.createSubTypeInstance); this.status = this.getValue(rawValues, PolicyNegotiationProcessContainer.STATUS_FIELD_NAME); this.transitory = this.getValue(rawValues, PolicyNegotiationProcessContainer.TRANSITORY_FIELD_NAME); this.version = this.getValue(rawValues, PolicyNegotiationProcessContainer.VERSION_FIELD_NAME); } } }