/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { ISoftReference, SoftReference } from './soft-reference.model'; import { IProcessStatus, ProcessStatus } from './process-status.model'; 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 { IProcessAction, ProcessAction } from './process-action.model'; export interface IFacultativeAuditEntry { contractRef?: ISoftReference; contractStatus?: IProcessStatus; dueDate?: Date; nextActionExpectedFrom?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; processRef?: ISoftReference; timestamp?: Date; triggeredBy?: string; workflowAction?: IProcessAction; } export class FacultativeAuditEntry extends BaseModel implements IFacultativeAuditEntry { static CONTRACT_REF_FIELD_NAME = 'contractRef'; static CONTRACT_STATUS_FIELD_NAME = 'contractStatus'; static DUE_DATE_FIELD_NAME = 'dueDate'; static NEXT_ACTION_EXPECTED_FROM_FIELD_NAME = 'nextActionExpectedFrom'; static PROCESS_REF_FIELD_NAME = 'processRef'; static TIMESTAMP_FIELD_NAME = 'timestamp'; static TRIGGERED_BY_FIELD_NAME = 'triggeredBy'; static WORKFLOW_ACTION_FIELD_NAME = 'workflowAction'; contractRef: SoftReference; contractStatus: ProcessStatus; dueDate: Date; nextActionExpectedFrom: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; processRef: SoftReference; timestamp: Date; triggeredBy: string; workflowAction: ProcessAction; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.contractRef = new SoftReference(); this.contractStatus = new ProcessStatus(); this.nextActionExpectedFrom = new BureauLeader(); this.processRef = new SoftReference(); this.workflowAction = new ProcessAction(); 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.contractRef.setValues(rawValues.contractRef); this.contractStatus.setValues(rawValues.contractStatus); this.dueDate = this.getValue(rawValues, FacultativeAuditEntry.DUE_DATE_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.processRef.setValues(rawValues.processRef); this.timestamp = this.getValue(rawValues, FacultativeAuditEntry.TIMESTAMP_FIELD_NAME); this.triggeredBy = this.getValue(rawValues, FacultativeAuditEntry.TRIGGERED_BY_FIELD_NAME); this.workflowAction.setValues(rawValues.workflowAction); } } }