UNPKG

wallee

Version:
38 lines (37 loc) 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfRestAddressFormat = instanceOfRestAddressFormat; exports.RestAddressFormatFromJSON = RestAddressFormatFromJSON; exports.RestAddressFormatFromJSONTyped = RestAddressFormatFromJSONTyped; exports.RestAddressFormatToJSON = RestAddressFormatToJSON; exports.RestAddressFormatToJSONTyped = RestAddressFormatToJSONTyped; const RestAddressFormatField_1 = require("./RestAddressFormatField"); /** * Check if a given object implements the RestAddressFormat interface. */ function instanceOfRestAddressFormat(value) { return true; } function RestAddressFormatFromJSON(json) { return RestAddressFormatFromJSONTyped(json, false); } function RestAddressFormatFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'postCodeExamples': json['postCodeExamples'] == null ? undefined : json['postCodeExamples'], 'requiredFields': json['requiredFields'] == null ? undefined : (new Set(json['requiredFields'].map(RestAddressFormatField_1.RestAddressFormatFieldFromJSON))), 'usedFields': json['usedFields'] == null ? undefined : (new Set(json['usedFields'].map(RestAddressFormatField_1.RestAddressFormatFieldFromJSON))), 'postCodeRegex': json['postCodeRegex'] == null ? undefined : json['postCodeRegex'], }; } function RestAddressFormatToJSON(json) { return RestAddressFormatToJSONTyped(json, false); } function RestAddressFormatToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return {}; }