fromJson static method

MappingMessageInfo fromJson(
  1. dynamic value
)

Returns a new MappingMessageInfo instance and imports its values from value if it's a Map, null otherwise.

Implementation

// ignore: prefer_constructors_over_static_methods
static MappingMessageInfo fromJson(dynamic value) {
  if (value is Map) {
    final json = value.cast<String, dynamic>();
    return MappingMessageInfo(
      mappingId: mapValueOfType<String>(json, r'MappingId'),
      ordinal: mapValueOfType<int>(json, r'Ordinal'),
      messageType: mapValueOfType<String>(json, r'MessageType'),
      source_: mapValueOfType<String>(json, r'Source'),
      message: mapValueOfType<String>(json, r'Message'),
      assetModelId: mapValueOfType<int>(json, r'AssetModelId'),
      entityId: mapValueOfType<int>(json, r'EntityId'),
      entityType: mapValueOfType<String>(json, r'EntityType'),
    );
  }
  return null;
}