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