/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { ICountryDataEntry, CountryDataEntry } from './country-data-entry.model'; import { ISubRegionDataEntry, SubRegionDataEntry } from './sub-region-data-entry.model'; export interface IRegionDataEntry { code?: string; countries?: Array; name?: string; subRegions?: Array; } export class RegionDataEntry extends BaseModel implements IRegionDataEntry { static CODE_FIELD_NAME = 'code'; static COUNTRIES_FIELD_NAME = 'countries'; static NAME_FIELD_NAME = 'name'; static SUB_REGIONS_FIELD_NAME = 'subRegions'; code: string; countries: Array; name: string; subRegions: Array; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.countries = new Array(); this.subRegions = 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.code = this.getValue(rawValues, RegionDataEntry.CODE_FIELD_NAME); this.fillModelArray(this, RegionDataEntry.COUNTRIES_FIELD_NAME, rawValues.countries, CountryDataEntry, SubTypeFactory.createSubTypeInstance); this.name = this.getValue(rawValues, RegionDataEntry.NAME_FIELD_NAME); this.fillModelArray(this, RegionDataEntry.SUB_REGIONS_FIELD_NAME, rawValues.subRegions, SubRegionDataEntry, SubTypeFactory.createSubTypeInstance); } } }