// GENERATED CODE - DO NOT MODIFY BY HAND part of 'hetzner_server_info.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** HetznerServerInfo _$HetznerServerInfoFromJson(Map json) => HetznerServerInfo( json['id'] as int, json['name'] as String, $enumDecode(_$ServerStatusEnumMap, json['status']), DateTime.parse(json['created'] as String), HetznerServerTypeInfo.fromJson( json['server_type'] as Map), HetznerServerInfo.locationFromJson(json['datacenter'] as Map), HetznerPublicNetInfo.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', }; HetznerPublicNetInfo _$HetznerPublicNetInfoFromJson( Map json) => HetznerPublicNetInfo( HetznerIp4.fromJson(json['ipv4'] as Map), ); HetznerIp4 _$HetznerIp4FromJson(Map json) => HetznerIp4( json['id'] as int, json['ip'] as String, json['blocked'] as bool, json['dns_ptr'] as String, ); HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson( Map json) => HetznerServerTypeInfo( json['cores'] as int, json['memory'] as num, json['disk'] as int, (json['prices'] as List) .map((e) => HetznerPriceInfo.fromJson(e as Map)) .toList(), ); HetznerPriceInfo _$HetznerPriceInfoFromJson(Map json) => HetznerPriceInfo( HetznerPriceInfo.getPrice(json['price_hourly'] as Map), HetznerPriceInfo.getPrice(json['price_monthly'] as Map), ); HetznerLocation _$HetznerLocationFromJson(Map json) => HetznerLocation( json['country'] as String, json['city'] as String, json['description'] as String, json['network_zone'] as String, );