deserialize<T> method
Deserialize the provided json data
to an object of type t
or T
.
Implementation
@override
T deserialize<T>(
dynamic data, [
Type? t,
]) {
t ??= T;
if (customConstructors.containsKey(t)) {
return customConstructors[t]!(data, this) as T;
}
if (t == _i2.AuthKey) {
return _i2.AuthKey.fromJson(data, this) as T;
}
if (t == _i3.CacheInfo) {
return _i3.CacheInfo.fromJson(data, this) as T;
}
if (t == _i4.CachesInfo) {
return _i4.CachesInfo.fromJson(data, this) as T;
}
if (t == _i5.CloudStorageEntry) {
return _i5.CloudStorageEntry.fromJson(data, this) as T;
}
if (t == _i6.CloudStorageDirectUploadEntry) {
return _i6.CloudStorageDirectUploadEntry.fromJson(data, this) as T;
}
if (t == _i7.ClusterInfo) {
return _i7.ClusterInfo.fromJson(data, this) as T;
}
if (t == _i8.ClusterServerInfo) {
return _i8.ClusterServerInfo.fromJson(data, this) as T;
}
if (t == _i9.DistributedCacheEntry) {
return _i9.DistributedCacheEntry.fromJson(data, this) as T;
}
if (t == _i10.FutureCallEntry) {
return _i10.FutureCallEntry.fromJson(data, this) as T;
}
if (t == _i11.LogEntry) {
return _i11.LogEntry.fromJson(data, this) as T;
}
if (t == _i12.LogLevel) {
return _i12.LogLevel.fromJson(data) as T;
}
if (t == _i13.LogResult) {
return _i13.LogResult.fromJson(data, this) as T;
}
if (t == _i14.LogSettings) {
return _i14.LogSettings.fromJson(data, this) as T;
}
if (t == _i15.LogSettingsOverride) {
return _i15.LogSettingsOverride.fromJson(data, this) as T;
}
if (t == _i16.MessageLogEntry) {
return _i16.MessageLogEntry.fromJson(data, this) as T;
}
if (t == _i17.MethodInfo) {
return _i17.MethodInfo.fromJson(data, this) as T;
}
if (t == _i18.QueryLogEntry) {
return _i18.QueryLogEntry.fromJson(data, this) as T;
}
if (t == _i19.ReadWriteTestEntry) {
return _i19.ReadWriteTestEntry.fromJson(data, this) as T;
}
if (t == _i20.RuntimeSettings) {
return _i20.RuntimeSettings.fromJson(data, this) as T;
}
if (t == _i21.ServerHealthConnectionInfo) {
return _i21.ServerHealthConnectionInfo.fromJson(data, this) as T;
}
if (t == _i22.ServerHealthMetric) {
return _i22.ServerHealthMetric.fromJson(data, this) as T;
}
if (t == _i23.ServerHealthResult) {
return _i23.ServerHealthResult.fromJson(data, this) as T;
}
if (t == _i24.SessionLogEntry) {
return _i24.SessionLogEntry.fromJson(data, this) as T;
}
if (t == _i25.SessionLogFilter) {
return _i25.SessionLogFilter.fromJson(data, this) as T;
}
if (t == _i26.SessionLogInfo) {
return _i26.SessionLogInfo.fromJson(data, this) as T;
}
if (t == _i27.SessionLogResult) {
return _i27.SessionLogResult.fromJson(data, this) as T;
}
if (t == _i1.getType<_i2.AuthKey?>()) {
return (data != null ? _i2.AuthKey.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i3.CacheInfo?>()) {
return (data != null ? _i3.CacheInfo.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i4.CachesInfo?>()) {
return (data != null ? _i4.CachesInfo.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i5.CloudStorageEntry?>()) {
return (data != null ? _i5.CloudStorageEntry.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i6.CloudStorageDirectUploadEntry?>()) {
return (data != null
? _i6.CloudStorageDirectUploadEntry.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i7.ClusterInfo?>()) {
return (data != null ? _i7.ClusterInfo.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i8.ClusterServerInfo?>()) {
return (data != null ? _i8.ClusterServerInfo.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i9.DistributedCacheEntry?>()) {
return (data != null
? _i9.DistributedCacheEntry.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i10.FutureCallEntry?>()) {
return (data != null ? _i10.FutureCallEntry.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i11.LogEntry?>()) {
return (data != null ? _i11.LogEntry.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i12.LogLevel?>()) {
return (data != null ? _i12.LogLevel.fromJson(data) : null) as T;
}
if (t == _i1.getType<_i13.LogResult?>()) {
return (data != null ? _i13.LogResult.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i14.LogSettings?>()) {
return (data != null ? _i14.LogSettings.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i15.LogSettingsOverride?>()) {
return (data != null
? _i15.LogSettingsOverride.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i16.MessageLogEntry?>()) {
return (data != null ? _i16.MessageLogEntry.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i17.MethodInfo?>()) {
return (data != null ? _i17.MethodInfo.fromJson(data, this) : null) as T;
}
if (t == _i1.getType<_i18.QueryLogEntry?>()) {
return (data != null ? _i18.QueryLogEntry.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i19.ReadWriteTestEntry?>()) {
return (data != null
? _i19.ReadWriteTestEntry.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i20.RuntimeSettings?>()) {
return (data != null ? _i20.RuntimeSettings.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i21.ServerHealthConnectionInfo?>()) {
return (data != null
? _i21.ServerHealthConnectionInfo.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i22.ServerHealthMetric?>()) {
return (data != null
? _i22.ServerHealthMetric.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i23.ServerHealthResult?>()) {
return (data != null
? _i23.ServerHealthResult.fromJson(data, this)
: null) as T;
}
if (t == _i1.getType<_i24.SessionLogEntry?>()) {
return (data != null ? _i24.SessionLogEntry.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i25.SessionLogFilter?>()) {
return (data != null ? _i25.SessionLogFilter.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i26.SessionLogInfo?>()) {
return (data != null ? _i26.SessionLogInfo.fromJson(data, this) : null)
as T;
}
if (t == _i1.getType<_i27.SessionLogResult?>()) {
return (data != null ? _i27.SessionLogResult.fromJson(data, this) : null)
as T;
}
if (t == List<String>) {
return (data as List).map((e) => deserialize<String>(e)).toList()
as dynamic;
}
if (t == _i1.getType<List<String>?>()) {
return (data != null
? (data as List).map((e) => deserialize<String>(e)).toList()
: null) as dynamic;
}
if (t == List<_i28.ClusterServerInfo>) {
return (data as List)
.map((e) => deserialize<_i28.ClusterServerInfo>(e))
.toList() as dynamic;
}
if (t == List<_i28.LogEntry>) {
return (data as List).map((e) => deserialize<_i28.LogEntry>(e)).toList()
as dynamic;
}
if (t == List<_i28.LogSettingsOverride>) {
return (data as List)
.map((e) => deserialize<_i28.LogSettingsOverride>(e))
.toList() as dynamic;
}
if (t == List<_i28.ServerHealthMetric>) {
return (data as List)
.map((e) => deserialize<_i28.ServerHealthMetric>(e))
.toList() as dynamic;
}
if (t == List<_i28.ServerHealthConnectionInfo>) {
return (data as List)
.map((e) => deserialize<_i28.ServerHealthConnectionInfo>(e))
.toList() as dynamic;
}
if (t == List<_i28.QueryLogEntry>) {
return (data as List)
.map((e) => deserialize<_i28.QueryLogEntry>(e))
.toList() as dynamic;
}
if (t == List<_i28.MessageLogEntry>) {
return (data as List)
.map((e) => deserialize<_i28.MessageLogEntry>(e))
.toList() as dynamic;
}
if (t == List<_i28.SessionLogInfo>) {
return (data as List)
.map((e) => deserialize<_i28.SessionLogInfo>(e))
.toList() as dynamic;
}
return super.deserialize<T>(data, t);
}