wallee
Version:
TypeScript/JavaScript client for wallee
31 lines (30 loc) • 1.21 kB
JavaScript
import { RestAddressFormatFieldFromJSON, } from './RestAddressFormatField';
/**
* Check if a given object implements the RestAddressFormat interface.
*/
export function instanceOfRestAddressFormat(value) {
return true;
}
export function RestAddressFormatFromJSON(json) {
return RestAddressFormatFromJSONTyped(json, false);
}
export 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(RestAddressFormatFieldFromJSON))),
'usedFields': json['usedFields'] == null ? undefined : (new Set(json['usedFields'].map(RestAddressFormatFieldFromJSON))),
'postCodeRegex': json['postCodeRegex'] == null ? undefined : json['postCodeRegex'],
};
}
export function RestAddressFormatToJSON(json) {
return RestAddressFormatToJSONTyped(json, false);
}
export function RestAddressFormatToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {};
}