UNPKG

wallee

Version:
42 lines (41 loc) 1.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfRestCountry = instanceOfRestCountry; exports.RestCountryFromJSON = RestCountryFromJSON; exports.RestCountryFromJSONTyped = RestCountryFromJSONTyped; exports.RestCountryToJSON = RestCountryToJSON; exports.RestCountryToJSONTyped = RestCountryToJSONTyped; const RestAddressFormat_1 = require("./RestAddressFormat"); /** * Check if a given object implements the RestCountry interface. */ function instanceOfRestCountry(value) { return true; } function RestCountryFromJSON(json) { return RestCountryFromJSONTyped(json, false); } function RestCountryFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'isoCode2': json['isoCode2'] == null ? undefined : json['isoCode2'], 'addressFormat': json['addressFormat'] == null ? undefined : (0, RestAddressFormat_1.RestAddressFormatFromJSON)(json['addressFormat']), 'isoCode3': json['isoCode3'] == null ? undefined : json['isoCode3'], 'stateCodes': json['stateCodes'] == null ? undefined : new Set(json['stateCodes']), 'name': json['name'] == null ? undefined : json['name'], 'numericCode': json['numericCode'] == null ? undefined : json['numericCode'], }; } function RestCountryToJSON(json) { return RestCountryToJSONTyped(json, false); } function RestCountryToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'addressFormat': (0, RestAddressFormat_1.RestAddressFormatToJSON)(value['addressFormat']), }; }