wallee
Version:
TypeScript/JavaScript client for wallee
32 lines (31 loc) • 1 kB
JavaScript
import { LabelDescriptorFromJSON, LabelDescriptorToJSON, } from './LabelDescriptor';
/**
* Check if a given object implements the Label interface.
*/
export function instanceOfLabel(value) {
return true;
}
export function LabelFromJSON(json) {
return LabelFromJSONTyped(json, false);
}
export function LabelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'contentAsString': json['contentAsString'] == null ? undefined : json['contentAsString'],
'descriptor': json['descriptor'] == null ? undefined : LabelDescriptorFromJSON(json['descriptor']),
'content': json['content'] == null ? undefined : json['content'],
};
}
export function LabelToJSON(json) {
return LabelToJSONTyped(json, false);
}
export function LabelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'descriptor': LabelDescriptorToJSON(value['descriptor']),
};
}