/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IInterest, Interest } from './interest.model'; import { IGeographicLocation, GeographicLocation } from './geographic-location.model'; import { ICountry, Country } from './country.model'; import { ICountrySubdivision, CountrySubdivision } from './country-subdivision.model'; import { IPeril, Peril } from './peril.model'; import { IRiskType, RiskType } from './risk-type.model'; import { InsuranceType } from './enums'; export interface IRiskScope { insuranceTypes?: Array; interests?: Array; locations?: Array; perils?: Array; riskTypes?: Array; } export class RiskScope extends BaseModel implements IRiskScope { static INSURANCE_TYPES_FIELD_NAME = 'insuranceTypes'; static INTERESTS_FIELD_NAME = 'interests'; static LOCATIONS_FIELD_NAME = 'locations'; static PERILS_FIELD_NAME = 'perils'; static RISK_TYPES_FIELD_NAME = 'riskTypes'; insuranceTypes: Array; interests: Array; locations: Array; perils: Array; riskTypes: Array; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.insuranceTypes = new Array(); this.interests = new Array(); this.locations = new Array(); this.perils = new Array(); this.riskTypes = 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, RiskScope.INSURANCE_TYPES_FIELD_NAME, rawValues.insuranceTypes); this.fillModelArray(this, RiskScope.INTERESTS_FIELD_NAME, rawValues.interests, Interest, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskScope.LOCATIONS_FIELD_NAME, rawValues.locations, GeographicLocation, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskScope.PERILS_FIELD_NAME, rawValues.perils, Peril, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, RiskScope.RISK_TYPES_FIELD_NAME, rawValues.riskTypes, RiskType, SubTypeFactory.createSubTypeInstance); } } }