/** * 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 { ICountrySubdivisionDataEntry, CountrySubdivisionDataEntry } from './country-subdivision-data-entry.model'; import { IRegionDataEntry, RegionDataEntry } from './region-data-entry.model'; import { ISubRegionDataEntry, SubRegionDataEntry } from './sub-region-data-entry.model'; export interface ILocationMasterData { countries?: Array; countrySubdivisions?: Array; regions?: Array; subRegions?: Array; } export class LocationMasterData extends BaseModel implements ILocationMasterData { static COUNTRIES_FIELD_NAME = 'countries'; static COUNTRY_SUBDIVISIONS_FIELD_NAME = 'countrySubdivisions'; static REGIONS_FIELD_NAME = 'regions'; static SUB_REGIONS_FIELD_NAME = 'subRegions'; countries: Array; countrySubdivisions: Array; regions: Array; 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.countrySubdivisions = new Array(); this.regions = 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.fillModelArray(this, LocationMasterData.COUNTRIES_FIELD_NAME, rawValues.countries, CountryDataEntry, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, LocationMasterData.COUNTRY_SUBDIVISIONS_FIELD_NAME, rawValues.countrySubdivisions, CountrySubdivisionDataEntry, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, LocationMasterData.REGIONS_FIELD_NAME, rawValues.regions, RegionDataEntry, SubTypeFactory.createSubTypeInstance); this.fillModelArray(this, LocationMasterData.SUB_REGIONS_FIELD_NAME, rawValues.subRegions, SubRegionDataEntry, SubTypeFactory.createSubTypeInstance); } } }