/** * 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 { IDocument, Document } from './document.model'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { ICompany, Company } from './company.model'; import { IPerson, Person } from './person.model'; import { IRiskScope, RiskScope } from './risk-scope.model'; import { IStateChangeRecord, StateChangeRecord } from './state-change-record.model'; import { IMoney, Money } from './money.model'; export interface IReinsuranceTreaty { cededPortfolios?: Array; description?: string; documents?: Array; effectivePeriod?: IBoundedPeriod; id?: string; name: string; owner?: ICompany | IPerson; referenceCurrency?: string; scopesCovered?: Array; stateChangeRecordDtos?: Array; totalPremium?: IMoney; totalSumInsured?: IMoney; } export class ReinsuranceTreaty extends BaseModel implements IReinsuranceTreaty { static CEDED_PORTFOLIOS_FIELD_NAME = 'cededPortfolios'; static DESCRIPTION_FIELD_NAME = 'description'; static DOCUMENTS_FIELD_NAME = 'documents'; static EFFECTIVE_PERIOD_FIELD_NAME = 'effectivePeriod'; static ID_FIELD_NAME = 'id'; static NAME_FIELD_NAME = 'name'; static OWNER_FIELD_NAME = 'owner'; static REFERENCE_CURRENCY_FIELD_NAME = 'referenceCurrency'; static SCOPES_COVERED_FIELD_NAME = 'scopesCovered'; static STATE_CHANGE_RECORD_DTOS_FIELD_NAME = 'stateChangeRecordDtos'; static TOTAL_PREMIUM_FIELD_NAME = 'totalPremium'; static TOTAL_SUM_INSURED_FIELD_NAME = 'totalSumInsured'; cededPortfolios: Array; description: string; documents: Array; effectivePeriod: BoundedPeriod; id: string; name: string; owner: Company | Person; referenceCurrency: string; scopesCovered: Array; stateChangeRecordDtos: Array; totalPremium: Money; totalSumInsured: Money; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.cededPortfolios = new Array(); this.documents = new Array(); this.effectivePeriod = new BoundedPeriod(); this.owner = new Company(); this.scopesCovered = new Array(); this.stateChangeRecordDtos = new Array(); this.totalPremium = new Money(); this.totalSumInsured = new Money(); 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, ReinsuranceTreaty.CEDED_PORTFOLIOS_FIELD_NAME, rawValues.cededPortfolios, SoftReference, SubTypeFactory.createSubTypeInstance); this.description = this.getValue(rawValues, ReinsuranceTreaty.DESCRIPTION_FIELD_NAME); this.fillModelArray(this, ReinsuranceTreaty.DOCUMENTS_FIELD_NAME, rawValues.documents, Document, SubTypeFactory.createSubTypeInstance); this.effectivePeriod.setValues(rawValues.effectivePeriod); this.id = this.getValue(rawValues, ReinsuranceTreaty.ID_FIELD_NAME); this.name = this.getValue(rawValues, ReinsuranceTreaty.NAME_FIELD_NAME); if (rawValues.owner && rawValues.owner.typeSelector && this.owner.typeSelector !== rawValues.owner.typeSelector) { this.owner = SubTypeFactory.createSubTypeInstance(rawValues.owner) as Company | Person; } this.owner.setValues(rawValues.owner); this.referenceCurrency = this.getValue(rawValues, ReinsuranceTreaty.REFERENCE_CURRENCY_FIELD_NAME); this.fillModelArray(this, ReinsuranceTreaty.SCOPES_COVERED_FIELD_NAME, rawValues.scopesCovered, RiskScope, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, ReinsuranceTreaty.STATE_CHANGE_RECORD_DTOS_FIELD_NAME, rawValues.stateChangeRecordDtos, StateChangeRecord, SubTypeFactory.createSubTypeInstance); this.totalPremium.setValues(rawValues.totalPremium); this.totalSumInsured.setValues(rawValues.totalSumInsured); } } }