class GuiConfig {
  GuiConfig({
    required this.selected,
    required this.updateInterval,
    required this.updateSubsAtStart,
    required this.setSystemProxy,
    required this.startAtLogin,
    required this.breakConnections,
    required this.language,
    required this.servicePort,
    required this.dnsPort
  });
  late String selected;
  late int updateInterval;
  late bool updateSubsAtStart;
  late bool setSystemProxy;
  late bool startAtLogin;
  late bool breakConnections;
  late String language;
  late int servicePort;
  late String dnsPort;


  GuiConfig.fromJson(Map<String, dynamic> json) {
    selected = json['selected'];
    updateInterval = json['updateInterval'];
    updateSubsAtStart = json['updateSubsAtStart'];
    setSystemProxy = json['setSystemProxy'];
    startAtLogin = json['startAtLogin'];
    breakConnections = json['breakConnections'];
    language = json['language'];
    servicePort = json['servicePort'];
    dnsPort = json['dnsPort'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['selected'] = selected;
    data['updateInterval'] = updateInterval;
    data['updateSubsAtStart'] = updateSubsAtStart;
    data['setSystemProxy'] = setSystemProxy;
    data['startAtLogin'] = startAtLogin;
    data['breakConnections'] = breakConnections;
    data['language'] = language;
    data['servicePort'] = servicePort;
    data['dnsPort'] = dnsPort;
    return data;
  }

  @override
  String toString() {
    return toJson().toString();
  }
}



class VersionConfig {
  late String serviceVersion;
  late String coreVersion;
  late String appVersion;

  VersionConfig({
    required this.serviceVersion,
    required this.coreVersion,
    required this.appVersion,
  });

  VersionConfig.fromJson(Map<String, dynamic> json) {
    serviceVersion = json['serviceVersion'];
    coreVersion = json['coreVersion'];
    appVersion = json['appVersion'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['serviceVersion'] = serviceVersion;
    data['coreVersion'] = coreVersion;
    data['appVersion'] = appVersion;
    return data;
  }

  @override
  String toString() {
    return toJson().toString();
  }
}
