/** * 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 { 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 { IStateChangeRecord, StateChangeRecord } from './state-change-record.model'; import { InsuranceContractProcessStatus } from './enums'; export interface IInsuranceContractQuotation { contract?: ISoftReference; createdAt?: Date; description?: string; followUpDueAt?: Date; id?: string; insuranceServiceRequest?: ISoftReference; nextActionExpectedFrom?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; originatingContract?: ISoftReference; participants?: Array; stateChangeRecords?: Array; status?: InsuranceContractProcessStatus; typeSelector?: string; } export class InsuranceContractQuotation extends BaseModel implements IInsuranceContractQuotation { static TYPE_SELECTOR = 'InsuranceContractQuotation'; static CONTRACT_FIELD_NAME = 'contract'; static CREATED_AT_FIELD_NAME = 'createdAt'; static DESCRIPTION_FIELD_NAME = 'description'; static FOLLOW_UP_DUE_AT_FIELD_NAME = 'followUpDueAt'; static ID_FIELD_NAME = 'id'; static INSURANCE_SERVICE_REQUEST_FIELD_NAME = 'insuranceServiceRequest'; static NEXT_ACTION_EXPECTED_FROM_FIELD_NAME = 'nextActionExpectedFrom'; static ORIGINATING_CONTRACT_FIELD_NAME = 'originatingContract'; static PARTICIPANTS_FIELD_NAME = 'participants'; static STATE_CHANGE_RECORDS_FIELD_NAME = 'stateChangeRecords'; static STATUS_FIELD_NAME = 'status'; static TYPE_SELECTOR_FIELD_NAME = 'typeSelector'; contract: SoftReference; createdAt: Date; description: string; followUpDueAt: Date; id: string; insuranceServiceRequest: SoftReference; nextActionExpectedFrom: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; originatingContract: SoftReference; participants: Array; stateChangeRecords: Array; status: InsuranceContractProcessStatus; typeSelector: string; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = InsuranceContractQuotation.TYPE_SELECTOR; this.contract = new SoftReference(); this.insuranceServiceRequest = new SoftReference(); this.nextActionExpectedFrom = new BureauLeader(); this.originatingContract = new SoftReference(); this.participants = new Array(); this.stateChangeRecords = 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.contract.setValues(rawValues.contract); this.createdAt = this.getValue(rawValues, InsuranceContractQuotation.CREATED_AT_FIELD_NAME); this.description = this.getValue(rawValues, InsuranceContractQuotation.DESCRIPTION_FIELD_NAME); this.followUpDueAt = this.getValue(rawValues, InsuranceContractQuotation.FOLLOW_UP_DUE_AT_FIELD_NAME); this.id = this.getValue(rawValues, InsuranceContractQuotation.ID_FIELD_NAME); this.insuranceServiceRequest.setValues(rawValues.insuranceServiceRequest); 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.originatingContract.setValues(rawValues.originatingContract); this.fillModelArray(this, InsuranceContractQuotation.PARTICIPANTS_FIELD_NAME, rawValues.participants, BureauLeader, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, InsuranceContractQuotation.STATE_CHANGE_RECORDS_FIELD_NAME, rawValues.stateChangeRecords, StateChangeRecord, SubTypeFactory.createSubTypeInstance); this.status = this.getValue(rawValues, InsuranceContractQuotation.STATUS_FIELD_NAME); this.typeSelector = this.getValue(rawValues, InsuranceContractQuotation.TYPE_SELECTOR_FIELD_NAME); } } }