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