/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IClause, Clause } from './clause.model'; import { ICustomClause, CustomClause } from './custom-clause.model'; import { IPredefinedClause, PredefinedClause } from './predefined-clause.model'; import { IContractWording, ContractWording } from './contract-wording.model'; import { IRiskCoverage, RiskCoverage } from './risk-coverage.model'; import { ICurrencyExchange, CurrencyExchange } from './currency-exchange.model'; import { IDocument, Document } from './document.model'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { IExternalContractReference, ExternalContractReference } from './external-contract-reference.model'; import { ICommission, Commission } from './commission.model'; import { IPremium, Premium } from './premium.model'; import { ISoftReference, SoftReference } from './soft-reference.model'; import { ILegalJurisdiction, LegalJurisdiction } from './legal-jurisdiction.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 { IInsuranceProduct, InsuranceProduct } from './insurance-product.model'; import { IStateChangeRecord, StateChangeRecord } from './state-change-record.model'; import { InsuranceBasis } from './enums'; import { ContractStatus } from './enums'; export interface IPrimaryInsuranceContract { clauses?: Array; contractWording?: IContractWording; coverages?: Array; creationDateTime?: Date; currencyExchanges?: Array; documents?: Array; effectivePeriod?: IBoundedPeriod; externalContractReferences?: Array; fees?: Array; id?: string; insuranceBasis?: InsuranceBasis; insuranceProgram?: ISoftReference; legalJurisdiction?: ILegalJurisdiction; masterContract?: ISoftReference; name?: string; partyRolesInContract?: Array; product?: IInsuranceProduct; referenceCurrency?: string; stateChangeRecords?: Array; status?: ContractStatus; typeSelector?: string; version?: number; } export class PrimaryInsuranceContract extends BaseModel implements IPrimaryInsuranceContract { static TYPE_SELECTOR = 'PrimaryInsuranceContract'; static CLAUSES_FIELD_NAME = 'clauses'; static CONTRACT_WORDING_FIELD_NAME = 'contractWording'; static COVERAGES_FIELD_NAME = 'coverages'; static CREATION_DATE_TIME_FIELD_NAME = 'creationDateTime'; static CURRENCY_EXCHANGES_FIELD_NAME = 'currencyExchanges'; static DOCUMENTS_FIELD_NAME = 'documents'; static EFFECTIVE_PERIOD_FIELD_NAME = 'effectivePeriod'; static EXTERNAL_CONTRACT_REFERENCES_FIELD_NAME = 'externalContractReferences'; static FEES_FIELD_NAME = 'fees'; static ID_FIELD_NAME = 'id'; static INSURANCE_BASIS_FIELD_NAME = 'insuranceBasis'; static INSURANCE_PROGRAM_FIELD_NAME = 'insuranceProgram'; static LEGAL_JURISDICTION_FIELD_NAME = 'legalJurisdiction'; static MASTER_CONTRACT_FIELD_NAME = 'masterContract'; static NAME_FIELD_NAME = 'name'; static PARTY_ROLES_IN_CONTRACT_FIELD_NAME = 'partyRolesInContract'; static PRODUCT_FIELD_NAME = 'product'; static REFERENCE_CURRENCY_FIELD_NAME = 'referenceCurrency'; static STATE_CHANGE_RECORDS_FIELD_NAME = 'stateChangeRecords'; static STATUS_FIELD_NAME = 'status'; static TYPE_SELECTOR_FIELD_NAME = 'typeSelector'; static VERSION_FIELD_NAME = 'version'; clauses: Array; contractWording: ContractWording; coverages: Array; creationDateTime: Date; currencyExchanges: Array; documents: Array; effectivePeriod: BoundedPeriod; externalContractReferences: Array; fees: Array; id: string; insuranceBasis: InsuranceBasis; insuranceProgram: SoftReference; legalJurisdiction: LegalJurisdiction; masterContract: SoftReference; name: string; partyRolesInContract: Array; product: InsuranceProduct; referenceCurrency: string; stateChangeRecords: Array; status: ContractStatus; 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 = PrimaryInsuranceContract.TYPE_SELECTOR; this.clauses = new Array(); this.contractWording = new ContractWording(); this.coverages = new Array(); this.currencyExchanges = new Array(); this.documents = new Array(); this.effectivePeriod = new BoundedPeriod(); this.externalContractReferences = new Array(); this.fees = new Array(); this.insuranceProgram = new SoftReference(); this.legalJurisdiction = new LegalJurisdiction(); this.masterContract = new SoftReference(); this.partyRolesInContract = new Array(); this.product = new InsuranceProduct(); 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.fillModelArray(this, PrimaryInsuranceContract.CLAUSES_FIELD_NAME, rawValues.clauses, Clause, SubTypeFactory.createSubTypeInstance); this.contractWording.setValues(rawValues.contractWording); this.fillModelArray(this, PrimaryInsuranceContract.COVERAGES_FIELD_NAME, rawValues.coverages, RiskCoverage, SubTypeFactory.createSubTypeInstance); this.creationDateTime = this.getValue(rawValues, PrimaryInsuranceContract.CREATION_DATE_TIME_FIELD_NAME); this.fillModelArray(this, PrimaryInsuranceContract.CURRENCY_EXCHANGES_FIELD_NAME, rawValues.currencyExchanges, CurrencyExchange, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, PrimaryInsuranceContract.DOCUMENTS_FIELD_NAME, rawValues.documents, Document, SubTypeFactory.createSubTypeInstance); this.effectivePeriod.setValues(rawValues.effectivePeriod); this.fillModelArray(this, PrimaryInsuranceContract.EXTERNAL_CONTRACT_REFERENCES_FIELD_NAME, rawValues.externalContractReferences, ExternalContractReference, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, PrimaryInsuranceContract.FEES_FIELD_NAME, rawValues.fees, Commission, SubTypeFactory.createSubTypeInstance); this.id = this.getValue(rawValues, PrimaryInsuranceContract.ID_FIELD_NAME); this.insuranceBasis = this.getValue(rawValues, PrimaryInsuranceContract.INSURANCE_BASIS_FIELD_NAME); this.insuranceProgram.setValues(rawValues.insuranceProgram); this.legalJurisdiction.setValues(rawValues.legalJurisdiction); this.masterContract.setValues(rawValues.masterContract); this.name = this.getValue(rawValues, PrimaryInsuranceContract.NAME_FIELD_NAME); this.fillModelArray(this, PrimaryInsuranceContract.PARTY_ROLES_IN_CONTRACT_FIELD_NAME, rawValues.partyRolesInContract, BureauLeader, SubTypeFactory.createSubTypeInstance); this.product.setValues(rawValues.product); this.referenceCurrency = this.getValue(rawValues, PrimaryInsuranceContract.REFERENCE_CURRENCY_FIELD_NAME); this.fillModelArray(this, PrimaryInsuranceContract.STATE_CHANGE_RECORDS_FIELD_NAME, rawValues.stateChangeRecords, StateChangeRecord, SubTypeFactory.createSubTypeInstance); this.status = this.getValue(rawValues, PrimaryInsuranceContract.STATUS_FIELD_NAME); this.typeSelector = this.getValue(rawValues, PrimaryInsuranceContract.TYPE_SELECTOR_FIELD_NAME); this.version = this.getValue(rawValues, PrimaryInsuranceContract.VERSION_FIELD_NAME); } } }