diff --git a/lib/gateways/v6/api_gateway_v6.dart b/lib/gateways/v6/api_gateway_v6.dart index f442ce72..905263e1 100644 --- a/lib/gateways/v6/api_gateway_v6.dart +++ b/lib/gateways/v6/api_gateway_v6.dart @@ -3,19 +3,21 @@ import 'dart:convert'; import 'dart:io'; import 'package:http/http.dart'; import 'package:http/http.dart' as http; -import 'package:pi_hole_client/functions/convert.dart'; -import 'package:pi_hole_client/models/api/v6/auth/auth.dart'; -import 'package:pi_hole_client/models/api/v6/dns/dns.dart'; +// import 'package:pi_hole_client/functions/convert.dart'; +import 'package:pi_hole_client/models/api/v6/auth/auth.dart' as v6; +import 'package:pi_hole_client/models/api/v6/dns/dns.dart' as v6; +import 'package:pi_hole_client/models/api/v6/flt/ftl.dart' as v6; +import 'package:pi_hole_client/models/api/v6/metrics/stats.dart' as v6; import 'package:pi_hole_client/models/app_log.dart'; import 'package:pi_hole_client/models/domain.dart'; -import 'package:pi_hole_client/functions/encode_basic_auth.dart'; +// import 'package:pi_hole_client/functions/encode_basic_auth.dart'; import 'package:pi_hole_client/models/gateways.dart'; -import 'package:pi_hole_client/models/log.dart'; -import 'package:pi_hole_client/models/overtime_data.dart'; +// import 'package:pi_hole_client/models/log.dart'; +// import 'package:pi_hole_client/models/overtime_data.dart'; import 'package:pi_hole_client/models/realtime_status.dart'; import 'package:pi_hole_client/models/server.dart'; import 'package:pi_hole_client/gateways/api_gateway_interface.dart'; -import 'package:pi_hole_client/functions/logger.dart'; +// import 'package:pi_hole_client/functions/logger.dart'; class ApiGatewayV6 implements ApiGateway { final Server server; @@ -145,7 +147,7 @@ class ApiGatewayV6 implements ApiGateway { // Login if (status.statusCode == 200) { - final statusParsed = Session.fromJson(jsonDecode(status.body)); + final statusParsed = v6.Session.fromJson(jsonDecode(status.body)); sid = statusParsed.session.sid; // Get DNS blocking status @@ -153,7 +155,7 @@ class ApiGatewayV6 implements ApiGateway { method: 'get', url: '${server.address}/api/dns/blocking'); if (enableOrDisable.statusCode == 200) { final enableOrDisableParsed = - Blocking.fromJson(jsonDecode(enableOrDisable.body)); + v6.Blocking.fromJson(jsonDecode(enableOrDisable.body)); return LoginQueryResponse( result: APiResponseType.success, status: enableOrDisableParsed.blocking, @@ -231,7 +233,86 @@ class ApiGatewayV6 implements ApiGateway { /// data in a structured format. @override Future realtimeStatus() async { - throw UnimplementedError(); + try { + final response = await Future.wait([ + httpClient( + method: 'get', + url: '${server.address}/api/stats/summary', + ), + httpClient( + method: 'get', + url: '${server.address}/api/info/ftl', + ), + httpClient( + method: 'get', + url: '${server.address}/api/dns/blocking', + ), + httpClient( + method: 'get', + url: '${server.address}/api/stats/top_domains', + ), + httpClient( + method: 'get', + url: '${server.address}/api/stats/top_domains?blocked=true', + ), + httpClient( + method: 'get', + url: '${server.address}/api/stats/top_clients', + ), + httpClient( + method: 'get', + url: '${server.address}/api/stats/top_clients?blocked=true', + ), + httpClient( + method: 'get', + url: '${server.address}/api/stats/upstreams', + ), + ]); + if (response[0].statusCode == 200 && + response[1].statusCode == 200 && + response[2].statusCode == 200 && + response[3].statusCode == 200 && + response[4].statusCode == 200 && + response[5].statusCode == 200 && + response[6].statusCode == 200 && + response[7].statusCode == 200) { + final summary = v6.StatsSummary.fromJson(jsonDecode(response[0].body)); + final infoFtl = v6.InfoFtl.fromJson(jsonDecode(response[1].body)); + final blocking = v6.Blocking.fromJson(jsonDecode(response[2].body)); + final topPermittedDomains = + v6.StatsTopDomains.fromJson(jsonDecode(response[3].body)); + final topBlockedDomains = + v6.StatsTopDomains.fromJson(jsonDecode(response[4].body)); + final topClients = + v6.StatsTopClients.fromJson(jsonDecode(response[5].body)); + final topBlockedClients = + v6.StatsTopClients.fromJson(jsonDecode(response[6].body)); + final upstreams = + v6.StatsUpstreams.fromJson(jsonDecode(response[7].body)); + + return RealtimeStatusResponse( + result: APiResponseType.success, + data: RealtimeStatus.fromV6( + summary, + infoFtl, + blocking, + topPermittedDomains, + topBlockedDomains, + topClients, + topBlockedClients, + upstreams)); + } else { + return RealtimeStatusResponse(result: APiResponseType.error); + } + } on SocketException { + return RealtimeStatusResponse(result: APiResponseType.socket); + } on TimeoutException { + return RealtimeStatusResponse(result: APiResponseType.timeout); + } on HandshakeException { + return RealtimeStatusResponse(result: APiResponseType.sslError); + } catch (e) { + return RealtimeStatusResponse(result: APiResponseType.error); + } } /// Disables a Pi-hole server diff --git a/lib/models/api/v6/auth/auth.dart b/lib/models/api/v6/auth/auth.dart index 2ce61dc1..70951b39 100644 --- a/lib/models/api/v6/auth/auth.dart +++ b/lib/models/api/v6/auth/auth.dart @@ -17,6 +17,7 @@ class Password with _$Password { class Session with _$Session { factory Session({ required SessionDetail session, + required double took, }) = _Session; factory Session.fromJson(Map json) => diff --git a/lib/models/api/v6/auth/auth.freezed.dart b/lib/models/api/v6/auth/auth.freezed.dart index f68e8238..d493c52d 100644 --- a/lib/models/api/v6/auth/auth.freezed.dart +++ b/lib/models/api/v6/auth/auth.freezed.dart @@ -170,6 +170,7 @@ Session _$SessionFromJson(Map json) { /// @nodoc mixin _$Session { SessionDetail get session => throw _privateConstructorUsedError; + double get took => throw _privateConstructorUsedError; /// Serializes this Session to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -185,7 +186,7 @@ abstract class $SessionCopyWith<$Res> { factory $SessionCopyWith(Session value, $Res Function(Session) then) = _$SessionCopyWithImpl<$Res, Session>; @useResult - $Res call({SessionDetail session}); + $Res call({SessionDetail session, double took}); $SessionDetailCopyWith<$Res> get session; } @@ -206,12 +207,17 @@ class _$SessionCopyWithImpl<$Res, $Val extends Session> @override $Res call({ Object? session = null, + Object? took = null, }) { return _then(_value.copyWith( session: null == session ? _value.session : session // ignore: cast_nullable_to_non_nullable as SessionDetail, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, ) as $Val); } @@ -233,7 +239,7 @@ abstract class _$$SessionImplCopyWith<$Res> implements $SessionCopyWith<$Res> { __$$SessionImplCopyWithImpl<$Res>; @override @useResult - $Res call({SessionDetail session}); + $Res call({SessionDetail session, double took}); @override $SessionDetailCopyWith<$Res> get session; @@ -253,12 +259,17 @@ class __$$SessionImplCopyWithImpl<$Res> @override $Res call({ Object? session = null, + Object? took = null, }) { return _then(_$SessionImpl( session: null == session ? _value.session : session // ignore: cast_nullable_to_non_nullable as SessionDetail, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, )); } } @@ -266,17 +277,19 @@ class __$$SessionImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$SessionImpl implements _Session { - _$SessionImpl({required this.session}); + _$SessionImpl({required this.session, required this.took}); factory _$SessionImpl.fromJson(Map json) => _$$SessionImplFromJson(json); @override final SessionDetail session; + @override + final double took; @override String toString() { - return 'Session(session: $session)'; + return 'Session(session: $session, took: $took)'; } @override @@ -284,12 +297,13 @@ class _$SessionImpl implements _Session { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SessionImpl && - (identical(other.session, session) || other.session == session)); + (identical(other.session, session) || other.session == session) && + (identical(other.took, took) || other.took == took)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, session); + int get hashCode => Object.hash(runtimeType, session, took); /// Create a copy of Session /// with the given fields replaced by the non-null parameter values. @@ -308,12 +322,16 @@ class _$SessionImpl implements _Session { } abstract class _Session implements Session { - factory _Session({required final SessionDetail session}) = _$SessionImpl; + factory _Session( + {required final SessionDetail session, + required final double took}) = _$SessionImpl; factory _Session.fromJson(Map json) = _$SessionImpl.fromJson; @override SessionDetail get session; + @override + double get took; /// Create a copy of Session /// with the given fields replaced by the non-null parameter values. diff --git a/lib/models/api/v6/auth/auth.g.dart b/lib/models/api/v6/auth/auth.g.dart index 0735915a..099f1c03 100644 --- a/lib/models/api/v6/auth/auth.g.dart +++ b/lib/models/api/v6/auth/auth.g.dart @@ -19,11 +19,13 @@ Map _$$PasswordImplToJson(_$PasswordImpl instance) => _$SessionImpl _$$SessionImplFromJson(Map json) => _$SessionImpl( session: SessionDetail.fromJson(json['session'] as Map), + took: (json['took'] as num).toDouble(), ); Map _$$SessionImplToJson(_$SessionImpl instance) => { 'session': instance.session, + 'took': instance.took, }; _$SessionDetailImpl _$$SessionDetailImplFromJson(Map json) => diff --git a/lib/models/api/v6/flt/ftl.dart b/lib/models/api/v6/flt/ftl.dart new file mode 100644 index 00000000..47a9525f --- /dev/null +++ b/lib/models/api/v6/flt/ftl.dart @@ -0,0 +1,103 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'ftl.freezed.dart'; +part 'ftl.g.dart'; + +@freezed +class InfoFtl with _$InfoFtl { + const factory InfoFtl({ + required Ftl ftl, + required double took, + }) = _InfoFtl; + + factory InfoFtl.fromJson(Map json) => + _$InfoFtlFromJson(json); +} + +@freezed +class Ftl with _$Ftl { + const factory Ftl({ + required Database database, + @JsonKey(name: 'privacy_level') required int privacyLevel, + required Clients clients, + required int pid, + required int uptime, + @JsonKey(name: '%mem') required double memPercentage, + @JsonKey(name: '%cpu') required double cpuPercentage, + @JsonKey(name: 'allow_destructive') required bool allowDestructive, + required Dnsmasq dnsmasq, + }) = _Ftl; + + factory Ftl.fromJson(Map json) => _$FtlFromJson(json); +} + +@freezed +class Database with _$Database { + const factory Database({ + required int gravity, + required int groups, + required int lists, + required int clients, + required Domains domains, + }) = _Database; + + factory Database.fromJson(Map json) => + _$DatabaseFromJson(json); +} + +@freezed +class Domains with _$Domains { + const factory Domains({ + required int allowed, + required int denied, + }) = _Domains; + + factory Domains.fromJson(Map json) => + _$DomainsFromJson(json); +} + +@freezed +class Clients with _$Clients { + const factory Clients({ + required int total, + required int active, + }) = _Clients; + + factory Clients.fromJson(Map json) => + _$ClientsFromJson(json); +} + +@freezed +class Dnsmasq with _$Dnsmasq { + const factory Dnsmasq({ + @JsonKey(name: 'dns_cache_inserted') required int dnsCacheInserted, + @JsonKey(name: 'dns_cache_live_freed') required int dnsCacheLiveFreed, + @JsonKey(name: 'dns_queries_forwarded') required int dnsQueriesForwarded, + @JsonKey(name: 'dns_auth_answered') required int dnsAuthAnswered, + @JsonKey(name: 'dns_local_answered') required int dnsLocalAnswered, + @JsonKey(name: 'dns_stale_answered') required int dnsStaleAnswered, + @JsonKey(name: 'dns_unanswered') required int dnsUnanswered, + @JsonKey(name: 'bootp') required int bootp, + @JsonKey(name: 'pxe') required int pxe, + @JsonKey(name: 'dhcp_ack') required int dhcpAck, + @JsonKey(name: 'dhcp_decline') required int dhcpDecline, + @JsonKey(name: 'dhcp_discover') required int dhcpDiscover, + @JsonKey(name: 'dhcp_inform') required int dhcpInform, + @JsonKey(name: 'dhcp_nak') required int dhcpNak, + @JsonKey(name: 'dhcp_offer') required int dhcpOffer, + @JsonKey(name: 'dhcp_release') required int dhcpRelease, + @JsonKey(name: 'dhcp_request') required int dhcpRequest, + @JsonKey(name: 'noanswer') required int noAnswer, + @JsonKey(name: 'leases_allocated_4') required int leasesAllocated4, + @JsonKey(name: 'leases_pruned_4') required int leasesPruned4, + @JsonKey(name: 'leases_allocated_6') required int leasesAllocated6, + @JsonKey(name: 'leases_pruned_6') required int leasesPruned6, + @JsonKey(name: 'tcp_connections') required int tcpConnections, + @JsonKey(name: 'dnssec_max_crypto_use') required int dnssecMaxCryptoUse, + @JsonKey(name: 'dnssec_max_sig_fail') required int dnssecMaxSigFail, + @JsonKey(name: 'dnssec_max_work') required int dnssecMaxWork, + }) = _Dnsmasq; + + factory Dnsmasq.fromJson(Map json) => + _$DnsmasqFromJson(json); +} diff --git a/lib/models/api/v6/flt/ftl.freezed.dart b/lib/models/api/v6/flt/ftl.freezed.dart new file mode 100644 index 00000000..8181f90d --- /dev/null +++ b/lib/models/api/v6/flt/ftl.freezed.dart @@ -0,0 +1,1899 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'ftl.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +InfoFtl _$InfoFtlFromJson(Map json) { + return _InfoFtl.fromJson(json); +} + +/// @nodoc +mixin _$InfoFtl { + Ftl get ftl => throw _privateConstructorUsedError; + double get took => throw _privateConstructorUsedError; + + /// Serializes this InfoFtl to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of InfoFtl + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $InfoFtlCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $InfoFtlCopyWith<$Res> { + factory $InfoFtlCopyWith(InfoFtl value, $Res Function(InfoFtl) then) = + _$InfoFtlCopyWithImpl<$Res, InfoFtl>; + @useResult + $Res call({Ftl ftl, double took}); + + $FtlCopyWith<$Res> get ftl; +} + +/// @nodoc +class _$InfoFtlCopyWithImpl<$Res, $Val extends InfoFtl> + implements $InfoFtlCopyWith<$Res> { + _$InfoFtlCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of InfoFtl + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? ftl = null, + Object? took = null, + }) { + return _then(_value.copyWith( + ftl: null == ftl + ? _value.ftl + : ftl // ignore: cast_nullable_to_non_nullable + as Ftl, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } + + /// Create a copy of InfoFtl + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $FtlCopyWith<$Res> get ftl { + return $FtlCopyWith<$Res>(_value.ftl, (value) { + return _then(_value.copyWith(ftl: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$InfoFtlImplCopyWith<$Res> implements $InfoFtlCopyWith<$Res> { + factory _$$InfoFtlImplCopyWith( + _$InfoFtlImpl value, $Res Function(_$InfoFtlImpl) then) = + __$$InfoFtlImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({Ftl ftl, double took}); + + @override + $FtlCopyWith<$Res> get ftl; +} + +/// @nodoc +class __$$InfoFtlImplCopyWithImpl<$Res> + extends _$InfoFtlCopyWithImpl<$Res, _$InfoFtlImpl> + implements _$$InfoFtlImplCopyWith<$Res> { + __$$InfoFtlImplCopyWithImpl( + _$InfoFtlImpl _value, $Res Function(_$InfoFtlImpl) _then) + : super(_value, _then); + + /// Create a copy of InfoFtl + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? ftl = null, + Object? took = null, + }) { + return _then(_$InfoFtlImpl( + ftl: null == ftl + ? _value.ftl + : ftl // ignore: cast_nullable_to_non_nullable + as Ftl, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$InfoFtlImpl implements _InfoFtl { + const _$InfoFtlImpl({required this.ftl, required this.took}); + + factory _$InfoFtlImpl.fromJson(Map json) => + _$$InfoFtlImplFromJson(json); + + @override + final Ftl ftl; + @override + final double took; + + @override + String toString() { + return 'InfoFtl(ftl: $ftl, took: $took)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InfoFtlImpl && + (identical(other.ftl, ftl) || other.ftl == ftl) && + (identical(other.took, took) || other.took == took)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, ftl, took); + + /// Create a copy of InfoFtl + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$InfoFtlImplCopyWith<_$InfoFtlImpl> get copyWith => + __$$InfoFtlImplCopyWithImpl<_$InfoFtlImpl>(this, _$identity); + + @override + Map toJson() { + return _$$InfoFtlImplToJson( + this, + ); + } +} + +abstract class _InfoFtl implements InfoFtl { + const factory _InfoFtl({required final Ftl ftl, required final double took}) = + _$InfoFtlImpl; + + factory _InfoFtl.fromJson(Map json) = _$InfoFtlImpl.fromJson; + + @override + Ftl get ftl; + @override + double get took; + + /// Create a copy of InfoFtl + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$InfoFtlImplCopyWith<_$InfoFtlImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Ftl _$FtlFromJson(Map json) { + return _Ftl.fromJson(json); +} + +/// @nodoc +mixin _$Ftl { + Database get database => throw _privateConstructorUsedError; + @JsonKey(name: 'privacy_level') + int get privacyLevel => throw _privateConstructorUsedError; + Clients get clients => throw _privateConstructorUsedError; + int get pid => throw _privateConstructorUsedError; + int get uptime => throw _privateConstructorUsedError; + @JsonKey(name: '%mem') + double get memPercentage => throw _privateConstructorUsedError; + @JsonKey(name: '%cpu') + double get cpuPercentage => throw _privateConstructorUsedError; + @JsonKey(name: 'allow_destructive') + bool get allowDestructive => throw _privateConstructorUsedError; + Dnsmasq get dnsmasq => throw _privateConstructorUsedError; + + /// Serializes this Ftl to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $FtlCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $FtlCopyWith<$Res> { + factory $FtlCopyWith(Ftl value, $Res Function(Ftl) then) = + _$FtlCopyWithImpl<$Res, Ftl>; + @useResult + $Res call( + {Database database, + @JsonKey(name: 'privacy_level') int privacyLevel, + Clients clients, + int pid, + int uptime, + @JsonKey(name: '%mem') double memPercentage, + @JsonKey(name: '%cpu') double cpuPercentage, + @JsonKey(name: 'allow_destructive') bool allowDestructive, + Dnsmasq dnsmasq}); + + $DatabaseCopyWith<$Res> get database; + $ClientsCopyWith<$Res> get clients; + $DnsmasqCopyWith<$Res> get dnsmasq; +} + +/// @nodoc +class _$FtlCopyWithImpl<$Res, $Val extends Ftl> implements $FtlCopyWith<$Res> { + _$FtlCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? database = null, + Object? privacyLevel = null, + Object? clients = null, + Object? pid = null, + Object? uptime = null, + Object? memPercentage = null, + Object? cpuPercentage = null, + Object? allowDestructive = null, + Object? dnsmasq = null, + }) { + return _then(_value.copyWith( + database: null == database + ? _value.database + : database // ignore: cast_nullable_to_non_nullable + as Database, + privacyLevel: null == privacyLevel + ? _value.privacyLevel + : privacyLevel // ignore: cast_nullable_to_non_nullable + as int, + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as Clients, + pid: null == pid + ? _value.pid + : pid // ignore: cast_nullable_to_non_nullable + as int, + uptime: null == uptime + ? _value.uptime + : uptime // ignore: cast_nullable_to_non_nullable + as int, + memPercentage: null == memPercentage + ? _value.memPercentage + : memPercentage // ignore: cast_nullable_to_non_nullable + as double, + cpuPercentage: null == cpuPercentage + ? _value.cpuPercentage + : cpuPercentage // ignore: cast_nullable_to_non_nullable + as double, + allowDestructive: null == allowDestructive + ? _value.allowDestructive + : allowDestructive // ignore: cast_nullable_to_non_nullable + as bool, + dnsmasq: null == dnsmasq + ? _value.dnsmasq + : dnsmasq // ignore: cast_nullable_to_non_nullable + as Dnsmasq, + ) as $Val); + } + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $DatabaseCopyWith<$Res> get database { + return $DatabaseCopyWith<$Res>(_value.database, (value) { + return _then(_value.copyWith(database: value) as $Val); + }); + } + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $ClientsCopyWith<$Res> get clients { + return $ClientsCopyWith<$Res>(_value.clients, (value) { + return _then(_value.copyWith(clients: value) as $Val); + }); + } + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $DnsmasqCopyWith<$Res> get dnsmasq { + return $DnsmasqCopyWith<$Res>(_value.dnsmasq, (value) { + return _then(_value.copyWith(dnsmasq: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$FtlImplCopyWith<$Res> implements $FtlCopyWith<$Res> { + factory _$$FtlImplCopyWith(_$FtlImpl value, $Res Function(_$FtlImpl) then) = + __$$FtlImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {Database database, + @JsonKey(name: 'privacy_level') int privacyLevel, + Clients clients, + int pid, + int uptime, + @JsonKey(name: '%mem') double memPercentage, + @JsonKey(name: '%cpu') double cpuPercentage, + @JsonKey(name: 'allow_destructive') bool allowDestructive, + Dnsmasq dnsmasq}); + + @override + $DatabaseCopyWith<$Res> get database; + @override + $ClientsCopyWith<$Res> get clients; + @override + $DnsmasqCopyWith<$Res> get dnsmasq; +} + +/// @nodoc +class __$$FtlImplCopyWithImpl<$Res> extends _$FtlCopyWithImpl<$Res, _$FtlImpl> + implements _$$FtlImplCopyWith<$Res> { + __$$FtlImplCopyWithImpl(_$FtlImpl _value, $Res Function(_$FtlImpl) _then) + : super(_value, _then); + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? database = null, + Object? privacyLevel = null, + Object? clients = null, + Object? pid = null, + Object? uptime = null, + Object? memPercentage = null, + Object? cpuPercentage = null, + Object? allowDestructive = null, + Object? dnsmasq = null, + }) { + return _then(_$FtlImpl( + database: null == database + ? _value.database + : database // ignore: cast_nullable_to_non_nullable + as Database, + privacyLevel: null == privacyLevel + ? _value.privacyLevel + : privacyLevel // ignore: cast_nullable_to_non_nullable + as int, + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as Clients, + pid: null == pid + ? _value.pid + : pid // ignore: cast_nullable_to_non_nullable + as int, + uptime: null == uptime + ? _value.uptime + : uptime // ignore: cast_nullable_to_non_nullable + as int, + memPercentage: null == memPercentage + ? _value.memPercentage + : memPercentage // ignore: cast_nullable_to_non_nullable + as double, + cpuPercentage: null == cpuPercentage + ? _value.cpuPercentage + : cpuPercentage // ignore: cast_nullable_to_non_nullable + as double, + allowDestructive: null == allowDestructive + ? _value.allowDestructive + : allowDestructive // ignore: cast_nullable_to_non_nullable + as bool, + dnsmasq: null == dnsmasq + ? _value.dnsmasq + : dnsmasq // ignore: cast_nullable_to_non_nullable + as Dnsmasq, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$FtlImpl implements _Ftl { + const _$FtlImpl( + {required this.database, + @JsonKey(name: 'privacy_level') required this.privacyLevel, + required this.clients, + required this.pid, + required this.uptime, + @JsonKey(name: '%mem') required this.memPercentage, + @JsonKey(name: '%cpu') required this.cpuPercentage, + @JsonKey(name: 'allow_destructive') required this.allowDestructive, + required this.dnsmasq}); + + factory _$FtlImpl.fromJson(Map json) => + _$$FtlImplFromJson(json); + + @override + final Database database; + @override + @JsonKey(name: 'privacy_level') + final int privacyLevel; + @override + final Clients clients; + @override + final int pid; + @override + final int uptime; + @override + @JsonKey(name: '%mem') + final double memPercentage; + @override + @JsonKey(name: '%cpu') + final double cpuPercentage; + @override + @JsonKey(name: 'allow_destructive') + final bool allowDestructive; + @override + final Dnsmasq dnsmasq; + + @override + String toString() { + return 'Ftl(database: $database, privacyLevel: $privacyLevel, clients: $clients, pid: $pid, uptime: $uptime, memPercentage: $memPercentage, cpuPercentage: $cpuPercentage, allowDestructive: $allowDestructive, dnsmasq: $dnsmasq)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FtlImpl && + (identical(other.database, database) || + other.database == database) && + (identical(other.privacyLevel, privacyLevel) || + other.privacyLevel == privacyLevel) && + (identical(other.clients, clients) || other.clients == clients) && + (identical(other.pid, pid) || other.pid == pid) && + (identical(other.uptime, uptime) || other.uptime == uptime) && + (identical(other.memPercentage, memPercentage) || + other.memPercentage == memPercentage) && + (identical(other.cpuPercentage, cpuPercentage) || + other.cpuPercentage == cpuPercentage) && + (identical(other.allowDestructive, allowDestructive) || + other.allowDestructive == allowDestructive) && + (identical(other.dnsmasq, dnsmasq) || other.dnsmasq == dnsmasq)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, database, privacyLevel, clients, + pid, uptime, memPercentage, cpuPercentage, allowDestructive, dnsmasq); + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$FtlImplCopyWith<_$FtlImpl> get copyWith => + __$$FtlImplCopyWithImpl<_$FtlImpl>(this, _$identity); + + @override + Map toJson() { + return _$$FtlImplToJson( + this, + ); + } +} + +abstract class _Ftl implements Ftl { + const factory _Ftl( + {required final Database database, + @JsonKey(name: 'privacy_level') required final int privacyLevel, + required final Clients clients, + required final int pid, + required final int uptime, + @JsonKey(name: '%mem') required final double memPercentage, + @JsonKey(name: '%cpu') required final double cpuPercentage, + @JsonKey(name: 'allow_destructive') required final bool allowDestructive, + required final Dnsmasq dnsmasq}) = _$FtlImpl; + + factory _Ftl.fromJson(Map json) = _$FtlImpl.fromJson; + + @override + Database get database; + @override + @JsonKey(name: 'privacy_level') + int get privacyLevel; + @override + Clients get clients; + @override + int get pid; + @override + int get uptime; + @override + @JsonKey(name: '%mem') + double get memPercentage; + @override + @JsonKey(name: '%cpu') + double get cpuPercentage; + @override + @JsonKey(name: 'allow_destructive') + bool get allowDestructive; + @override + Dnsmasq get dnsmasq; + + /// Create a copy of Ftl + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$FtlImplCopyWith<_$FtlImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Database _$DatabaseFromJson(Map json) { + return _Database.fromJson(json); +} + +/// @nodoc +mixin _$Database { + int get gravity => throw _privateConstructorUsedError; + int get groups => throw _privateConstructorUsedError; + int get lists => throw _privateConstructorUsedError; + int get clients => throw _privateConstructorUsedError; + Domains get domains => throw _privateConstructorUsedError; + + /// Serializes this Database to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Database + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $DatabaseCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DatabaseCopyWith<$Res> { + factory $DatabaseCopyWith(Database value, $Res Function(Database) then) = + _$DatabaseCopyWithImpl<$Res, Database>; + @useResult + $Res call({int gravity, int groups, int lists, int clients, Domains domains}); + + $DomainsCopyWith<$Res> get domains; +} + +/// @nodoc +class _$DatabaseCopyWithImpl<$Res, $Val extends Database> + implements $DatabaseCopyWith<$Res> { + _$DatabaseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Database + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? gravity = null, + Object? groups = null, + Object? lists = null, + Object? clients = null, + Object? domains = null, + }) { + return _then(_value.copyWith( + gravity: null == gravity + ? _value.gravity + : gravity // ignore: cast_nullable_to_non_nullable + as int, + groups: null == groups + ? _value.groups + : groups // ignore: cast_nullable_to_non_nullable + as int, + lists: null == lists + ? _value.lists + : lists // ignore: cast_nullable_to_non_nullable + as int, + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as int, + domains: null == domains + ? _value.domains + : domains // ignore: cast_nullable_to_non_nullable + as Domains, + ) as $Val); + } + + /// Create a copy of Database + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $DomainsCopyWith<$Res> get domains { + return $DomainsCopyWith<$Res>(_value.domains, (value) { + return _then(_value.copyWith(domains: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$DatabaseImplCopyWith<$Res> + implements $DatabaseCopyWith<$Res> { + factory _$$DatabaseImplCopyWith( + _$DatabaseImpl value, $Res Function(_$DatabaseImpl) then) = + __$$DatabaseImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int gravity, int groups, int lists, int clients, Domains domains}); + + @override + $DomainsCopyWith<$Res> get domains; +} + +/// @nodoc +class __$$DatabaseImplCopyWithImpl<$Res> + extends _$DatabaseCopyWithImpl<$Res, _$DatabaseImpl> + implements _$$DatabaseImplCopyWith<$Res> { + __$$DatabaseImplCopyWithImpl( + _$DatabaseImpl _value, $Res Function(_$DatabaseImpl) _then) + : super(_value, _then); + + /// Create a copy of Database + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? gravity = null, + Object? groups = null, + Object? lists = null, + Object? clients = null, + Object? domains = null, + }) { + return _then(_$DatabaseImpl( + gravity: null == gravity + ? _value.gravity + : gravity // ignore: cast_nullable_to_non_nullable + as int, + groups: null == groups + ? _value.groups + : groups // ignore: cast_nullable_to_non_nullable + as int, + lists: null == lists + ? _value.lists + : lists // ignore: cast_nullable_to_non_nullable + as int, + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as int, + domains: null == domains + ? _value.domains + : domains // ignore: cast_nullable_to_non_nullable + as Domains, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$DatabaseImpl implements _Database { + const _$DatabaseImpl( + {required this.gravity, + required this.groups, + required this.lists, + required this.clients, + required this.domains}); + + factory _$DatabaseImpl.fromJson(Map json) => + _$$DatabaseImplFromJson(json); + + @override + final int gravity; + @override + final int groups; + @override + final int lists; + @override + final int clients; + @override + final Domains domains; + + @override + String toString() { + return 'Database(gravity: $gravity, groups: $groups, lists: $lists, clients: $clients, domains: $domains)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DatabaseImpl && + (identical(other.gravity, gravity) || other.gravity == gravity) && + (identical(other.groups, groups) || other.groups == groups) && + (identical(other.lists, lists) || other.lists == lists) && + (identical(other.clients, clients) || other.clients == clients) && + (identical(other.domains, domains) || other.domains == domains)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, gravity, groups, lists, clients, domains); + + /// Create a copy of Database + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$DatabaseImplCopyWith<_$DatabaseImpl> get copyWith => + __$$DatabaseImplCopyWithImpl<_$DatabaseImpl>(this, _$identity); + + @override + Map toJson() { + return _$$DatabaseImplToJson( + this, + ); + } +} + +abstract class _Database implements Database { + const factory _Database( + {required final int gravity, + required final int groups, + required final int lists, + required final int clients, + required final Domains domains}) = _$DatabaseImpl; + + factory _Database.fromJson(Map json) = + _$DatabaseImpl.fromJson; + + @override + int get gravity; + @override + int get groups; + @override + int get lists; + @override + int get clients; + @override + Domains get domains; + + /// Create a copy of Database + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$DatabaseImplCopyWith<_$DatabaseImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Domains _$DomainsFromJson(Map json) { + return _Domains.fromJson(json); +} + +/// @nodoc +mixin _$Domains { + int get allowed => throw _privateConstructorUsedError; + int get denied => throw _privateConstructorUsedError; + + /// Serializes this Domains to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Domains + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $DomainsCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DomainsCopyWith<$Res> { + factory $DomainsCopyWith(Domains value, $Res Function(Domains) then) = + _$DomainsCopyWithImpl<$Res, Domains>; + @useResult + $Res call({int allowed, int denied}); +} + +/// @nodoc +class _$DomainsCopyWithImpl<$Res, $Val extends Domains> + implements $DomainsCopyWith<$Res> { + _$DomainsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Domains + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? allowed = null, + Object? denied = null, + }) { + return _then(_value.copyWith( + allowed: null == allowed + ? _value.allowed + : allowed // ignore: cast_nullable_to_non_nullable + as int, + denied: null == denied + ? _value.denied + : denied // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$DomainsImplCopyWith<$Res> implements $DomainsCopyWith<$Res> { + factory _$$DomainsImplCopyWith( + _$DomainsImpl value, $Res Function(_$DomainsImpl) then) = + __$$DomainsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int allowed, int denied}); +} + +/// @nodoc +class __$$DomainsImplCopyWithImpl<$Res> + extends _$DomainsCopyWithImpl<$Res, _$DomainsImpl> + implements _$$DomainsImplCopyWith<$Res> { + __$$DomainsImplCopyWithImpl( + _$DomainsImpl _value, $Res Function(_$DomainsImpl) _then) + : super(_value, _then); + + /// Create a copy of Domains + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? allowed = null, + Object? denied = null, + }) { + return _then(_$DomainsImpl( + allowed: null == allowed + ? _value.allowed + : allowed // ignore: cast_nullable_to_non_nullable + as int, + denied: null == denied + ? _value.denied + : denied // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$DomainsImpl implements _Domains { + const _$DomainsImpl({required this.allowed, required this.denied}); + + factory _$DomainsImpl.fromJson(Map json) => + _$$DomainsImplFromJson(json); + + @override + final int allowed; + @override + final int denied; + + @override + String toString() { + return 'Domains(allowed: $allowed, denied: $denied)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DomainsImpl && + (identical(other.allowed, allowed) || other.allowed == allowed) && + (identical(other.denied, denied) || other.denied == denied)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, allowed, denied); + + /// Create a copy of Domains + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$DomainsImplCopyWith<_$DomainsImpl> get copyWith => + __$$DomainsImplCopyWithImpl<_$DomainsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$DomainsImplToJson( + this, + ); + } +} + +abstract class _Domains implements Domains { + const factory _Domains( + {required final int allowed, required final int denied}) = _$DomainsImpl; + + factory _Domains.fromJson(Map json) = _$DomainsImpl.fromJson; + + @override + int get allowed; + @override + int get denied; + + /// Create a copy of Domains + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$DomainsImplCopyWith<_$DomainsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Clients _$ClientsFromJson(Map json) { + return _Clients.fromJson(json); +} + +/// @nodoc +mixin _$Clients { + int get total => throw _privateConstructorUsedError; + int get active => throw _privateConstructorUsedError; + + /// Serializes this Clients to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $ClientsCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ClientsCopyWith<$Res> { + factory $ClientsCopyWith(Clients value, $Res Function(Clients) then) = + _$ClientsCopyWithImpl<$Res, Clients>; + @useResult + $Res call({int total, int active}); +} + +/// @nodoc +class _$ClientsCopyWithImpl<$Res, $Val extends Clients> + implements $ClientsCopyWith<$Res> { + _$ClientsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? total = null, + Object? active = null, + }) { + return _then(_value.copyWith( + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + active: null == active + ? _value.active + : active // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$ClientsImplCopyWith<$Res> implements $ClientsCopyWith<$Res> { + factory _$$ClientsImplCopyWith( + _$ClientsImpl value, $Res Function(_$ClientsImpl) then) = + __$$ClientsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int total, int active}); +} + +/// @nodoc +class __$$ClientsImplCopyWithImpl<$Res> + extends _$ClientsCopyWithImpl<$Res, _$ClientsImpl> + implements _$$ClientsImplCopyWith<$Res> { + __$$ClientsImplCopyWithImpl( + _$ClientsImpl _value, $Res Function(_$ClientsImpl) _then) + : super(_value, _then); + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? total = null, + Object? active = null, + }) { + return _then(_$ClientsImpl( + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + active: null == active + ? _value.active + : active // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$ClientsImpl implements _Clients { + const _$ClientsImpl({required this.total, required this.active}); + + factory _$ClientsImpl.fromJson(Map json) => + _$$ClientsImplFromJson(json); + + @override + final int total; + @override + final int active; + + @override + String toString() { + return 'Clients(total: $total, active: $active)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ClientsImpl && + (identical(other.total, total) || other.total == total) && + (identical(other.active, active) || other.active == active)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, total, active); + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$ClientsImplCopyWith<_$ClientsImpl> get copyWith => + __$$ClientsImplCopyWithImpl<_$ClientsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$ClientsImplToJson( + this, + ); + } +} + +abstract class _Clients implements Clients { + const factory _Clients( + {required final int total, required final int active}) = _$ClientsImpl; + + factory _Clients.fromJson(Map json) = _$ClientsImpl.fromJson; + + @override + int get total; + @override + int get active; + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ClientsImplCopyWith<_$ClientsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Dnsmasq _$DnsmasqFromJson(Map json) { + return _Dnsmasq.fromJson(json); +} + +/// @nodoc +mixin _$Dnsmasq { + @JsonKey(name: 'dns_cache_inserted') + int get dnsCacheInserted => throw _privateConstructorUsedError; + @JsonKey(name: 'dns_cache_live_freed') + int get dnsCacheLiveFreed => throw _privateConstructorUsedError; + @JsonKey(name: 'dns_queries_forwarded') + int get dnsQueriesForwarded => throw _privateConstructorUsedError; + @JsonKey(name: 'dns_auth_answered') + int get dnsAuthAnswered => throw _privateConstructorUsedError; + @JsonKey(name: 'dns_local_answered') + int get dnsLocalAnswered => throw _privateConstructorUsedError; + @JsonKey(name: 'dns_stale_answered') + int get dnsStaleAnswered => throw _privateConstructorUsedError; + @JsonKey(name: 'dns_unanswered') + int get dnsUnanswered => throw _privateConstructorUsedError; + @JsonKey(name: 'bootp') + int get bootp => throw _privateConstructorUsedError; + @JsonKey(name: 'pxe') + int get pxe => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_ack') + int get dhcpAck => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_decline') + int get dhcpDecline => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_discover') + int get dhcpDiscover => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_inform') + int get dhcpInform => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_nak') + int get dhcpNak => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_offer') + int get dhcpOffer => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_release') + int get dhcpRelease => throw _privateConstructorUsedError; + @JsonKey(name: 'dhcp_request') + int get dhcpRequest => throw _privateConstructorUsedError; + @JsonKey(name: 'noanswer') + int get noAnswer => throw _privateConstructorUsedError; + @JsonKey(name: 'leases_allocated_4') + int get leasesAllocated4 => throw _privateConstructorUsedError; + @JsonKey(name: 'leases_pruned_4') + int get leasesPruned4 => throw _privateConstructorUsedError; + @JsonKey(name: 'leases_allocated_6') + int get leasesAllocated6 => throw _privateConstructorUsedError; + @JsonKey(name: 'leases_pruned_6') + int get leasesPruned6 => throw _privateConstructorUsedError; + @JsonKey(name: 'tcp_connections') + int get tcpConnections => throw _privateConstructorUsedError; + @JsonKey(name: 'dnssec_max_crypto_use') + int get dnssecMaxCryptoUse => throw _privateConstructorUsedError; + @JsonKey(name: 'dnssec_max_sig_fail') + int get dnssecMaxSigFail => throw _privateConstructorUsedError; + @JsonKey(name: 'dnssec_max_work') + int get dnssecMaxWork => throw _privateConstructorUsedError; + + /// Serializes this Dnsmasq to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Dnsmasq + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $DnsmasqCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DnsmasqCopyWith<$Res> { + factory $DnsmasqCopyWith(Dnsmasq value, $Res Function(Dnsmasq) then) = + _$DnsmasqCopyWithImpl<$Res, Dnsmasq>; + @useResult + $Res call( + {@JsonKey(name: 'dns_cache_inserted') int dnsCacheInserted, + @JsonKey(name: 'dns_cache_live_freed') int dnsCacheLiveFreed, + @JsonKey(name: 'dns_queries_forwarded') int dnsQueriesForwarded, + @JsonKey(name: 'dns_auth_answered') int dnsAuthAnswered, + @JsonKey(name: 'dns_local_answered') int dnsLocalAnswered, + @JsonKey(name: 'dns_stale_answered') int dnsStaleAnswered, + @JsonKey(name: 'dns_unanswered') int dnsUnanswered, + @JsonKey(name: 'bootp') int bootp, + @JsonKey(name: 'pxe') int pxe, + @JsonKey(name: 'dhcp_ack') int dhcpAck, + @JsonKey(name: 'dhcp_decline') int dhcpDecline, + @JsonKey(name: 'dhcp_discover') int dhcpDiscover, + @JsonKey(name: 'dhcp_inform') int dhcpInform, + @JsonKey(name: 'dhcp_nak') int dhcpNak, + @JsonKey(name: 'dhcp_offer') int dhcpOffer, + @JsonKey(name: 'dhcp_release') int dhcpRelease, + @JsonKey(name: 'dhcp_request') int dhcpRequest, + @JsonKey(name: 'noanswer') int noAnswer, + @JsonKey(name: 'leases_allocated_4') int leasesAllocated4, + @JsonKey(name: 'leases_pruned_4') int leasesPruned4, + @JsonKey(name: 'leases_allocated_6') int leasesAllocated6, + @JsonKey(name: 'leases_pruned_6') int leasesPruned6, + @JsonKey(name: 'tcp_connections') int tcpConnections, + @JsonKey(name: 'dnssec_max_crypto_use') int dnssecMaxCryptoUse, + @JsonKey(name: 'dnssec_max_sig_fail') int dnssecMaxSigFail, + @JsonKey(name: 'dnssec_max_work') int dnssecMaxWork}); +} + +/// @nodoc +class _$DnsmasqCopyWithImpl<$Res, $Val extends Dnsmasq> + implements $DnsmasqCopyWith<$Res> { + _$DnsmasqCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Dnsmasq + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? dnsCacheInserted = null, + Object? dnsCacheLiveFreed = null, + Object? dnsQueriesForwarded = null, + Object? dnsAuthAnswered = null, + Object? dnsLocalAnswered = null, + Object? dnsStaleAnswered = null, + Object? dnsUnanswered = null, + Object? bootp = null, + Object? pxe = null, + Object? dhcpAck = null, + Object? dhcpDecline = null, + Object? dhcpDiscover = null, + Object? dhcpInform = null, + Object? dhcpNak = null, + Object? dhcpOffer = null, + Object? dhcpRelease = null, + Object? dhcpRequest = null, + Object? noAnswer = null, + Object? leasesAllocated4 = null, + Object? leasesPruned4 = null, + Object? leasesAllocated6 = null, + Object? leasesPruned6 = null, + Object? tcpConnections = null, + Object? dnssecMaxCryptoUse = null, + Object? dnssecMaxSigFail = null, + Object? dnssecMaxWork = null, + }) { + return _then(_value.copyWith( + dnsCacheInserted: null == dnsCacheInserted + ? _value.dnsCacheInserted + : dnsCacheInserted // ignore: cast_nullable_to_non_nullable + as int, + dnsCacheLiveFreed: null == dnsCacheLiveFreed + ? _value.dnsCacheLiveFreed + : dnsCacheLiveFreed // ignore: cast_nullable_to_non_nullable + as int, + dnsQueriesForwarded: null == dnsQueriesForwarded + ? _value.dnsQueriesForwarded + : dnsQueriesForwarded // ignore: cast_nullable_to_non_nullable + as int, + dnsAuthAnswered: null == dnsAuthAnswered + ? _value.dnsAuthAnswered + : dnsAuthAnswered // ignore: cast_nullable_to_non_nullable + as int, + dnsLocalAnswered: null == dnsLocalAnswered + ? _value.dnsLocalAnswered + : dnsLocalAnswered // ignore: cast_nullable_to_non_nullable + as int, + dnsStaleAnswered: null == dnsStaleAnswered + ? _value.dnsStaleAnswered + : dnsStaleAnswered // ignore: cast_nullable_to_non_nullable + as int, + dnsUnanswered: null == dnsUnanswered + ? _value.dnsUnanswered + : dnsUnanswered // ignore: cast_nullable_to_non_nullable + as int, + bootp: null == bootp + ? _value.bootp + : bootp // ignore: cast_nullable_to_non_nullable + as int, + pxe: null == pxe + ? _value.pxe + : pxe // ignore: cast_nullable_to_non_nullable + as int, + dhcpAck: null == dhcpAck + ? _value.dhcpAck + : dhcpAck // ignore: cast_nullable_to_non_nullable + as int, + dhcpDecline: null == dhcpDecline + ? _value.dhcpDecline + : dhcpDecline // ignore: cast_nullable_to_non_nullable + as int, + dhcpDiscover: null == dhcpDiscover + ? _value.dhcpDiscover + : dhcpDiscover // ignore: cast_nullable_to_non_nullable + as int, + dhcpInform: null == dhcpInform + ? _value.dhcpInform + : dhcpInform // ignore: cast_nullable_to_non_nullable + as int, + dhcpNak: null == dhcpNak + ? _value.dhcpNak + : dhcpNak // ignore: cast_nullable_to_non_nullable + as int, + dhcpOffer: null == dhcpOffer + ? _value.dhcpOffer + : dhcpOffer // ignore: cast_nullable_to_non_nullable + as int, + dhcpRelease: null == dhcpRelease + ? _value.dhcpRelease + : dhcpRelease // ignore: cast_nullable_to_non_nullable + as int, + dhcpRequest: null == dhcpRequest + ? _value.dhcpRequest + : dhcpRequest // ignore: cast_nullable_to_non_nullable + as int, + noAnswer: null == noAnswer + ? _value.noAnswer + : noAnswer // ignore: cast_nullable_to_non_nullable + as int, + leasesAllocated4: null == leasesAllocated4 + ? _value.leasesAllocated4 + : leasesAllocated4 // ignore: cast_nullable_to_non_nullable + as int, + leasesPruned4: null == leasesPruned4 + ? _value.leasesPruned4 + : leasesPruned4 // ignore: cast_nullable_to_non_nullable + as int, + leasesAllocated6: null == leasesAllocated6 + ? _value.leasesAllocated6 + : leasesAllocated6 // ignore: cast_nullable_to_non_nullable + as int, + leasesPruned6: null == leasesPruned6 + ? _value.leasesPruned6 + : leasesPruned6 // ignore: cast_nullable_to_non_nullable + as int, + tcpConnections: null == tcpConnections + ? _value.tcpConnections + : tcpConnections // ignore: cast_nullable_to_non_nullable + as int, + dnssecMaxCryptoUse: null == dnssecMaxCryptoUse + ? _value.dnssecMaxCryptoUse + : dnssecMaxCryptoUse // ignore: cast_nullable_to_non_nullable + as int, + dnssecMaxSigFail: null == dnssecMaxSigFail + ? _value.dnssecMaxSigFail + : dnssecMaxSigFail // ignore: cast_nullable_to_non_nullable + as int, + dnssecMaxWork: null == dnssecMaxWork + ? _value.dnssecMaxWork + : dnssecMaxWork // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$DnsmasqImplCopyWith<$Res> implements $DnsmasqCopyWith<$Res> { + factory _$$DnsmasqImplCopyWith( + _$DnsmasqImpl value, $Res Function(_$DnsmasqImpl) then) = + __$$DnsmasqImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {@JsonKey(name: 'dns_cache_inserted') int dnsCacheInserted, + @JsonKey(name: 'dns_cache_live_freed') int dnsCacheLiveFreed, + @JsonKey(name: 'dns_queries_forwarded') int dnsQueriesForwarded, + @JsonKey(name: 'dns_auth_answered') int dnsAuthAnswered, + @JsonKey(name: 'dns_local_answered') int dnsLocalAnswered, + @JsonKey(name: 'dns_stale_answered') int dnsStaleAnswered, + @JsonKey(name: 'dns_unanswered') int dnsUnanswered, + @JsonKey(name: 'bootp') int bootp, + @JsonKey(name: 'pxe') int pxe, + @JsonKey(name: 'dhcp_ack') int dhcpAck, + @JsonKey(name: 'dhcp_decline') int dhcpDecline, + @JsonKey(name: 'dhcp_discover') int dhcpDiscover, + @JsonKey(name: 'dhcp_inform') int dhcpInform, + @JsonKey(name: 'dhcp_nak') int dhcpNak, + @JsonKey(name: 'dhcp_offer') int dhcpOffer, + @JsonKey(name: 'dhcp_release') int dhcpRelease, + @JsonKey(name: 'dhcp_request') int dhcpRequest, + @JsonKey(name: 'noanswer') int noAnswer, + @JsonKey(name: 'leases_allocated_4') int leasesAllocated4, + @JsonKey(name: 'leases_pruned_4') int leasesPruned4, + @JsonKey(name: 'leases_allocated_6') int leasesAllocated6, + @JsonKey(name: 'leases_pruned_6') int leasesPruned6, + @JsonKey(name: 'tcp_connections') int tcpConnections, + @JsonKey(name: 'dnssec_max_crypto_use') int dnssecMaxCryptoUse, + @JsonKey(name: 'dnssec_max_sig_fail') int dnssecMaxSigFail, + @JsonKey(name: 'dnssec_max_work') int dnssecMaxWork}); +} + +/// @nodoc +class __$$DnsmasqImplCopyWithImpl<$Res> + extends _$DnsmasqCopyWithImpl<$Res, _$DnsmasqImpl> + implements _$$DnsmasqImplCopyWith<$Res> { + __$$DnsmasqImplCopyWithImpl( + _$DnsmasqImpl _value, $Res Function(_$DnsmasqImpl) _then) + : super(_value, _then); + + /// Create a copy of Dnsmasq + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? dnsCacheInserted = null, + Object? dnsCacheLiveFreed = null, + Object? dnsQueriesForwarded = null, + Object? dnsAuthAnswered = null, + Object? dnsLocalAnswered = null, + Object? dnsStaleAnswered = null, + Object? dnsUnanswered = null, + Object? bootp = null, + Object? pxe = null, + Object? dhcpAck = null, + Object? dhcpDecline = null, + Object? dhcpDiscover = null, + Object? dhcpInform = null, + Object? dhcpNak = null, + Object? dhcpOffer = null, + Object? dhcpRelease = null, + Object? dhcpRequest = null, + Object? noAnswer = null, + Object? leasesAllocated4 = null, + Object? leasesPruned4 = null, + Object? leasesAllocated6 = null, + Object? leasesPruned6 = null, + Object? tcpConnections = null, + Object? dnssecMaxCryptoUse = null, + Object? dnssecMaxSigFail = null, + Object? dnssecMaxWork = null, + }) { + return _then(_$DnsmasqImpl( + dnsCacheInserted: null == dnsCacheInserted + ? _value.dnsCacheInserted + : dnsCacheInserted // ignore: cast_nullable_to_non_nullable + as int, + dnsCacheLiveFreed: null == dnsCacheLiveFreed + ? _value.dnsCacheLiveFreed + : dnsCacheLiveFreed // ignore: cast_nullable_to_non_nullable + as int, + dnsQueriesForwarded: null == dnsQueriesForwarded + ? _value.dnsQueriesForwarded + : dnsQueriesForwarded // ignore: cast_nullable_to_non_nullable + as int, + dnsAuthAnswered: null == dnsAuthAnswered + ? _value.dnsAuthAnswered + : dnsAuthAnswered // ignore: cast_nullable_to_non_nullable + as int, + dnsLocalAnswered: null == dnsLocalAnswered + ? _value.dnsLocalAnswered + : dnsLocalAnswered // ignore: cast_nullable_to_non_nullable + as int, + dnsStaleAnswered: null == dnsStaleAnswered + ? _value.dnsStaleAnswered + : dnsStaleAnswered // ignore: cast_nullable_to_non_nullable + as int, + dnsUnanswered: null == dnsUnanswered + ? _value.dnsUnanswered + : dnsUnanswered // ignore: cast_nullable_to_non_nullable + as int, + bootp: null == bootp + ? _value.bootp + : bootp // ignore: cast_nullable_to_non_nullable + as int, + pxe: null == pxe + ? _value.pxe + : pxe // ignore: cast_nullable_to_non_nullable + as int, + dhcpAck: null == dhcpAck + ? _value.dhcpAck + : dhcpAck // ignore: cast_nullable_to_non_nullable + as int, + dhcpDecline: null == dhcpDecline + ? _value.dhcpDecline + : dhcpDecline // ignore: cast_nullable_to_non_nullable + as int, + dhcpDiscover: null == dhcpDiscover + ? _value.dhcpDiscover + : dhcpDiscover // ignore: cast_nullable_to_non_nullable + as int, + dhcpInform: null == dhcpInform + ? _value.dhcpInform + : dhcpInform // ignore: cast_nullable_to_non_nullable + as int, + dhcpNak: null == dhcpNak + ? _value.dhcpNak + : dhcpNak // ignore: cast_nullable_to_non_nullable + as int, + dhcpOffer: null == dhcpOffer + ? _value.dhcpOffer + : dhcpOffer // ignore: cast_nullable_to_non_nullable + as int, + dhcpRelease: null == dhcpRelease + ? _value.dhcpRelease + : dhcpRelease // ignore: cast_nullable_to_non_nullable + as int, + dhcpRequest: null == dhcpRequest + ? _value.dhcpRequest + : dhcpRequest // ignore: cast_nullable_to_non_nullable + as int, + noAnswer: null == noAnswer + ? _value.noAnswer + : noAnswer // ignore: cast_nullable_to_non_nullable + as int, + leasesAllocated4: null == leasesAllocated4 + ? _value.leasesAllocated4 + : leasesAllocated4 // ignore: cast_nullable_to_non_nullable + as int, + leasesPruned4: null == leasesPruned4 + ? _value.leasesPruned4 + : leasesPruned4 // ignore: cast_nullable_to_non_nullable + as int, + leasesAllocated6: null == leasesAllocated6 + ? _value.leasesAllocated6 + : leasesAllocated6 // ignore: cast_nullable_to_non_nullable + as int, + leasesPruned6: null == leasesPruned6 + ? _value.leasesPruned6 + : leasesPruned6 // ignore: cast_nullable_to_non_nullable + as int, + tcpConnections: null == tcpConnections + ? _value.tcpConnections + : tcpConnections // ignore: cast_nullable_to_non_nullable + as int, + dnssecMaxCryptoUse: null == dnssecMaxCryptoUse + ? _value.dnssecMaxCryptoUse + : dnssecMaxCryptoUse // ignore: cast_nullable_to_non_nullable + as int, + dnssecMaxSigFail: null == dnssecMaxSigFail + ? _value.dnssecMaxSigFail + : dnssecMaxSigFail // ignore: cast_nullable_to_non_nullable + as int, + dnssecMaxWork: null == dnssecMaxWork + ? _value.dnssecMaxWork + : dnssecMaxWork // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$DnsmasqImpl implements _Dnsmasq { + const _$DnsmasqImpl( + {@JsonKey(name: 'dns_cache_inserted') required this.dnsCacheInserted, + @JsonKey(name: 'dns_cache_live_freed') required this.dnsCacheLiveFreed, + @JsonKey(name: 'dns_queries_forwarded') required this.dnsQueriesForwarded, + @JsonKey(name: 'dns_auth_answered') required this.dnsAuthAnswered, + @JsonKey(name: 'dns_local_answered') required this.dnsLocalAnswered, + @JsonKey(name: 'dns_stale_answered') required this.dnsStaleAnswered, + @JsonKey(name: 'dns_unanswered') required this.dnsUnanswered, + @JsonKey(name: 'bootp') required this.bootp, + @JsonKey(name: 'pxe') required this.pxe, + @JsonKey(name: 'dhcp_ack') required this.dhcpAck, + @JsonKey(name: 'dhcp_decline') required this.dhcpDecline, + @JsonKey(name: 'dhcp_discover') required this.dhcpDiscover, + @JsonKey(name: 'dhcp_inform') required this.dhcpInform, + @JsonKey(name: 'dhcp_nak') required this.dhcpNak, + @JsonKey(name: 'dhcp_offer') required this.dhcpOffer, + @JsonKey(name: 'dhcp_release') required this.dhcpRelease, + @JsonKey(name: 'dhcp_request') required this.dhcpRequest, + @JsonKey(name: 'noanswer') required this.noAnswer, + @JsonKey(name: 'leases_allocated_4') required this.leasesAllocated4, + @JsonKey(name: 'leases_pruned_4') required this.leasesPruned4, + @JsonKey(name: 'leases_allocated_6') required this.leasesAllocated6, + @JsonKey(name: 'leases_pruned_6') required this.leasesPruned6, + @JsonKey(name: 'tcp_connections') required this.tcpConnections, + @JsonKey(name: 'dnssec_max_crypto_use') required this.dnssecMaxCryptoUse, + @JsonKey(name: 'dnssec_max_sig_fail') required this.dnssecMaxSigFail, + @JsonKey(name: 'dnssec_max_work') required this.dnssecMaxWork}); + + factory _$DnsmasqImpl.fromJson(Map json) => + _$$DnsmasqImplFromJson(json); + + @override + @JsonKey(name: 'dns_cache_inserted') + final int dnsCacheInserted; + @override + @JsonKey(name: 'dns_cache_live_freed') + final int dnsCacheLiveFreed; + @override + @JsonKey(name: 'dns_queries_forwarded') + final int dnsQueriesForwarded; + @override + @JsonKey(name: 'dns_auth_answered') + final int dnsAuthAnswered; + @override + @JsonKey(name: 'dns_local_answered') + final int dnsLocalAnswered; + @override + @JsonKey(name: 'dns_stale_answered') + final int dnsStaleAnswered; + @override + @JsonKey(name: 'dns_unanswered') + final int dnsUnanswered; + @override + @JsonKey(name: 'bootp') + final int bootp; + @override + @JsonKey(name: 'pxe') + final int pxe; + @override + @JsonKey(name: 'dhcp_ack') + final int dhcpAck; + @override + @JsonKey(name: 'dhcp_decline') + final int dhcpDecline; + @override + @JsonKey(name: 'dhcp_discover') + final int dhcpDiscover; + @override + @JsonKey(name: 'dhcp_inform') + final int dhcpInform; + @override + @JsonKey(name: 'dhcp_nak') + final int dhcpNak; + @override + @JsonKey(name: 'dhcp_offer') + final int dhcpOffer; + @override + @JsonKey(name: 'dhcp_release') + final int dhcpRelease; + @override + @JsonKey(name: 'dhcp_request') + final int dhcpRequest; + @override + @JsonKey(name: 'noanswer') + final int noAnswer; + @override + @JsonKey(name: 'leases_allocated_4') + final int leasesAllocated4; + @override + @JsonKey(name: 'leases_pruned_4') + final int leasesPruned4; + @override + @JsonKey(name: 'leases_allocated_6') + final int leasesAllocated6; + @override + @JsonKey(name: 'leases_pruned_6') + final int leasesPruned6; + @override + @JsonKey(name: 'tcp_connections') + final int tcpConnections; + @override + @JsonKey(name: 'dnssec_max_crypto_use') + final int dnssecMaxCryptoUse; + @override + @JsonKey(name: 'dnssec_max_sig_fail') + final int dnssecMaxSigFail; + @override + @JsonKey(name: 'dnssec_max_work') + final int dnssecMaxWork; + + @override + String toString() { + return 'Dnsmasq(dnsCacheInserted: $dnsCacheInserted, dnsCacheLiveFreed: $dnsCacheLiveFreed, dnsQueriesForwarded: $dnsQueriesForwarded, dnsAuthAnswered: $dnsAuthAnswered, dnsLocalAnswered: $dnsLocalAnswered, dnsStaleAnswered: $dnsStaleAnswered, dnsUnanswered: $dnsUnanswered, bootp: $bootp, pxe: $pxe, dhcpAck: $dhcpAck, dhcpDecline: $dhcpDecline, dhcpDiscover: $dhcpDiscover, dhcpInform: $dhcpInform, dhcpNak: $dhcpNak, dhcpOffer: $dhcpOffer, dhcpRelease: $dhcpRelease, dhcpRequest: $dhcpRequest, noAnswer: $noAnswer, leasesAllocated4: $leasesAllocated4, leasesPruned4: $leasesPruned4, leasesAllocated6: $leasesAllocated6, leasesPruned6: $leasesPruned6, tcpConnections: $tcpConnections, dnssecMaxCryptoUse: $dnssecMaxCryptoUse, dnssecMaxSigFail: $dnssecMaxSigFail, dnssecMaxWork: $dnssecMaxWork)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DnsmasqImpl && + (identical(other.dnsCacheInserted, dnsCacheInserted) || + other.dnsCacheInserted == dnsCacheInserted) && + (identical(other.dnsCacheLiveFreed, dnsCacheLiveFreed) || + other.dnsCacheLiveFreed == dnsCacheLiveFreed) && + (identical(other.dnsQueriesForwarded, dnsQueriesForwarded) || + other.dnsQueriesForwarded == dnsQueriesForwarded) && + (identical(other.dnsAuthAnswered, dnsAuthAnswered) || + other.dnsAuthAnswered == dnsAuthAnswered) && + (identical(other.dnsLocalAnswered, dnsLocalAnswered) || + other.dnsLocalAnswered == dnsLocalAnswered) && + (identical(other.dnsStaleAnswered, dnsStaleAnswered) || + other.dnsStaleAnswered == dnsStaleAnswered) && + (identical(other.dnsUnanswered, dnsUnanswered) || + other.dnsUnanswered == dnsUnanswered) && + (identical(other.bootp, bootp) || other.bootp == bootp) && + (identical(other.pxe, pxe) || other.pxe == pxe) && + (identical(other.dhcpAck, dhcpAck) || other.dhcpAck == dhcpAck) && + (identical(other.dhcpDecline, dhcpDecline) || + other.dhcpDecline == dhcpDecline) && + (identical(other.dhcpDiscover, dhcpDiscover) || + other.dhcpDiscover == dhcpDiscover) && + (identical(other.dhcpInform, dhcpInform) || + other.dhcpInform == dhcpInform) && + (identical(other.dhcpNak, dhcpNak) || other.dhcpNak == dhcpNak) && + (identical(other.dhcpOffer, dhcpOffer) || + other.dhcpOffer == dhcpOffer) && + (identical(other.dhcpRelease, dhcpRelease) || + other.dhcpRelease == dhcpRelease) && + (identical(other.dhcpRequest, dhcpRequest) || + other.dhcpRequest == dhcpRequest) && + (identical(other.noAnswer, noAnswer) || + other.noAnswer == noAnswer) && + (identical(other.leasesAllocated4, leasesAllocated4) || + other.leasesAllocated4 == leasesAllocated4) && + (identical(other.leasesPruned4, leasesPruned4) || + other.leasesPruned4 == leasesPruned4) && + (identical(other.leasesAllocated6, leasesAllocated6) || + other.leasesAllocated6 == leasesAllocated6) && + (identical(other.leasesPruned6, leasesPruned6) || + other.leasesPruned6 == leasesPruned6) && + (identical(other.tcpConnections, tcpConnections) || + other.tcpConnections == tcpConnections) && + (identical(other.dnssecMaxCryptoUse, dnssecMaxCryptoUse) || + other.dnssecMaxCryptoUse == dnssecMaxCryptoUse) && + (identical(other.dnssecMaxSigFail, dnssecMaxSigFail) || + other.dnssecMaxSigFail == dnssecMaxSigFail) && + (identical(other.dnssecMaxWork, dnssecMaxWork) || + other.dnssecMaxWork == dnssecMaxWork)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + dnsCacheInserted, + dnsCacheLiveFreed, + dnsQueriesForwarded, + dnsAuthAnswered, + dnsLocalAnswered, + dnsStaleAnswered, + dnsUnanswered, + bootp, + pxe, + dhcpAck, + dhcpDecline, + dhcpDiscover, + dhcpInform, + dhcpNak, + dhcpOffer, + dhcpRelease, + dhcpRequest, + noAnswer, + leasesAllocated4, + leasesPruned4, + leasesAllocated6, + leasesPruned6, + tcpConnections, + dnssecMaxCryptoUse, + dnssecMaxSigFail, + dnssecMaxWork + ]); + + /// Create a copy of Dnsmasq + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$DnsmasqImplCopyWith<_$DnsmasqImpl> get copyWith => + __$$DnsmasqImplCopyWithImpl<_$DnsmasqImpl>(this, _$identity); + + @override + Map toJson() { + return _$$DnsmasqImplToJson( + this, + ); + } +} + +abstract class _Dnsmasq implements Dnsmasq { + const factory _Dnsmasq( + {@JsonKey(name: 'dns_cache_inserted') required final int dnsCacheInserted, + @JsonKey(name: 'dns_cache_live_freed') + required final int dnsCacheLiveFreed, + @JsonKey(name: 'dns_queries_forwarded') + required final int dnsQueriesForwarded, + @JsonKey(name: 'dns_auth_answered') required final int dnsAuthAnswered, + @JsonKey(name: 'dns_local_answered') required final int dnsLocalAnswered, + @JsonKey(name: 'dns_stale_answered') required final int dnsStaleAnswered, + @JsonKey(name: 'dns_unanswered') required final int dnsUnanswered, + @JsonKey(name: 'bootp') required final int bootp, + @JsonKey(name: 'pxe') required final int pxe, + @JsonKey(name: 'dhcp_ack') required final int dhcpAck, + @JsonKey(name: 'dhcp_decline') required final int dhcpDecline, + @JsonKey(name: 'dhcp_discover') required final int dhcpDiscover, + @JsonKey(name: 'dhcp_inform') required final int dhcpInform, + @JsonKey(name: 'dhcp_nak') required final int dhcpNak, + @JsonKey(name: 'dhcp_offer') required final int dhcpOffer, + @JsonKey(name: 'dhcp_release') required final int dhcpRelease, + @JsonKey(name: 'dhcp_request') required final int dhcpRequest, + @JsonKey(name: 'noanswer') required final int noAnswer, + @JsonKey(name: 'leases_allocated_4') required final int leasesAllocated4, + @JsonKey(name: 'leases_pruned_4') required final int leasesPruned4, + @JsonKey(name: 'leases_allocated_6') required final int leasesAllocated6, + @JsonKey(name: 'leases_pruned_6') required final int leasesPruned6, + @JsonKey(name: 'tcp_connections') required final int tcpConnections, + @JsonKey(name: 'dnssec_max_crypto_use') + required final int dnssecMaxCryptoUse, + @JsonKey(name: 'dnssec_max_sig_fail') required final int dnssecMaxSigFail, + @JsonKey(name: 'dnssec_max_work') + required final int dnssecMaxWork}) = _$DnsmasqImpl; + + factory _Dnsmasq.fromJson(Map json) = _$DnsmasqImpl.fromJson; + + @override + @JsonKey(name: 'dns_cache_inserted') + int get dnsCacheInserted; + @override + @JsonKey(name: 'dns_cache_live_freed') + int get dnsCacheLiveFreed; + @override + @JsonKey(name: 'dns_queries_forwarded') + int get dnsQueriesForwarded; + @override + @JsonKey(name: 'dns_auth_answered') + int get dnsAuthAnswered; + @override + @JsonKey(name: 'dns_local_answered') + int get dnsLocalAnswered; + @override + @JsonKey(name: 'dns_stale_answered') + int get dnsStaleAnswered; + @override + @JsonKey(name: 'dns_unanswered') + int get dnsUnanswered; + @override + @JsonKey(name: 'bootp') + int get bootp; + @override + @JsonKey(name: 'pxe') + int get pxe; + @override + @JsonKey(name: 'dhcp_ack') + int get dhcpAck; + @override + @JsonKey(name: 'dhcp_decline') + int get dhcpDecline; + @override + @JsonKey(name: 'dhcp_discover') + int get dhcpDiscover; + @override + @JsonKey(name: 'dhcp_inform') + int get dhcpInform; + @override + @JsonKey(name: 'dhcp_nak') + int get dhcpNak; + @override + @JsonKey(name: 'dhcp_offer') + int get dhcpOffer; + @override + @JsonKey(name: 'dhcp_release') + int get dhcpRelease; + @override + @JsonKey(name: 'dhcp_request') + int get dhcpRequest; + @override + @JsonKey(name: 'noanswer') + int get noAnswer; + @override + @JsonKey(name: 'leases_allocated_4') + int get leasesAllocated4; + @override + @JsonKey(name: 'leases_pruned_4') + int get leasesPruned4; + @override + @JsonKey(name: 'leases_allocated_6') + int get leasesAllocated6; + @override + @JsonKey(name: 'leases_pruned_6') + int get leasesPruned6; + @override + @JsonKey(name: 'tcp_connections') + int get tcpConnections; + @override + @JsonKey(name: 'dnssec_max_crypto_use') + int get dnssecMaxCryptoUse; + @override + @JsonKey(name: 'dnssec_max_sig_fail') + int get dnssecMaxSigFail; + @override + @JsonKey(name: 'dnssec_max_work') + int get dnssecMaxWork; + + /// Create a copy of Dnsmasq + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$DnsmasqImplCopyWith<_$DnsmasqImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/lib/models/api/v6/flt/ftl.g.dart b/lib/models/api/v6/flt/ftl.g.dart new file mode 100644 index 00000000..f328b659 --- /dev/null +++ b/lib/models/api/v6/flt/ftl.g.dart @@ -0,0 +1,145 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'ftl.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$InfoFtlImpl _$$InfoFtlImplFromJson(Map json) => + _$InfoFtlImpl( + ftl: Ftl.fromJson(json['ftl'] as Map), + took: (json['took'] as num).toDouble(), + ); + +Map _$$InfoFtlImplToJson(_$InfoFtlImpl instance) => + { + 'ftl': instance.ftl, + 'took': instance.took, + }; + +_$FtlImpl _$$FtlImplFromJson(Map json) => _$FtlImpl( + database: Database.fromJson(json['database'] as Map), + privacyLevel: (json['privacy_level'] as num).toInt(), + clients: Clients.fromJson(json['clients'] as Map), + pid: (json['pid'] as num).toInt(), + uptime: (json['uptime'] as num).toInt(), + memPercentage: (json['%mem'] as num).toDouble(), + cpuPercentage: (json['%cpu'] as num).toDouble(), + allowDestructive: json['allow_destructive'] as bool, + dnsmasq: Dnsmasq.fromJson(json['dnsmasq'] as Map), + ); + +Map _$$FtlImplToJson(_$FtlImpl instance) => { + 'database': instance.database, + 'privacy_level': instance.privacyLevel, + 'clients': instance.clients, + 'pid': instance.pid, + 'uptime': instance.uptime, + '%mem': instance.memPercentage, + '%cpu': instance.cpuPercentage, + 'allow_destructive': instance.allowDestructive, + 'dnsmasq': instance.dnsmasq, + }; + +_$DatabaseImpl _$$DatabaseImplFromJson(Map json) => + _$DatabaseImpl( + gravity: (json['gravity'] as num).toInt(), + groups: (json['groups'] as num).toInt(), + lists: (json['lists'] as num).toInt(), + clients: (json['clients'] as num).toInt(), + domains: Domains.fromJson(json['domains'] as Map), + ); + +Map _$$DatabaseImplToJson(_$DatabaseImpl instance) => + { + 'gravity': instance.gravity, + 'groups': instance.groups, + 'lists': instance.lists, + 'clients': instance.clients, + 'domains': instance.domains, + }; + +_$DomainsImpl _$$DomainsImplFromJson(Map json) => + _$DomainsImpl( + allowed: (json['allowed'] as num).toInt(), + denied: (json['denied'] as num).toInt(), + ); + +Map _$$DomainsImplToJson(_$DomainsImpl instance) => + { + 'allowed': instance.allowed, + 'denied': instance.denied, + }; + +_$ClientsImpl _$$ClientsImplFromJson(Map json) => + _$ClientsImpl( + total: (json['total'] as num).toInt(), + active: (json['active'] as num).toInt(), + ); + +Map _$$ClientsImplToJson(_$ClientsImpl instance) => + { + 'total': instance.total, + 'active': instance.active, + }; + +_$DnsmasqImpl _$$DnsmasqImplFromJson(Map json) => + _$DnsmasqImpl( + dnsCacheInserted: (json['dns_cache_inserted'] as num).toInt(), + dnsCacheLiveFreed: (json['dns_cache_live_freed'] as num).toInt(), + dnsQueriesForwarded: (json['dns_queries_forwarded'] as num).toInt(), + dnsAuthAnswered: (json['dns_auth_answered'] as num).toInt(), + dnsLocalAnswered: (json['dns_local_answered'] as num).toInt(), + dnsStaleAnswered: (json['dns_stale_answered'] as num).toInt(), + dnsUnanswered: (json['dns_unanswered'] as num).toInt(), + bootp: (json['bootp'] as num).toInt(), + pxe: (json['pxe'] as num).toInt(), + dhcpAck: (json['dhcp_ack'] as num).toInt(), + dhcpDecline: (json['dhcp_decline'] as num).toInt(), + dhcpDiscover: (json['dhcp_discover'] as num).toInt(), + dhcpInform: (json['dhcp_inform'] as num).toInt(), + dhcpNak: (json['dhcp_nak'] as num).toInt(), + dhcpOffer: (json['dhcp_offer'] as num).toInt(), + dhcpRelease: (json['dhcp_release'] as num).toInt(), + dhcpRequest: (json['dhcp_request'] as num).toInt(), + noAnswer: (json['noanswer'] as num).toInt(), + leasesAllocated4: (json['leases_allocated_4'] as num).toInt(), + leasesPruned4: (json['leases_pruned_4'] as num).toInt(), + leasesAllocated6: (json['leases_allocated_6'] as num).toInt(), + leasesPruned6: (json['leases_pruned_6'] as num).toInt(), + tcpConnections: (json['tcp_connections'] as num).toInt(), + dnssecMaxCryptoUse: (json['dnssec_max_crypto_use'] as num).toInt(), + dnssecMaxSigFail: (json['dnssec_max_sig_fail'] as num).toInt(), + dnssecMaxWork: (json['dnssec_max_work'] as num).toInt(), + ); + +Map _$$DnsmasqImplToJson(_$DnsmasqImpl instance) => + { + 'dns_cache_inserted': instance.dnsCacheInserted, + 'dns_cache_live_freed': instance.dnsCacheLiveFreed, + 'dns_queries_forwarded': instance.dnsQueriesForwarded, + 'dns_auth_answered': instance.dnsAuthAnswered, + 'dns_local_answered': instance.dnsLocalAnswered, + 'dns_stale_answered': instance.dnsStaleAnswered, + 'dns_unanswered': instance.dnsUnanswered, + 'bootp': instance.bootp, + 'pxe': instance.pxe, + 'dhcp_ack': instance.dhcpAck, + 'dhcp_decline': instance.dhcpDecline, + 'dhcp_discover': instance.dhcpDiscover, + 'dhcp_inform': instance.dhcpInform, + 'dhcp_nak': instance.dhcpNak, + 'dhcp_offer': instance.dhcpOffer, + 'dhcp_release': instance.dhcpRelease, + 'dhcp_request': instance.dhcpRequest, + 'noanswer': instance.noAnswer, + 'leases_allocated_4': instance.leasesAllocated4, + 'leases_pruned_4': instance.leasesPruned4, + 'leases_allocated_6': instance.leasesAllocated6, + 'leases_pruned_6': instance.leasesPruned6, + 'tcp_connections': instance.tcpConnections, + 'dnssec_max_crypto_use': instance.dnssecMaxCryptoUse, + 'dnssec_max_sig_fail': instance.dnssecMaxSigFail, + 'dnssec_max_work': instance.dnssecMaxWork, + }; diff --git a/lib/models/api/v6/metrics/stats.dart b/lib/models/api/v6/metrics/stats.dart new file mode 100644 index 00000000..53180c43 --- /dev/null +++ b/lib/models/api/v6/metrics/stats.dart @@ -0,0 +1,218 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'stats.freezed.dart'; +part 'stats.g.dart'; + +@freezed +class StatsSummary with _$StatsSummary { + const factory StatsSummary({ + required Queries queries, + required Clients clients, + required Gravity gravity, + required double took, + }) = _StatsSummary; + + factory StatsSummary.fromJson(Map json) => + _$StatsSummaryFromJson(json); +} + +@freezed +class Queries with _$Queries { + const factory Queries({ + required int total, + required int blocked, + @JsonKey(name: 'percent_blocked') required double percentBlocked, + @JsonKey(name: 'unique_domains') required int uniqueDomains, + required int forwarded, + required int cached, + required Types types, + required Status status, + required Replies replies, + }) = _Queries; + + factory Queries.fromJson(Map json) => + _$QueriesFromJson(json); +} + +@freezed +class Types with _$Types { + const factory Types({ + @JsonKey(name: 'A') required int a, + @JsonKey(name: 'AAAA') required int aaaa, + @JsonKey(name: 'ANY') required int any, + @JsonKey(name: 'SRV') required int srv, + @JsonKey(name: 'SOA') required int soa, + @JsonKey(name: 'PTR') required int ptr, + @JsonKey(name: 'TXT') required int txt, + @JsonKey(name: 'NAPTR') required int naptr, + @JsonKey(name: 'MX') required int mx, + @JsonKey(name: 'DS') required int ds, + @JsonKey(name: 'RRSIG') required int rrsig, + @JsonKey(name: 'DNSKEY') required int dnskey, + @JsonKey(name: 'NS') required int ns, + @JsonKey(name: 'SVCB') required int svcb, + @JsonKey(name: 'HTTPS') required int https, + @JsonKey(name: 'OTHER') required int other, + }) = _Types; + + factory Types.fromJson(Map json) => _$TypesFromJson(json); +} + +@freezed +class Status with _$Status { + const factory Status({ + @JsonKey(name: 'UNKNOWN') required int unknown, + @JsonKey(name: 'GRAVITY') required int gravity, + @JsonKey(name: 'FORWARDED') required int forwarded, + @JsonKey(name: 'CACHE') required int cache, + @JsonKey(name: 'REGEX') required int regex, + @JsonKey(name: 'DENYLIST') required int denylist, + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') required int externalBlockedIp, + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') required int externalBlockedNull, + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') required int externalBlockedNxra, + @JsonKey(name: 'GRAVITY_CNAME') required int gravityCname, + @JsonKey(name: 'REGEX_CNAME') required int regexCname, + @JsonKey(name: 'DENYLIST_CNAME') required int denylistCname, + @JsonKey(name: 'RETRIED') required int retried, + @JsonKey(name: 'RETRIED_DNSSEC') required int retriedDnssec, + @JsonKey(name: 'IN_PROGRESS') required int inProgress, + @JsonKey(name: 'DBBUSY') required int dbbusy, + @JsonKey(name: 'SPECIAL_DOMAIN') required int specialDomain, + @JsonKey(name: 'CACHE_STALE') required int cacheStale, + }) = _Status; + + factory Status.fromJson(Map json) => _$StatusFromJson(json); +} + +@freezed +class Replies with _$Replies { + const factory Replies({ + @JsonKey(name: 'UNKNOWN') required int unknown, + @JsonKey(name: 'NODATA') required int nodata, + @JsonKey(name: 'NXDOMAIN') required int nxdomain, + @JsonKey(name: 'CNAME') required int cname, + @JsonKey(name: 'IP') required int ip, + @JsonKey(name: 'DOMAIN') required int domain, + @JsonKey(name: 'RRNAME') required int rrname, + @JsonKey(name: 'SERVFAIL') required int servfail, + @JsonKey(name: 'REFUSED') required int refused, + @JsonKey(name: 'NOTIMP') required int notimp, + @JsonKey(name: 'OTHER') required int other, + @JsonKey(name: 'DNSSEC') required int dnssec, + @JsonKey(name: 'NONE') required int none, + @JsonKey(name: 'BLOB') required int blob, + }) = _Replies; + + factory Replies.fromJson(Map json) => + _$RepliesFromJson(json); +} + +@freezed +class Clients with _$Clients { + const factory Clients({ + required int active, + required int total, + }) = _Clients; + + factory Clients.fromJson(Map json) => + _$ClientsFromJson(json); +} + +@freezed +class Gravity with _$Gravity { + const factory Gravity({ + @JsonKey(name: 'domains_being_blocked') required int domainsBeingBlocked, + @JsonKey(name: 'last_update') required int lastUpdate, + }) = _Gravity; + + factory Gravity.fromJson(Map json) => + _$GravityFromJson(json); +} + +//api/stats/top_tomains +@freezed +class StatsTopDomains with _$StatsTopDomains { + const factory StatsTopDomains({ + required List domains, + @JsonKey(name: 'total_queries') required int totalQueries, + @JsonKey(name: 'blocked_queries') required int blockedQueries, + required double took, + }) = _StatsTopDomains; + + factory StatsTopDomains.fromJson(Map json) => + _$StatsTopDomainsFromJson(json); +} + +@freezed +class Domain with _$Domain { + const factory Domain({ + required String domain, + required int count, + }) = _Domain; + + factory Domain.fromJson(Map json) => _$DomainFromJson(json); +} + +// api/stats/top_clients +@freezed +class StatsTopClients with _$StatsTopClients { + const factory StatsTopClients({ + required List clients, + @JsonKey(name: 'total_queries') required int totalQueries, + @JsonKey(name: 'blocked_queries') required int blockedQueries, + required double took, + }) = _StatsTopClients; + + factory StatsTopClients.fromJson(Map json) => + _$StatsTopClientsFromJson(json); +} + +@freezed +class Client with _$Client { + const factory Client({ + required String ip, + required String name, + required int count, + }) = _Client; + + factory Client.fromJson(Map json) => _$ClientFromJson(json); +} + +// api/stats/StatsUpstreams +@freezed +class StatsUpstreams with _$StatsUpstreams { + const factory StatsUpstreams({ + required List upstreams, + @JsonKey(name: 'forwarded_queries') required int forwardedQueries, + @JsonKey(name: 'total_queries') required int totalQueries, + required double took, + }) = _StatsUpstreams; + + factory StatsUpstreams.fromJson(Map json) => + _$StatsUpstreamsFromJson(json); +} + +@freezed +class Upstream with _$Upstream { + const factory Upstream({ + required String ip, + required String name, + required int port, + required int count, + required Statistics statistics, + }) = _Upstream; + + factory Upstream.fromJson(Map json) => + _$UpstreamFromJson(json); +} + +@freezed +class Statistics with _$Statistics { + const factory Statistics({ + required double response, + required double variance, + }) = _Statistics; + + factory Statistics.fromJson(Map json) => + _$StatisticsFromJson(json); +} diff --git a/lib/models/api/v6/metrics/stats.freezed.dart b/lib/models/api/v6/metrics/stats.freezed.dart new file mode 100644 index 00000000..56fdeea4 --- /dev/null +++ b/lib/models/api/v6/metrics/stats.freezed.dart @@ -0,0 +1,3949 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'stats.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +StatsSummary _$StatsSummaryFromJson(Map json) { + return _StatsSummary.fromJson(json); +} + +/// @nodoc +mixin _$StatsSummary { + Queries get queries => throw _privateConstructorUsedError; + Clients get clients => throw _privateConstructorUsedError; + Gravity get gravity => throw _privateConstructorUsedError; + double get took => throw _privateConstructorUsedError; + + /// Serializes this StatsSummary to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $StatsSummaryCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StatsSummaryCopyWith<$Res> { + factory $StatsSummaryCopyWith( + StatsSummary value, $Res Function(StatsSummary) then) = + _$StatsSummaryCopyWithImpl<$Res, StatsSummary>; + @useResult + $Res call({Queries queries, Clients clients, Gravity gravity, double took}); + + $QueriesCopyWith<$Res> get queries; + $ClientsCopyWith<$Res> get clients; + $GravityCopyWith<$Res> get gravity; +} + +/// @nodoc +class _$StatsSummaryCopyWithImpl<$Res, $Val extends StatsSummary> + implements $StatsSummaryCopyWith<$Res> { + _$StatsSummaryCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? queries = null, + Object? clients = null, + Object? gravity = null, + Object? took = null, + }) { + return _then(_value.copyWith( + queries: null == queries + ? _value.queries + : queries // ignore: cast_nullable_to_non_nullable + as Queries, + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as Clients, + gravity: null == gravity + ? _value.gravity + : gravity // ignore: cast_nullable_to_non_nullable + as Gravity, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $QueriesCopyWith<$Res> get queries { + return $QueriesCopyWith<$Res>(_value.queries, (value) { + return _then(_value.copyWith(queries: value) as $Val); + }); + } + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $ClientsCopyWith<$Res> get clients { + return $ClientsCopyWith<$Res>(_value.clients, (value) { + return _then(_value.copyWith(clients: value) as $Val); + }); + } + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $GravityCopyWith<$Res> get gravity { + return $GravityCopyWith<$Res>(_value.gravity, (value) { + return _then(_value.copyWith(gravity: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$StatsSummaryImplCopyWith<$Res> + implements $StatsSummaryCopyWith<$Res> { + factory _$$StatsSummaryImplCopyWith( + _$StatsSummaryImpl value, $Res Function(_$StatsSummaryImpl) then) = + __$$StatsSummaryImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({Queries queries, Clients clients, Gravity gravity, double took}); + + @override + $QueriesCopyWith<$Res> get queries; + @override + $ClientsCopyWith<$Res> get clients; + @override + $GravityCopyWith<$Res> get gravity; +} + +/// @nodoc +class __$$StatsSummaryImplCopyWithImpl<$Res> + extends _$StatsSummaryCopyWithImpl<$Res, _$StatsSummaryImpl> + implements _$$StatsSummaryImplCopyWith<$Res> { + __$$StatsSummaryImplCopyWithImpl( + _$StatsSummaryImpl _value, $Res Function(_$StatsSummaryImpl) _then) + : super(_value, _then); + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? queries = null, + Object? clients = null, + Object? gravity = null, + Object? took = null, + }) { + return _then(_$StatsSummaryImpl( + queries: null == queries + ? _value.queries + : queries // ignore: cast_nullable_to_non_nullable + as Queries, + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as Clients, + gravity: null == gravity + ? _value.gravity + : gravity // ignore: cast_nullable_to_non_nullable + as Gravity, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$StatsSummaryImpl implements _StatsSummary { + const _$StatsSummaryImpl( + {required this.queries, + required this.clients, + required this.gravity, + required this.took}); + + factory _$StatsSummaryImpl.fromJson(Map json) => + _$$StatsSummaryImplFromJson(json); + + @override + final Queries queries; + @override + final Clients clients; + @override + final Gravity gravity; + @override + final double took; + + @override + String toString() { + return 'StatsSummary(queries: $queries, clients: $clients, gravity: $gravity, took: $took)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$StatsSummaryImpl && + (identical(other.queries, queries) || other.queries == queries) && + (identical(other.clients, clients) || other.clients == clients) && + (identical(other.gravity, gravity) || other.gravity == gravity) && + (identical(other.took, took) || other.took == took)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, queries, clients, gravity, took); + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$StatsSummaryImplCopyWith<_$StatsSummaryImpl> get copyWith => + __$$StatsSummaryImplCopyWithImpl<_$StatsSummaryImpl>(this, _$identity); + + @override + Map toJson() { + return _$$StatsSummaryImplToJson( + this, + ); + } +} + +abstract class _StatsSummary implements StatsSummary { + const factory _StatsSummary( + {required final Queries queries, + required final Clients clients, + required final Gravity gravity, + required final double took}) = _$StatsSummaryImpl; + + factory _StatsSummary.fromJson(Map json) = + _$StatsSummaryImpl.fromJson; + + @override + Queries get queries; + @override + Clients get clients; + @override + Gravity get gravity; + @override + double get took; + + /// Create a copy of StatsSummary + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StatsSummaryImplCopyWith<_$StatsSummaryImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Queries _$QueriesFromJson(Map json) { + return _Queries.fromJson(json); +} + +/// @nodoc +mixin _$Queries { + int get total => throw _privateConstructorUsedError; + int get blocked => throw _privateConstructorUsedError; + @JsonKey(name: 'percent_blocked') + double get percentBlocked => throw _privateConstructorUsedError; + @JsonKey(name: 'unique_domains') + int get uniqueDomains => throw _privateConstructorUsedError; + int get forwarded => throw _privateConstructorUsedError; + int get cached => throw _privateConstructorUsedError; + Types get types => throw _privateConstructorUsedError; + Status get status => throw _privateConstructorUsedError; + Replies get replies => throw _privateConstructorUsedError; + + /// Serializes this Queries to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $QueriesCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $QueriesCopyWith<$Res> { + factory $QueriesCopyWith(Queries value, $Res Function(Queries) then) = + _$QueriesCopyWithImpl<$Res, Queries>; + @useResult + $Res call( + {int total, + int blocked, + @JsonKey(name: 'percent_blocked') double percentBlocked, + @JsonKey(name: 'unique_domains') int uniqueDomains, + int forwarded, + int cached, + Types types, + Status status, + Replies replies}); + + $TypesCopyWith<$Res> get types; + $StatusCopyWith<$Res> get status; + $RepliesCopyWith<$Res> get replies; +} + +/// @nodoc +class _$QueriesCopyWithImpl<$Res, $Val extends Queries> + implements $QueriesCopyWith<$Res> { + _$QueriesCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? total = null, + Object? blocked = null, + Object? percentBlocked = null, + Object? uniqueDomains = null, + Object? forwarded = null, + Object? cached = null, + Object? types = null, + Object? status = null, + Object? replies = null, + }) { + return _then(_value.copyWith( + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + blocked: null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as int, + percentBlocked: null == percentBlocked + ? _value.percentBlocked + : percentBlocked // ignore: cast_nullable_to_non_nullable + as double, + uniqueDomains: null == uniqueDomains + ? _value.uniqueDomains + : uniqueDomains // ignore: cast_nullable_to_non_nullable + as int, + forwarded: null == forwarded + ? _value.forwarded + : forwarded // ignore: cast_nullable_to_non_nullable + as int, + cached: null == cached + ? _value.cached + : cached // ignore: cast_nullable_to_non_nullable + as int, + types: null == types + ? _value.types + : types // ignore: cast_nullable_to_non_nullable + as Types, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as Status, + replies: null == replies + ? _value.replies + : replies // ignore: cast_nullable_to_non_nullable + as Replies, + ) as $Val); + } + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $TypesCopyWith<$Res> get types { + return $TypesCopyWith<$Res>(_value.types, (value) { + return _then(_value.copyWith(types: value) as $Val); + }); + } + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StatusCopyWith<$Res> get status { + return $StatusCopyWith<$Res>(_value.status, (value) { + return _then(_value.copyWith(status: value) as $Val); + }); + } + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $RepliesCopyWith<$Res> get replies { + return $RepliesCopyWith<$Res>(_value.replies, (value) { + return _then(_value.copyWith(replies: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$QueriesImplCopyWith<$Res> implements $QueriesCopyWith<$Res> { + factory _$$QueriesImplCopyWith( + _$QueriesImpl value, $Res Function(_$QueriesImpl) then) = + __$$QueriesImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {int total, + int blocked, + @JsonKey(name: 'percent_blocked') double percentBlocked, + @JsonKey(name: 'unique_domains') int uniqueDomains, + int forwarded, + int cached, + Types types, + Status status, + Replies replies}); + + @override + $TypesCopyWith<$Res> get types; + @override + $StatusCopyWith<$Res> get status; + @override + $RepliesCopyWith<$Res> get replies; +} + +/// @nodoc +class __$$QueriesImplCopyWithImpl<$Res> + extends _$QueriesCopyWithImpl<$Res, _$QueriesImpl> + implements _$$QueriesImplCopyWith<$Res> { + __$$QueriesImplCopyWithImpl( + _$QueriesImpl _value, $Res Function(_$QueriesImpl) _then) + : super(_value, _then); + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? total = null, + Object? blocked = null, + Object? percentBlocked = null, + Object? uniqueDomains = null, + Object? forwarded = null, + Object? cached = null, + Object? types = null, + Object? status = null, + Object? replies = null, + }) { + return _then(_$QueriesImpl( + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + blocked: null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as int, + percentBlocked: null == percentBlocked + ? _value.percentBlocked + : percentBlocked // ignore: cast_nullable_to_non_nullable + as double, + uniqueDomains: null == uniqueDomains + ? _value.uniqueDomains + : uniqueDomains // ignore: cast_nullable_to_non_nullable + as int, + forwarded: null == forwarded + ? _value.forwarded + : forwarded // ignore: cast_nullable_to_non_nullable + as int, + cached: null == cached + ? _value.cached + : cached // ignore: cast_nullable_to_non_nullable + as int, + types: null == types + ? _value.types + : types // ignore: cast_nullable_to_non_nullable + as Types, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as Status, + replies: null == replies + ? _value.replies + : replies // ignore: cast_nullable_to_non_nullable + as Replies, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$QueriesImpl implements _Queries { + const _$QueriesImpl( + {required this.total, + required this.blocked, + @JsonKey(name: 'percent_blocked') required this.percentBlocked, + @JsonKey(name: 'unique_domains') required this.uniqueDomains, + required this.forwarded, + required this.cached, + required this.types, + required this.status, + required this.replies}); + + factory _$QueriesImpl.fromJson(Map json) => + _$$QueriesImplFromJson(json); + + @override + final int total; + @override + final int blocked; + @override + @JsonKey(name: 'percent_blocked') + final double percentBlocked; + @override + @JsonKey(name: 'unique_domains') + final int uniqueDomains; + @override + final int forwarded; + @override + final int cached; + @override + final Types types; + @override + final Status status; + @override + final Replies replies; + + @override + String toString() { + return 'Queries(total: $total, blocked: $blocked, percentBlocked: $percentBlocked, uniqueDomains: $uniqueDomains, forwarded: $forwarded, cached: $cached, types: $types, status: $status, replies: $replies)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$QueriesImpl && + (identical(other.total, total) || other.total == total) && + (identical(other.blocked, blocked) || other.blocked == blocked) && + (identical(other.percentBlocked, percentBlocked) || + other.percentBlocked == percentBlocked) && + (identical(other.uniqueDomains, uniqueDomains) || + other.uniqueDomains == uniqueDomains) && + (identical(other.forwarded, forwarded) || + other.forwarded == forwarded) && + (identical(other.cached, cached) || other.cached == cached) && + (identical(other.types, types) || other.types == types) && + (identical(other.status, status) || other.status == status) && + (identical(other.replies, replies) || other.replies == replies)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, total, blocked, percentBlocked, + uniqueDomains, forwarded, cached, types, status, replies); + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$QueriesImplCopyWith<_$QueriesImpl> get copyWith => + __$$QueriesImplCopyWithImpl<_$QueriesImpl>(this, _$identity); + + @override + Map toJson() { + return _$$QueriesImplToJson( + this, + ); + } +} + +abstract class _Queries implements Queries { + const factory _Queries( + {required final int total, + required final int blocked, + @JsonKey(name: 'percent_blocked') required final double percentBlocked, + @JsonKey(name: 'unique_domains') required final int uniqueDomains, + required final int forwarded, + required final int cached, + required final Types types, + required final Status status, + required final Replies replies}) = _$QueriesImpl; + + factory _Queries.fromJson(Map json) = _$QueriesImpl.fromJson; + + @override + int get total; + @override + int get blocked; + @override + @JsonKey(name: 'percent_blocked') + double get percentBlocked; + @override + @JsonKey(name: 'unique_domains') + int get uniqueDomains; + @override + int get forwarded; + @override + int get cached; + @override + Types get types; + @override + Status get status; + @override + Replies get replies; + + /// Create a copy of Queries + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$QueriesImplCopyWith<_$QueriesImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Types _$TypesFromJson(Map json) { + return _Types.fromJson(json); +} + +/// @nodoc +mixin _$Types { + @JsonKey(name: 'A') + int get a => throw _privateConstructorUsedError; + @JsonKey(name: 'AAAA') + int get aaaa => throw _privateConstructorUsedError; + @JsonKey(name: 'ANY') + int get any => throw _privateConstructorUsedError; + @JsonKey(name: 'SRV') + int get srv => throw _privateConstructorUsedError; + @JsonKey(name: 'SOA') + int get soa => throw _privateConstructorUsedError; + @JsonKey(name: 'PTR') + int get ptr => throw _privateConstructorUsedError; + @JsonKey(name: 'TXT') + int get txt => throw _privateConstructorUsedError; + @JsonKey(name: 'NAPTR') + int get naptr => throw _privateConstructorUsedError; + @JsonKey(name: 'MX') + int get mx => throw _privateConstructorUsedError; + @JsonKey(name: 'DS') + int get ds => throw _privateConstructorUsedError; + @JsonKey(name: 'RRSIG') + int get rrsig => throw _privateConstructorUsedError; + @JsonKey(name: 'DNSKEY') + int get dnskey => throw _privateConstructorUsedError; + @JsonKey(name: 'NS') + int get ns => throw _privateConstructorUsedError; + @JsonKey(name: 'SVCB') + int get svcb => throw _privateConstructorUsedError; + @JsonKey(name: 'HTTPS') + int get https => throw _privateConstructorUsedError; + @JsonKey(name: 'OTHER') + int get other => throw _privateConstructorUsedError; + + /// Serializes this Types to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Types + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $TypesCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $TypesCopyWith<$Res> { + factory $TypesCopyWith(Types value, $Res Function(Types) then) = + _$TypesCopyWithImpl<$Res, Types>; + @useResult + $Res call( + {@JsonKey(name: 'A') int a, + @JsonKey(name: 'AAAA') int aaaa, + @JsonKey(name: 'ANY') int any, + @JsonKey(name: 'SRV') int srv, + @JsonKey(name: 'SOA') int soa, + @JsonKey(name: 'PTR') int ptr, + @JsonKey(name: 'TXT') int txt, + @JsonKey(name: 'NAPTR') int naptr, + @JsonKey(name: 'MX') int mx, + @JsonKey(name: 'DS') int ds, + @JsonKey(name: 'RRSIG') int rrsig, + @JsonKey(name: 'DNSKEY') int dnskey, + @JsonKey(name: 'NS') int ns, + @JsonKey(name: 'SVCB') int svcb, + @JsonKey(name: 'HTTPS') int https, + @JsonKey(name: 'OTHER') int other}); +} + +/// @nodoc +class _$TypesCopyWithImpl<$Res, $Val extends Types> + implements $TypesCopyWith<$Res> { + _$TypesCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Types + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? a = null, + Object? aaaa = null, + Object? any = null, + Object? srv = null, + Object? soa = null, + Object? ptr = null, + Object? txt = null, + Object? naptr = null, + Object? mx = null, + Object? ds = null, + Object? rrsig = null, + Object? dnskey = null, + Object? ns = null, + Object? svcb = null, + Object? https = null, + Object? other = null, + }) { + return _then(_value.copyWith( + a: null == a + ? _value.a + : a // ignore: cast_nullable_to_non_nullable + as int, + aaaa: null == aaaa + ? _value.aaaa + : aaaa // ignore: cast_nullable_to_non_nullable + as int, + any: null == any + ? _value.any + : any // ignore: cast_nullable_to_non_nullable + as int, + srv: null == srv + ? _value.srv + : srv // ignore: cast_nullable_to_non_nullable + as int, + soa: null == soa + ? _value.soa + : soa // ignore: cast_nullable_to_non_nullable + as int, + ptr: null == ptr + ? _value.ptr + : ptr // ignore: cast_nullable_to_non_nullable + as int, + txt: null == txt + ? _value.txt + : txt // ignore: cast_nullable_to_non_nullable + as int, + naptr: null == naptr + ? _value.naptr + : naptr // ignore: cast_nullable_to_non_nullable + as int, + mx: null == mx + ? _value.mx + : mx // ignore: cast_nullable_to_non_nullable + as int, + ds: null == ds + ? _value.ds + : ds // ignore: cast_nullable_to_non_nullable + as int, + rrsig: null == rrsig + ? _value.rrsig + : rrsig // ignore: cast_nullable_to_non_nullable + as int, + dnskey: null == dnskey + ? _value.dnskey + : dnskey // ignore: cast_nullable_to_non_nullable + as int, + ns: null == ns + ? _value.ns + : ns // ignore: cast_nullable_to_non_nullable + as int, + svcb: null == svcb + ? _value.svcb + : svcb // ignore: cast_nullable_to_non_nullable + as int, + https: null == https + ? _value.https + : https // ignore: cast_nullable_to_non_nullable + as int, + other: null == other + ? _value.other + : other // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$TypesImplCopyWith<$Res> implements $TypesCopyWith<$Res> { + factory _$$TypesImplCopyWith( + _$TypesImpl value, $Res Function(_$TypesImpl) then) = + __$$TypesImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {@JsonKey(name: 'A') int a, + @JsonKey(name: 'AAAA') int aaaa, + @JsonKey(name: 'ANY') int any, + @JsonKey(name: 'SRV') int srv, + @JsonKey(name: 'SOA') int soa, + @JsonKey(name: 'PTR') int ptr, + @JsonKey(name: 'TXT') int txt, + @JsonKey(name: 'NAPTR') int naptr, + @JsonKey(name: 'MX') int mx, + @JsonKey(name: 'DS') int ds, + @JsonKey(name: 'RRSIG') int rrsig, + @JsonKey(name: 'DNSKEY') int dnskey, + @JsonKey(name: 'NS') int ns, + @JsonKey(name: 'SVCB') int svcb, + @JsonKey(name: 'HTTPS') int https, + @JsonKey(name: 'OTHER') int other}); +} + +/// @nodoc +class __$$TypesImplCopyWithImpl<$Res> + extends _$TypesCopyWithImpl<$Res, _$TypesImpl> + implements _$$TypesImplCopyWith<$Res> { + __$$TypesImplCopyWithImpl( + _$TypesImpl _value, $Res Function(_$TypesImpl) _then) + : super(_value, _then); + + /// Create a copy of Types + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? a = null, + Object? aaaa = null, + Object? any = null, + Object? srv = null, + Object? soa = null, + Object? ptr = null, + Object? txt = null, + Object? naptr = null, + Object? mx = null, + Object? ds = null, + Object? rrsig = null, + Object? dnskey = null, + Object? ns = null, + Object? svcb = null, + Object? https = null, + Object? other = null, + }) { + return _then(_$TypesImpl( + a: null == a + ? _value.a + : a // ignore: cast_nullable_to_non_nullable + as int, + aaaa: null == aaaa + ? _value.aaaa + : aaaa // ignore: cast_nullable_to_non_nullable + as int, + any: null == any + ? _value.any + : any // ignore: cast_nullable_to_non_nullable + as int, + srv: null == srv + ? _value.srv + : srv // ignore: cast_nullable_to_non_nullable + as int, + soa: null == soa + ? _value.soa + : soa // ignore: cast_nullable_to_non_nullable + as int, + ptr: null == ptr + ? _value.ptr + : ptr // ignore: cast_nullable_to_non_nullable + as int, + txt: null == txt + ? _value.txt + : txt // ignore: cast_nullable_to_non_nullable + as int, + naptr: null == naptr + ? _value.naptr + : naptr // ignore: cast_nullable_to_non_nullable + as int, + mx: null == mx + ? _value.mx + : mx // ignore: cast_nullable_to_non_nullable + as int, + ds: null == ds + ? _value.ds + : ds // ignore: cast_nullable_to_non_nullable + as int, + rrsig: null == rrsig + ? _value.rrsig + : rrsig // ignore: cast_nullable_to_non_nullable + as int, + dnskey: null == dnskey + ? _value.dnskey + : dnskey // ignore: cast_nullable_to_non_nullable + as int, + ns: null == ns + ? _value.ns + : ns // ignore: cast_nullable_to_non_nullable + as int, + svcb: null == svcb + ? _value.svcb + : svcb // ignore: cast_nullable_to_non_nullable + as int, + https: null == https + ? _value.https + : https // ignore: cast_nullable_to_non_nullable + as int, + other: null == other + ? _value.other + : other // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$TypesImpl implements _Types { + const _$TypesImpl( + {@JsonKey(name: 'A') required this.a, + @JsonKey(name: 'AAAA') required this.aaaa, + @JsonKey(name: 'ANY') required this.any, + @JsonKey(name: 'SRV') required this.srv, + @JsonKey(name: 'SOA') required this.soa, + @JsonKey(name: 'PTR') required this.ptr, + @JsonKey(name: 'TXT') required this.txt, + @JsonKey(name: 'NAPTR') required this.naptr, + @JsonKey(name: 'MX') required this.mx, + @JsonKey(name: 'DS') required this.ds, + @JsonKey(name: 'RRSIG') required this.rrsig, + @JsonKey(name: 'DNSKEY') required this.dnskey, + @JsonKey(name: 'NS') required this.ns, + @JsonKey(name: 'SVCB') required this.svcb, + @JsonKey(name: 'HTTPS') required this.https, + @JsonKey(name: 'OTHER') required this.other}); + + factory _$TypesImpl.fromJson(Map json) => + _$$TypesImplFromJson(json); + + @override + @JsonKey(name: 'A') + final int a; + @override + @JsonKey(name: 'AAAA') + final int aaaa; + @override + @JsonKey(name: 'ANY') + final int any; + @override + @JsonKey(name: 'SRV') + final int srv; + @override + @JsonKey(name: 'SOA') + final int soa; + @override + @JsonKey(name: 'PTR') + final int ptr; + @override + @JsonKey(name: 'TXT') + final int txt; + @override + @JsonKey(name: 'NAPTR') + final int naptr; + @override + @JsonKey(name: 'MX') + final int mx; + @override + @JsonKey(name: 'DS') + final int ds; + @override + @JsonKey(name: 'RRSIG') + final int rrsig; + @override + @JsonKey(name: 'DNSKEY') + final int dnskey; + @override + @JsonKey(name: 'NS') + final int ns; + @override + @JsonKey(name: 'SVCB') + final int svcb; + @override + @JsonKey(name: 'HTTPS') + final int https; + @override + @JsonKey(name: 'OTHER') + final int other; + + @override + String toString() { + return 'Types(a: $a, aaaa: $aaaa, any: $any, srv: $srv, soa: $soa, ptr: $ptr, txt: $txt, naptr: $naptr, mx: $mx, ds: $ds, rrsig: $rrsig, dnskey: $dnskey, ns: $ns, svcb: $svcb, https: $https, other: $other)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$TypesImpl && + (identical(other.a, a) || other.a == a) && + (identical(other.aaaa, aaaa) || other.aaaa == aaaa) && + (identical(other.any, any) || other.any == any) && + (identical(other.srv, srv) || other.srv == srv) && + (identical(other.soa, soa) || other.soa == soa) && + (identical(other.ptr, ptr) || other.ptr == ptr) && + (identical(other.txt, txt) || other.txt == txt) && + (identical(other.naptr, naptr) || other.naptr == naptr) && + (identical(other.mx, mx) || other.mx == mx) && + (identical(other.ds, ds) || other.ds == ds) && + (identical(other.rrsig, rrsig) || other.rrsig == rrsig) && + (identical(other.dnskey, dnskey) || other.dnskey == dnskey) && + (identical(other.ns, ns) || other.ns == ns) && + (identical(other.svcb, svcb) || other.svcb == svcb) && + (identical(other.https, https) || other.https == https) && + (identical(other.other, this.other) || other.other == this.other)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, a, aaaa, any, srv, soa, ptr, txt, + naptr, mx, ds, rrsig, dnskey, ns, svcb, https, other); + + /// Create a copy of Types + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$TypesImplCopyWith<_$TypesImpl> get copyWith => + __$$TypesImplCopyWithImpl<_$TypesImpl>(this, _$identity); + + @override + Map toJson() { + return _$$TypesImplToJson( + this, + ); + } +} + +abstract class _Types implements Types { + const factory _Types( + {@JsonKey(name: 'A') required final int a, + @JsonKey(name: 'AAAA') required final int aaaa, + @JsonKey(name: 'ANY') required final int any, + @JsonKey(name: 'SRV') required final int srv, + @JsonKey(name: 'SOA') required final int soa, + @JsonKey(name: 'PTR') required final int ptr, + @JsonKey(name: 'TXT') required final int txt, + @JsonKey(name: 'NAPTR') required final int naptr, + @JsonKey(name: 'MX') required final int mx, + @JsonKey(name: 'DS') required final int ds, + @JsonKey(name: 'RRSIG') required final int rrsig, + @JsonKey(name: 'DNSKEY') required final int dnskey, + @JsonKey(name: 'NS') required final int ns, + @JsonKey(name: 'SVCB') required final int svcb, + @JsonKey(name: 'HTTPS') required final int https, + @JsonKey(name: 'OTHER') required final int other}) = _$TypesImpl; + + factory _Types.fromJson(Map json) = _$TypesImpl.fromJson; + + @override + @JsonKey(name: 'A') + int get a; + @override + @JsonKey(name: 'AAAA') + int get aaaa; + @override + @JsonKey(name: 'ANY') + int get any; + @override + @JsonKey(name: 'SRV') + int get srv; + @override + @JsonKey(name: 'SOA') + int get soa; + @override + @JsonKey(name: 'PTR') + int get ptr; + @override + @JsonKey(name: 'TXT') + int get txt; + @override + @JsonKey(name: 'NAPTR') + int get naptr; + @override + @JsonKey(name: 'MX') + int get mx; + @override + @JsonKey(name: 'DS') + int get ds; + @override + @JsonKey(name: 'RRSIG') + int get rrsig; + @override + @JsonKey(name: 'DNSKEY') + int get dnskey; + @override + @JsonKey(name: 'NS') + int get ns; + @override + @JsonKey(name: 'SVCB') + int get svcb; + @override + @JsonKey(name: 'HTTPS') + int get https; + @override + @JsonKey(name: 'OTHER') + int get other; + + /// Create a copy of Types + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$TypesImplCopyWith<_$TypesImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Status _$StatusFromJson(Map json) { + return _Status.fromJson(json); +} + +/// @nodoc +mixin _$Status { + @JsonKey(name: 'UNKNOWN') + int get unknown => throw _privateConstructorUsedError; + @JsonKey(name: 'GRAVITY') + int get gravity => throw _privateConstructorUsedError; + @JsonKey(name: 'FORWARDED') + int get forwarded => throw _privateConstructorUsedError; + @JsonKey(name: 'CACHE') + int get cache => throw _privateConstructorUsedError; + @JsonKey(name: 'REGEX') + int get regex => throw _privateConstructorUsedError; + @JsonKey(name: 'DENYLIST') + int get denylist => throw _privateConstructorUsedError; + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') + int get externalBlockedIp => throw _privateConstructorUsedError; + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') + int get externalBlockedNull => throw _privateConstructorUsedError; + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') + int get externalBlockedNxra => throw _privateConstructorUsedError; + @JsonKey(name: 'GRAVITY_CNAME') + int get gravityCname => throw _privateConstructorUsedError; + @JsonKey(name: 'REGEX_CNAME') + int get regexCname => throw _privateConstructorUsedError; + @JsonKey(name: 'DENYLIST_CNAME') + int get denylistCname => throw _privateConstructorUsedError; + @JsonKey(name: 'RETRIED') + int get retried => throw _privateConstructorUsedError; + @JsonKey(name: 'RETRIED_DNSSEC') + int get retriedDnssec => throw _privateConstructorUsedError; + @JsonKey(name: 'IN_PROGRESS') + int get inProgress => throw _privateConstructorUsedError; + @JsonKey(name: 'DBBUSY') + int get dbbusy => throw _privateConstructorUsedError; + @JsonKey(name: 'SPECIAL_DOMAIN') + int get specialDomain => throw _privateConstructorUsedError; + @JsonKey(name: 'CACHE_STALE') + int get cacheStale => throw _privateConstructorUsedError; + + /// Serializes this Status to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Status + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $StatusCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StatusCopyWith<$Res> { + factory $StatusCopyWith(Status value, $Res Function(Status) then) = + _$StatusCopyWithImpl<$Res, Status>; + @useResult + $Res call( + {@JsonKey(name: 'UNKNOWN') int unknown, + @JsonKey(name: 'GRAVITY') int gravity, + @JsonKey(name: 'FORWARDED') int forwarded, + @JsonKey(name: 'CACHE') int cache, + @JsonKey(name: 'REGEX') int regex, + @JsonKey(name: 'DENYLIST') int denylist, + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') int externalBlockedIp, + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') int externalBlockedNull, + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') int externalBlockedNxra, + @JsonKey(name: 'GRAVITY_CNAME') int gravityCname, + @JsonKey(name: 'REGEX_CNAME') int regexCname, + @JsonKey(name: 'DENYLIST_CNAME') int denylistCname, + @JsonKey(name: 'RETRIED') int retried, + @JsonKey(name: 'RETRIED_DNSSEC') int retriedDnssec, + @JsonKey(name: 'IN_PROGRESS') int inProgress, + @JsonKey(name: 'DBBUSY') int dbbusy, + @JsonKey(name: 'SPECIAL_DOMAIN') int specialDomain, + @JsonKey(name: 'CACHE_STALE') int cacheStale}); +} + +/// @nodoc +class _$StatusCopyWithImpl<$Res, $Val extends Status> + implements $StatusCopyWith<$Res> { + _$StatusCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Status + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? unknown = null, + Object? gravity = null, + Object? forwarded = null, + Object? cache = null, + Object? regex = null, + Object? denylist = null, + Object? externalBlockedIp = null, + Object? externalBlockedNull = null, + Object? externalBlockedNxra = null, + Object? gravityCname = null, + Object? regexCname = null, + Object? denylistCname = null, + Object? retried = null, + Object? retriedDnssec = null, + Object? inProgress = null, + Object? dbbusy = null, + Object? specialDomain = null, + Object? cacheStale = null, + }) { + return _then(_value.copyWith( + unknown: null == unknown + ? _value.unknown + : unknown // ignore: cast_nullable_to_non_nullable + as int, + gravity: null == gravity + ? _value.gravity + : gravity // ignore: cast_nullable_to_non_nullable + as int, + forwarded: null == forwarded + ? _value.forwarded + : forwarded // ignore: cast_nullable_to_non_nullable + as int, + cache: null == cache + ? _value.cache + : cache // ignore: cast_nullable_to_non_nullable + as int, + regex: null == regex + ? _value.regex + : regex // ignore: cast_nullable_to_non_nullable + as int, + denylist: null == denylist + ? _value.denylist + : denylist // ignore: cast_nullable_to_non_nullable + as int, + externalBlockedIp: null == externalBlockedIp + ? _value.externalBlockedIp + : externalBlockedIp // ignore: cast_nullable_to_non_nullable + as int, + externalBlockedNull: null == externalBlockedNull + ? _value.externalBlockedNull + : externalBlockedNull // ignore: cast_nullable_to_non_nullable + as int, + externalBlockedNxra: null == externalBlockedNxra + ? _value.externalBlockedNxra + : externalBlockedNxra // ignore: cast_nullable_to_non_nullable + as int, + gravityCname: null == gravityCname + ? _value.gravityCname + : gravityCname // ignore: cast_nullable_to_non_nullable + as int, + regexCname: null == regexCname + ? _value.regexCname + : regexCname // ignore: cast_nullable_to_non_nullable + as int, + denylistCname: null == denylistCname + ? _value.denylistCname + : denylistCname // ignore: cast_nullable_to_non_nullable + as int, + retried: null == retried + ? _value.retried + : retried // ignore: cast_nullable_to_non_nullable + as int, + retriedDnssec: null == retriedDnssec + ? _value.retriedDnssec + : retriedDnssec // ignore: cast_nullable_to_non_nullable + as int, + inProgress: null == inProgress + ? _value.inProgress + : inProgress // ignore: cast_nullable_to_non_nullable + as int, + dbbusy: null == dbbusy + ? _value.dbbusy + : dbbusy // ignore: cast_nullable_to_non_nullable + as int, + specialDomain: null == specialDomain + ? _value.specialDomain + : specialDomain // ignore: cast_nullable_to_non_nullable + as int, + cacheStale: null == cacheStale + ? _value.cacheStale + : cacheStale // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$StatusImplCopyWith<$Res> implements $StatusCopyWith<$Res> { + factory _$$StatusImplCopyWith( + _$StatusImpl value, $Res Function(_$StatusImpl) then) = + __$$StatusImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {@JsonKey(name: 'UNKNOWN') int unknown, + @JsonKey(name: 'GRAVITY') int gravity, + @JsonKey(name: 'FORWARDED') int forwarded, + @JsonKey(name: 'CACHE') int cache, + @JsonKey(name: 'REGEX') int regex, + @JsonKey(name: 'DENYLIST') int denylist, + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') int externalBlockedIp, + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') int externalBlockedNull, + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') int externalBlockedNxra, + @JsonKey(name: 'GRAVITY_CNAME') int gravityCname, + @JsonKey(name: 'REGEX_CNAME') int regexCname, + @JsonKey(name: 'DENYLIST_CNAME') int denylistCname, + @JsonKey(name: 'RETRIED') int retried, + @JsonKey(name: 'RETRIED_DNSSEC') int retriedDnssec, + @JsonKey(name: 'IN_PROGRESS') int inProgress, + @JsonKey(name: 'DBBUSY') int dbbusy, + @JsonKey(name: 'SPECIAL_DOMAIN') int specialDomain, + @JsonKey(name: 'CACHE_STALE') int cacheStale}); +} + +/// @nodoc +class __$$StatusImplCopyWithImpl<$Res> + extends _$StatusCopyWithImpl<$Res, _$StatusImpl> + implements _$$StatusImplCopyWith<$Res> { + __$$StatusImplCopyWithImpl( + _$StatusImpl _value, $Res Function(_$StatusImpl) _then) + : super(_value, _then); + + /// Create a copy of Status + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? unknown = null, + Object? gravity = null, + Object? forwarded = null, + Object? cache = null, + Object? regex = null, + Object? denylist = null, + Object? externalBlockedIp = null, + Object? externalBlockedNull = null, + Object? externalBlockedNxra = null, + Object? gravityCname = null, + Object? regexCname = null, + Object? denylistCname = null, + Object? retried = null, + Object? retriedDnssec = null, + Object? inProgress = null, + Object? dbbusy = null, + Object? specialDomain = null, + Object? cacheStale = null, + }) { + return _then(_$StatusImpl( + unknown: null == unknown + ? _value.unknown + : unknown // ignore: cast_nullable_to_non_nullable + as int, + gravity: null == gravity + ? _value.gravity + : gravity // ignore: cast_nullable_to_non_nullable + as int, + forwarded: null == forwarded + ? _value.forwarded + : forwarded // ignore: cast_nullable_to_non_nullable + as int, + cache: null == cache + ? _value.cache + : cache // ignore: cast_nullable_to_non_nullable + as int, + regex: null == regex + ? _value.regex + : regex // ignore: cast_nullable_to_non_nullable + as int, + denylist: null == denylist + ? _value.denylist + : denylist // ignore: cast_nullable_to_non_nullable + as int, + externalBlockedIp: null == externalBlockedIp + ? _value.externalBlockedIp + : externalBlockedIp // ignore: cast_nullable_to_non_nullable + as int, + externalBlockedNull: null == externalBlockedNull + ? _value.externalBlockedNull + : externalBlockedNull // ignore: cast_nullable_to_non_nullable + as int, + externalBlockedNxra: null == externalBlockedNxra + ? _value.externalBlockedNxra + : externalBlockedNxra // ignore: cast_nullable_to_non_nullable + as int, + gravityCname: null == gravityCname + ? _value.gravityCname + : gravityCname // ignore: cast_nullable_to_non_nullable + as int, + regexCname: null == regexCname + ? _value.regexCname + : regexCname // ignore: cast_nullable_to_non_nullable + as int, + denylistCname: null == denylistCname + ? _value.denylistCname + : denylistCname // ignore: cast_nullable_to_non_nullable + as int, + retried: null == retried + ? _value.retried + : retried // ignore: cast_nullable_to_non_nullable + as int, + retriedDnssec: null == retriedDnssec + ? _value.retriedDnssec + : retriedDnssec // ignore: cast_nullable_to_non_nullable + as int, + inProgress: null == inProgress + ? _value.inProgress + : inProgress // ignore: cast_nullable_to_non_nullable + as int, + dbbusy: null == dbbusy + ? _value.dbbusy + : dbbusy // ignore: cast_nullable_to_non_nullable + as int, + specialDomain: null == specialDomain + ? _value.specialDomain + : specialDomain // ignore: cast_nullable_to_non_nullable + as int, + cacheStale: null == cacheStale + ? _value.cacheStale + : cacheStale // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$StatusImpl implements _Status { + const _$StatusImpl( + {@JsonKey(name: 'UNKNOWN') required this.unknown, + @JsonKey(name: 'GRAVITY') required this.gravity, + @JsonKey(name: 'FORWARDED') required this.forwarded, + @JsonKey(name: 'CACHE') required this.cache, + @JsonKey(name: 'REGEX') required this.regex, + @JsonKey(name: 'DENYLIST') required this.denylist, + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') required this.externalBlockedIp, + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') required this.externalBlockedNull, + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') required this.externalBlockedNxra, + @JsonKey(name: 'GRAVITY_CNAME') required this.gravityCname, + @JsonKey(name: 'REGEX_CNAME') required this.regexCname, + @JsonKey(name: 'DENYLIST_CNAME') required this.denylistCname, + @JsonKey(name: 'RETRIED') required this.retried, + @JsonKey(name: 'RETRIED_DNSSEC') required this.retriedDnssec, + @JsonKey(name: 'IN_PROGRESS') required this.inProgress, + @JsonKey(name: 'DBBUSY') required this.dbbusy, + @JsonKey(name: 'SPECIAL_DOMAIN') required this.specialDomain, + @JsonKey(name: 'CACHE_STALE') required this.cacheStale}); + + factory _$StatusImpl.fromJson(Map json) => + _$$StatusImplFromJson(json); + + @override + @JsonKey(name: 'UNKNOWN') + final int unknown; + @override + @JsonKey(name: 'GRAVITY') + final int gravity; + @override + @JsonKey(name: 'FORWARDED') + final int forwarded; + @override + @JsonKey(name: 'CACHE') + final int cache; + @override + @JsonKey(name: 'REGEX') + final int regex; + @override + @JsonKey(name: 'DENYLIST') + final int denylist; + @override + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') + final int externalBlockedIp; + @override + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') + final int externalBlockedNull; + @override + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') + final int externalBlockedNxra; + @override + @JsonKey(name: 'GRAVITY_CNAME') + final int gravityCname; + @override + @JsonKey(name: 'REGEX_CNAME') + final int regexCname; + @override + @JsonKey(name: 'DENYLIST_CNAME') + final int denylistCname; + @override + @JsonKey(name: 'RETRIED') + final int retried; + @override + @JsonKey(name: 'RETRIED_DNSSEC') + final int retriedDnssec; + @override + @JsonKey(name: 'IN_PROGRESS') + final int inProgress; + @override + @JsonKey(name: 'DBBUSY') + final int dbbusy; + @override + @JsonKey(name: 'SPECIAL_DOMAIN') + final int specialDomain; + @override + @JsonKey(name: 'CACHE_STALE') + final int cacheStale; + + @override + String toString() { + return 'Status(unknown: $unknown, gravity: $gravity, forwarded: $forwarded, cache: $cache, regex: $regex, denylist: $denylist, externalBlockedIp: $externalBlockedIp, externalBlockedNull: $externalBlockedNull, externalBlockedNxra: $externalBlockedNxra, gravityCname: $gravityCname, regexCname: $regexCname, denylistCname: $denylistCname, retried: $retried, retriedDnssec: $retriedDnssec, inProgress: $inProgress, dbbusy: $dbbusy, specialDomain: $specialDomain, cacheStale: $cacheStale)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$StatusImpl && + (identical(other.unknown, unknown) || other.unknown == unknown) && + (identical(other.gravity, gravity) || other.gravity == gravity) && + (identical(other.forwarded, forwarded) || + other.forwarded == forwarded) && + (identical(other.cache, cache) || other.cache == cache) && + (identical(other.regex, regex) || other.regex == regex) && + (identical(other.denylist, denylist) || + other.denylist == denylist) && + (identical(other.externalBlockedIp, externalBlockedIp) || + other.externalBlockedIp == externalBlockedIp) && + (identical(other.externalBlockedNull, externalBlockedNull) || + other.externalBlockedNull == externalBlockedNull) && + (identical(other.externalBlockedNxra, externalBlockedNxra) || + other.externalBlockedNxra == externalBlockedNxra) && + (identical(other.gravityCname, gravityCname) || + other.gravityCname == gravityCname) && + (identical(other.regexCname, regexCname) || + other.regexCname == regexCname) && + (identical(other.denylistCname, denylistCname) || + other.denylistCname == denylistCname) && + (identical(other.retried, retried) || other.retried == retried) && + (identical(other.retriedDnssec, retriedDnssec) || + other.retriedDnssec == retriedDnssec) && + (identical(other.inProgress, inProgress) || + other.inProgress == inProgress) && + (identical(other.dbbusy, dbbusy) || other.dbbusy == dbbusy) && + (identical(other.specialDomain, specialDomain) || + other.specialDomain == specialDomain) && + (identical(other.cacheStale, cacheStale) || + other.cacheStale == cacheStale)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + unknown, + gravity, + forwarded, + cache, + regex, + denylist, + externalBlockedIp, + externalBlockedNull, + externalBlockedNxra, + gravityCname, + regexCname, + denylistCname, + retried, + retriedDnssec, + inProgress, + dbbusy, + specialDomain, + cacheStale); + + /// Create a copy of Status + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$StatusImplCopyWith<_$StatusImpl> get copyWith => + __$$StatusImplCopyWithImpl<_$StatusImpl>(this, _$identity); + + @override + Map toJson() { + return _$$StatusImplToJson( + this, + ); + } +} + +abstract class _Status implements Status { + const factory _Status( + {@JsonKey(name: 'UNKNOWN') required final int unknown, + @JsonKey(name: 'GRAVITY') required final int gravity, + @JsonKey(name: 'FORWARDED') required final int forwarded, + @JsonKey(name: 'CACHE') required final int cache, + @JsonKey(name: 'REGEX') required final int regex, + @JsonKey(name: 'DENYLIST') required final int denylist, + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') + required final int externalBlockedIp, + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') + required final int externalBlockedNull, + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') + required final int externalBlockedNxra, + @JsonKey(name: 'GRAVITY_CNAME') required final int gravityCname, + @JsonKey(name: 'REGEX_CNAME') required final int regexCname, + @JsonKey(name: 'DENYLIST_CNAME') required final int denylistCname, + @JsonKey(name: 'RETRIED') required final int retried, + @JsonKey(name: 'RETRIED_DNSSEC') required final int retriedDnssec, + @JsonKey(name: 'IN_PROGRESS') required final int inProgress, + @JsonKey(name: 'DBBUSY') required final int dbbusy, + @JsonKey(name: 'SPECIAL_DOMAIN') required final int specialDomain, + @JsonKey(name: 'CACHE_STALE') required final int cacheStale}) = + _$StatusImpl; + + factory _Status.fromJson(Map json) = _$StatusImpl.fromJson; + + @override + @JsonKey(name: 'UNKNOWN') + int get unknown; + @override + @JsonKey(name: 'GRAVITY') + int get gravity; + @override + @JsonKey(name: 'FORWARDED') + int get forwarded; + @override + @JsonKey(name: 'CACHE') + int get cache; + @override + @JsonKey(name: 'REGEX') + int get regex; + @override + @JsonKey(name: 'DENYLIST') + int get denylist; + @override + @JsonKey(name: 'EXTERNAL_BLOCKED_IP') + int get externalBlockedIp; + @override + @JsonKey(name: 'EXTERNAL_BLOCKED_NULL') + int get externalBlockedNull; + @override + @JsonKey(name: 'EXTERNAL_BLOCKED_NXRA') + int get externalBlockedNxra; + @override + @JsonKey(name: 'GRAVITY_CNAME') + int get gravityCname; + @override + @JsonKey(name: 'REGEX_CNAME') + int get regexCname; + @override + @JsonKey(name: 'DENYLIST_CNAME') + int get denylistCname; + @override + @JsonKey(name: 'RETRIED') + int get retried; + @override + @JsonKey(name: 'RETRIED_DNSSEC') + int get retriedDnssec; + @override + @JsonKey(name: 'IN_PROGRESS') + int get inProgress; + @override + @JsonKey(name: 'DBBUSY') + int get dbbusy; + @override + @JsonKey(name: 'SPECIAL_DOMAIN') + int get specialDomain; + @override + @JsonKey(name: 'CACHE_STALE') + int get cacheStale; + + /// Create a copy of Status + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StatusImplCopyWith<_$StatusImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Replies _$RepliesFromJson(Map json) { + return _Replies.fromJson(json); +} + +/// @nodoc +mixin _$Replies { + @JsonKey(name: 'UNKNOWN') + int get unknown => throw _privateConstructorUsedError; + @JsonKey(name: 'NODATA') + int get nodata => throw _privateConstructorUsedError; + @JsonKey(name: 'NXDOMAIN') + int get nxdomain => throw _privateConstructorUsedError; + @JsonKey(name: 'CNAME') + int get cname => throw _privateConstructorUsedError; + @JsonKey(name: 'IP') + int get ip => throw _privateConstructorUsedError; + @JsonKey(name: 'DOMAIN') + int get domain => throw _privateConstructorUsedError; + @JsonKey(name: 'RRNAME') + int get rrname => throw _privateConstructorUsedError; + @JsonKey(name: 'SERVFAIL') + int get servfail => throw _privateConstructorUsedError; + @JsonKey(name: 'REFUSED') + int get refused => throw _privateConstructorUsedError; + @JsonKey(name: 'NOTIMP') + int get notimp => throw _privateConstructorUsedError; + @JsonKey(name: 'OTHER') + int get other => throw _privateConstructorUsedError; + @JsonKey(name: 'DNSSEC') + int get dnssec => throw _privateConstructorUsedError; + @JsonKey(name: 'NONE') + int get none => throw _privateConstructorUsedError; + @JsonKey(name: 'BLOB') + int get blob => throw _privateConstructorUsedError; + + /// Serializes this Replies to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Replies + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $RepliesCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $RepliesCopyWith<$Res> { + factory $RepliesCopyWith(Replies value, $Res Function(Replies) then) = + _$RepliesCopyWithImpl<$Res, Replies>; + @useResult + $Res call( + {@JsonKey(name: 'UNKNOWN') int unknown, + @JsonKey(name: 'NODATA') int nodata, + @JsonKey(name: 'NXDOMAIN') int nxdomain, + @JsonKey(name: 'CNAME') int cname, + @JsonKey(name: 'IP') int ip, + @JsonKey(name: 'DOMAIN') int domain, + @JsonKey(name: 'RRNAME') int rrname, + @JsonKey(name: 'SERVFAIL') int servfail, + @JsonKey(name: 'REFUSED') int refused, + @JsonKey(name: 'NOTIMP') int notimp, + @JsonKey(name: 'OTHER') int other, + @JsonKey(name: 'DNSSEC') int dnssec, + @JsonKey(name: 'NONE') int none, + @JsonKey(name: 'BLOB') int blob}); +} + +/// @nodoc +class _$RepliesCopyWithImpl<$Res, $Val extends Replies> + implements $RepliesCopyWith<$Res> { + _$RepliesCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Replies + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? unknown = null, + Object? nodata = null, + Object? nxdomain = null, + Object? cname = null, + Object? ip = null, + Object? domain = null, + Object? rrname = null, + Object? servfail = null, + Object? refused = null, + Object? notimp = null, + Object? other = null, + Object? dnssec = null, + Object? none = null, + Object? blob = null, + }) { + return _then(_value.copyWith( + unknown: null == unknown + ? _value.unknown + : unknown // ignore: cast_nullable_to_non_nullable + as int, + nodata: null == nodata + ? _value.nodata + : nodata // ignore: cast_nullable_to_non_nullable + as int, + nxdomain: null == nxdomain + ? _value.nxdomain + : nxdomain // ignore: cast_nullable_to_non_nullable + as int, + cname: null == cname + ? _value.cname + : cname // ignore: cast_nullable_to_non_nullable + as int, + ip: null == ip + ? _value.ip + : ip // ignore: cast_nullable_to_non_nullable + as int, + domain: null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as int, + rrname: null == rrname + ? _value.rrname + : rrname // ignore: cast_nullable_to_non_nullable + as int, + servfail: null == servfail + ? _value.servfail + : servfail // ignore: cast_nullable_to_non_nullable + as int, + refused: null == refused + ? _value.refused + : refused // ignore: cast_nullable_to_non_nullable + as int, + notimp: null == notimp + ? _value.notimp + : notimp // ignore: cast_nullable_to_non_nullable + as int, + other: null == other + ? _value.other + : other // ignore: cast_nullable_to_non_nullable + as int, + dnssec: null == dnssec + ? _value.dnssec + : dnssec // ignore: cast_nullable_to_non_nullable + as int, + none: null == none + ? _value.none + : none // ignore: cast_nullable_to_non_nullable + as int, + blob: null == blob + ? _value.blob + : blob // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$RepliesImplCopyWith<$Res> implements $RepliesCopyWith<$Res> { + factory _$$RepliesImplCopyWith( + _$RepliesImpl value, $Res Function(_$RepliesImpl) then) = + __$$RepliesImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {@JsonKey(name: 'UNKNOWN') int unknown, + @JsonKey(name: 'NODATA') int nodata, + @JsonKey(name: 'NXDOMAIN') int nxdomain, + @JsonKey(name: 'CNAME') int cname, + @JsonKey(name: 'IP') int ip, + @JsonKey(name: 'DOMAIN') int domain, + @JsonKey(name: 'RRNAME') int rrname, + @JsonKey(name: 'SERVFAIL') int servfail, + @JsonKey(name: 'REFUSED') int refused, + @JsonKey(name: 'NOTIMP') int notimp, + @JsonKey(name: 'OTHER') int other, + @JsonKey(name: 'DNSSEC') int dnssec, + @JsonKey(name: 'NONE') int none, + @JsonKey(name: 'BLOB') int blob}); +} + +/// @nodoc +class __$$RepliesImplCopyWithImpl<$Res> + extends _$RepliesCopyWithImpl<$Res, _$RepliesImpl> + implements _$$RepliesImplCopyWith<$Res> { + __$$RepliesImplCopyWithImpl( + _$RepliesImpl _value, $Res Function(_$RepliesImpl) _then) + : super(_value, _then); + + /// Create a copy of Replies + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? unknown = null, + Object? nodata = null, + Object? nxdomain = null, + Object? cname = null, + Object? ip = null, + Object? domain = null, + Object? rrname = null, + Object? servfail = null, + Object? refused = null, + Object? notimp = null, + Object? other = null, + Object? dnssec = null, + Object? none = null, + Object? blob = null, + }) { + return _then(_$RepliesImpl( + unknown: null == unknown + ? _value.unknown + : unknown // ignore: cast_nullable_to_non_nullable + as int, + nodata: null == nodata + ? _value.nodata + : nodata // ignore: cast_nullable_to_non_nullable + as int, + nxdomain: null == nxdomain + ? _value.nxdomain + : nxdomain // ignore: cast_nullable_to_non_nullable + as int, + cname: null == cname + ? _value.cname + : cname // ignore: cast_nullable_to_non_nullable + as int, + ip: null == ip + ? _value.ip + : ip // ignore: cast_nullable_to_non_nullable + as int, + domain: null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as int, + rrname: null == rrname + ? _value.rrname + : rrname // ignore: cast_nullable_to_non_nullable + as int, + servfail: null == servfail + ? _value.servfail + : servfail // ignore: cast_nullable_to_non_nullable + as int, + refused: null == refused + ? _value.refused + : refused // ignore: cast_nullable_to_non_nullable + as int, + notimp: null == notimp + ? _value.notimp + : notimp // ignore: cast_nullable_to_non_nullable + as int, + other: null == other + ? _value.other + : other // ignore: cast_nullable_to_non_nullable + as int, + dnssec: null == dnssec + ? _value.dnssec + : dnssec // ignore: cast_nullable_to_non_nullable + as int, + none: null == none + ? _value.none + : none // ignore: cast_nullable_to_non_nullable + as int, + blob: null == blob + ? _value.blob + : blob // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$RepliesImpl implements _Replies { + const _$RepliesImpl( + {@JsonKey(name: 'UNKNOWN') required this.unknown, + @JsonKey(name: 'NODATA') required this.nodata, + @JsonKey(name: 'NXDOMAIN') required this.nxdomain, + @JsonKey(name: 'CNAME') required this.cname, + @JsonKey(name: 'IP') required this.ip, + @JsonKey(name: 'DOMAIN') required this.domain, + @JsonKey(name: 'RRNAME') required this.rrname, + @JsonKey(name: 'SERVFAIL') required this.servfail, + @JsonKey(name: 'REFUSED') required this.refused, + @JsonKey(name: 'NOTIMP') required this.notimp, + @JsonKey(name: 'OTHER') required this.other, + @JsonKey(name: 'DNSSEC') required this.dnssec, + @JsonKey(name: 'NONE') required this.none, + @JsonKey(name: 'BLOB') required this.blob}); + + factory _$RepliesImpl.fromJson(Map json) => + _$$RepliesImplFromJson(json); + + @override + @JsonKey(name: 'UNKNOWN') + final int unknown; + @override + @JsonKey(name: 'NODATA') + final int nodata; + @override + @JsonKey(name: 'NXDOMAIN') + final int nxdomain; + @override + @JsonKey(name: 'CNAME') + final int cname; + @override + @JsonKey(name: 'IP') + final int ip; + @override + @JsonKey(name: 'DOMAIN') + final int domain; + @override + @JsonKey(name: 'RRNAME') + final int rrname; + @override + @JsonKey(name: 'SERVFAIL') + final int servfail; + @override + @JsonKey(name: 'REFUSED') + final int refused; + @override + @JsonKey(name: 'NOTIMP') + final int notimp; + @override + @JsonKey(name: 'OTHER') + final int other; + @override + @JsonKey(name: 'DNSSEC') + final int dnssec; + @override + @JsonKey(name: 'NONE') + final int none; + @override + @JsonKey(name: 'BLOB') + final int blob; + + @override + String toString() { + return 'Replies(unknown: $unknown, nodata: $nodata, nxdomain: $nxdomain, cname: $cname, ip: $ip, domain: $domain, rrname: $rrname, servfail: $servfail, refused: $refused, notimp: $notimp, other: $other, dnssec: $dnssec, none: $none, blob: $blob)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$RepliesImpl && + (identical(other.unknown, unknown) || other.unknown == unknown) && + (identical(other.nodata, nodata) || other.nodata == nodata) && + (identical(other.nxdomain, nxdomain) || + other.nxdomain == nxdomain) && + (identical(other.cname, cname) || other.cname == cname) && + (identical(other.ip, ip) || other.ip == ip) && + (identical(other.domain, domain) || other.domain == domain) && + (identical(other.rrname, rrname) || other.rrname == rrname) && + (identical(other.servfail, servfail) || + other.servfail == servfail) && + (identical(other.refused, refused) || other.refused == refused) && + (identical(other.notimp, notimp) || other.notimp == notimp) && + (identical(other.other, this.other) || other.other == this.other) && + (identical(other.dnssec, dnssec) || other.dnssec == dnssec) && + (identical(other.none, none) || other.none == none) && + (identical(other.blob, blob) || other.blob == blob)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, unknown, nodata, nxdomain, cname, + ip, domain, rrname, servfail, refused, notimp, other, dnssec, none, blob); + + /// Create a copy of Replies + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$RepliesImplCopyWith<_$RepliesImpl> get copyWith => + __$$RepliesImplCopyWithImpl<_$RepliesImpl>(this, _$identity); + + @override + Map toJson() { + return _$$RepliesImplToJson( + this, + ); + } +} + +abstract class _Replies implements Replies { + const factory _Replies( + {@JsonKey(name: 'UNKNOWN') required final int unknown, + @JsonKey(name: 'NODATA') required final int nodata, + @JsonKey(name: 'NXDOMAIN') required final int nxdomain, + @JsonKey(name: 'CNAME') required final int cname, + @JsonKey(name: 'IP') required final int ip, + @JsonKey(name: 'DOMAIN') required final int domain, + @JsonKey(name: 'RRNAME') required final int rrname, + @JsonKey(name: 'SERVFAIL') required final int servfail, + @JsonKey(name: 'REFUSED') required final int refused, + @JsonKey(name: 'NOTIMP') required final int notimp, + @JsonKey(name: 'OTHER') required final int other, + @JsonKey(name: 'DNSSEC') required final int dnssec, + @JsonKey(name: 'NONE') required final int none, + @JsonKey(name: 'BLOB') required final int blob}) = _$RepliesImpl; + + factory _Replies.fromJson(Map json) = _$RepliesImpl.fromJson; + + @override + @JsonKey(name: 'UNKNOWN') + int get unknown; + @override + @JsonKey(name: 'NODATA') + int get nodata; + @override + @JsonKey(name: 'NXDOMAIN') + int get nxdomain; + @override + @JsonKey(name: 'CNAME') + int get cname; + @override + @JsonKey(name: 'IP') + int get ip; + @override + @JsonKey(name: 'DOMAIN') + int get domain; + @override + @JsonKey(name: 'RRNAME') + int get rrname; + @override + @JsonKey(name: 'SERVFAIL') + int get servfail; + @override + @JsonKey(name: 'REFUSED') + int get refused; + @override + @JsonKey(name: 'NOTIMP') + int get notimp; + @override + @JsonKey(name: 'OTHER') + int get other; + @override + @JsonKey(name: 'DNSSEC') + int get dnssec; + @override + @JsonKey(name: 'NONE') + int get none; + @override + @JsonKey(name: 'BLOB') + int get blob; + + /// Create a copy of Replies + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$RepliesImplCopyWith<_$RepliesImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Clients _$ClientsFromJson(Map json) { + return _Clients.fromJson(json); +} + +/// @nodoc +mixin _$Clients { + int get active => throw _privateConstructorUsedError; + int get total => throw _privateConstructorUsedError; + + /// Serializes this Clients to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $ClientsCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ClientsCopyWith<$Res> { + factory $ClientsCopyWith(Clients value, $Res Function(Clients) then) = + _$ClientsCopyWithImpl<$Res, Clients>; + @useResult + $Res call({int active, int total}); +} + +/// @nodoc +class _$ClientsCopyWithImpl<$Res, $Val extends Clients> + implements $ClientsCopyWith<$Res> { + _$ClientsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? active = null, + Object? total = null, + }) { + return _then(_value.copyWith( + active: null == active + ? _value.active + : active // ignore: cast_nullable_to_non_nullable + as int, + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$ClientsImplCopyWith<$Res> implements $ClientsCopyWith<$Res> { + factory _$$ClientsImplCopyWith( + _$ClientsImpl value, $Res Function(_$ClientsImpl) then) = + __$$ClientsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int active, int total}); +} + +/// @nodoc +class __$$ClientsImplCopyWithImpl<$Res> + extends _$ClientsCopyWithImpl<$Res, _$ClientsImpl> + implements _$$ClientsImplCopyWith<$Res> { + __$$ClientsImplCopyWithImpl( + _$ClientsImpl _value, $Res Function(_$ClientsImpl) _then) + : super(_value, _then); + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? active = null, + Object? total = null, + }) { + return _then(_$ClientsImpl( + active: null == active + ? _value.active + : active // ignore: cast_nullable_to_non_nullable + as int, + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$ClientsImpl implements _Clients { + const _$ClientsImpl({required this.active, required this.total}); + + factory _$ClientsImpl.fromJson(Map json) => + _$$ClientsImplFromJson(json); + + @override + final int active; + @override + final int total; + + @override + String toString() { + return 'Clients(active: $active, total: $total)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ClientsImpl && + (identical(other.active, active) || other.active == active) && + (identical(other.total, total) || other.total == total)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, active, total); + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$ClientsImplCopyWith<_$ClientsImpl> get copyWith => + __$$ClientsImplCopyWithImpl<_$ClientsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$ClientsImplToJson( + this, + ); + } +} + +abstract class _Clients implements Clients { + const factory _Clients( + {required final int active, required final int total}) = _$ClientsImpl; + + factory _Clients.fromJson(Map json) = _$ClientsImpl.fromJson; + + @override + int get active; + @override + int get total; + + /// Create a copy of Clients + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ClientsImplCopyWith<_$ClientsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Gravity _$GravityFromJson(Map json) { + return _Gravity.fromJson(json); +} + +/// @nodoc +mixin _$Gravity { + @JsonKey(name: 'domains_being_blocked') + int get domainsBeingBlocked => throw _privateConstructorUsedError; + @JsonKey(name: 'last_update') + int get lastUpdate => throw _privateConstructorUsedError; + + /// Serializes this Gravity to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Gravity + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $GravityCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $GravityCopyWith<$Res> { + factory $GravityCopyWith(Gravity value, $Res Function(Gravity) then) = + _$GravityCopyWithImpl<$Res, Gravity>; + @useResult + $Res call( + {@JsonKey(name: 'domains_being_blocked') int domainsBeingBlocked, + @JsonKey(name: 'last_update') int lastUpdate}); +} + +/// @nodoc +class _$GravityCopyWithImpl<$Res, $Val extends Gravity> + implements $GravityCopyWith<$Res> { + _$GravityCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Gravity + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domainsBeingBlocked = null, + Object? lastUpdate = null, + }) { + return _then(_value.copyWith( + domainsBeingBlocked: null == domainsBeingBlocked + ? _value.domainsBeingBlocked + : domainsBeingBlocked // ignore: cast_nullable_to_non_nullable + as int, + lastUpdate: null == lastUpdate + ? _value.lastUpdate + : lastUpdate // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$GravityImplCopyWith<$Res> implements $GravityCopyWith<$Res> { + factory _$$GravityImplCopyWith( + _$GravityImpl value, $Res Function(_$GravityImpl) then) = + __$$GravityImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {@JsonKey(name: 'domains_being_blocked') int domainsBeingBlocked, + @JsonKey(name: 'last_update') int lastUpdate}); +} + +/// @nodoc +class __$$GravityImplCopyWithImpl<$Res> + extends _$GravityCopyWithImpl<$Res, _$GravityImpl> + implements _$$GravityImplCopyWith<$Res> { + __$$GravityImplCopyWithImpl( + _$GravityImpl _value, $Res Function(_$GravityImpl) _then) + : super(_value, _then); + + /// Create a copy of Gravity + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domainsBeingBlocked = null, + Object? lastUpdate = null, + }) { + return _then(_$GravityImpl( + domainsBeingBlocked: null == domainsBeingBlocked + ? _value.domainsBeingBlocked + : domainsBeingBlocked // ignore: cast_nullable_to_non_nullable + as int, + lastUpdate: null == lastUpdate + ? _value.lastUpdate + : lastUpdate // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$GravityImpl implements _Gravity { + const _$GravityImpl( + {@JsonKey(name: 'domains_being_blocked') + required this.domainsBeingBlocked, + @JsonKey(name: 'last_update') required this.lastUpdate}); + + factory _$GravityImpl.fromJson(Map json) => + _$$GravityImplFromJson(json); + + @override + @JsonKey(name: 'domains_being_blocked') + final int domainsBeingBlocked; + @override + @JsonKey(name: 'last_update') + final int lastUpdate; + + @override + String toString() { + return 'Gravity(domainsBeingBlocked: $domainsBeingBlocked, lastUpdate: $lastUpdate)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$GravityImpl && + (identical(other.domainsBeingBlocked, domainsBeingBlocked) || + other.domainsBeingBlocked == domainsBeingBlocked) && + (identical(other.lastUpdate, lastUpdate) || + other.lastUpdate == lastUpdate)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, domainsBeingBlocked, lastUpdate); + + /// Create a copy of Gravity + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$GravityImplCopyWith<_$GravityImpl> get copyWith => + __$$GravityImplCopyWithImpl<_$GravityImpl>(this, _$identity); + + @override + Map toJson() { + return _$$GravityImplToJson( + this, + ); + } +} + +abstract class _Gravity implements Gravity { + const factory _Gravity( + {@JsonKey(name: 'domains_being_blocked') + required final int domainsBeingBlocked, + @JsonKey(name: 'last_update') required final int lastUpdate}) = + _$GravityImpl; + + factory _Gravity.fromJson(Map json) = _$GravityImpl.fromJson; + + @override + @JsonKey(name: 'domains_being_blocked') + int get domainsBeingBlocked; + @override + @JsonKey(name: 'last_update') + int get lastUpdate; + + /// Create a copy of Gravity + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$GravityImplCopyWith<_$GravityImpl> get copyWith => + throw _privateConstructorUsedError; +} + +StatsTopDomains _$StatsTopDomainsFromJson(Map json) { + return _StatsTopDomains.fromJson(json); +} + +/// @nodoc +mixin _$StatsTopDomains { + List get domains => throw _privateConstructorUsedError; + @JsonKey(name: 'total_queries') + int get totalQueries => throw _privateConstructorUsedError; + @JsonKey(name: 'blocked_queries') + int get blockedQueries => throw _privateConstructorUsedError; + double get took => throw _privateConstructorUsedError; + + /// Serializes this StatsTopDomains to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of StatsTopDomains + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $StatsTopDomainsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StatsTopDomainsCopyWith<$Res> { + factory $StatsTopDomainsCopyWith( + StatsTopDomains value, $Res Function(StatsTopDomains) then) = + _$StatsTopDomainsCopyWithImpl<$Res, StatsTopDomains>; + @useResult + $Res call( + {List domains, + @JsonKey(name: 'total_queries') int totalQueries, + @JsonKey(name: 'blocked_queries') int blockedQueries, + double took}); +} + +/// @nodoc +class _$StatsTopDomainsCopyWithImpl<$Res, $Val extends StatsTopDomains> + implements $StatsTopDomainsCopyWith<$Res> { + _$StatsTopDomainsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of StatsTopDomains + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domains = null, + Object? totalQueries = null, + Object? blockedQueries = null, + Object? took = null, + }) { + return _then(_value.copyWith( + domains: null == domains + ? _value.domains + : domains // ignore: cast_nullable_to_non_nullable + as List, + totalQueries: null == totalQueries + ? _value.totalQueries + : totalQueries // ignore: cast_nullable_to_non_nullable + as int, + blockedQueries: null == blockedQueries + ? _value.blockedQueries + : blockedQueries // ignore: cast_nullable_to_non_nullable + as int, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$StatsTopDomainsImplCopyWith<$Res> + implements $StatsTopDomainsCopyWith<$Res> { + factory _$$StatsTopDomainsImplCopyWith(_$StatsTopDomainsImpl value, + $Res Function(_$StatsTopDomainsImpl) then) = + __$$StatsTopDomainsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {List domains, + @JsonKey(name: 'total_queries') int totalQueries, + @JsonKey(name: 'blocked_queries') int blockedQueries, + double took}); +} + +/// @nodoc +class __$$StatsTopDomainsImplCopyWithImpl<$Res> + extends _$StatsTopDomainsCopyWithImpl<$Res, _$StatsTopDomainsImpl> + implements _$$StatsTopDomainsImplCopyWith<$Res> { + __$$StatsTopDomainsImplCopyWithImpl( + _$StatsTopDomainsImpl _value, $Res Function(_$StatsTopDomainsImpl) _then) + : super(_value, _then); + + /// Create a copy of StatsTopDomains + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domains = null, + Object? totalQueries = null, + Object? blockedQueries = null, + Object? took = null, + }) { + return _then(_$StatsTopDomainsImpl( + domains: null == domains + ? _value._domains + : domains // ignore: cast_nullable_to_non_nullable + as List, + totalQueries: null == totalQueries + ? _value.totalQueries + : totalQueries // ignore: cast_nullable_to_non_nullable + as int, + blockedQueries: null == blockedQueries + ? _value.blockedQueries + : blockedQueries // ignore: cast_nullable_to_non_nullable + as int, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$StatsTopDomainsImpl implements _StatsTopDomains { + const _$StatsTopDomainsImpl( + {required final List domains, + @JsonKey(name: 'total_queries') required this.totalQueries, + @JsonKey(name: 'blocked_queries') required this.blockedQueries, + required this.took}) + : _domains = domains; + + factory _$StatsTopDomainsImpl.fromJson(Map json) => + _$$StatsTopDomainsImplFromJson(json); + + final List _domains; + @override + List get domains { + if (_domains is EqualUnmodifiableListView) return _domains; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_domains); + } + + @override + @JsonKey(name: 'total_queries') + final int totalQueries; + @override + @JsonKey(name: 'blocked_queries') + final int blockedQueries; + @override + final double took; + + @override + String toString() { + return 'StatsTopDomains(domains: $domains, totalQueries: $totalQueries, blockedQueries: $blockedQueries, took: $took)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$StatsTopDomainsImpl && + const DeepCollectionEquality().equals(other._domains, _domains) && + (identical(other.totalQueries, totalQueries) || + other.totalQueries == totalQueries) && + (identical(other.blockedQueries, blockedQueries) || + other.blockedQueries == blockedQueries) && + (identical(other.took, took) || other.took == took)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_domains), + totalQueries, + blockedQueries, + took); + + /// Create a copy of StatsTopDomains + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$StatsTopDomainsImplCopyWith<_$StatsTopDomainsImpl> get copyWith => + __$$StatsTopDomainsImplCopyWithImpl<_$StatsTopDomainsImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$StatsTopDomainsImplToJson( + this, + ); + } +} + +abstract class _StatsTopDomains implements StatsTopDomains { + const factory _StatsTopDomains( + {required final List domains, + @JsonKey(name: 'total_queries') required final int totalQueries, + @JsonKey(name: 'blocked_queries') required final int blockedQueries, + required final double took}) = _$StatsTopDomainsImpl; + + factory _StatsTopDomains.fromJson(Map json) = + _$StatsTopDomainsImpl.fromJson; + + @override + List get domains; + @override + @JsonKey(name: 'total_queries') + int get totalQueries; + @override + @JsonKey(name: 'blocked_queries') + int get blockedQueries; + @override + double get took; + + /// Create a copy of StatsTopDomains + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StatsTopDomainsImplCopyWith<_$StatsTopDomainsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Domain _$DomainFromJson(Map json) { + return _Domain.fromJson(json); +} + +/// @nodoc +mixin _$Domain { + String get domain => throw _privateConstructorUsedError; + int get count => throw _privateConstructorUsedError; + + /// Serializes this Domain to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Domain + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $DomainCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DomainCopyWith<$Res> { + factory $DomainCopyWith(Domain value, $Res Function(Domain) then) = + _$DomainCopyWithImpl<$Res, Domain>; + @useResult + $Res call({String domain, int count}); +} + +/// @nodoc +class _$DomainCopyWithImpl<$Res, $Val extends Domain> + implements $DomainCopyWith<$Res> { + _$DomainCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Domain + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domain = null, + Object? count = null, + }) { + return _then(_value.copyWith( + domain: null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + count: null == count + ? _value.count + : count // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$DomainImplCopyWith<$Res> implements $DomainCopyWith<$Res> { + factory _$$DomainImplCopyWith( + _$DomainImpl value, $Res Function(_$DomainImpl) then) = + __$$DomainImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String domain, int count}); +} + +/// @nodoc +class __$$DomainImplCopyWithImpl<$Res> + extends _$DomainCopyWithImpl<$Res, _$DomainImpl> + implements _$$DomainImplCopyWith<$Res> { + __$$DomainImplCopyWithImpl( + _$DomainImpl _value, $Res Function(_$DomainImpl) _then) + : super(_value, _then); + + /// Create a copy of Domain + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domain = null, + Object? count = null, + }) { + return _then(_$DomainImpl( + domain: null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + count: null == count + ? _value.count + : count // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$DomainImpl implements _Domain { + const _$DomainImpl({required this.domain, required this.count}); + + factory _$DomainImpl.fromJson(Map json) => + _$$DomainImplFromJson(json); + + @override + final String domain; + @override + final int count; + + @override + String toString() { + return 'Domain(domain: $domain, count: $count)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DomainImpl && + (identical(other.domain, domain) || other.domain == domain) && + (identical(other.count, count) || other.count == count)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, domain, count); + + /// Create a copy of Domain + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$DomainImplCopyWith<_$DomainImpl> get copyWith => + __$$DomainImplCopyWithImpl<_$DomainImpl>(this, _$identity); + + @override + Map toJson() { + return _$$DomainImplToJson( + this, + ); + } +} + +abstract class _Domain implements Domain { + const factory _Domain( + {required final String domain, required final int count}) = _$DomainImpl; + + factory _Domain.fromJson(Map json) = _$DomainImpl.fromJson; + + @override + String get domain; + @override + int get count; + + /// Create a copy of Domain + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$DomainImplCopyWith<_$DomainImpl> get copyWith => + throw _privateConstructorUsedError; +} + +StatsTopClients _$StatsTopClientsFromJson(Map json) { + return _StatsTopClients.fromJson(json); +} + +/// @nodoc +mixin _$StatsTopClients { + List get clients => throw _privateConstructorUsedError; + @JsonKey(name: 'total_queries') + int get totalQueries => throw _privateConstructorUsedError; + @JsonKey(name: 'blocked_queries') + int get blockedQueries => throw _privateConstructorUsedError; + double get took => throw _privateConstructorUsedError; + + /// Serializes this StatsTopClients to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of StatsTopClients + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $StatsTopClientsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StatsTopClientsCopyWith<$Res> { + factory $StatsTopClientsCopyWith( + StatsTopClients value, $Res Function(StatsTopClients) then) = + _$StatsTopClientsCopyWithImpl<$Res, StatsTopClients>; + @useResult + $Res call( + {List clients, + @JsonKey(name: 'total_queries') int totalQueries, + @JsonKey(name: 'blocked_queries') int blockedQueries, + double took}); +} + +/// @nodoc +class _$StatsTopClientsCopyWithImpl<$Res, $Val extends StatsTopClients> + implements $StatsTopClientsCopyWith<$Res> { + _$StatsTopClientsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of StatsTopClients + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? clients = null, + Object? totalQueries = null, + Object? blockedQueries = null, + Object? took = null, + }) { + return _then(_value.copyWith( + clients: null == clients + ? _value.clients + : clients // ignore: cast_nullable_to_non_nullable + as List, + totalQueries: null == totalQueries + ? _value.totalQueries + : totalQueries // ignore: cast_nullable_to_non_nullable + as int, + blockedQueries: null == blockedQueries + ? _value.blockedQueries + : blockedQueries // ignore: cast_nullable_to_non_nullable + as int, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$StatsTopClientsImplCopyWith<$Res> + implements $StatsTopClientsCopyWith<$Res> { + factory _$$StatsTopClientsImplCopyWith(_$StatsTopClientsImpl value, + $Res Function(_$StatsTopClientsImpl) then) = + __$$StatsTopClientsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {List clients, + @JsonKey(name: 'total_queries') int totalQueries, + @JsonKey(name: 'blocked_queries') int blockedQueries, + double took}); +} + +/// @nodoc +class __$$StatsTopClientsImplCopyWithImpl<$Res> + extends _$StatsTopClientsCopyWithImpl<$Res, _$StatsTopClientsImpl> + implements _$$StatsTopClientsImplCopyWith<$Res> { + __$$StatsTopClientsImplCopyWithImpl( + _$StatsTopClientsImpl _value, $Res Function(_$StatsTopClientsImpl) _then) + : super(_value, _then); + + /// Create a copy of StatsTopClients + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? clients = null, + Object? totalQueries = null, + Object? blockedQueries = null, + Object? took = null, + }) { + return _then(_$StatsTopClientsImpl( + clients: null == clients + ? _value._clients + : clients // ignore: cast_nullable_to_non_nullable + as List, + totalQueries: null == totalQueries + ? _value.totalQueries + : totalQueries // ignore: cast_nullable_to_non_nullable + as int, + blockedQueries: null == blockedQueries + ? _value.blockedQueries + : blockedQueries // ignore: cast_nullable_to_non_nullable + as int, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$StatsTopClientsImpl implements _StatsTopClients { + const _$StatsTopClientsImpl( + {required final List clients, + @JsonKey(name: 'total_queries') required this.totalQueries, + @JsonKey(name: 'blocked_queries') required this.blockedQueries, + required this.took}) + : _clients = clients; + + factory _$StatsTopClientsImpl.fromJson(Map json) => + _$$StatsTopClientsImplFromJson(json); + + final List _clients; + @override + List get clients { + if (_clients is EqualUnmodifiableListView) return _clients; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_clients); + } + + @override + @JsonKey(name: 'total_queries') + final int totalQueries; + @override + @JsonKey(name: 'blocked_queries') + final int blockedQueries; + @override + final double took; + + @override + String toString() { + return 'StatsTopClients(clients: $clients, totalQueries: $totalQueries, blockedQueries: $blockedQueries, took: $took)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$StatsTopClientsImpl && + const DeepCollectionEquality().equals(other._clients, _clients) && + (identical(other.totalQueries, totalQueries) || + other.totalQueries == totalQueries) && + (identical(other.blockedQueries, blockedQueries) || + other.blockedQueries == blockedQueries) && + (identical(other.took, took) || other.took == took)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_clients), + totalQueries, + blockedQueries, + took); + + /// Create a copy of StatsTopClients + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$StatsTopClientsImplCopyWith<_$StatsTopClientsImpl> get copyWith => + __$$StatsTopClientsImplCopyWithImpl<_$StatsTopClientsImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$StatsTopClientsImplToJson( + this, + ); + } +} + +abstract class _StatsTopClients implements StatsTopClients { + const factory _StatsTopClients( + {required final List clients, + @JsonKey(name: 'total_queries') required final int totalQueries, + @JsonKey(name: 'blocked_queries') required final int blockedQueries, + required final double took}) = _$StatsTopClientsImpl; + + factory _StatsTopClients.fromJson(Map json) = + _$StatsTopClientsImpl.fromJson; + + @override + List get clients; + @override + @JsonKey(name: 'total_queries') + int get totalQueries; + @override + @JsonKey(name: 'blocked_queries') + int get blockedQueries; + @override + double get took; + + /// Create a copy of StatsTopClients + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StatsTopClientsImplCopyWith<_$StatsTopClientsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Client _$ClientFromJson(Map json) { + return _Client.fromJson(json); +} + +/// @nodoc +mixin _$Client { + String get ip => throw _privateConstructorUsedError; + String get name => throw _privateConstructorUsedError; + int get count => throw _privateConstructorUsedError; + + /// Serializes this Client to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Client + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $ClientCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ClientCopyWith<$Res> { + factory $ClientCopyWith(Client value, $Res Function(Client) then) = + _$ClientCopyWithImpl<$Res, Client>; + @useResult + $Res call({String ip, String name, int count}); +} + +/// @nodoc +class _$ClientCopyWithImpl<$Res, $Val extends Client> + implements $ClientCopyWith<$Res> { + _$ClientCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Client + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? ip = null, + Object? name = null, + Object? count = null, + }) { + return _then(_value.copyWith( + ip: null == ip + ? _value.ip + : ip // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + count: null == count + ? _value.count + : count // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$ClientImplCopyWith<$Res> implements $ClientCopyWith<$Res> { + factory _$$ClientImplCopyWith( + _$ClientImpl value, $Res Function(_$ClientImpl) then) = + __$$ClientImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String ip, String name, int count}); +} + +/// @nodoc +class __$$ClientImplCopyWithImpl<$Res> + extends _$ClientCopyWithImpl<$Res, _$ClientImpl> + implements _$$ClientImplCopyWith<$Res> { + __$$ClientImplCopyWithImpl( + _$ClientImpl _value, $Res Function(_$ClientImpl) _then) + : super(_value, _then); + + /// Create a copy of Client + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? ip = null, + Object? name = null, + Object? count = null, + }) { + return _then(_$ClientImpl( + ip: null == ip + ? _value.ip + : ip // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + count: null == count + ? _value.count + : count // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$ClientImpl implements _Client { + const _$ClientImpl( + {required this.ip, required this.name, required this.count}); + + factory _$ClientImpl.fromJson(Map json) => + _$$ClientImplFromJson(json); + + @override + final String ip; + @override + final String name; + @override + final int count; + + @override + String toString() { + return 'Client(ip: $ip, name: $name, count: $count)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ClientImpl && + (identical(other.ip, ip) || other.ip == ip) && + (identical(other.name, name) || other.name == name) && + (identical(other.count, count) || other.count == count)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, ip, name, count); + + /// Create a copy of Client + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$ClientImplCopyWith<_$ClientImpl> get copyWith => + __$$ClientImplCopyWithImpl<_$ClientImpl>(this, _$identity); + + @override + Map toJson() { + return _$$ClientImplToJson( + this, + ); + } +} + +abstract class _Client implements Client { + const factory _Client( + {required final String ip, + required final String name, + required final int count}) = _$ClientImpl; + + factory _Client.fromJson(Map json) = _$ClientImpl.fromJson; + + @override + String get ip; + @override + String get name; + @override + int get count; + + /// Create a copy of Client + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ClientImplCopyWith<_$ClientImpl> get copyWith => + throw _privateConstructorUsedError; +} + +StatsUpstreams _$StatsUpstreamsFromJson(Map json) { + return _StatsUpstreams.fromJson(json); +} + +/// @nodoc +mixin _$StatsUpstreams { + List get upstreams => throw _privateConstructorUsedError; + @JsonKey(name: 'forwarded_queries') + int get forwardedQueries => throw _privateConstructorUsedError; + @JsonKey(name: 'total_queries') + int get totalQueries => throw _privateConstructorUsedError; + double get took => throw _privateConstructorUsedError; + + /// Serializes this StatsUpstreams to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of StatsUpstreams + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $StatsUpstreamsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StatsUpstreamsCopyWith<$Res> { + factory $StatsUpstreamsCopyWith( + StatsUpstreams value, $Res Function(StatsUpstreams) then) = + _$StatsUpstreamsCopyWithImpl<$Res, StatsUpstreams>; + @useResult + $Res call( + {List upstreams, + @JsonKey(name: 'forwarded_queries') int forwardedQueries, + @JsonKey(name: 'total_queries') int totalQueries, + double took}); +} + +/// @nodoc +class _$StatsUpstreamsCopyWithImpl<$Res, $Val extends StatsUpstreams> + implements $StatsUpstreamsCopyWith<$Res> { + _$StatsUpstreamsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of StatsUpstreams + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? upstreams = null, + Object? forwardedQueries = null, + Object? totalQueries = null, + Object? took = null, + }) { + return _then(_value.copyWith( + upstreams: null == upstreams + ? _value.upstreams + : upstreams // ignore: cast_nullable_to_non_nullable + as List, + forwardedQueries: null == forwardedQueries + ? _value.forwardedQueries + : forwardedQueries // ignore: cast_nullable_to_non_nullable + as int, + totalQueries: null == totalQueries + ? _value.totalQueries + : totalQueries // ignore: cast_nullable_to_non_nullable + as int, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$StatsUpstreamsImplCopyWith<$Res> + implements $StatsUpstreamsCopyWith<$Res> { + factory _$$StatsUpstreamsImplCopyWith(_$StatsUpstreamsImpl value, + $Res Function(_$StatsUpstreamsImpl) then) = + __$$StatsUpstreamsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {List upstreams, + @JsonKey(name: 'forwarded_queries') int forwardedQueries, + @JsonKey(name: 'total_queries') int totalQueries, + double took}); +} + +/// @nodoc +class __$$StatsUpstreamsImplCopyWithImpl<$Res> + extends _$StatsUpstreamsCopyWithImpl<$Res, _$StatsUpstreamsImpl> + implements _$$StatsUpstreamsImplCopyWith<$Res> { + __$$StatsUpstreamsImplCopyWithImpl( + _$StatsUpstreamsImpl _value, $Res Function(_$StatsUpstreamsImpl) _then) + : super(_value, _then); + + /// Create a copy of StatsUpstreams + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? upstreams = null, + Object? forwardedQueries = null, + Object? totalQueries = null, + Object? took = null, + }) { + return _then(_$StatsUpstreamsImpl( + upstreams: null == upstreams + ? _value._upstreams + : upstreams // ignore: cast_nullable_to_non_nullable + as List, + forwardedQueries: null == forwardedQueries + ? _value.forwardedQueries + : forwardedQueries // ignore: cast_nullable_to_non_nullable + as int, + totalQueries: null == totalQueries + ? _value.totalQueries + : totalQueries // ignore: cast_nullable_to_non_nullable + as int, + took: null == took + ? _value.took + : took // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$StatsUpstreamsImpl implements _StatsUpstreams { + const _$StatsUpstreamsImpl( + {required final List upstreams, + @JsonKey(name: 'forwarded_queries') required this.forwardedQueries, + @JsonKey(name: 'total_queries') required this.totalQueries, + required this.took}) + : _upstreams = upstreams; + + factory _$StatsUpstreamsImpl.fromJson(Map json) => + _$$StatsUpstreamsImplFromJson(json); + + final List _upstreams; + @override + List get upstreams { + if (_upstreams is EqualUnmodifiableListView) return _upstreams; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_upstreams); + } + + @override + @JsonKey(name: 'forwarded_queries') + final int forwardedQueries; + @override + @JsonKey(name: 'total_queries') + final int totalQueries; + @override + final double took; + + @override + String toString() { + return 'StatsUpstreams(upstreams: $upstreams, forwardedQueries: $forwardedQueries, totalQueries: $totalQueries, took: $took)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$StatsUpstreamsImpl && + const DeepCollectionEquality() + .equals(other._upstreams, _upstreams) && + (identical(other.forwardedQueries, forwardedQueries) || + other.forwardedQueries == forwardedQueries) && + (identical(other.totalQueries, totalQueries) || + other.totalQueries == totalQueries) && + (identical(other.took, took) || other.took == took)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_upstreams), + forwardedQueries, + totalQueries, + took); + + /// Create a copy of StatsUpstreams + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$StatsUpstreamsImplCopyWith<_$StatsUpstreamsImpl> get copyWith => + __$$StatsUpstreamsImplCopyWithImpl<_$StatsUpstreamsImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$StatsUpstreamsImplToJson( + this, + ); + } +} + +abstract class _StatsUpstreams implements StatsUpstreams { + const factory _StatsUpstreams( + {required final List upstreams, + @JsonKey(name: 'forwarded_queries') required final int forwardedQueries, + @JsonKey(name: 'total_queries') required final int totalQueries, + required final double took}) = _$StatsUpstreamsImpl; + + factory _StatsUpstreams.fromJson(Map json) = + _$StatsUpstreamsImpl.fromJson; + + @override + List get upstreams; + @override + @JsonKey(name: 'forwarded_queries') + int get forwardedQueries; + @override + @JsonKey(name: 'total_queries') + int get totalQueries; + @override + double get took; + + /// Create a copy of StatsUpstreams + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StatsUpstreamsImplCopyWith<_$StatsUpstreamsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Upstream _$UpstreamFromJson(Map json) { + return _Upstream.fromJson(json); +} + +/// @nodoc +mixin _$Upstream { + String get ip => throw _privateConstructorUsedError; + String get name => throw _privateConstructorUsedError; + int get port => throw _privateConstructorUsedError; + int get count => throw _privateConstructorUsedError; + Statistics get statistics => throw _privateConstructorUsedError; + + /// Serializes this Upstream to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Upstream + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $UpstreamCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $UpstreamCopyWith<$Res> { + factory $UpstreamCopyWith(Upstream value, $Res Function(Upstream) then) = + _$UpstreamCopyWithImpl<$Res, Upstream>; + @useResult + $Res call( + {String ip, String name, int port, int count, Statistics statistics}); + + $StatisticsCopyWith<$Res> get statistics; +} + +/// @nodoc +class _$UpstreamCopyWithImpl<$Res, $Val extends Upstream> + implements $UpstreamCopyWith<$Res> { + _$UpstreamCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Upstream + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? ip = null, + Object? name = null, + Object? port = null, + Object? count = null, + Object? statistics = null, + }) { + return _then(_value.copyWith( + ip: null == ip + ? _value.ip + : ip // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + port: null == port + ? _value.port + : port // ignore: cast_nullable_to_non_nullable + as int, + count: null == count + ? _value.count + : count // ignore: cast_nullable_to_non_nullable + as int, + statistics: null == statistics + ? _value.statistics + : statistics // ignore: cast_nullable_to_non_nullable + as Statistics, + ) as $Val); + } + + /// Create a copy of Upstream + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StatisticsCopyWith<$Res> get statistics { + return $StatisticsCopyWith<$Res>(_value.statistics, (value) { + return _then(_value.copyWith(statistics: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$UpstreamImplCopyWith<$Res> + implements $UpstreamCopyWith<$Res> { + factory _$$UpstreamImplCopyWith( + _$UpstreamImpl value, $Res Function(_$UpstreamImpl) then) = + __$$UpstreamImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String ip, String name, int port, int count, Statistics statistics}); + + @override + $StatisticsCopyWith<$Res> get statistics; +} + +/// @nodoc +class __$$UpstreamImplCopyWithImpl<$Res> + extends _$UpstreamCopyWithImpl<$Res, _$UpstreamImpl> + implements _$$UpstreamImplCopyWith<$Res> { + __$$UpstreamImplCopyWithImpl( + _$UpstreamImpl _value, $Res Function(_$UpstreamImpl) _then) + : super(_value, _then); + + /// Create a copy of Upstream + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? ip = null, + Object? name = null, + Object? port = null, + Object? count = null, + Object? statistics = null, + }) { + return _then(_$UpstreamImpl( + ip: null == ip + ? _value.ip + : ip // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + port: null == port + ? _value.port + : port // ignore: cast_nullable_to_non_nullable + as int, + count: null == count + ? _value.count + : count // ignore: cast_nullable_to_non_nullable + as int, + statistics: null == statistics + ? _value.statistics + : statistics // ignore: cast_nullable_to_non_nullable + as Statistics, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$UpstreamImpl implements _Upstream { + const _$UpstreamImpl( + {required this.ip, + required this.name, + required this.port, + required this.count, + required this.statistics}); + + factory _$UpstreamImpl.fromJson(Map json) => + _$$UpstreamImplFromJson(json); + + @override + final String ip; + @override + final String name; + @override + final int port; + @override + final int count; + @override + final Statistics statistics; + + @override + String toString() { + return 'Upstream(ip: $ip, name: $name, port: $port, count: $count, statistics: $statistics)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$UpstreamImpl && + (identical(other.ip, ip) || other.ip == ip) && + (identical(other.name, name) || other.name == name) && + (identical(other.port, port) || other.port == port) && + (identical(other.count, count) || other.count == count) && + (identical(other.statistics, statistics) || + other.statistics == statistics)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, ip, name, port, count, statistics); + + /// Create a copy of Upstream + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$UpstreamImplCopyWith<_$UpstreamImpl> get copyWith => + __$$UpstreamImplCopyWithImpl<_$UpstreamImpl>(this, _$identity); + + @override + Map toJson() { + return _$$UpstreamImplToJson( + this, + ); + } +} + +abstract class _Upstream implements Upstream { + const factory _Upstream( + {required final String ip, + required final String name, + required final int port, + required final int count, + required final Statistics statistics}) = _$UpstreamImpl; + + factory _Upstream.fromJson(Map json) = + _$UpstreamImpl.fromJson; + + @override + String get ip; + @override + String get name; + @override + int get port; + @override + int get count; + @override + Statistics get statistics; + + /// Create a copy of Upstream + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$UpstreamImplCopyWith<_$UpstreamImpl> get copyWith => + throw _privateConstructorUsedError; +} + +Statistics _$StatisticsFromJson(Map json) { + return _Statistics.fromJson(json); +} + +/// @nodoc +mixin _$Statistics { + double get response => throw _privateConstructorUsedError; + double get variance => throw _privateConstructorUsedError; + + /// Serializes this Statistics to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Statistics + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $StatisticsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StatisticsCopyWith<$Res> { + factory $StatisticsCopyWith( + Statistics value, $Res Function(Statistics) then) = + _$StatisticsCopyWithImpl<$Res, Statistics>; + @useResult + $Res call({double response, double variance}); +} + +/// @nodoc +class _$StatisticsCopyWithImpl<$Res, $Val extends Statistics> + implements $StatisticsCopyWith<$Res> { + _$StatisticsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Statistics + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? response = null, + Object? variance = null, + }) { + return _then(_value.copyWith( + response: null == response + ? _value.response + : response // ignore: cast_nullable_to_non_nullable + as double, + variance: null == variance + ? _value.variance + : variance // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$StatisticsImplCopyWith<$Res> + implements $StatisticsCopyWith<$Res> { + factory _$$StatisticsImplCopyWith( + _$StatisticsImpl value, $Res Function(_$StatisticsImpl) then) = + __$$StatisticsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({double response, double variance}); +} + +/// @nodoc +class __$$StatisticsImplCopyWithImpl<$Res> + extends _$StatisticsCopyWithImpl<$Res, _$StatisticsImpl> + implements _$$StatisticsImplCopyWith<$Res> { + __$$StatisticsImplCopyWithImpl( + _$StatisticsImpl _value, $Res Function(_$StatisticsImpl) _then) + : super(_value, _then); + + /// Create a copy of Statistics + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? response = null, + Object? variance = null, + }) { + return _then(_$StatisticsImpl( + response: null == response + ? _value.response + : response // ignore: cast_nullable_to_non_nullable + as double, + variance: null == variance + ? _value.variance + : variance // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$StatisticsImpl implements _Statistics { + const _$StatisticsImpl({required this.response, required this.variance}); + + factory _$StatisticsImpl.fromJson(Map json) => + _$$StatisticsImplFromJson(json); + + @override + final double response; + @override + final double variance; + + @override + String toString() { + return 'Statistics(response: $response, variance: $variance)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$StatisticsImpl && + (identical(other.response, response) || + other.response == response) && + (identical(other.variance, variance) || + other.variance == variance)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, response, variance); + + /// Create a copy of Statistics + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$StatisticsImplCopyWith<_$StatisticsImpl> get copyWith => + __$$StatisticsImplCopyWithImpl<_$StatisticsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$StatisticsImplToJson( + this, + ); + } +} + +abstract class _Statistics implements Statistics { + const factory _Statistics( + {required final double response, + required final double variance}) = _$StatisticsImpl; + + factory _Statistics.fromJson(Map json) = + _$StatisticsImpl.fromJson; + + @override + double get response; + @override + double get variance; + + /// Create a copy of Statistics + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StatisticsImplCopyWith<_$StatisticsImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/lib/models/api/v6/metrics/stats.g.dart b/lib/models/api/v6/metrics/stats.g.dart new file mode 100644 index 00000000..2a3ac113 --- /dev/null +++ b/lib/models/api/v6/metrics/stats.g.dart @@ -0,0 +1,305 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'stats.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$StatsSummaryImpl _$$StatsSummaryImplFromJson(Map json) => + _$StatsSummaryImpl( + queries: Queries.fromJson(json['queries'] as Map), + clients: Clients.fromJson(json['clients'] as Map), + gravity: Gravity.fromJson(json['gravity'] as Map), + took: (json['took'] as num).toDouble(), + ); + +Map _$$StatsSummaryImplToJson(_$StatsSummaryImpl instance) => + { + 'queries': instance.queries, + 'clients': instance.clients, + 'gravity': instance.gravity, + 'took': instance.took, + }; + +_$QueriesImpl _$$QueriesImplFromJson(Map json) => + _$QueriesImpl( + total: (json['total'] as num).toInt(), + blocked: (json['blocked'] as num).toInt(), + percentBlocked: (json['percent_blocked'] as num).toDouble(), + uniqueDomains: (json['unique_domains'] as num).toInt(), + forwarded: (json['forwarded'] as num).toInt(), + cached: (json['cached'] as num).toInt(), + types: Types.fromJson(json['types'] as Map), + status: Status.fromJson(json['status'] as Map), + replies: Replies.fromJson(json['replies'] as Map), + ); + +Map _$$QueriesImplToJson(_$QueriesImpl instance) => + { + 'total': instance.total, + 'blocked': instance.blocked, + 'percent_blocked': instance.percentBlocked, + 'unique_domains': instance.uniqueDomains, + 'forwarded': instance.forwarded, + 'cached': instance.cached, + 'types': instance.types, + 'status': instance.status, + 'replies': instance.replies, + }; + +_$TypesImpl _$$TypesImplFromJson(Map json) => _$TypesImpl( + a: (json['A'] as num).toInt(), + aaaa: (json['AAAA'] as num).toInt(), + any: (json['ANY'] as num).toInt(), + srv: (json['SRV'] as num).toInt(), + soa: (json['SOA'] as num).toInt(), + ptr: (json['PTR'] as num).toInt(), + txt: (json['TXT'] as num).toInt(), + naptr: (json['NAPTR'] as num).toInt(), + mx: (json['MX'] as num).toInt(), + ds: (json['DS'] as num).toInt(), + rrsig: (json['RRSIG'] as num).toInt(), + dnskey: (json['DNSKEY'] as num).toInt(), + ns: (json['NS'] as num).toInt(), + svcb: (json['SVCB'] as num).toInt(), + https: (json['HTTPS'] as num).toInt(), + other: (json['OTHER'] as num).toInt(), + ); + +Map _$$TypesImplToJson(_$TypesImpl instance) => + { + 'A': instance.a, + 'AAAA': instance.aaaa, + 'ANY': instance.any, + 'SRV': instance.srv, + 'SOA': instance.soa, + 'PTR': instance.ptr, + 'TXT': instance.txt, + 'NAPTR': instance.naptr, + 'MX': instance.mx, + 'DS': instance.ds, + 'RRSIG': instance.rrsig, + 'DNSKEY': instance.dnskey, + 'NS': instance.ns, + 'SVCB': instance.svcb, + 'HTTPS': instance.https, + 'OTHER': instance.other, + }; + +_$StatusImpl _$$StatusImplFromJson(Map json) => _$StatusImpl( + unknown: (json['UNKNOWN'] as num).toInt(), + gravity: (json['GRAVITY'] as num).toInt(), + forwarded: (json['FORWARDED'] as num).toInt(), + cache: (json['CACHE'] as num).toInt(), + regex: (json['REGEX'] as num).toInt(), + denylist: (json['DENYLIST'] as num).toInt(), + externalBlockedIp: (json['EXTERNAL_BLOCKED_IP'] as num).toInt(), + externalBlockedNull: (json['EXTERNAL_BLOCKED_NULL'] as num).toInt(), + externalBlockedNxra: (json['EXTERNAL_BLOCKED_NXRA'] as num).toInt(), + gravityCname: (json['GRAVITY_CNAME'] as num).toInt(), + regexCname: (json['REGEX_CNAME'] as num).toInt(), + denylistCname: (json['DENYLIST_CNAME'] as num).toInt(), + retried: (json['RETRIED'] as num).toInt(), + retriedDnssec: (json['RETRIED_DNSSEC'] as num).toInt(), + inProgress: (json['IN_PROGRESS'] as num).toInt(), + dbbusy: (json['DBBUSY'] as num).toInt(), + specialDomain: (json['SPECIAL_DOMAIN'] as num).toInt(), + cacheStale: (json['CACHE_STALE'] as num).toInt(), + ); + +Map _$$StatusImplToJson(_$StatusImpl instance) => + { + 'UNKNOWN': instance.unknown, + 'GRAVITY': instance.gravity, + 'FORWARDED': instance.forwarded, + 'CACHE': instance.cache, + 'REGEX': instance.regex, + 'DENYLIST': instance.denylist, + 'EXTERNAL_BLOCKED_IP': instance.externalBlockedIp, + 'EXTERNAL_BLOCKED_NULL': instance.externalBlockedNull, + 'EXTERNAL_BLOCKED_NXRA': instance.externalBlockedNxra, + 'GRAVITY_CNAME': instance.gravityCname, + 'REGEX_CNAME': instance.regexCname, + 'DENYLIST_CNAME': instance.denylistCname, + 'RETRIED': instance.retried, + 'RETRIED_DNSSEC': instance.retriedDnssec, + 'IN_PROGRESS': instance.inProgress, + 'DBBUSY': instance.dbbusy, + 'SPECIAL_DOMAIN': instance.specialDomain, + 'CACHE_STALE': instance.cacheStale, + }; + +_$RepliesImpl _$$RepliesImplFromJson(Map json) => + _$RepliesImpl( + unknown: (json['UNKNOWN'] as num).toInt(), + nodata: (json['NODATA'] as num).toInt(), + nxdomain: (json['NXDOMAIN'] as num).toInt(), + cname: (json['CNAME'] as num).toInt(), + ip: (json['IP'] as num).toInt(), + domain: (json['DOMAIN'] as num).toInt(), + rrname: (json['RRNAME'] as num).toInt(), + servfail: (json['SERVFAIL'] as num).toInt(), + refused: (json['REFUSED'] as num).toInt(), + notimp: (json['NOTIMP'] as num).toInt(), + other: (json['OTHER'] as num).toInt(), + dnssec: (json['DNSSEC'] as num).toInt(), + none: (json['NONE'] as num).toInt(), + blob: (json['BLOB'] as num).toInt(), + ); + +Map _$$RepliesImplToJson(_$RepliesImpl instance) => + { + 'UNKNOWN': instance.unknown, + 'NODATA': instance.nodata, + 'NXDOMAIN': instance.nxdomain, + 'CNAME': instance.cname, + 'IP': instance.ip, + 'DOMAIN': instance.domain, + 'RRNAME': instance.rrname, + 'SERVFAIL': instance.servfail, + 'REFUSED': instance.refused, + 'NOTIMP': instance.notimp, + 'OTHER': instance.other, + 'DNSSEC': instance.dnssec, + 'NONE': instance.none, + 'BLOB': instance.blob, + }; + +_$ClientsImpl _$$ClientsImplFromJson(Map json) => + _$ClientsImpl( + active: (json['active'] as num).toInt(), + total: (json['total'] as num).toInt(), + ); + +Map _$$ClientsImplToJson(_$ClientsImpl instance) => + { + 'active': instance.active, + 'total': instance.total, + }; + +_$GravityImpl _$$GravityImplFromJson(Map json) => + _$GravityImpl( + domainsBeingBlocked: (json['domains_being_blocked'] as num).toInt(), + lastUpdate: (json['last_update'] as num).toInt(), + ); + +Map _$$GravityImplToJson(_$GravityImpl instance) => + { + 'domains_being_blocked': instance.domainsBeingBlocked, + 'last_update': instance.lastUpdate, + }; + +_$StatsTopDomainsImpl _$$StatsTopDomainsImplFromJson( + Map json) => + _$StatsTopDomainsImpl( + domains: (json['domains'] as List) + .map((e) => Domain.fromJson(e as Map)) + .toList(), + totalQueries: (json['total_queries'] as num).toInt(), + blockedQueries: (json['blocked_queries'] as num).toInt(), + took: (json['took'] as num).toDouble(), + ); + +Map _$$StatsTopDomainsImplToJson( + _$StatsTopDomainsImpl instance) => + { + 'domains': instance.domains, + 'total_queries': instance.totalQueries, + 'blocked_queries': instance.blockedQueries, + 'took': instance.took, + }; + +_$DomainImpl _$$DomainImplFromJson(Map json) => _$DomainImpl( + domain: json['domain'] as String, + count: (json['count'] as num).toInt(), + ); + +Map _$$DomainImplToJson(_$DomainImpl instance) => + { + 'domain': instance.domain, + 'count': instance.count, + }; + +_$StatsTopClientsImpl _$$StatsTopClientsImplFromJson( + Map json) => + _$StatsTopClientsImpl( + clients: (json['clients'] as List) + .map((e) => Client.fromJson(e as Map)) + .toList(), + totalQueries: (json['total_queries'] as num).toInt(), + blockedQueries: (json['blocked_queries'] as num).toInt(), + took: (json['took'] as num).toDouble(), + ); + +Map _$$StatsTopClientsImplToJson( + _$StatsTopClientsImpl instance) => + { + 'clients': instance.clients, + 'total_queries': instance.totalQueries, + 'blocked_queries': instance.blockedQueries, + 'took': instance.took, + }; + +_$ClientImpl _$$ClientImplFromJson(Map json) => _$ClientImpl( + ip: json['ip'] as String, + name: json['name'] as String, + count: (json['count'] as num).toInt(), + ); + +Map _$$ClientImplToJson(_$ClientImpl instance) => + { + 'ip': instance.ip, + 'name': instance.name, + 'count': instance.count, + }; + +_$StatsUpstreamsImpl _$$StatsUpstreamsImplFromJson(Map json) => + _$StatsUpstreamsImpl( + upstreams: (json['upstreams'] as List) + .map((e) => Upstream.fromJson(e as Map)) + .toList(), + forwardedQueries: (json['forwarded_queries'] as num).toInt(), + totalQueries: (json['total_queries'] as num).toInt(), + took: (json['took'] as num).toDouble(), + ); + +Map _$$StatsUpstreamsImplToJson( + _$StatsUpstreamsImpl instance) => + { + 'upstreams': instance.upstreams, + 'forwarded_queries': instance.forwardedQueries, + 'total_queries': instance.totalQueries, + 'took': instance.took, + }; + +_$UpstreamImpl _$$UpstreamImplFromJson(Map json) => + _$UpstreamImpl( + ip: json['ip'] as String, + name: json['name'] as String, + port: (json['port'] as num).toInt(), + count: (json['count'] as num).toInt(), + statistics: + Statistics.fromJson(json['statistics'] as Map), + ); + +Map _$$UpstreamImplToJson(_$UpstreamImpl instance) => + { + 'ip': instance.ip, + 'name': instance.name, + 'port': instance.port, + 'count': instance.count, + 'statistics': instance.statistics, + }; + +_$StatisticsImpl _$$StatisticsImplFromJson(Map json) => + _$StatisticsImpl( + response: (json['response'] as num).toDouble(), + variance: (json['variance'] as num).toDouble(), + ); + +Map _$$StatisticsImplToJson(_$StatisticsImpl instance) => + { + 'response': instance.response, + 'variance': instance.variance, + }; diff --git a/lib/models/realtime_status.dart b/lib/models/realtime_status.dart index 33228c4a..ee3924ef 100644 --- a/lib/models/realtime_status.dart +++ b/lib/models/realtime_status.dart @@ -1,6 +1,9 @@ import 'dart:convert'; import 'package:pi_hole_client/functions/charts_data_functions.dart'; +import 'package:pi_hole_client/models/api/v6/dns/dns.dart'; +import 'package:pi_hole_client/models/api/v6/flt/ftl.dart'; +import 'package:pi_hole_client/models/api/v6/metrics/stats.dart'; RealtimeStatus realtimeStatusFromJson(String str) => RealtimeStatus.fromJson(json.decode(str)); @@ -126,4 +129,116 @@ class RealtimeStatus { ? sortValues(removeZeroValues(Map.from(json["forward_destinations"]).map((k, v) => MapEntry(k, v.toDouble())))) : {}, queryTypes: ((json["querytypes"].runtimeType != List) && (json["querytypes"] != null)) ? sortValues(removeZeroValues(Map.from(json["querytypes"]).map((k, v) => MapEntry(k, v.toDouble())))) : {}); + + factory RealtimeStatus.fromV6( + StatsSummary summary, + InfoFtl infoFtl, + Blocking blocking, + StatsTopDomains topPermittedDomains, + StatsTopDomains topBlockedDomains, + StatsTopClients topClients, + StatsTopClients topClientsBlocked, + StatsUpstreams upstreams, + ) { + // Calculate the percentage of each query type + final totalQueryTypes = + summary.queries.types.toJson().values.reduce((a, b) => a + b); + final queryTypes = sortValues(removeZeroValues(summary.queries.types + .toJson() + .map((key, value) => MapEntry(key, (value / totalQueryTypes) * 100)))); + + final topQueries = topPermittedDomains.domains.isNotEmpty + ? Map.fromEntries( + topPermittedDomains.domains.map( + (domain) => MapEntry(domain.domain, domain.count)), + ) + : {}; + + final topAds = topBlockedDomains.domains.isNotEmpty + ? Map.fromEntries( + topBlockedDomains.domains.map( + (domain) => MapEntry(domain.domain, domain.count)), + ) + : {}; + + final topSources = topClients.clients.isNotEmpty + ? Map.fromEntries( + topClients.clients.map( + (client) => MapEntry( + client.name.isNotEmpty + ? '$client.name|$client.ip' + : client.ip, + client.count), + ), + ) + : {}; + + final topSourcesBlocked = topClientsBlocked.clients.isNotEmpty + ? Map.fromEntries( + topClientsBlocked.clients.map( + (client) => MapEntry( + client.name.isNotEmpty + ? '$client.name|$client.ip' + : client.ip, + client.count), + ), + ) + : {}; + + final totalForwardDestinations = upstreams.upstreams.isNotEmpty + ? upstreams.upstreams + .map((upstream) => upstream.count) + .reduce((a, b) => a + b) + : 0; + final forwardDestinations = upstreams.upstreams.isNotEmpty + ? sortValues(removeZeroValues(Map.fromEntries( + upstreams.upstreams.map( + (upstream) => MapEntry( + upstream.port == -1 + ? '${upstream.name}|${upstream.ip}' + : '${upstream.name}#${upstream.port}|${upstream.ip}#${upstream.port}', + upstream.count / totalForwardDestinations * 100), + ), + ))) + : {}; + + // memo: + // dnsQueriesAllTypes: v5 same as dnsQueriesToday number + // dnsQueriesAllReplies: v5 same as dnsQueriesToday number + return RealtimeStatus( + domainsBeingBlocked: summary.gravity.domainsBeingBlocked, + dnsQueriesToday: summary.queries.total, + adsBlockedToday: summary.queries.blocked, + adsPercentageToday: summary.queries.percentBlocked, + uniqueDomains: summary.queries.uniqueDomains, + queriesForwarded: summary.queries.forwarded, + queriesCached: summary.queries.cached, + clientsEverSeen: summary.clients.total, + uniqueClients: summary.clients.active, + dnsQueriesAllTypes: summary.queries.total, + replyUnknown: summary.queries.replies.unknown, + replyNodata: summary.queries.replies.nodata, + replyNxdomain: summary.queries.replies.nxdomain, + replyCname: summary.queries.replies.cname, + replyIp: summary.queries.replies.ip, + replyDomain: summary.queries.replies.domain, + replyRrname: summary.queries.replies.rrname, + replyServfail: summary.queries.replies.servfail, + replyRefused: summary.queries.replies.refused, + replyNotimp: summary.queries.replies.notimp, + replyOther: summary.queries.replies.other, + replyDnssec: summary.queries.replies.dnssec, + replyNone: summary.queries.replies.none, + replyBlob: summary.queries.replies.blob, + dnsQueriesAllReplies: summary.queries.total, + privacyLevel: infoFtl.ftl.privacyLevel, + status: blocking.blocking, + topQueries: topQueries, + topAds: topAds, + topSources: topSources, + topSourcesBlocked: topSourcesBlocked, + forwardDestinations: forwardDestinations, + queryTypes: queryTypes, + ); + } } diff --git a/lib/providers/servers_provider.dart b/lib/providers/servers_provider.dart index 577200ae..99d30171 100644 --- a/lib/providers/servers_provider.dart +++ b/lib/providers/servers_provider.dart @@ -2,14 +2,11 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:pi_hole_client/gateways/api_gateway_factory.dart'; import 'package:pi_hole_client/gateways/api_gateway_interface.dart'; -import 'package:pi_hole_client/gateways/v5/api_gateway_v5.dart'; -import 'package:pi_hole_client/models/gateways.dart'; import 'package:pi_hole_client/models/repository/database.dart'; import 'package:pi_hole_client/repository/database.dart'; import 'package:pi_hole_client/providers/app_config_provider.dart'; import 'package:pi_hole_client/functions/conversions.dart'; import 'package:pi_hole_client/models/server.dart'; -import 'package:provider/provider.dart'; class ServersProvider with ChangeNotifier { AppConfigProvider? _appConfigProvider; diff --git a/lib/repository/database.dart b/lib/repository/database.dart index 9bab83d9..9826f718 100644 --- a/lib/repository/database.dart +++ b/lib/repository/database.dart @@ -148,7 +148,8 @@ class DatabaseRepository { .getValue('${server.address}_basicAuthUser'); final basicAuthPassword = await _secureStorage .getValue('${server.address}_basicAuthPassword'); - final password = await _secureStorage.getValue('password'); + final password = + await _secureStorage.getValue('${server.address}_password'); servers![i] = ServerDbData.withSecrets( server, diff --git a/test/gateways/v6/api_gateway_v6_test.dart b/test/gateways/v6/api_gateway_v6_test.dart index b53def94..b91288d0 100644 --- a/test/gateways/v6/api_gateway_v6_test.dart +++ b/test/gateways/v6/api_gateway_v6_test.dart @@ -5,7 +5,6 @@ import 'package:mockito/mockito.dart'; import 'package:mockito/annotations.dart'; import 'package:pi_hole_client/constants/api_versions.dart'; import 'package:pi_hole_client/gateways/v6/api_gateway_v6.dart'; -import 'package:pi_hole_client/models/api/v6/auth/auth.dart'; import 'package:pi_hole_client/models/domain.dart'; import 'package:pi_hole_client/models/gateways.dart'; import 'package:pi_hole_client/models/server.dart'; @@ -193,8 +192,16 @@ void main() { group('realtimeStatus', () { late Server server; - final url = - 'http://example.com/admin/api.php?auth=xxx123&summaryRaw&topItems&getForwardDestinations&getQuerySources&topClientsBlocked&getQueryTypes'; + final urls = [ + 'http://example.com/api/stats/summary', + 'http://example.com/api/info/ftl', + 'http://example.com/api/dns/blocking', + 'http://example.com/api/stats/top_domains', + 'http://example.com/api/stats/top_domains?blocked=true', + 'http://example.com/api/stats/top_clients', + 'http://example.com/api/stats/top_clients?blocked=true', + 'http://example.com/api/stats/upstreams', + ]; setUp(() { server = Server( @@ -202,87 +209,201 @@ void main() { alias: 'example', defaultServer: true, apiVersion: SupportedApiVersions.v6, - token: 'xxx123'); + password: 'xxx123'); }); test('Return success', () async { final mockClient = MockClient(); final apiGateway = ApiGatewayV6(server, client: mockClient); - final data = { - "domains_being_blocked": 121860, - "dns_queries_today": 16, - "ads_blocked_today": 1, - "ads_percentage_today": 6.25, - "unique_domains": 11, - "queries_forwarded": 9, - "queries_cached": 6, - "clients_ever_seen": 2, - "unique_clients": 2, - "dns_queries_all_types": 16, - "reply_UNKNOWN": 0, - "reply_NODATA": 0, - "reply_NXDOMAIN": 3, - "reply_CNAME": 0, - "reply_IP": 10, - "reply_DOMAIN": 3, - "reply_RRNAME": 0, - "reply_SERVFAIL": 0, - "reply_REFUSED": 0, - "reply_NOTIMP": 0, - "reply_OTHER": 0, - "reply_DNSSEC": 0, - "reply_NONE": 0, - "reply_BLOB": 0, - "dns_queries_all_replies": 16, - "privacy_level": 0, - "status": "enabled", - "gravity_last_updated": { - "file_exists": true, - "absolute": 1732972589, - "relative": {"days": 5, "hours": 18, "minutes": 14} + final data = [ + { + "queries": { + "total": 7497, + "blocked": 3465, + "percent_blocked": 34.5, + "unique_domains": 445, + "forwarded": 4574, + "cached": 9765, + "types": { + "A": 3643, + "AAAA": 123, + "ANY": 3423, + "SRV": 345, + "SOA": 7567, + "PTR": 456, + "TXT": 85, + "NAPTR": 346, + "MX": 457, + "DS": 456, + "RRSIG": 345, + "DNSKEY": 55, + "NS": 868, + "SVCB": 645, + "HTTPS": 4, + "OTHER": 845 + }, + "status": { + "UNKNOWN": 3, + "GRAVITY": 72, + "FORWARDED": 533, + "CACHE": 32, + "REGEX": 84, + "DENYLIST": 31, + "EXTERNAL_BLOCKED_IP": 0, + "EXTERNAL_BLOCKED_NULL": 0, + "EXTERNAL_BLOCKED_NXRA": 0, + "GRAVITY_CNAME": 0, + "REGEX_CNAME": 0, + "DENYLIST_CNAME": 0, + "RETRIED": 0, + "RETRIED_DNSSEC": 0, + "IN_PROGRESS": 0, + "DBBUSY": 0, + "SPECIAL_DOMAIN": 0, + "CACHE_STALE": 0 + }, + "replies": { + "UNKNOWN": 3, + "NODATA": 72, + "NXDOMAIN": 533, + "CNAME": 32, + "IP": 84, + "DOMAIN": 31, + "RRNAME": 0, + "SERVFAIL": 0, + "REFUSED": 0, + "NOTIMP": 0, + "OTHER": 0, + "DNSSEC": 31, + "NONE": 0, + "BLOB": 0 + } + }, + "clients": {"active": 10, "total": 22}, + "gravity": { + "domains_being_blocked": 104756, + "last_update": 1725194639 + }, + "took": 0.003 }, - "top_queries": { - "1.0.26.172.in-addr.arpa": 3, - "8.8.8.8.in-addr.arpa": 3, - "github.com": 2, - "gitlab.com": 1, - "sample.com": 1, - "test.com": 1, - "google.com": 1, - "google.co.jp": 1, - "yahoo.co.jp": 1, - "fix.test.com": 1 + { + "ftl": { + "database": { + "gravity": 67906, + "groups": 6, + "lists": 1, + "clients": 5, + "domains": {"allowed": 10, "denied": 3} + }, + "privacy_level": 0, + "clients": {"total": 10, "active": 8}, + "pid": 1234, + "uptime": 123456789, + "%mem": 0.1, + "%cpu": 1.2, + "allow_destructive": true, + "dnsmasq": { + "dns_cache_inserted": 8, + "dns_cache_live_freed": 0, + "dns_queries_forwarded": 2, + "dns_auth_answered": 0, + "dns_local_answered": 74, + "dns_stale_answered": 0, + "dns_unanswered": 0, + "bootp": 0, + "pxe": 0, + "dhcp_ack": 0, + "dhcp_decline": 0, + "dhcp_discover": 0, + "dhcp_inform": 0, + "dhcp_nak": 0, + "dhcp_offer": 0, + "dhcp_release": 0, + "dhcp_request": 0, + "noanswer": 0, + "leases_allocated_4": 0, + "leases_pruned_4": 0, + "leases_allocated_6": 0, + "leases_pruned_6": 0, + "tcp_connections": 0, + "dnssec_max_crypto_use": 0, + "dnssec_max_sig_fail": 0, + "dnssec_max_work": 0 + } + }, + "took": 0.003 + }, + {"blocking": "enabled", "timer": 15, "took": 0.003}, + { + "domains": [ + {"domain": "pi-hole.net", "count": 8516} + ], + "total_queries": 29160, + "blocked_queries": 6379, + "took": 0.003 }, - "top_ads": {"test.com": 1}, - "top_sources": {"172.26.0.1": 10, "localhost|127.0.0.1": 6}, - "top_sources_blocked": {"172.26.0.1": 1}, - "forward_destinations": { - "blocked|blocked": 6.25, - "cached|cached": 37.5, - "other|other": 0, - "dns.google#53|8.8.8.8#53": 56.25 + { + "domains": [ + {"domain": "pi-hole.net", "count": 8516} + ], + "total_queries": 29160, + "blocked_queries": 6379, + "took": 0.003 }, - "querytypes": { - "A (IPv4)": 62.5, - "AAAA (IPv6)": 0, - "ANY": 0, - "SRV": 0, - "SOA": 0, - "PTR": 37.5, - "TXT": 0, - "NAPTR": 0, - "MX": 0, - "DS": 0, - "RRSIG": 0, - "DNSKEY": 0, - "NS": 0, - "OTHER": 0, - "SVCB": 0, - "HTTPS": 0 + { + "clients": [ + {"ip": "192.168.0.44", "name": "raspberrypi.lan", "count": 5896} + ], + "total_queries": 29160, + "blocked_queries": 6379, + "took": 0.003 + }, + { + "clients": [ + {"ip": "192.168.0.44", "name": "raspberrypi.lan", "count": 5896} + ], + "total_queries": 29160, + "blocked_queries": 6379, + "took": 0.003 + }, + { + "upstreams": [ + { + "ip": "blocklist", + "name": "blocklist", + "port": -1, + "count": 0, + "statistics": {"response": 0, "variance": 0} + }, + { + "ip": "cache", + "name": "cache", + "port": -1, + "count": 2, + "statistics": {"response": 0, "variance": 0} + }, + { + "ip": "8.8.8.8", + "name": "dns.google", + "port": 53, + "count": 8, + "statistics": { + "response": 0.0516872935824924, + "variance": 0.0049697216173868828 + } + }, + ], + "total_queries": 8, + "forwarded_queries": 6, + "took": 5.6982040405273438e-05 } - }; - when(mockClient.get(Uri.parse(url), headers: {})) - .thenAnswer((_) async => http.Response(jsonEncode(data), 200)); + ]; + for (int i = 0; i < urls.length; i++) { + when(mockClient.get( + Uri.parse(urls[i]), + headers: anyNamed('headers'), + )).thenAnswer((_) async => http.Response(jsonEncode(data[i]), 200)); + } final response = await apiGateway.realtimeStatus(); @@ -294,8 +415,10 @@ void main() { final mockClient = MockClient(); final apiGateway = ApiGatewayV6(server, client: mockClient); - when(mockClient.get(Uri.parse(url), headers: {})) - .thenThrow(Exception('Unexpected error test')); + for (final url in urls) { + when(mockClient.get(Uri.parse(url), headers: {})) + .thenThrow(Exception('Unexpected error test')); + } final response = await apiGateway.realtimeStatus();