toJson static method
Creates Map
from Class Object
Implementation
static MapEntry<String, dynamic> toJson(Si1TypeDef value) {
switch (value.kind) {
case 'Composite':
return MapEntry(
value.kind, (value as Si1TypeDef_Composite).value.toJson());
case 'Variant':
return MapEntry(
value.kind, (value as Si1TypeDef_Variant).value.toJson());
case 'Sequence':
return MapEntry(
value.kind, (value as Si1TypeDef_Sequence).value.toJson());
case 'Array':
return MapEntry(value.kind, (value as Si1TypeDef_Array).value.toJson());
case 'Tuple':
return MapEntry(value.kind, (value as Si1TypeDef_Tuple).value);
case 'Primitive':
return MapEntry(value.kind, (value as Si1TypeDef_Primitive).value.kind);
case 'Compact':
return MapEntry(
value.kind, (value as Si1TypeDef_Compact).value.toJson());
case 'BitSequence':
return MapEntry(
value.kind, (value as Si1TypeDef_BitSequence).value.toJson());
default:
throw UnexpectedTypeException('Unexpected type: ${value.kind}');
}
}