decode method

  1. @override
ApiOperation decode(
  1. dynamic value
)

Implementation

@override
ApiOperation decode(dynamic value) {
  switch (value) {
    case 'login':
      return ApiOperation.login;
    case 'create':
      return ApiOperation.create;
    case 'search':
      return ApiOperation.search;
    case 'update':
      return ApiOperation.update;
    case 'delete':
      return ApiOperation.delete;
    case 'bulk_create':
      return ApiOperation.bulkCreate;
    case 'bulk_update':
      return ApiOperation.bulkUpdate;
    case 'bulk_delete':
      return ApiOperation.bulkDelete;
    case 'single_create':
      return ApiOperation.singleCreate;
    default:
      throw MapperException.unknownEnumValue(value);
  }
}