/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { IDocument, Document } from './document.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 { INote, Note } from './note.model'; import { ISoftReference, SoftReference } from './soft-reference.model'; import { IProcessStatus, ProcessStatus } from './process-status.model'; export interface IReportingDataExchange { accountingPeriod?: IBoundedPeriod; createdAt?: Date; description?: string; documents?: Array; dueDate?: Date; id?: string; inputDocuments?: Array; name?: string; nextActionExpectedFrom?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; notes?: Array; outputDocuments?: Array; parentProcess?: ISoftReference; participants?: Array; status?: IProcessStatus; typeSelector?: string; version?: number; } export class ReportingDataExchange extends BaseModel implements IReportingDataExchange { static TYPE_SELECTOR = 'ReportingDataExchange'; static ACCOUNTING_PERIOD_FIELD_NAME = 'accountingPeriod'; static CREATED_AT_FIELD_NAME = 'createdAt'; static DESCRIPTION_FIELD_NAME = 'description'; static DOCUMENTS_FIELD_NAME = 'documents'; static DUE_DATE_FIELD_NAME = 'dueDate'; static ID_FIELD_NAME = 'id'; static INPUT_DOCUMENTS_FIELD_NAME = 'inputDocuments'; static NAME_FIELD_NAME = 'name'; static NEXT_ACTION_EXPECTED_FROM_FIELD_NAME = 'nextActionExpectedFrom'; static NOTES_FIELD_NAME = 'notes'; static OUTPUT_DOCUMENTS_FIELD_NAME = 'outputDocuments'; static PARENT_PROCESS_FIELD_NAME = 'parentProcess'; static PARTICIPANTS_FIELD_NAME = 'participants'; static STATUS_FIELD_NAME = 'status'; static TYPE_SELECTOR_FIELD_NAME = 'typeSelector'; static VERSION_FIELD_NAME = 'version'; accountingPeriod: BoundedPeriod; createdAt: Date; description: string; documents: Array; dueDate: Date; id: string; inputDocuments: Array; name: string; nextActionExpectedFrom: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; notes: Array; outputDocuments: Array; parentProcess: SoftReference; participants: Array; status: ProcessStatus; typeSelector: string; 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.typeSelector = ReportingDataExchange.TYPE_SELECTOR; this.accountingPeriod = new BoundedPeriod(); this.documents = new Array(); this.inputDocuments = new Array(); this.nextActionExpectedFrom = new BureauLeader(); this.notes = new Array(); this.outputDocuments = new Array(); this.parentProcess = new SoftReference(); this.participants = new Array(); this.status = new ProcessStatus(); 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.accountingPeriod.setValues(rawValues.accountingPeriod); this.createdAt = this.getValue(rawValues, ReportingDataExchange.CREATED_AT_FIELD_NAME); this.description = this.getValue(rawValues, ReportingDataExchange.DESCRIPTION_FIELD_NAME); this.fillModelArray(this, ReportingDataExchange.DOCUMENTS_FIELD_NAME, rawValues.documents, Document, SubTypeFactory.createSubTypeInstance); this.dueDate = this.getValue(rawValues, ReportingDataExchange.DUE_DATE_FIELD_NAME); this.id = this.getValue(rawValues, ReportingDataExchange.ID_FIELD_NAME); this.fillModelArray(this, ReportingDataExchange.INPUT_DOCUMENTS_FIELD_NAME, rawValues.inputDocuments, Document, SubTypeFactory.createSubTypeInstance); this.name = this.getValue(rawValues, ReportingDataExchange.NAME_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, ReportingDataExchange.NOTES_FIELD_NAME, rawValues.notes, Note, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, ReportingDataExchange.OUTPUT_DOCUMENTS_FIELD_NAME, rawValues.outputDocuments, Document, SubTypeFactory.createSubTypeInstance); this.parentProcess.setValues(rawValues.parentProcess); this.fillModelArray(this, ReportingDataExchange.PARTICIPANTS_FIELD_NAME, rawValues.participants, BureauLeader, SubTypeFactory.createSubTypeInstance); this.status.setValues(rawValues.status); this.typeSelector = this.getValue(rawValues, ReportingDataExchange.TYPE_SELECTOR_FIELD_NAME); this.version = this.getValue(rawValues, ReportingDataExchange.VERSION_FIELD_NAME); } } }