getClassNameForObject method

  1. @override
String? getClassNameForObject(
  1. Object? data
)
override

Get the className for the provided object.

Implementation

@override
String? getClassNameForObject(Object? data) {
  String? className = super.getClassNameForObject(data);
  if (className != null) return className;

  if (data is Map<String, dynamic> && data['__className__'] is String) {
    return (data['__className__'] as String).replaceFirst('serverpod.', '');
  }

  switch (data) {
    case _i0ntvx71.RevokedAuthenticationAuthId():
      return 'RevokedAuthenticationAuthId';
    case _ivj17zej.RevokedAuthenticationScope():
      return 'RevokedAuthenticationScope';
    case _iubydmqj.RevokedAuthenticationUser():
      return 'RevokedAuthenticationUser';
    case _ihncus9g.CacheInfo():
      return 'CacheInfo';
    case _iuu4tkmh.CachesInfo():
      return 'CachesInfo';
    case _il44s43u.CloudStorageEntry():
      return 'CloudStorageEntry';
    case _i97jjzdk.CloudStorageDirectDownloadEntry():
      return 'CloudStorageDirectDownloadEntry';
    case _ihrv9246.CloudStorageDirectUploadEntry():
      return 'CloudStorageDirectUploadEntry';
    case _ix58cu06.ClusterInfo():
      return 'ClusterInfo';
    case _i0iseagh.ClusterServerInfo():
      return 'ClusterServerInfo';
    case _is8pd350.CronFutureCallScheduling():
      return 'CronFutureCallScheduling';
    case _i2x83mx1.DatabaseMigrationVersion():
      return 'DatabaseMigrationVersion';
    case _imsb8zuu.DistributedCacheEntry():
      return 'DistributedCacheEntry';
    case _ier2zjtm.AccessDeniedException():
      return 'AccessDeniedException';
    case _icej9e0v.FileNotFoundException():
      return 'FileNotFoundException';
    case _iil91lk2.FutureCallClaimEntry():
      return 'FutureCallClaimEntry';
    case _ipstj2hb.FutureCallEntry():
      return 'FutureCallEntry';
    case _is8pd350.IntervalFutureCallScheduling():
      return 'IntervalFutureCallScheduling';
    case _iv7ld46g.LogEntry():
      return 'LogEntry';
    case _iavjjqw5.LogLevel():
      return 'LogLevel';
    case _i6wf5evp.LogResult():
      return 'LogResult';
    case _illv0ea4.LogSettings():
      return 'LogSettings';
    case _i5sjxqb6.LogSettingsOverride():
      return 'LogSettingsOverride';
    case _iky1nb92.MessageLogEntry():
      return 'MessageLogEntry';
    case _iphoy7x3.MethodInfo():
      return 'MethodInfo';
    case _inqjskye.QueryLogEntry():
      return 'QueryLogEntry';
    case _i2c0cuss.ReadWriteTestEntry():
      return 'ReadWriteTestEntry';
    case _im7ye3v2.RuntimeSettings():
      return 'RuntimeSettings';
    case _igb3a02z.ServerHealthConnectionInfo():
      return 'ServerHealthConnectionInfo';
    case _i8823art.ServerHealthMetric():
      return 'ServerHealthMetric';
    case _ife0uun1.ServerHealthResult():
      return 'ServerHealthResult';
    case _i641wcmx.ServerpodSqlException():
      return 'ServerpodSqlException';
    case _i3jtimpl.SessionLogEntry():
      return 'SessionLogEntry';
    case _i2jy9zag.SessionLogFilter():
      return 'SessionLogFilter';
    case _i783h20h.SessionLogInfo():
      return 'SessionLogInfo';
    case _idz92mnt.SessionLogResult():
      return 'SessionLogResult';
  }
  className = _isd.Protocol().getClassNameForObject(data);
  if (className != null) {
    return className.contains('.')
        ? className
        : 'serverpod_database.$className';
  }
  return null;
}