// GENERATED CODE - DO NOT MODIFY BY HAND part of 'provider_server_info.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** ProviderServerInfo _$ProviderServerInfoFromJson(Map json) => ProviderServerInfo( json['id'] as int, json['name'] as String, $enumDecode(_$ServerStatusEnumMap, json['status']), DateTime.parse(json['created'] as String), ProviderServerTypeInfo.fromJson( json['server_type'] as Map), ProviderServerInfo.locationFromJson(json['datacenter'] as Map), ProviderPublicNetInfo.fromJson( json['public_net'] as Map), (json['volumes'] as List).map((e) => e as int).toList(), ); const _$ServerStatusEnumMap = { ServerStatus.running: 'running', ServerStatus.initializing: 'initializing', ServerStatus.starting: 'starting', ServerStatus.stopping: 'stopping', ServerStatus.off: 'off', ServerStatus.deleting: 'deleting', ServerStatus.migrating: 'migrating', ServerStatus.rebuilding: 'rebuilding', ServerStatus.unknown: 'unknown', }; ProviderPublicNetInfo _$ProviderPublicNetInfoFromJson( Map json) => ProviderPublicNetInfo( ProviderIp4.fromJson(json['ipv4'] as Map), ); ProviderIp4 _$ProviderIp4FromJson(Map json) => ProviderIp4( json['id'] as int, json['ip'] as String, json['blocked'] as bool, json['dns_ptr'] as String, ); ProviderServerTypeInfo _$ProviderServerTypeInfoFromJson( Map json) => ProviderServerTypeInfo( json['cores'] as int, json['memory'] as num, json['disk'] as int, (json['prices'] as List) .map((e) => ProviderPriceInfo.fromJson(e as Map)) .toList(), ); ProviderPriceInfo _$ProviderPriceInfoFromJson(Map json) => ProviderPriceInfo( ProviderPriceInfo.getPrice(json['price_hourly'] as Map), ProviderPriceInfo.getPrice(json['price_monthly'] as Map), ); ProviderLocation _$ProviderLocationFromJson(Map json) => ProviderLocation( json['country'] as String, json['city'] as String, json['description'] as String, json['network_zone'] as String, );