diff --git a/client/flutter_ui/.gitignore b/client/flutter_ui/.gitignore new file mode 100644 index 000000000..e4efcb381 --- /dev/null +++ b/client/flutter_ui/.gitignore @@ -0,0 +1,6 @@ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +build/ +coverage/ diff --git a/client/flutter_ui/.metadata b/client/flutter_ui/.metadata new file mode 100644 index 000000000..cb5faccaa --- /dev/null +++ b/client/flutter_ui/.metadata @@ -0,0 +1,36 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "02085feb3f5d8a8156e5e28512b9d99351d510c0" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + base_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + - platform: linux + create_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + base_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + - platform: macos + create_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + base_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + - platform: windows + create_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + base_revision: 02085feb3f5d8a8156e5e28512b9d99351d510c0 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/client/flutter_ui/MIGRATION.md b/client/flutter_ui/MIGRATION.md new file mode 100644 index 000000000..9d9b25e5b --- /dev/null +++ b/client/flutter_ui/MIGRATION.md @@ -0,0 +1,115 @@ +# Flutter UI Migration + +## Current Boundary + +Keep the daemon as-is and replace only the desktop UI process. The Flutter app +should continue to talk to `DaemonService` from `client/proto/daemon.proto`. + +The current UI is not a simple settings window. It owns: + +- tray/menu-bar state and nested menu actions +- gRPC connection management and event subscription +- connect, disconnect, login, and session-expired flows +- profile switching, deregistration, and profile windows +- network route and exit-node selection +- advanced settings +- debug bundle creation and upload status dialogs +- enforced update notifications and progress windows +- OS sleep/wake notification to the daemon +- single-instance signaling and quick-actions windows + +## Phases + +1. Scaffold and generated gRPC client + - Done: generated Dart stubs from `client/proto/daemon.proto`. + - Done: app defaults to a gRPC-backed implementation and keeps + `--fake-daemon` for UI-only work. + - Remaining: replace the development user agent suffix with the release + version at build time. + +2. Core connection parity + - Done: status polling and `SubscribeEvents` refresh hooks. + - Done: `connect()` runs `Login` → optional SSO browser handoff via + `openExternalUrl` → `WaitSSOLogin` → `Up`, with an `awaitingLogin` snapshot + state and a banner that exposes the verification URI and user code. + - Done: `disconnect()` calls `Down`. + - Match current daemon address defaults: + - Windows: `tcp://127.0.0.1:41731` + - Unix-like desktop: `unix:///var/run/netbird.sock` + +3. Settings, profiles, and networks + - Done: `GetConfig`/`SetConfig` for the toggleable settings (auto-connect, + allow SSH, quantum resistance, lazy connections, block inbound, + notifications). Read-only fields (management URL, interface, port, MTU) + still need editable forms. + - Done: profile add/switch/remove/logout via `AddProfile`, + `SwitchProfile`, `RemoveProfile`, `Logout`. + - Done: network list with overlap filtering, per-route + `SelectNetworks`/`DeselectNetworks`, and exit-node single-selection. + +4. Desktop integration + - Done: tray icon and menu via `tray_manager` (status header, profile, + Connect/Disconnect, Show window, Quit) with status-aware icons that fall + back to template variants on macOS. + - Done: window lifecycle via `window_manager` — close hides instead of + exiting; tray "Quit" actually destroys the window. + - Done: native notifications via `local_notifier`, fed by the daemon's + `SubscribeEvents` stream and gated by the `notifications` setting (with + CRITICAL severity always firing). + - Done: browser launch and clipboard via `Process.run` and + `flutter/services` Clipboard. + - Remaining: file/folder reveal for debug bundles, single-instance + signaling, quick-actions invocation, and sleep/wake forwarding through + `NotifyOSLifecycle`. Settings/Networks submenus on the tray are deferred + until the window-side flows are stable. + - Note: `local_notifier` uses macOS's deprecated `NSUserNotificationCenter` + (warns at build time). Plan to swap to `flutter_local_notifications` + before release. + +5. Debug and update flows + - Done: rich debug bundle screen with anonymize, system-info, upload (URL), + and run-with-trace + duration. State machine drives `GetLogLevel` → + `SetLogLevel(TRACE)` → `Down` → `SetSyncResponsePersistence` → `Up` → + progress over duration → `StopCPUProfile` → `DebugBundle`, with restore + of original log level and persistence in a finally. Result dialog covers + uploaded, upload-failed, and local-only outcomes with copy/open actions. + - Done: enforced-update modal triggered by daemon `progress_window=show` + metadata. Polls `GetInstallerResult` with a 15-min timeout, blocks close + for 10 s, then surfaces success (auto-close) or failure (error message). + - Remaining: hook a "Check for updates" / "Install now" button into the + About surface that calls `TriggerUpdate` directly. + +6. Release pipeline + - Update `.github/workflows/release.yml` UI build steps. + - Update `client/netbird.wxs`, `release_files/install.sh`, and + `release_files/ui-post-install.sh` where they assume the Go UI artifact. + - Update updater restart behavior in `client/internal/updater/installer`. + - Preserve public artifact names until installers and updater logic are + intentionally migrated. + +## RPCs Used By The Current UI + +The first production implementation should cover: + +- `Status`, `Up`, `Down` +- `Login`, `WaitSSOLogin`, `Logout` +- `GetConfig`, `SetConfig`, `GetFeatures` +- `SubscribeEvents` +- `ListNetworks`, `SelectNetworks`, `DeselectNetworks` +- `ListProfiles`, `AddProfile`, `SwitchProfile`, `RemoveProfile`, + `GetActiveProfile` +- `DebugBundle`, `GetLogLevel`, `SetLogLevel`, `SetSyncResponsePersistence`, + `StartCPUProfile`, `StopCPUProfile` +- `TriggerUpdate`, `GetInstallerResult` +- `NotifyOSLifecycle` + +## Risk Register + +- Desktop tray support differs sharply across Windows, macOS, and Linux. +- Linux app indicators and desktop-session startup need distro-level testing. +- The updater currently restarts `netbird-ui` by process/app name on Windows and + macOS, so artifact naming changes must be coordinated. +- Dart gRPC over Unix domain sockets must be validated against the daemon's + existing `unix://` address behavior. +- Flutter desktop packaging is separate from Go builds, so release CI needs a + new toolchain and cache strategy. diff --git a/client/flutter_ui/README.md b/client/flutter_ui/README.md new file mode 100644 index 000000000..7a9f3a6fa --- /dev/null +++ b/client/flutter_ui/README.md @@ -0,0 +1,54 @@ +# NetBird Flutter UI + +This is the migration workspace for a Flutter-based replacement for `client/ui`. +The existing Go/Fyne UI remains the production UI until this package reaches +feature and release-pipeline parity. + +## Scope + +The first target is the desktop UI only. The NetBird daemon, service lifecycle, +network engine, and daemon gRPC API stay in Go. + +Initial parity target: + +- tray/menu-bar entry with connection status and connect/disconnect actions +- settings and feature flags backed by `DaemonService.GetConfig` and `SetConfig` +- profile management +- network and exit-node selection +- daemon event subscription and desktop notifications +- login/session-expired flow +- debug bundle flow +- enforced-update progress window +- Windows, macOS, and Linux packaging integration + +## Bootstrap + +Flutter and Dart are not committed into this repository. After installing the +Flutter SDK, run: + +```sh +cd client/flutter_ui +bash tool/bootstrap.sh +bash tool/generate_proto.sh +flutter run -d macos -- --daemon-addr=unix:///var/run/netbird.sock +``` + +Use `-d windows` or `-d linux` on those platforms. The Windows daemon address is +currently `tcp://127.0.0.1:41731`. + +For UI-only development without a daemon, run: + +```sh +flutter run -d macos -- --fake-daemon +``` + +## Layout + +- `lib/main.dart`: app entry point and command-line flag parsing +- `lib/src/app_shell.dart`: first-pass desktop shell +- `lib/src/daemon_client.dart`: daemon boundary with fake and gRPC-backed clients +- `lib/src/models.dart`: UI-facing models independent from generated protobufs +- `lib/src/generated/`: generated Dart protobuf and gRPC files +- `tool/bootstrap.sh`: creates Flutter desktop platform folders once Flutter is installed +- `tool/generate_proto.sh`: generates Dart gRPC bindings from `client/proto/daemon.proto` +- `MIGRATION.md`: parity plan and release integration checklist diff --git a/client/flutter_ui/analysis_options.yaml b/client/flutter_ui/analysis_options.yaml new file mode 100644 index 000000000..a8d28bb5d --- /dev/null +++ b/client/flutter_ui/analysis_options.yaml @@ -0,0 +1,10 @@ +include: package:lints/recommended.yaml + +analyzer: + exclude: + - lib/src/generated/** + +linter: + rules: + avoid_print: true + diff --git a/client/flutter_ui/assets/tray/connected-macos.png b/client/flutter_ui/assets/tray/connected-macos.png new file mode 100644 index 000000000..ead210250 Binary files /dev/null and b/client/flutter_ui/assets/tray/connected-macos.png differ diff --git a/client/flutter_ui/assets/tray/connected.png b/client/flutter_ui/assets/tray/connected.png new file mode 100644 index 000000000..4258a5c1c Binary files /dev/null and b/client/flutter_ui/assets/tray/connected.png differ diff --git a/client/flutter_ui/assets/tray/connecting-macos.png b/client/flutter_ui/assets/tray/connecting-macos.png new file mode 100644 index 000000000..0fe7fa0db Binary files /dev/null and b/client/flutter_ui/assets/tray/connecting-macos.png differ diff --git a/client/flutter_ui/assets/tray/connecting.png b/client/flutter_ui/assets/tray/connecting.png new file mode 100644 index 000000000..4f607c997 Binary files /dev/null and b/client/flutter_ui/assets/tray/connecting.png differ diff --git a/client/flutter_ui/assets/tray/disconnected-macos.png b/client/flutter_ui/assets/tray/disconnected-macos.png new file mode 100644 index 000000000..36b9a488f Binary files /dev/null and b/client/flutter_ui/assets/tray/disconnected-macos.png differ diff --git a/client/flutter_ui/assets/tray/disconnected.png b/client/flutter_ui/assets/tray/disconnected.png new file mode 100644 index 000000000..a92e9ed4c Binary files /dev/null and b/client/flutter_ui/assets/tray/disconnected.png differ diff --git a/client/flutter_ui/assets/tray/error-macos.png b/client/flutter_ui/assets/tray/error-macos.png new file mode 100644 index 000000000..9a9998bcf Binary files /dev/null and b/client/flutter_ui/assets/tray/error-macos.png differ diff --git a/client/flutter_ui/assets/tray/error.png b/client/flutter_ui/assets/tray/error.png new file mode 100644 index 000000000..722342989 Binary files /dev/null and b/client/flutter_ui/assets/tray/error.png differ diff --git a/client/flutter_ui/lib/main.dart b/client/flutter_ui/lib/main.dart new file mode 100644 index 000000000..f35017165 --- /dev/null +++ b/client/flutter_ui/lib/main.dart @@ -0,0 +1,53 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:window_manager/window_manager.dart'; + +import 'src/app_shell.dart'; +import 'src/daemon_client.dart'; +import 'src/desktop_integration.dart'; + +Future main(List args) async { + WidgetsFlutterBinding.ensureInitialized(); + + final daemonAddr = _readFlag(args, 'daemon-addr') ?? _defaultDaemonAddr(); + final fakeDaemon = args.contains('--fake-daemon'); + + await windowManager.ensureInitialized(); + const windowOptions = WindowOptions( + size: Size(900, 640), + minimumSize: Size(720, 520), + center: true, + title: 'NetBird', + ); + await windowManager.waitUntilReadyToShow(windowOptions, () async { + await windowManager.show(); + await windowManager.focus(); + }); + + final client = fakeDaemon + ? FakeDaemonClient(daemonAddr: daemonAddr) + : GrpcDaemonClient(daemonAddr: daemonAddr); + + final integration = DesktopIntegration(client: client); + await integration.initialize(); + + runApp(NetBirdFlutterApp(client: client, integration: integration)); +} + +String? _readFlag(List args, String name) { + final prefix = '--$name='; + for (final arg in args) { + if (arg.startsWith(prefix)) { + return arg.substring(prefix.length); + } + } + return null; +} + +String _defaultDaemonAddr() { + if (Platform.isWindows) { + return 'tcp://127.0.0.1:41731'; + } + return 'unix:///var/run/netbird.sock'; +} diff --git a/client/flutter_ui/lib/src/app_shell.dart b/client/flutter_ui/lib/src/app_shell.dart new file mode 100644 index 000000000..3c099125e --- /dev/null +++ b/client/flutter_ui/lib/src/app_shell.dart @@ -0,0 +1,889 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import 'daemon_client.dart'; +import 'debug_screen.dart'; +import 'desktop_integration.dart'; +import 'models.dart'; +import 'platform.dart'; +import 'update_progress.dart'; + +class NetBirdFlutterApp extends StatelessWidget { + const NetBirdFlutterApp({required this.client, this.integration, super.key}); + + final DaemonClient client; + final DesktopIntegration? integration; + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'NetBird', + debugShowCheckedModeBanner: false, + theme: ThemeData( + useMaterial3: true, + colorSchemeSeed: const Color(0xFF008C95), + brightness: Brightness.light, + ), + darkTheme: ThemeData( + useMaterial3: true, + colorSchemeSeed: const Color(0xFF008C95), + brightness: Brightness.dark, + ), + home: AppShell(client: client, integration: integration), + ); + } +} + +class AppShell extends StatefulWidget { + const AppShell({required this.client, this.integration, super.key}); + + final DaemonClient client; + final DesktopIntegration? integration; + + @override + State createState() => _AppShellState(); +} + +class _AppShellState extends State { + late ClientSnapshot _snapshot; + StreamSubscription? _subscription; + StreamSubscription? _updateSubscription; + StreamSubscription? _tabSubscription; + int _selectedIndex = 0; + bool _busy = false; + bool _updateDialogOpen = false; + + @override + void initState() { + super.initState(); + _snapshot = ClientSnapshot.initial(widget.client.daemonAddr); + _subscription = widget.client.watchSnapshot().listen((snapshot) { + if (!mounted) { + return; + } + setState(() => _snapshot = snapshot); + }); + _updateSubscription = widget.client.watchUpdateRequests().listen( + _showUpdateDialog, + ); + _tabSubscription = widget.integration?.tabRequests.listen((index) { + if (!mounted) { + return; + } + setState(() => _selectedIndex = index); + }); + } + + @override + void dispose() { + _subscription?.cancel(); + _updateSubscription?.cancel(); + _tabSubscription?.cancel(); + widget.client.dispose(); + super.dispose(); + } + + Future _showUpdateDialog(UpdateProgressEvent event) async { + if (!mounted || _updateDialogOpen) { + return; + } + _updateDialogOpen = true; + try { + await showUpdateProgressDialog( + context: context, + client: widget.client, + event: event, + ); + } finally { + if (mounted) { + _updateDialogOpen = false; + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Row( + children: [ + NavigationRail( + selectedIndex: _selectedIndex, + onDestinationSelected: (index) { + setState(() => _selectedIndex = index); + }, + labelType: NavigationRailLabelType.all, + leading: Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: _StatusGlyph(status: _snapshot.status), + ), + destinations: const [ + NavigationRailDestination( + icon: Icon(Icons.hub_outlined), + selectedIcon: Icon(Icons.hub), + label: Text('Status'), + ), + NavigationRailDestination( + icon: Icon(Icons.route_outlined), + selectedIcon: Icon(Icons.route), + label: Text('Networks'), + ), + NavigationRailDestination( + icon: Icon(Icons.account_circle_outlined), + selectedIcon: Icon(Icons.account_circle), + label: Text('Profiles'), + ), + NavigationRailDestination( + icon: Icon(Icons.tune_outlined), + selectedIcon: Icon(Icons.tune), + label: Text('Settings'), + ), + NavigationRailDestination( + icon: Icon(Icons.bug_report_outlined), + selectedIcon: Icon(Icons.bug_report), + label: Text('Debug'), + ), + ], + ), + const VerticalDivider(width: 1), + Expanded(child: SafeArea(child: _buildPage(context))), + ], + ), + ); + } + + Widget _buildPage(BuildContext context) { + return switch (_selectedIndex) { + 0 => _StatusPane( + snapshot: _snapshot, + busy: _busy, + onConnect: () => _run(widget.client.connect), + onDisconnect: () => _run(widget.client.disconnect), + ), + 1 => _NetworksPane(snapshot: _snapshot, client: widget.client), + 2 => _ProfilesPane(snapshot: _snapshot, client: widget.client), + 3 => _SettingsPane(snapshot: _snapshot, client: widget.client), + _ => DebugScreen(client: widget.client), + }; + } + + Future _run(Future Function() action) async { + if (_busy) { + return; + } + setState(() => _busy = true); + try { + await action(); + } finally { + if (mounted) { + setState(() => _busy = false); + } + } + } +} + +class _Page extends StatelessWidget { + const _Page({required this.title, required this.child, this.actions}); + + final String title; + final Widget child; + final List? actions; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Text( + title, + style: Theme.of(context).textTheme.headlineSmall, + ), + ), + if (actions != null) ...actions!, + ], + ), + const SizedBox(height: 20), + Expanded(child: child), + ], + ), + ); + } +} + +class _StatusPane extends StatelessWidget { + const _StatusPane({ + required this.snapshot, + required this.busy, + required this.onConnect, + required this.onDisconnect, + }); + + final ClientSnapshot snapshot; + final bool busy; + final VoidCallback onConnect; + final VoidCallback onDisconnect; + + @override + Widget build(BuildContext context) { + final connected = snapshot.status == ConnectionStatus.connected; + final connecting = + snapshot.status == ConnectionStatus.connecting || + snapshot.status == ConnectionStatus.awaitingLogin; + + return _Page( + title: 'Status', + child: ListView( + children: [ + _InfoRow(label: 'Connection', value: snapshot.status.label), + _InfoRow(label: 'Daemon', value: snapshot.daemonAddr), + _InfoRow(label: 'Daemon version', value: snapshot.daemonVersion), + if (snapshot.pendingLogin != null) ...[ + const SizedBox(height: 16), + _LoginBanner(pending: snapshot.pendingLogin!), + ], + if (snapshot.errorMessage != null) ...[ + const SizedBox(height: 16), + _ErrorBanner(message: snapshot.errorMessage!), + ], + const SizedBox(height: 24), + Wrap( + spacing: 12, + runSpacing: 12, + children: [ + FilledButton.icon( + onPressed: busy || connected || connecting ? null : onConnect, + icon: const Icon(Icons.power_settings_new), + label: const Text('Connect'), + ), + OutlinedButton.icon( + onPressed: busy || !connected ? null : onDisconnect, + icon: const Icon(Icons.power_off), + label: const Text('Disconnect'), + ), + ], + ), + const SizedBox(height: 32), + _SectionLabel('Active profile'), + _ProfileTile(profile: snapshot.activeProfile), + ], + ), + ); + } +} + +class _NetworksPane extends StatefulWidget { + const _NetworksPane({required this.snapshot, required this.client}); + + final ClientSnapshot snapshot; + final DaemonClient client; + + @override + State<_NetworksPane> createState() => _NetworksPaneState(); +} + +class _NetworksPaneState extends State<_NetworksPane> { + NetworkFilter _filter = NetworkFilter.all; + final Set _busyRoutes = {}; + + @override + Widget build(BuildContext context) { + final networks = widget.snapshot.networks + .where(_filter.matches) + .toList(); + + return _Page( + title: 'Networks', + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SegmentedButton( + segments: const [ + ButtonSegment( + value: NetworkFilter.all, + icon: Icon(Icons.all_inclusive), + label: Text('All'), + ), + ButtonSegment( + value: NetworkFilter.overlapping, + icon: Icon(Icons.compare_arrows), + label: Text('Overlapping'), + ), + ButtonSegment( + value: NetworkFilter.exitNode, + icon: Icon(Icons.public), + label: Text('Exit nodes'), + ), + ], + selected: {_filter}, + onSelectionChanged: (selected) { + setState(() => _filter = selected.single); + }, + ), + const SizedBox(height: 16), + if (networks.isEmpty) + const Padding( + padding: EdgeInsets.symmetric(vertical: 24), + child: Text('No networks to show.'), + ) + else + Expanded( + child: ListView.separated( + itemCount: networks.length, + separatorBuilder: (_, _) => const Divider(height: 1), + itemBuilder: (context, index) { + final route = networks[index]; + final exitNodeMode = _filter == NetworkFilter.exitNode; + return _NetworkTile( + route: route, + exitNodeMode: exitNodeMode, + busy: _busyRoutes.contains(route.id), + onChanged: (selected) => + _toggle(route, selected, exitNodeMode), + ); + }, + ), + ), + ], + ), + ); + } + + Future _toggle( + NetworkRoute route, + bool selected, + bool exitNodeMode, + ) async { + if (_busyRoutes.contains(route.id)) { + return; + } + setState(() => _busyRoutes.add(route.id)); + try { + if (exitNodeMode) { + await widget.client.setExitNode(selected ? route.id : null); + } else { + await widget.client.setNetworkSelection(route.id, selected); + } + } finally { + if (mounted) { + setState(() => _busyRoutes.remove(route.id)); + } + } + } +} + +class _ProfilesPane extends StatefulWidget { + const _ProfilesPane({required this.snapshot, required this.client}); + + final ClientSnapshot snapshot; + final DaemonClient client; + + @override + State<_ProfilesPane> createState() => _ProfilesPaneState(); +} + +class _ProfilesPaneState extends State<_ProfilesPane> { + bool _busy = false; + + @override + Widget build(BuildContext context) { + return _Page( + title: 'Profiles', + actions: [ + FilledButton.tonalIcon( + onPressed: _busy ? null : _showAddDialog, + icon: const Icon(Icons.add), + label: const Text('Add profile'), + ), + ], + child: ListView.separated( + itemCount: widget.snapshot.profiles.length, + separatorBuilder: (_, _) => const Divider(height: 1), + itemBuilder: (context, index) { + final profile = widget.snapshot.profiles[index]; + return _ProfileTile( + profile: profile, + onTap: profile.active || _busy ? null : () => _confirmSwitch(profile), + trailing: _profileMenu(profile), + ); + }, + ), + ); + } + + Widget _profileMenu(ProfileInfo profile) { + return PopupMenuButton<_ProfileAction>( + enabled: !_busy, + onSelected: (action) => _handleAction(action, profile), + itemBuilder: (context) => [ + if (profile.active) + const PopupMenuItem( + value: _ProfileAction.logout, + child: ListTile( + leading: Icon(Icons.logout), + title: Text('Logout'), + contentPadding: EdgeInsets.zero, + ), + ), + PopupMenuItem( + value: _ProfileAction.remove, + enabled: !profile.active, + child: const ListTile( + leading: Icon(Icons.delete_outline), + title: Text('Remove'), + contentPadding: EdgeInsets.zero, + ), + ), + ], + ); + } + + Future _handleAction( + _ProfileAction action, + ProfileInfo profile, + ) async { + switch (action) { + case _ProfileAction.logout: + await _confirmAndRun( + title: 'Logout from ${profile.name}?', + message: + 'This disconnects the active profile and clears its session.', + run: widget.client.logoutActive, + ); + case _ProfileAction.remove: + await _confirmAndRun( + title: 'Remove profile ${profile.name}?', + message: 'This deletes the profile from this device.', + run: () => widget.client.removeProfile(profile.name), + ); + } + } + + Future _confirmSwitch(ProfileInfo profile) async { + await _confirmAndRun( + title: 'Switch to ${profile.name}?', + message: 'The connection will restart with the new profile.', + run: () => widget.client.switchProfile(profile.name), + ); + } + + Future _showAddDialog() async { + final controller = TextEditingController(); + final name = await showDialog( + context: context, + builder: (context) { + return AlertDialog( + title: const Text('Add profile'), + content: TextField( + controller: controller, + autofocus: true, + decoration: const InputDecoration(labelText: 'Profile name'), + onSubmitted: (value) => Navigator.of(context).pop(value.trim()), + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Cancel'), + ), + FilledButton( + onPressed: () => + Navigator.of(context).pop(controller.text.trim()), + child: const Text('Add'), + ), + ], + ); + }, + ); + if (name == null || name.isEmpty) { + return; + } + await _runBusy(() => widget.client.addProfile(name)); + } + + Future _confirmAndRun({ + required String title, + required String message, + required Future Function() run, + }) async { + final confirm = await showDialog( + context: context, + builder: (context) { + return AlertDialog( + title: Text(title), + content: Text(message), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: const Text('Cancel'), + ), + FilledButton( + onPressed: () => Navigator.of(context).pop(true), + child: const Text('Confirm'), + ), + ], + ); + }, + ); + if (confirm != true) { + return; + } + await _runBusy(run); + } + + Future _runBusy(Future Function() action) async { + if (_busy) { + return; + } + setState(() => _busy = true); + try { + await action(); + } finally { + if (mounted) { + setState(() => _busy = false); + } + } + } +} + +enum _ProfileAction { logout, remove } + +class _SettingsPane extends StatefulWidget { + const _SettingsPane({required this.snapshot, required this.client}); + + final ClientSnapshot snapshot; + final DaemonClient client; + + @override + State<_SettingsPane> createState() => _SettingsPaneState(); +} + +class _SettingsPaneState extends State<_SettingsPane> { + bool _writing = false; + + @override + Widget build(BuildContext context) { + final settings = widget.snapshot.settings; + final disabled = _writing; + + return _Page( + title: 'Settings', + child: ListView( + children: [ + _InfoRow(label: 'Management URL', value: settings.managementUrl), + _InfoRow(label: 'Interface', value: settings.interfaceName), + _InfoRow(label: 'WireGuard port', value: '${settings.wireguardPort}'), + _InfoRow(label: 'MTU', value: '${settings.mtu}'), + const SizedBox(height: 16), + SwitchListTile( + value: settings.autoConnect, + onChanged: disabled + ? null + : (value) => + _apply(settings.copyWith(autoConnect: value)), + title: const Text('Connect on startup'), + ), + SwitchListTile( + value: settings.allowSsh, + onChanged: disabled + ? null + : (value) => _apply(settings.copyWith(allowSsh: value)), + title: const Text('Allow SSH'), + ), + SwitchListTile( + value: settings.quantumResistance, + onChanged: disabled + ? null + : (value) => + _apply(settings.copyWith(quantumResistance: value)), + title: const Text('Quantum resistance'), + ), + SwitchListTile( + value: settings.lazyConnection, + onChanged: disabled + ? null + : (value) => + _apply(settings.copyWith(lazyConnection: value)), + title: const Text('Lazy connections'), + ), + SwitchListTile( + value: settings.blockInbound, + onChanged: disabled + ? null + : (value) => + _apply(settings.copyWith(blockInbound: value)), + title: const Text('Block inbound'), + ), + SwitchListTile( + value: settings.notifications, + onChanged: disabled + ? null + : (value) => + _apply(settings.copyWith(notifications: value)), + title: const Text('Notifications'), + ), + ], + ), + ); + } + + Future _apply(ClientSettings updated) async { + setState(() => _writing = true); + try { + await widget.client.updateSettings(updated); + } finally { + if (mounted) { + setState(() => _writing = false); + } + } + } +} + +class _StatusGlyph extends StatelessWidget { + const _StatusGlyph({required this.status}); + + final ConnectionStatus status; + + @override + Widget build(BuildContext context) { + final color = switch (status) { + ConnectionStatus.connected => Colors.green, + ConnectionStatus.connecting => Colors.amber, + ConnectionStatus.awaitingLogin => Colors.lightBlue, + ConnectionStatus.error => Colors.red, + ConnectionStatus.disconnected => Colors.grey, + }; + + return Tooltip( + message: status.label, + child: Icon(Icons.circle, color: color, size: 18), + ); + } +} + +class _InfoRow extends StatelessWidget { + const _InfoRow({required this.label, required this.value}); + + final String label; + final String value; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: 160, + child: Text(label, style: Theme.of(context).textTheme.labelLarge), + ), + Expanded(child: Text(value)), + ], + ), + ); + } +} + +class _SectionLabel extends StatelessWidget { + const _SectionLabel(this.text); + + final String text; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.only(bottom: 8), + child: Text(text, style: Theme.of(context).textTheme.titleMedium), + ); + } +} + +class _ErrorBanner extends StatelessWidget { + const _ErrorBanner({required this.message}); + + final String message; + + @override + Widget build(BuildContext context) { + final colors = Theme.of(context).colorScheme; + return DecoratedBox( + decoration: BoxDecoration( + color: colors.errorContainer, + borderRadius: BorderRadius.circular(8), + ), + child: Padding( + padding: const EdgeInsets.all(12), + child: Row( + children: [ + Icon(Icons.error_outline, color: colors.onErrorContainer), + const SizedBox(width: 12), + Expanded( + child: Text( + message, + style: TextStyle(color: colors.onErrorContainer), + ), + ), + ], + ), + ), + ); + } +} + +class _LoginBanner extends StatelessWidget { + const _LoginBanner({required this.pending}); + + final PendingLogin pending; + + @override + Widget build(BuildContext context) { + final colors = Theme.of(context).colorScheme; + return DecoratedBox( + decoration: BoxDecoration( + color: colors.tertiaryContainer, + borderRadius: BorderRadius.circular(8), + ), + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Sign in to continue', + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: colors.onTertiaryContainer, + ), + ), + const SizedBox(height: 8), + Text( + 'A browser window opened to complete sign-in. ' + 'If it did not, open the URL below.', + style: TextStyle(color: colors.onTertiaryContainer), + ), + const SizedBox(height: 12), + SelectableText( + pending.verificationUri, + style: TextStyle(color: colors.onTertiaryContainer), + ), + const SizedBox(height: 4), + Text( + 'Code: ${pending.userCode}', + style: TextStyle(color: colors.onTertiaryContainer), + ), + const SizedBox(height: 12), + Wrap( + spacing: 8, + children: [ + FilledButton.tonalIcon( + onPressed: () => _openUrl(pending.verificationUri), + icon: const Icon(Icons.open_in_new), + label: const Text('Open in browser'), + ), + OutlinedButton.icon( + onPressed: () => _copy(context, pending.verificationUri), + icon: const Icon(Icons.copy), + label: const Text('Copy URL'), + ), + ], + ), + ], + ), + ), + ); + } + + Future _openUrl(String url) async { + await openExternalUrl(url); + } + + Future _copy(BuildContext context, String url) async { + await Clipboard.setData(ClipboardData(text: url)); + if (!context.mounted) { + return; + } + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('URL copied')), + ); + } +} + +class _NetworkTile extends StatelessWidget { + const _NetworkTile({ + required this.route, + required this.exitNodeMode, + required this.busy, + required this.onChanged, + }); + + final NetworkRoute route; + final bool exitNodeMode; + final bool busy; + final ValueChanged onChanged; + + @override + Widget build(BuildContext context) { + final subtitle = [ + route.range, + if (route.domains.isNotEmpty) route.domains.join(', '), + ].join(' '); + + Widget leading; + if (busy) { + leading = const SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator(strokeWidth: 2), + ); + } else if (exitNodeMode) { + leading = IconButton( + icon: Icon( + route.selected + ? Icons.radio_button_checked + : Icons.radio_button_unchecked, + ), + onPressed: () => onChanged(!route.selected), + ); + } else { + leading = Checkbox( + value: route.selected, + onChanged: (value) => onChanged(value ?? false), + ); + } + + return ListTile( + contentPadding: EdgeInsets.zero, + leading: leading, + title: Text(route.id), + subtitle: Text(subtitle), + trailing: route.isExitNode ? const Icon(Icons.public) : null, + onTap: busy ? null : () => onChanged(!route.selected), + ); + } +} + +class _ProfileTile extends StatelessWidget { + const _ProfileTile({required this.profile, this.onTap, this.trailing}); + + final ProfileInfo profile; + final VoidCallback? onTap; + final Widget? trailing; + + @override + Widget build(BuildContext context) { + return ListTile( + contentPadding: EdgeInsets.zero, + leading: Icon( + profile.active ? Icons.check_circle : Icons.circle_outlined, + ), + title: Text(profile.name), + subtitle: profile.email == null ? null : Text(profile.email!), + onTap: onTap, + trailing: trailing, + ); + } +} diff --git a/client/flutter_ui/lib/src/daemon_client.dart b/client/flutter_ui/lib/src/daemon_client.dart new file mode 100644 index 000000000..766a538cf --- /dev/null +++ b/client/flutter_ui/lib/src/daemon_client.dart @@ -0,0 +1,916 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:grpc/grpc.dart'; + +import 'generated/daemon.pbgrpc.dart' as daemon; +import 'models.dart'; +import 'platform.dart'; + +const _userAgent = 'netbird-desktop-ui/development'; + +abstract class DaemonClient { + String get daemonAddr; + + Stream watchSnapshot(); + + Stream watchEvents(); + + Stream watchUpdateRequests(); + + Future connect(); + + Future disconnect(); + + Future bringUp(); + + Future bringDown(); + + Future debugBundle({ + required bool anonymize, + required bool systemInfo, + String? uploadUrl, + }); + + Future getLogLevel(); + + Future setLogLevel(DaemonLogLevel level); + + Future setSyncResponsePersistence(bool enabled); + + Future startCpuProfile(); + + Future stopCpuProfile(); + + Future triggerUpdate(); + + Future getInstallerResult(); + + Future updateSettings(ClientSettings updated); + + Future setNetworkSelection(String routeId, bool selected); + + Future setExitNode(String? routeId); + + Future switchProfile(String name); + + Future addProfile(String name); + + Future removeProfile(String name); + + Future logoutActive(); + + void dispose(); +} + +class GrpcDaemonClient implements DaemonClient { + GrpcDaemonClient({required this.daemonAddr}) { + _snapshot = ClientSnapshot.initial(daemonAddr); + _channel = _createChannel(daemonAddr); + _client = daemon.DaemonServiceClient(_channel); + } + + @override + final String daemonAddr; + + final _snapshots = StreamController.broadcast(); + final _events = StreamController.broadcast(); + final _updateRequests = StreamController.broadcast(); + final _refreshInterval = const Duration(seconds: 2); + final _callTimeout = const Duration(seconds: 5); + final _ssoLoginTimeout = const Duration(minutes: 5); + final _installerPollTimeout = const Duration(minutes: 15); + + late final ClientChannel _channel; + late final daemon.DaemonServiceClient _client; + late ClientSnapshot _snapshot; + + Timer? _poller; + StreamSubscription? _eventSubscription; + var _started = false; + + @override + Stream watchSnapshot() { + _start(); + scheduleMicrotask(_emit); + return _snapshots.stream; + } + + @override + Stream watchEvents() { + _start(); + return _events.stream; + } + + @override + Stream watchUpdateRequests() { + _start(); + return _updateRequests.stream; + } + + @override + Future connect() async { + _setStatus(ConnectionStatus.connecting, clearError: true); + try { + await _runLoginFlow(); + await _client.up( + daemon.UpRequest(username: _username()), + options: _options(timeout: const Duration(seconds: 30)), + ); + } catch (error) { + _snapshot = _snapshot.copyWith( + status: ConnectionStatus.error, + errorMessage: _formatError(error), + clearPendingLogin: true, + ); + _emit(); + return; + } finally { + await _refresh(); + } + } + + @override + Future disconnect() async { + await _runRpc(() async { + await _client.down(daemon.DownRequest(), options: _options()); + }); + } + + @override + Future bringUp() async { + await _client.up( + daemon.UpRequest(username: _username()), + options: _options(timeout: const Duration(seconds: 30)), + ); + } + + @override + Future bringDown() async { + await _client.down( + daemon.DownRequest(), + options: _options(timeout: const Duration(seconds: 15)), + ); + } + + @override + Future debugBundle({ + required bool anonymize, + required bool systemInfo, + String? uploadUrl, + }) async { + final request = daemon.DebugBundleRequest( + anonymize: anonymize, + systemInfo: systemInfo, + uploadURL: uploadUrl ?? '', + ); + final response = await _client.debugBundle( + request, + options: _options(timeout: const Duration(minutes: 2)), + ); + return DebugBundleResult( + path: response.path, + uploadedKey: response.uploadedKey, + uploadFailureReason: response.uploadFailureReason, + ); + } + + @override + Future getLogLevel() async { + final response = await _client.getLogLevel( + daemon.GetLogLevelRequest(), + options: _options(), + ); + return _mapLogLevelFromProto(response.level); + } + + @override + Future setLogLevel(DaemonLogLevel level) async { + await _client.setLogLevel( + daemon.SetLogLevelRequest(level: _mapLogLevelToProto(level)), + options: _options(), + ); + } + + @override + Future setSyncResponsePersistence(bool enabled) async { + await _client.setSyncResponsePersistence( + daemon.SetSyncResponsePersistenceRequest(enabled: enabled), + options: _options(), + ); + } + + @override + Future startCpuProfile() async { + await _client.startCPUProfile( + daemon.StartCPUProfileRequest(), + options: _options(), + ); + } + + @override + Future stopCpuProfile() async { + await _client.stopCPUProfile( + daemon.StopCPUProfileRequest(), + options: _options(), + ); + } + + @override + Future triggerUpdate() async { + final response = await _client.triggerUpdate( + daemon.TriggerUpdateRequest(), + options: _options(timeout: const Duration(seconds: 30)), + ); + return TriggerUpdateResult( + success: response.success, + errorMessage: response.errorMsg, + ); + } + + @override + Future getInstallerResult() async { + final response = await _client.getInstallerResult( + daemon.InstallerResultRequest(), + options: _options(timeout: _installerPollTimeout), + ); + return InstallerResult( + success: response.success, + errorMessage: response.errorMsg, + ); + } + + @override + Future updateSettings(ClientSettings updated) async { + await _runRpc(() async { + final activeProfile = _snapshot.activeProfile.name; + await _client.setConfig( + daemon.SetConfigRequest( + username: _username(), + profileName: activeProfile, + managementUrl: updated.managementUrl, + rosenpassEnabled: updated.quantumResistance, + serverSSHAllowed: updated.allowSsh, + disableAutoConnect: !updated.autoConnect, + disableNotifications: !updated.notifications, + lazyConnectionEnabled: updated.lazyConnection, + blockInbound: updated.blockInbound, + ), + options: _options(timeout: const Duration(seconds: 10)), + ); + }); + } + + @override + Future setNetworkSelection(String routeId, bool selected) async { + await _runRpc(() async { + final request = daemon.SelectNetworksRequest(networkIDs: [routeId]); + if (selected) { + await _client.selectNetworks(request, options: _options()); + } else { + await _client.deselectNetworks(request, options: _options()); + } + }); + } + + @override + Future setExitNode(String? routeId) async { + await _runRpc(() async { + final exitNodeIds = _snapshot.networks + .where((route) => route.isExitNode) + .map((route) => route.id) + .toList(); + if (exitNodeIds.isNotEmpty) { + await _client.deselectNetworks( + daemon.SelectNetworksRequest(networkIDs: exitNodeIds), + options: _options(), + ); + } + if (routeId != null) { + await _client.selectNetworks( + daemon.SelectNetworksRequest(networkIDs: [routeId]), + options: _options(), + ); + } + }); + } + + @override + Future switchProfile(String name) async { + await _runRpc(() async { + await _client.switchProfile( + daemon.SwitchProfileRequest(profileName: name, username: _username()), + options: _options(), + ); + }); + } + + @override + Future addProfile(String name) async { + await _runRpc(() async { + await _client.addProfile( + daemon.AddProfileRequest(profileName: name, username: _username()), + options: _options(), + ); + }); + } + + @override + Future removeProfile(String name) async { + await _runRpc(() async { + await _client.removeProfile( + daemon.RemoveProfileRequest(profileName: name, username: _username()), + options: _options(), + ); + }); + } + + @override + Future logoutActive() async { + await _runRpc(() async { + final active = _snapshot.activeProfile.name; + await _client.logout( + daemon.LogoutRequest(profileName: active, username: _username()), + options: _options(timeout: const Duration(seconds: 15)), + ); + }); + } + + @override + void dispose() { + _poller?.cancel(); + unawaited(_eventSubscription?.cancel() ?? Future.value()); + _events.close(); + _updateRequests.close(); + _snapshots.close(); + unawaited(_channel.shutdown()); + } + + void _start() { + if (_started) { + return; + } + _started = true; + unawaited(_refresh()); + _poller = Timer.periodic(_refreshInterval, (_) { + unawaited(_refresh()); + }); + _eventSubscription = _client + .subscribeEvents(daemon.SubscribeRequest(), options: _options()) + .listen( + (event) { + _checkUpdateMetadata(event); + final notification = _mapSystemEvent(event); + if (notification != null && !_events.isClosed) { + _events.add(notification); + } + unawaited(_refresh()); + }, + onError: (_) {}, + ); + } + + DaemonLogLevel _mapLogLevelFromProto(daemon.LogLevel level) { + return switch (level) { + daemon.LogLevel.PANIC => DaemonLogLevel.panic, + daemon.LogLevel.FATAL => DaemonLogLevel.fatal, + daemon.LogLevel.ERROR => DaemonLogLevel.error, + daemon.LogLevel.WARN => DaemonLogLevel.warn, + daemon.LogLevel.INFO => DaemonLogLevel.info, + daemon.LogLevel.DEBUG => DaemonLogLevel.debug, + daemon.LogLevel.TRACE => DaemonLogLevel.trace, + _ => DaemonLogLevel.unknown, + }; + } + + daemon.LogLevel _mapLogLevelToProto(DaemonLogLevel level) { + return switch (level) { + DaemonLogLevel.panic => daemon.LogLevel.PANIC, + DaemonLogLevel.fatal => daemon.LogLevel.FATAL, + DaemonLogLevel.error => daemon.LogLevel.ERROR, + DaemonLogLevel.warn => daemon.LogLevel.WARN, + DaemonLogLevel.info => daemon.LogLevel.INFO, + DaemonLogLevel.debug => daemon.LogLevel.DEBUG, + DaemonLogLevel.trace => daemon.LogLevel.TRACE, + DaemonLogLevel.unknown => daemon.LogLevel.UNKNOWN, + }; + } + + void _checkUpdateMetadata(daemon.SystemEvent event) { + final action = event.metadata['progress_window']; + if (action != 'show') { + return; + } + final version = event.metadata['version'] ?? 'unknown'; + if (!_updateRequests.isClosed) { + _updateRequests.add(UpdateProgressEvent(version: version)); + } + } + + SystemNotification? _mapSystemEvent(daemon.SystemEvent event) { + final severity = switch (event.severity) { + daemon.SystemEvent_Severity.WARNING => NotificationSeverity.warning, + daemon.SystemEvent_Severity.ERROR => NotificationSeverity.error, + daemon.SystemEvent_Severity.CRITICAL => NotificationSeverity.critical, + _ => NotificationSeverity.info, + }; + final category = switch (event.category) { + daemon.SystemEvent_Category.NETWORK => NotificationCategory.network, + daemon.SystemEvent_Category.DNS => NotificationCategory.dns, + daemon.SystemEvent_Category.AUTHENTICATION => + NotificationCategory.authentication, + daemon.SystemEvent_Category.CONNECTIVITY => + NotificationCategory.connectivity, + daemon.SystemEvent_Category.SYSTEM => NotificationCategory.system, + _ => NotificationCategory.system, + }; + return SystemNotification( + severity: severity, + category: category, + message: event.message, + userMessage: event.userMessage, + id: event.metadata['id'], + ); + } + + Future _runLoginFlow() async { + final loginResponse = await _client.login( + daemon.LoginRequest( + isUnixDesktopClient: Platform.isLinux, + profileName: _snapshot.activeProfile.name, + username: _username(), + hint: _snapshot.activeProfile.email, + ), + options: _options(timeout: const Duration(seconds: 30)), + ); + + if (!loginResponse.needsSSOLogin) { + return; + } + + _snapshot = _snapshot.copyWith( + status: ConnectionStatus.awaitingLogin, + pendingLogin: PendingLogin( + verificationUri: loginResponse.verificationURIComplete, + userCode: loginResponse.userCode, + ), + ); + _emit(); + + if (loginResponse.verificationURIComplete.isNotEmpty) { + await openExternalUrl(loginResponse.verificationURIComplete); + } + + await _client.waitSSOLogin( + daemon.WaitSSOLoginRequest(userCode: loginResponse.userCode), + options: _options(timeout: _ssoLoginTimeout), + ); + + _snapshot = _snapshot.copyWith( + status: ConnectionStatus.connecting, + clearPendingLogin: true, + ); + _emit(); + } + + Future _runRpc(Future Function() action) async { + try { + _snapshot = _snapshot.copyWith(clearError: true); + _emit(); + await action(); + } catch (error) { + _snapshot = _snapshot.copyWith( + status: ConnectionStatus.error, + errorMessage: _formatError(error), + ); + _emit(); + } finally { + await _refresh(); + } + } + + Future _refresh() async { + try { + final status = await _client.status( + daemon.StatusRequest(), + options: _options(), + ); + + final activeProfile = await _loadActiveProfile(); + final profiles = await _loadProfiles(activeProfile); + final networks = await _loadNetworks(); + final settings = await _loadSettings(activeProfile); + + final mappedStatus = _mapStatus(status.status); + final preserveAwaiting = + _snapshot.status == ConnectionStatus.awaitingLogin && + mappedStatus != ConnectionStatus.connected; + + _snapshot = ClientSnapshot( + daemonAddr: daemonAddr, + daemonVersion: status.daemonVersion.isEmpty + ? 'unknown' + : status.daemonVersion, + status: preserveAwaiting ? ConnectionStatus.awaitingLogin : mappedStatus, + activeProfile: activeProfile, + profiles: profiles, + networks: networks, + settings: settings, + pendingLogin: preserveAwaiting ? _snapshot.pendingLogin : null, + ); + } catch (error) { + _snapshot = _snapshot.copyWith( + status: ConnectionStatus.error, + errorMessage: _formatError(error), + ); + } + _emit(); + } + + Future _loadActiveProfile() async { + try { + final active = await _client.getActiveProfile( + daemon.GetActiveProfileRequest(), + options: _options(), + ); + if (active.profileName.isNotEmpty) { + return ProfileInfo( + name: active.profileName, + email: _snapshot.activeProfile.email, + active: true, + ); + } + } catch (_) { + // Keep the status pane usable even when optional profile RPCs fail. + } + return _snapshot.activeProfile; + } + + Future> _loadProfiles(ProfileInfo activeProfile) async { + try { + final response = await _client.listProfiles( + daemon.ListProfilesRequest(username: _username()), + options: _options(), + ); + final profiles = response.profiles.map((profile) { + return ProfileInfo(name: profile.name, active: profile.isActive); + }).toList(); + if (profiles.isNotEmpty) { + return profiles; + } + } catch (_) { + // Profile listing is not required for core connection status. + } + return [activeProfile]; + } + + Future> _loadNetworks() async { + try { + final response = await _client.listNetworks( + daemon.ListNetworksRequest(), + options: _options(), + ); + return _mapNetworks(response.routes); + } catch (_) { + return _snapshot.networks; + } + } + + Future _loadSettings(ProfileInfo activeProfile) async { + try { + final config = await _client.getConfig( + daemon.GetConfigRequest( + profileName: activeProfile.name, + username: _username(), + ), + options: _options(), + ); + return ClientSettings( + managementUrl: config.managementUrl.isEmpty + ? 'https://api.netbird.io' + : config.managementUrl, + interfaceName: config.interfaceName.isEmpty + ? 'wt0' + : config.interfaceName, + wireguardPort: config.hasWireguardPort() + ? config.wireguardPort.toInt() + : 51820, + mtu: config.hasMtu() ? config.mtu.toInt() : 1280, + autoConnect: !config.disableAutoConnect, + allowSsh: config.serverSSHAllowed, + quantumResistance: config.rosenpassEnabled, + notifications: !config.disableNotifications, + lazyConnection: config.lazyConnectionEnabled, + blockInbound: config.blockInbound, + ); + } catch (_) { + return _snapshot.settings; + } + } + + List _mapNetworks(Iterable routes) { + final rangeCounts = {}; + for (final route in routes) { + if (route.domains.isEmpty) { + rangeCounts.update( + route.range, + (count) => count + 1, + ifAbsent: () => 1, + ); + } + } + + return routes.map((route) { + final resolvedIps = route.resolvedIPs.map((domain, ipList) { + return MapEntry(domain, ipList.ips.toList()); + }); + + return NetworkRoute( + id: route.iD, + range: route.range, + selected: route.selected, + domains: route.domains.toList(), + resolvedIps: resolvedIps, + overlapping: + route.domains.isEmpty && (rangeCounts[route.range] ?? 0) > 1, + ); + }).toList() + ..sort((a, b) => a.id.toLowerCase().compareTo(b.id.toLowerCase())); + } + + CallOptions _options({Duration? timeout}) { + return CallOptions(timeout: timeout ?? _callTimeout); + } + + void _setStatus( + ConnectionStatus status, { + bool clearError = false, + bool clearPendingLogin = false, + }) { + _snapshot = _snapshot.copyWith( + status: status, + clearError: clearError, + clearPendingLogin: clearPendingLogin, + ); + _emit(); + } + + void _emit() { + if (!_snapshots.isClosed) { + _snapshots.add(_snapshot); + } + } +} + +class FakeDaemonClient implements DaemonClient { + FakeDaemonClient({required this.daemonAddr}) { + scheduleMicrotask(_emit); + } + + @override + final String daemonAddr; + + final _snapshots = StreamController.broadcast(); + + late ClientSnapshot _snapshot = ClientSnapshot.initial(daemonAddr).copyWith( + daemonVersion: 'development', + profiles: const [ + ProfileInfo(name: 'default', email: 'user@example.com', active: true), + ProfileInfo(name: 'staging', active: false), + ], + networks: const [ + NetworkRoute(id: 'office', range: '10.10.0.0/16', selected: true), + NetworkRoute(id: 'prod', range: '10.20.0.0/16'), + NetworkRoute(id: 'exit-us', range: '0.0.0.0/0'), + ], + ); + + @override + Stream watchSnapshot() { + scheduleMicrotask(_emit); + return _snapshots.stream; + } + + @override + Stream watchEvents() => + const Stream.empty(); + + @override + Stream watchUpdateRequests() => + const Stream.empty(); + + @override + Future connect() async { + _snapshot = _snapshot.copyWith(status: ConnectionStatus.connecting); + _emit(); + await Future.delayed(const Duration(milliseconds: 450)); + _snapshot = _snapshot.copyWith(status: ConnectionStatus.connected); + _emit(); + } + + @override + Future disconnect() async { + _snapshot = _snapshot.copyWith(status: ConnectionStatus.disconnected); + _emit(); + } + + @override + Future bringUp() async { + _snapshot = _snapshot.copyWith(status: ConnectionStatus.connected); + _emit(); + } + + @override + Future bringDown() async { + _snapshot = _snapshot.copyWith(status: ConnectionStatus.disconnected); + _emit(); + } + + @override + Future debugBundle({ + required bool anonymize, + required bool systemInfo, + String? uploadUrl, + }) async { + await Future.delayed(const Duration(milliseconds: 400)); + return DebugBundleResult( + path: '/tmp/netbird-debug.tar.gz', + uploadedKey: uploadUrl == null ? '' : 'fake-upload-key', + ); + } + + @override + Future getLogLevel() async => DaemonLogLevel.info; + + @override + Future setLogLevel(DaemonLogLevel level) async {} + + @override + Future setSyncResponsePersistence(bool enabled) async {} + + @override + Future startCpuProfile() async {} + + @override + Future stopCpuProfile() async {} + + @override + Future triggerUpdate() async { + return const TriggerUpdateResult(success: true); + } + + @override + Future getInstallerResult() async { + await Future.delayed(const Duration(seconds: 2)); + return const InstallerResult(success: true); + } + + @override + Future updateSettings(ClientSettings updated) async { + _snapshot = _snapshot.copyWith(settings: updated); + _emit(); + } + + @override + Future setNetworkSelection(String routeId, bool selected) async { + final next = _snapshot.networks.map((route) { + if (route.id != routeId) { + return route; + } + return NetworkRoute( + id: route.id, + range: route.range, + domains: route.domains, + resolvedIps: route.resolvedIps, + overlapping: route.overlapping, + selected: selected, + ); + }).toList(); + _snapshot = _snapshot.copyWith(networks: next); + _emit(); + } + + @override + Future setExitNode(String? routeId) async { + final next = _snapshot.networks.map((route) { + if (!route.isExitNode) { + return route; + } + return NetworkRoute( + id: route.id, + range: route.range, + domains: route.domains, + resolvedIps: route.resolvedIps, + overlapping: route.overlapping, + selected: route.id == routeId, + ); + }).toList(); + _snapshot = _snapshot.copyWith(networks: next); + _emit(); + } + + @override + Future switchProfile(String name) async { + final profiles = _snapshot.profiles.map((profile) { + return ProfileInfo( + name: profile.name, + email: profile.email, + active: profile.name == name, + ); + }).toList(); + final active = profiles.firstWhere( + (profile) => profile.active, + orElse: () => _snapshot.activeProfile, + ); + _snapshot = _snapshot.copyWith(profiles: profiles, activeProfile: active); + _emit(); + } + + @override + Future addProfile(String name) async { + final profiles = [ + ..._snapshot.profiles, + ProfileInfo(name: name, active: false), + ]; + _snapshot = _snapshot.copyWith(profiles: profiles); + _emit(); + } + + @override + Future removeProfile(String name) async { + final profiles = _snapshot.profiles + .where((profile) => profile.name != name) + .toList(); + _snapshot = _snapshot.copyWith(profiles: profiles); + _emit(); + } + + @override + Future logoutActive() async { + _snapshot = _snapshot.copyWith(status: ConnectionStatus.disconnected); + _emit(); + } + + @override + void dispose() { + _snapshots.close(); + } + + void _emit() { + if (!_snapshots.isClosed) { + _snapshots.add(_snapshot); + } + } +} + +ClientChannel _createChannel(String daemonAddr) { + final options = ChannelOptions( + credentials: const ChannelCredentials.insecure(), + userAgent: _userAgent, + connectTimeout: const Duration(seconds: 3), + ); + + if (daemonAddr.startsWith('unix://')) { + final path = daemonAddr.substring('unix://'.length); + return ClientChannel( + InternetAddress(path, type: InternetAddressType.unix), + port: 0, + options: options, + ); + } + + final uri = daemonAddr.contains('://') + ? Uri.parse(daemonAddr) + : Uri.parse('tcp://$daemonAddr'); + final host = uri.host.isEmpty ? '127.0.0.1' : uri.host; + final port = uri.hasPort ? uri.port : 41731; + return ClientChannel(host, port: port, options: options); +} + +ConnectionStatus _mapStatus(String status) { + return switch (status) { + 'Connected' => ConnectionStatus.connected, + 'Connecting' => ConnectionStatus.connecting, + 'Idle' || 'SessionExpired' => ConnectionStatus.disconnected, + _ => ConnectionStatus.error, + }; +} + +String _username() { + if (Platform.isWindows) { + final username = Platform.environment['USERNAME'] ?? ''; + final domain = Platform.environment['USERDOMAIN'] ?? ''; + if (domain.isNotEmpty && username.isNotEmpty) { + return '$domain\\$username'; + } + return username; + } + return Platform.environment['USER'] ?? Platform.environment['LOGNAME'] ?? ''; +} + +String _formatError(Object error) { + if (error is GrpcError) { + return error.message ?? error.toString(); + } + return error.toString(); +} diff --git a/client/flutter_ui/lib/src/debug_screen.dart b/client/flutter_ui/lib/src/debug_screen.dart new file mode 100644 index 000000000..65627c026 --- /dev/null +++ b/client/flutter_ui/lib/src/debug_screen.dart @@ -0,0 +1,460 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import 'daemon_client.dart'; +import 'models.dart'; +import 'platform.dart'; + +const _defaultUploadUrl = 'https://upload.netbird.io/'; + +class DebugScreen extends StatefulWidget { + const DebugScreen({required this.client, super.key}); + + final DaemonClient client; + + @override + State createState() => _DebugScreenState(); +} + +class _DebugScreenState extends State { + final _uploadUrlController = + TextEditingController(text: _defaultUploadUrl); + final _durationController = TextEditingController(text: '1'); + + bool _anonymize = false; + bool _systemInfo = true; + bool _upload = true; + bool _runWithTrace = true; + bool _busy = false; + + String _status = ''; + double? _progress; + + @override + void dispose() { + _uploadUrlController.dispose(); + _durationController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Debug', style: Theme.of(context).textTheme.headlineSmall), + const SizedBox(height: 16), + Text( + 'Create a debug bundle to help troubleshoot issues with NetBird.', + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 24), + Expanded( + child: ListView( + children: [ + CheckboxListTile( + contentPadding: EdgeInsets.zero, + value: _anonymize, + onChanged: _busy + ? null + : (value) => setState(() => _anonymize = value ?? false), + title: const Text( + 'Anonymize sensitive information (public IPs, domains, ...)', + ), + ), + CheckboxListTile( + contentPadding: EdgeInsets.zero, + value: _systemInfo, + onChanged: _busy + ? null + : (value) => setState(() => _systemInfo = value ?? false), + title: const Text( + 'Include system information (routes, interfaces, ...)', + ), + ), + CheckboxListTile( + contentPadding: EdgeInsets.zero, + value: _upload, + onChanged: _busy + ? null + : (value) => setState(() => _upload = value ?? false), + title: const Text('Upload bundle automatically after creation'), + ), + if (_upload) + Padding( + padding: const EdgeInsets.only(left: 32, bottom: 8, top: 4), + child: TextField( + controller: _uploadUrlController, + enabled: !_busy, + decoration: const InputDecoration( + labelText: 'Debug upload URL', + border: OutlineInputBorder(), + ), + ), + ), + const Divider(height: 32), + CheckboxListTile( + contentPadding: EdgeInsets.zero, + value: _runWithTrace, + onChanged: _busy + ? null + : (value) => + setState(() => _runWithTrace = value ?? false), + title: const Text( + 'Run with trace logs before creating bundle', + ), + ), + if (_runWithTrace) + Padding( + padding: const EdgeInsets.only(left: 32, top: 4), + child: Row( + children: [ + const Text('Run for'), + const SizedBox(width: 12), + SizedBox( + width: 80, + child: TextField( + controller: _durationController, + enabled: !_busy, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + decoration: const InputDecoration( + isDense: true, + ), + ), + ), + const SizedBox(width: 8), + Text(_durationLabel()), + ], + ), + ), + if (_runWithTrace) + const Padding( + padding: EdgeInsets.only(left: 32, top: 8), + child: Text( + 'Note: NetBird will be brought up and down during collection.', + style: TextStyle(fontStyle: FontStyle.italic), + ), + ), + const SizedBox(height: 24), + if (_status.isNotEmpty) + Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Text(_status), + ), + if (_progress != null) + Padding( + padding: const EdgeInsets.only(bottom: 16), + child: LinearProgressIndicator(value: _progress), + ), + Align( + alignment: Alignment.centerLeft, + child: FilledButton.icon( + onPressed: _busy ? null : _onCreate, + icon: _busy + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.archive_outlined), + label: const Text('Create Debug Bundle'), + ), + ), + ], + ), + ), + ], + ), + ); + } + + String _durationLabel() { + final value = int.tryParse(_durationController.text) ?? 0; + return value == 1 ? 'minute' : 'minutes'; + } + + Future _onCreate() async { + final uploadUrl = _upload ? _uploadUrlController.text.trim() : null; + if (_upload && (uploadUrl == null || uploadUrl.isEmpty)) { + setState(() => _status = 'Upload URL is required when upload is enabled'); + return; + } + + Duration? traceDuration; + if (_runWithTrace) { + final minutes = int.tryParse(_durationController.text); + if (minutes == null || minutes < 1) { + setState(() => _status = 'Duration must be a number ≥ 1'); + return; + } + traceDuration = Duration(minutes: minutes); + } + + setState(() { + _busy = true; + _status = ''; + _progress = null; + }); + + try { + DebugBundleResult result; + if (traceDuration != null) { + result = await _runWithTraceLogs( + duration: traceDuration, + uploadUrl: uploadUrl, + ); + } else { + setState(() => _status = 'Creating debug bundle...'); + result = await widget.client.debugBundle( + anonymize: _anonymize, + systemInfo: _systemInfo, + uploadUrl: uploadUrl, + ); + } + if (!mounted) { + return; + } + setState(() => _status = 'Bundle created successfully'); + await _showResultDialog(result); + } catch (error) { + if (!mounted) { + return; + } + setState(() { + _status = 'Error: $error'; + _progress = null; + }); + } finally { + if (mounted) { + setState(() => _busy = false); + } + } + } + + Future _runWithTraceLogs({ + required Duration duration, + required String? uploadUrl, + }) async { + final initialLevel = await widget.client.getLogLevel(); + final wasTrace = initialLevel == DaemonLogLevel.trace; + + var levelChanged = false; + var persistenceEnabled = false; + var cpuProfileStarted = false; + + try { + if (!wasTrace) { + await widget.client.setLogLevel(DaemonLogLevel.trace); + levelChanged = true; + } + + try { + await widget.client.bringDown(); + } catch (_) { + // Already down is fine; daemon returns OK either way. + } + await Future.delayed(const Duration(seconds: 1)); + + try { + await widget.client.setSyncResponsePersistence(true); + persistenceEnabled = true; + } catch (_) { + // Persistence is best-effort — the bundle still works without it. + } + + await widget.client.bringUp(); + await Future.delayed(const Duration(seconds: 3)); + + try { + await widget.client.startCpuProfile(); + cpuProfileStarted = true; + } catch (_) { + // CPU profiling is optional. + } + + await _trackProgress(duration); + + if (cpuProfileStarted) { + try { + await widget.client.stopCpuProfile(); + } catch (_) {} + } + + if (!mounted) { + return const DebugBundleResult(path: ''); + } + setState(() { + _status = 'Creating debug bundle with collected logs...'; + _progress = null; + }); + + return await widget.client.debugBundle( + anonymize: _anonymize, + systemInfo: _systemInfo, + uploadUrl: uploadUrl, + ); + } finally { + if (levelChanged) { + try { + await widget.client.setLogLevel(initialLevel); + } catch (_) {} + } + if (persistenceEnabled) { + try { + await widget.client.setSyncResponsePersistence(false); + } catch (_) {} + } + } + } + + Future _trackProgress(Duration total) async { + final start = DateTime.now(); + final end = start.add(total); + setState(() { + _progress = 0; + _status = 'Running with trace logs... ${_formatRemaining(total)} remaining'; + }); + + while (DateTime.now().isBefore(end)) { + await Future.delayed(const Duration(milliseconds: 500)); + if (!mounted) { + return; + } + final elapsed = DateTime.now().difference(start); + final fraction = (elapsed.inMilliseconds / total.inMilliseconds).clamp( + 0.0, + 1.0, + ); + final remaining = end.difference(DateTime.now()); + setState(() { + _progress = fraction; + _status = + 'Running with trace logs... ${_formatRemaining(remaining < Duration.zero ? Duration.zero : remaining)} remaining'; + }); + } + } + + String _formatRemaining(Duration d) { + final hours = d.inHours.toString().padLeft(2, '0'); + final minutes = (d.inMinutes % 60).toString().padLeft(2, '0'); + final seconds = (d.inSeconds % 60).toString().padLeft(2, '0'); + return '$hours:$minutes:$seconds'; + } + + Future _showResultDialog(DebugBundleResult result) async { + if (!mounted) { + return; + } + await showDialog( + context: context, + builder: (context) => _DebugResultDialog(result: result), + ); + } +} + +class _DebugResultDialog extends StatelessWidget { + const _DebugResultDialog({required this.result}); + + final DebugBundleResult result; + + @override + Widget build(BuildContext context) { + final folder = _parentFolder(result.path); + + String title; + Widget body; + if (result.uploadFailed) { + title = 'Upload Failed'; + body = Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text('Bundle upload failed:\n${result.uploadFailureReason}'), + const SizedBox(height: 12), + SelectableText('Local copy: ${result.path}'), + ], + ); + } else if (result.uploaded) { + title = 'Upload Successful'; + body = Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text('Bundle uploaded successfully.'), + const SizedBox(height: 12), + const Text('Upload key:'), + SelectableText(result.uploadedKey), + const SizedBox(height: 12), + SelectableText('Local copy: ${result.path}'), + ], + ); + } else { + title = 'Debug Bundle Created'; + body = Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text('Bundle created locally at:\n${result.path}'), + const SizedBox(height: 8), + const Text( + 'Administrator privileges may be required to access the file.', + style: TextStyle(fontStyle: FontStyle.italic), + ), + ], + ); + } + + return AlertDialog( + title: Text(title), + content: SingleChildScrollView(child: body), + actions: [ + if (result.uploaded) + TextButton.icon( + onPressed: () async { + await Clipboard.setData( + ClipboardData(text: result.uploadedKey), + ); + if (context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Upload key copied')), + ); + } + }, + icon: const Icon(Icons.copy), + label: const Text('Copy key'), + ), + TextButton.icon( + onPressed: result.path.isEmpty + ? null + : () => openExternalUrl(result.path), + icon: const Icon(Icons.description_outlined), + label: const Text('Open file'), + ), + TextButton.icon( + onPressed: folder.isEmpty ? null : () => openExternalUrl(folder), + icon: const Icon(Icons.folder_open), + label: const Text('Open folder'), + ), + FilledButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Close'), + ), + ], + ); + } + + String _parentFolder(String path) { + if (path.isEmpty) { + return ''; + } + final lastSlash = path.lastIndexOf(RegExp(r'[/\\]')); + return lastSlash <= 0 ? '' : path.substring(0, lastSlash); + } +} diff --git a/client/flutter_ui/lib/src/desktop_integration.dart b/client/flutter_ui/lib/src/desktop_integration.dart new file mode 100644 index 000000000..4d2bdff76 --- /dev/null +++ b/client/flutter_ui/lib/src/desktop_integration.dart @@ -0,0 +1,434 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:local_notifier/local_notifier.dart'; +import 'package:tray_manager/tray_manager.dart'; +import 'package:window_manager/window_manager.dart'; + +import 'daemon_client.dart'; +import 'models.dart'; +import 'platform.dart'; + +const uiVersion = '0.1.0'; +const _githubUrl = 'https://github.com/netbirdio/netbird'; +const _downloadUrl = 'https://netbird.io/download/'; + +class TabIndex { + static const status = 0; + static const networks = 1; + static const profiles = 2; + static const settings = 3; + static const debug = 4; +} + +/// Owns native desktop integration: window lifecycle (hide on close), system +/// tray icon and menu, and OS-level notifications driven by daemon events. +class DesktopIntegration with TrayListener, WindowListener { + DesktopIntegration({required this.client}); + + final DaemonClient client; + final _tabRequests = StreamController.broadcast(); + + StreamSubscription? _snapshotSub; + StreamSubscription? _eventSub; + ClientSnapshot? _lastSnapshot; + String? _lastMenuKey; + bool _disposed = false; + bool _settingsBusy = false; + + Stream get tabRequests => _tabRequests.stream; + + static const _trayMenuConnect = 'connect'; + static const _trayMenuDisconnect = 'disconnect'; + static const _trayMenuShow = 'show'; + static const _trayMenuQuit = 'quit'; + static const _trayMenuAllowSSH = 'settings.allow_ssh'; + static const _trayMenuAutoConnect = 'settings.auto_connect'; + static const _trayMenuQuantum = 'settings.quantum'; + static const _trayMenuLazy = 'settings.lazy'; + static const _trayMenuBlockInbound = 'settings.block_inbound'; + static const _trayMenuNotifications = 'settings.notifications'; + static const _trayMenuAdvancedSettings = 'open.settings'; + static const _trayMenuDebugBundle = 'open.debug'; + static const _trayMenuNetworks = 'open.networks'; + static const _trayMenuManageProfiles = 'open.profiles'; + static const _trayMenuLogout = 'profile.logout'; + static const _trayMenuGithub = 'about.github'; + static const _trayMenuDownload = 'about.download'; + static const _profileSwitchPrefix = 'profile.switch:'; + + Future initialize() async { + await localNotifier.setup(appName: 'NetBird'); + await windowManager.setPreventClose(true); + windowManager.addListener(this); + trayManager.addListener(this); + + await _applyTrayIcon(ConnectionStatus.disconnected); + await trayManager.setToolTip('NetBird'); + await _refreshTrayMenu(null); + + _snapshotSub = client.watchSnapshot().listen(_onSnapshot); + _eventSub = client.watchEvents().listen(_onEvent); + } + + Future dispose() async { + if (_disposed) { + return; + } + _disposed = true; + await _snapshotSub?.cancel(); + await _eventSub?.cancel(); + await _tabRequests.close(); + windowManager.removeListener(this); + trayManager.removeListener(this); + await trayManager.destroy(); + } + + @override + void onWindowClose() { + unawaited(_handleWindowClose()); + } + + Future _handleWindowClose() async { + final prevent = await windowManager.isPreventClose(); + if (prevent) { + await windowManager.hide(); + } + } + + @override + void onTrayIconMouseDown() { + if (Platform.isMacOS) { + unawaited(trayManager.popUpContextMenu()); + } else { + unawaited(_showWindow()); + } + } + + @override + void onTrayIconRightMouseDown() { + unawaited(trayManager.popUpContextMenu()); + } + + @override + void onTrayMenuItemClick(MenuItem menuItem) { + final key = menuItem.key; + if (key == null) { + return; + } + if (key.startsWith(_profileSwitchPrefix)) { + final name = key.substring(_profileSwitchPrefix.length); + unawaited(_switchProfile(name)); + return; + } + switch (key) { + case _trayMenuConnect: + unawaited(client.connect()); + case _trayMenuDisconnect: + unawaited(client.disconnect()); + case _trayMenuShow: + unawaited(_showWindow()); + case _trayMenuQuit: + unawaited(_quit()); + case _trayMenuAllowSSH: + unawaited(_toggleSetting((s) => s.copyWith(allowSsh: !s.allowSsh))); + case _trayMenuAutoConnect: + unawaited( + _toggleSetting((s) => s.copyWith(autoConnect: !s.autoConnect)), + ); + case _trayMenuQuantum: + unawaited( + _toggleSetting( + (s) => s.copyWith(quantumResistance: !s.quantumResistance), + ), + ); + case _trayMenuLazy: + unawaited( + _toggleSetting( + (s) => s.copyWith(lazyConnection: !s.lazyConnection), + ), + ); + case _trayMenuBlockInbound: + unawaited( + _toggleSetting( + (s) => s.copyWith(blockInbound: !s.blockInbound), + ), + ); + case _trayMenuNotifications: + unawaited( + _toggleSetting( + (s) => s.copyWith(notifications: !s.notifications), + ), + ); + case _trayMenuAdvancedSettings: + unawaited(_openTab(TabIndex.settings)); + case _trayMenuDebugBundle: + unawaited(_openTab(TabIndex.debug)); + case _trayMenuNetworks: + unawaited(_openTab(TabIndex.networks)); + case _trayMenuManageProfiles: + unawaited(_openTab(TabIndex.profiles)); + case _trayMenuLogout: + unawaited(client.logoutActive()); + case _trayMenuGithub: + unawaited(openExternalUrl(_githubUrl)); + case _trayMenuDownload: + unawaited(openExternalUrl(_downloadUrl)); + } + } + + Future _openTab(int index) async { + if (!_tabRequests.isClosed) { + _tabRequests.add(index); + } + await _showWindow(); + } + + Future _toggleSetting( + ClientSettings Function(ClientSettings) mutate, + ) async { + if (_settingsBusy) { + return; + } + final snapshot = _lastSnapshot; + if (snapshot == null) { + return; + } + _settingsBusy = true; + try { + await client.updateSettings(mutate(snapshot.settings)); + } finally { + _settingsBusy = false; + } + } + + Future _switchProfile(String name) async { + final snapshot = _lastSnapshot; + if (snapshot == null || snapshot.activeProfile.name == name) { + return; + } + await client.switchProfile(name); + } + + Future _showWindow() async { + await windowManager.show(); + await windowManager.focus(); + } + + Future _quit() async { + await dispose(); + await windowManager.setPreventClose(false); + await windowManager.destroy(); + } + + void _onSnapshot(ClientSnapshot snapshot) { + final previous = _lastSnapshot; + _lastSnapshot = snapshot; + if (previous == null || previous.status != snapshot.status) { + unawaited(_applyTrayIcon(snapshot.status)); + unawaited(trayManager.setToolTip('NetBird — ${snapshot.status.label}')); + } + unawaited(_refreshTrayMenu(snapshot)); + } + + void _onEvent(SystemNotification event) { + if (event.userMessage.isEmpty) { + return; + } + final notificationsEnabled = + _lastSnapshot?.settings.notifications ?? true; + final critical = event.severity == NotificationSeverity.critical; + if (!notificationsEnabled && !critical) { + return; + } + + final title = '${_severityPrefix(event.severity)} [${event.category.label}]'; + final body = event.id == null + ? event.userMessage + : '${event.userMessage} (id: ${event.id})'; + + unawaited( + LocalNotification(title: title, body: body).show(), + ); + } + + Future _applyTrayIcon(ConnectionStatus status) async { + final basename = switch (status) { + ConnectionStatus.connected => 'connected', + ConnectionStatus.connecting || + ConnectionStatus.awaitingLogin => 'connecting', + ConnectionStatus.error => 'error', + ConnectionStatus.disconnected => 'disconnected', + }; + final asset = Platform.isMacOS + ? 'assets/tray/$basename-macos.png' + : 'assets/tray/$basename.png'; + await trayManager.setIcon(asset, isTemplate: Platform.isMacOS); + } + + Future _refreshTrayMenu(ClientSnapshot? snapshot) async { + final key = _menuKey(snapshot); + if (key == _lastMenuKey) { + return; + } + _lastMenuKey = key; + + final connected = snapshot?.status == ConnectionStatus.connected; + final connecting = snapshot?.status == ConnectionStatus.connecting || + snapshot?.status == ConnectionStatus.awaitingLogin; + + final statusLabel = + snapshot?.status.label ?? ConnectionStatus.disconnected.label; + final settings = snapshot?.settings ?? const ClientSettings(); + final activeName = snapshot?.activeProfile.name ?? 'unknown'; + final email = snapshot?.activeProfile.email; + final daemonVersion = snapshot?.daemonVersion ?? 'unknown'; + + final profileItems = []; + final profiles = snapshot?.profiles ?? const []; + for (final profile in profiles) { + profileItems.add( + MenuItem.checkbox( + key: '$_profileSwitchPrefix${profile.name}', + label: profile.name, + checked: profile.active, + ), + ); + } + if (profileItems.isNotEmpty) { + profileItems.add(MenuItem.separator()); + } + profileItems + ..add(MenuItem(key: _trayMenuManageProfiles, label: 'Manage Profiles')) + ..add( + MenuItem( + key: _trayMenuLogout, + label: 'Deregister', + disabled: !connected, + ), + ); + + await trayManager.setContextMenu( + Menu( + items: [ + MenuItem(label: statusLabel, disabled: true), + MenuItem.submenu( + label: 'Profile: $activeName', + submenu: Menu(items: profileItems), + ), + if (email != null && email.isNotEmpty) + MenuItem(label: '($email)', disabled: true), + MenuItem.separator(), + MenuItem( + key: _trayMenuConnect, + label: 'Connect', + disabled: connected || connecting, + ), + MenuItem( + key: _trayMenuDisconnect, + label: 'Disconnect', + disabled: !connected, + ), + MenuItem.separator(), + MenuItem.submenu( + label: 'Settings', + submenu: Menu( + items: [ + MenuItem.checkbox( + key: _trayMenuAllowSSH, + label: 'Allow SSH', + checked: settings.allowSsh, + ), + MenuItem.checkbox( + key: _trayMenuAutoConnect, + label: 'Connect on Startup', + checked: settings.autoConnect, + ), + MenuItem.checkbox( + key: _trayMenuQuantum, + label: 'Enable Quantum-Resistance', + checked: settings.quantumResistance, + ), + MenuItem.checkbox( + key: _trayMenuLazy, + label: 'Enable Lazy Connections', + checked: settings.lazyConnection, + ), + MenuItem.checkbox( + key: _trayMenuBlockInbound, + label: 'Block Inbound Connections', + checked: settings.blockInbound, + ), + MenuItem.checkbox( + key: _trayMenuNotifications, + label: 'Notifications', + checked: settings.notifications, + ), + MenuItem.separator(), + MenuItem( + key: _trayMenuAdvancedSettings, + label: 'Advanced Settings', + ), + MenuItem( + key: _trayMenuDebugBundle, + label: 'Create Debug Bundle', + ), + ], + ), + ), + MenuItem(key: _trayMenuNetworks, label: 'Networks'), + MenuItem.separator(), + MenuItem.submenu( + label: 'About', + submenu: Menu( + items: [ + MenuItem(key: _trayMenuGithub, label: 'GitHub'), + MenuItem(label: 'GUI: $uiVersion', disabled: true), + MenuItem(label: 'Daemon: $daemonVersion', disabled: true), + MenuItem( + key: _trayMenuDownload, + label: 'Download latest version', + ), + ], + ), + ), + MenuItem.separator(), + MenuItem(key: _trayMenuShow, label: 'Show window'), + MenuItem(key: _trayMenuQuit, label: 'Quit'), + ], + ), + ); + } + + String _menuKey(ClientSnapshot? snapshot) { + if (snapshot == null) { + return 'null'; + } + final s = snapshot.settings; + final profiles = snapshot.profiles + .map((p) => '${p.name}:${p.active}:${p.email ?? ''}') + .join(','); + return [ + snapshot.status.name, + snapshot.activeProfile.name, + snapshot.activeProfile.email ?? '', + snapshot.daemonVersion, + profiles, + s.allowSsh, + s.autoConnect, + s.quantumResistance, + s.lazyConnection, + s.blockInbound, + s.notifications, + ].join('|'); + } + + String _severityPrefix(NotificationSeverity severity) { + return switch (severity) { + NotificationSeverity.critical => 'Critical', + NotificationSeverity.error => 'Error', + NotificationSeverity.warning => 'Warning', + NotificationSeverity.info => 'Info', + }; + } +} diff --git a/client/flutter_ui/lib/src/generated/daemon.pb.dart b/client/flutter_ui/lib/src/generated/daemon.pb.dart new file mode 100644 index 000000000..57aa33f7c --- /dev/null +++ b/client/flutter_ui/lib/src/generated/daemon.pb.dart @@ -0,0 +1,7393 @@ +// This is a generated file - do not edit. +// +// Generated from daemon.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/well_known_types/google/protobuf/duration.pb.dart' + as $1; +import 'package:protobuf/well_known_types/google/protobuf/timestamp.pb.dart' + as $2; + +import 'daemon.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'daemon.pbenum.dart'; + +class EmptyRequest extends $pb.GeneratedMessage { + factory EmptyRequest() => create(); + + EmptyRequest._(); + + factory EmptyRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory EmptyRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'EmptyRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EmptyRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EmptyRequest copyWith(void Function(EmptyRequest) updates) => + super.copyWith((message) => updates(message as EmptyRequest)) + as EmptyRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EmptyRequest create() => EmptyRequest._(); + @$core.override + EmptyRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static EmptyRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static EmptyRequest? _defaultInstance; +} + +class OSLifecycleRequest extends $pb.GeneratedMessage { + factory OSLifecycleRequest({ + OSLifecycleRequest_CycleType? type, + }) { + final result = create(); + if (type != null) result.type = type; + return result; + } + + OSLifecycleRequest._(); + + factory OSLifecycleRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory OSLifecycleRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'OSLifecycleRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aE(1, _omitFieldNames ? '' : 'type', + enumValues: OSLifecycleRequest_CycleType.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + OSLifecycleRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + OSLifecycleRequest copyWith(void Function(OSLifecycleRequest) updates) => + super.copyWith((message) => updates(message as OSLifecycleRequest)) + as OSLifecycleRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static OSLifecycleRequest create() => OSLifecycleRequest._(); + @$core.override + OSLifecycleRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static OSLifecycleRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static OSLifecycleRequest? _defaultInstance; + + @$pb.TagNumber(1) + OSLifecycleRequest_CycleType get type => $_getN(0); + @$pb.TagNumber(1) + set type(OSLifecycleRequest_CycleType value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasType() => $_has(0); + @$pb.TagNumber(1) + void clearType() => $_clearField(1); +} + +class OSLifecycleResponse extends $pb.GeneratedMessage { + factory OSLifecycleResponse() => create(); + + OSLifecycleResponse._(); + + factory OSLifecycleResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory OSLifecycleResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'OSLifecycleResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + OSLifecycleResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + OSLifecycleResponse copyWith(void Function(OSLifecycleResponse) updates) => + super.copyWith((message) => updates(message as OSLifecycleResponse)) + as OSLifecycleResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static OSLifecycleResponse create() => OSLifecycleResponse._(); + @$core.override + OSLifecycleResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static OSLifecycleResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static OSLifecycleResponse? _defaultInstance; +} + +class LoginRequest extends $pb.GeneratedMessage { + factory LoginRequest({ + $core.String? setupKey, + @$core.Deprecated('This field is deprecated.') $core.String? preSharedKey, + $core.String? managementUrl, + $core.String? adminURL, + $core.Iterable<$core.String>? natExternalIPs, + $core.bool? cleanNATExternalIPs, + $core.List<$core.int>? customDNSAddress, + $core.bool? isUnixDesktopClient, + $core.String? hostname, + $core.bool? rosenpassEnabled, + $core.String? interfaceName, + $fixnum.Int64? wireguardPort, + $core.String? optionalPreSharedKey, + $core.bool? disableAutoConnect, + $core.bool? serverSSHAllowed, + $core.bool? rosenpassPermissive, + $core.Iterable<$core.String>? extraIFaceBlacklist, + $core.bool? networkMonitor, + $1.Duration? dnsRouteInterval, + $core.bool? disableClientRoutes, + $core.bool? disableServerRoutes, + $core.bool? disableDns, + $core.bool? disableFirewall, + $core.bool? blockLanAccess, + $core.bool? disableNotifications, + $core.Iterable<$core.String>? dnsLabels, + $core.bool? cleanDNSLabels, + $core.bool? lazyConnectionEnabled, + $core.bool? blockInbound, + $core.String? profileName, + $core.String? username, + $fixnum.Int64? mtu, + $core.String? hint, + $core.bool? enableSSHRoot, + $core.bool? enableSSHSFTP, + $core.bool? enableSSHLocalPortForwarding, + $core.bool? enableSSHRemotePortForwarding, + $core.bool? disableSSHAuth, + $core.int? sshJWTCacheTTL, + }) { + final result = create(); + if (setupKey != null) result.setupKey = setupKey; + if (preSharedKey != null) result.preSharedKey = preSharedKey; + if (managementUrl != null) result.managementUrl = managementUrl; + if (adminURL != null) result.adminURL = adminURL; + if (natExternalIPs != null) result.natExternalIPs.addAll(natExternalIPs); + if (cleanNATExternalIPs != null) + result.cleanNATExternalIPs = cleanNATExternalIPs; + if (customDNSAddress != null) result.customDNSAddress = customDNSAddress; + if (isUnixDesktopClient != null) + result.isUnixDesktopClient = isUnixDesktopClient; + if (hostname != null) result.hostname = hostname; + if (rosenpassEnabled != null) result.rosenpassEnabled = rosenpassEnabled; + if (interfaceName != null) result.interfaceName = interfaceName; + if (wireguardPort != null) result.wireguardPort = wireguardPort; + if (optionalPreSharedKey != null) + result.optionalPreSharedKey = optionalPreSharedKey; + if (disableAutoConnect != null) + result.disableAutoConnect = disableAutoConnect; + if (serverSSHAllowed != null) result.serverSSHAllowed = serverSSHAllowed; + if (rosenpassPermissive != null) + result.rosenpassPermissive = rosenpassPermissive; + if (extraIFaceBlacklist != null) + result.extraIFaceBlacklist.addAll(extraIFaceBlacklist); + if (networkMonitor != null) result.networkMonitor = networkMonitor; + if (dnsRouteInterval != null) result.dnsRouteInterval = dnsRouteInterval; + if (disableClientRoutes != null) + result.disableClientRoutes = disableClientRoutes; + if (disableServerRoutes != null) + result.disableServerRoutes = disableServerRoutes; + if (disableDns != null) result.disableDns = disableDns; + if (disableFirewall != null) result.disableFirewall = disableFirewall; + if (blockLanAccess != null) result.blockLanAccess = blockLanAccess; + if (disableNotifications != null) + result.disableNotifications = disableNotifications; + if (dnsLabels != null) result.dnsLabels.addAll(dnsLabels); + if (cleanDNSLabels != null) result.cleanDNSLabels = cleanDNSLabels; + if (lazyConnectionEnabled != null) + result.lazyConnectionEnabled = lazyConnectionEnabled; + if (blockInbound != null) result.blockInbound = blockInbound; + if (profileName != null) result.profileName = profileName; + if (username != null) result.username = username; + if (mtu != null) result.mtu = mtu; + if (hint != null) result.hint = hint; + if (enableSSHRoot != null) result.enableSSHRoot = enableSSHRoot; + if (enableSSHSFTP != null) result.enableSSHSFTP = enableSSHSFTP; + if (enableSSHLocalPortForwarding != null) + result.enableSSHLocalPortForwarding = enableSSHLocalPortForwarding; + if (enableSSHRemotePortForwarding != null) + result.enableSSHRemotePortForwarding = enableSSHRemotePortForwarding; + if (disableSSHAuth != null) result.disableSSHAuth = disableSSHAuth; + if (sshJWTCacheTTL != null) result.sshJWTCacheTTL = sshJWTCacheTTL; + return result; + } + + LoginRequest._(); + + factory LoginRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LoginRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LoginRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'setupKey', protoName: 'setupKey') + ..aOS(2, _omitFieldNames ? '' : 'preSharedKey', protoName: 'preSharedKey') + ..aOS(3, _omitFieldNames ? '' : 'managementUrl', protoName: 'managementUrl') + ..aOS(4, _omitFieldNames ? '' : 'adminURL', protoName: 'adminURL') + ..pPS(5, _omitFieldNames ? '' : 'natExternalIPs', + protoName: 'natExternalIPs') + ..aOB(6, _omitFieldNames ? '' : 'cleanNATExternalIPs', + protoName: 'cleanNATExternalIPs') + ..a<$core.List<$core.int>>( + 7, _omitFieldNames ? '' : 'customDNSAddress', $pb.PbFieldType.OY, + protoName: 'customDNSAddress') + ..aOB(8, _omitFieldNames ? '' : 'isUnixDesktopClient', + protoName: 'isUnixDesktopClient') + ..aOS(9, _omitFieldNames ? '' : 'hostname') + ..aOB(10, _omitFieldNames ? '' : 'rosenpassEnabled', + protoName: 'rosenpassEnabled') + ..aOS(11, _omitFieldNames ? '' : 'interfaceName', + protoName: 'interfaceName') + ..aInt64(12, _omitFieldNames ? '' : 'wireguardPort', + protoName: 'wireguardPort') + ..aOS(13, _omitFieldNames ? '' : 'optionalPreSharedKey', + protoName: 'optionalPreSharedKey') + ..aOB(14, _omitFieldNames ? '' : 'disableAutoConnect', + protoName: 'disableAutoConnect') + ..aOB(15, _omitFieldNames ? '' : 'serverSSHAllowed', + protoName: 'serverSSHAllowed') + ..aOB(16, _omitFieldNames ? '' : 'rosenpassPermissive', + protoName: 'rosenpassPermissive') + ..pPS(17, _omitFieldNames ? '' : 'extraIFaceBlacklist', + protoName: 'extraIFaceBlacklist') + ..aOB(18, _omitFieldNames ? '' : 'networkMonitor', + protoName: 'networkMonitor') + ..aOM<$1.Duration>(19, _omitFieldNames ? '' : 'dnsRouteInterval', + protoName: 'dnsRouteInterval', subBuilder: $1.Duration.create) + ..aOB(20, _omitFieldNames ? '' : 'disableClientRoutes') + ..aOB(21, _omitFieldNames ? '' : 'disableServerRoutes') + ..aOB(22, _omitFieldNames ? '' : 'disableDns') + ..aOB(23, _omitFieldNames ? '' : 'disableFirewall') + ..aOB(24, _omitFieldNames ? '' : 'blockLanAccess') + ..aOB(25, _omitFieldNames ? '' : 'disableNotifications') + ..pPS(26, _omitFieldNames ? '' : 'dnsLabels') + ..aOB(27, _omitFieldNames ? '' : 'cleanDNSLabels', + protoName: 'cleanDNSLabels') + ..aOB(28, _omitFieldNames ? '' : 'lazyConnectionEnabled', + protoName: 'lazyConnectionEnabled') + ..aOB(29, _omitFieldNames ? '' : 'blockInbound') + ..aOS(30, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(31, _omitFieldNames ? '' : 'username') + ..aInt64(32, _omitFieldNames ? '' : 'mtu') + ..aOS(33, _omitFieldNames ? '' : 'hint') + ..aOB(34, _omitFieldNames ? '' : 'enableSSHRoot', + protoName: 'enableSSHRoot') + ..aOB(35, _omitFieldNames ? '' : 'enableSSHSFTP', + protoName: 'enableSSHSFTP') + ..aOB(36, _omitFieldNames ? '' : 'enableSSHLocalPortForwarding', + protoName: 'enableSSHLocalPortForwarding') + ..aOB(37, _omitFieldNames ? '' : 'enableSSHRemotePortForwarding', + protoName: 'enableSSHRemotePortForwarding') + ..aOB(38, _omitFieldNames ? '' : 'disableSSHAuth', + protoName: 'disableSSHAuth') + ..aI(39, _omitFieldNames ? '' : 'sshJWTCacheTTL', + protoName: 'sshJWTCacheTTL') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LoginRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LoginRequest copyWith(void Function(LoginRequest) updates) => + super.copyWith((message) => updates(message as LoginRequest)) + as LoginRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LoginRequest create() => LoginRequest._(); + @$core.override + LoginRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static LoginRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static LoginRequest? _defaultInstance; + + /// setupKey netbird setup key. + @$pb.TagNumber(1) + $core.String get setupKey => $_getSZ(0); + @$pb.TagNumber(1) + set setupKey($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasSetupKey() => $_has(0); + @$pb.TagNumber(1) + void clearSetupKey() => $_clearField(1); + + /// This is the old PreSharedKey field which will be deprecated in favor of optionalPreSharedKey field that is defined as optional + /// to allow clearing of preshared key while being able to persist in the config file. + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(2) + $core.String get preSharedKey => $_getSZ(1); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(2) + set preSharedKey($core.String value) => $_setString(1, value); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(2) + $core.bool hasPreSharedKey() => $_has(1); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(2) + void clearPreSharedKey() => $_clearField(2); + + /// managementUrl to authenticate. + @$pb.TagNumber(3) + $core.String get managementUrl => $_getSZ(2); + @$pb.TagNumber(3) + set managementUrl($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasManagementUrl() => $_has(2); + @$pb.TagNumber(3) + void clearManagementUrl() => $_clearField(3); + + /// adminUrl to manage keys. + @$pb.TagNumber(4) + $core.String get adminURL => $_getSZ(3); + @$pb.TagNumber(4) + set adminURL($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasAdminURL() => $_has(3); + @$pb.TagNumber(4) + void clearAdminURL() => $_clearField(4); + + /// natExternalIPs map list of external IPs + @$pb.TagNumber(5) + $pb.PbList<$core.String> get natExternalIPs => $_getList(4); + + /// cleanNATExternalIPs clean map list of external IPs. + /// This is needed because the generated code + /// omits initialized empty slices due to omitempty tags + @$pb.TagNumber(6) + $core.bool get cleanNATExternalIPs => $_getBF(5); + @$pb.TagNumber(6) + set cleanNATExternalIPs($core.bool value) => $_setBool(5, value); + @$pb.TagNumber(6) + $core.bool hasCleanNATExternalIPs() => $_has(5); + @$pb.TagNumber(6) + void clearCleanNATExternalIPs() => $_clearField(6); + + @$pb.TagNumber(7) + $core.List<$core.int> get customDNSAddress => $_getN(6); + @$pb.TagNumber(7) + set customDNSAddress($core.List<$core.int> value) => $_setBytes(6, value); + @$pb.TagNumber(7) + $core.bool hasCustomDNSAddress() => $_has(6); + @$pb.TagNumber(7) + void clearCustomDNSAddress() => $_clearField(7); + + @$pb.TagNumber(8) + $core.bool get isUnixDesktopClient => $_getBF(7); + @$pb.TagNumber(8) + set isUnixDesktopClient($core.bool value) => $_setBool(7, value); + @$pb.TagNumber(8) + $core.bool hasIsUnixDesktopClient() => $_has(7); + @$pb.TagNumber(8) + void clearIsUnixDesktopClient() => $_clearField(8); + + @$pb.TagNumber(9) + $core.String get hostname => $_getSZ(8); + @$pb.TagNumber(9) + set hostname($core.String value) => $_setString(8, value); + @$pb.TagNumber(9) + $core.bool hasHostname() => $_has(8); + @$pb.TagNumber(9) + void clearHostname() => $_clearField(9); + + @$pb.TagNumber(10) + $core.bool get rosenpassEnabled => $_getBF(9); + @$pb.TagNumber(10) + set rosenpassEnabled($core.bool value) => $_setBool(9, value); + @$pb.TagNumber(10) + $core.bool hasRosenpassEnabled() => $_has(9); + @$pb.TagNumber(10) + void clearRosenpassEnabled() => $_clearField(10); + + @$pb.TagNumber(11) + $core.String get interfaceName => $_getSZ(10); + @$pb.TagNumber(11) + set interfaceName($core.String value) => $_setString(10, value); + @$pb.TagNumber(11) + $core.bool hasInterfaceName() => $_has(10); + @$pb.TagNumber(11) + void clearInterfaceName() => $_clearField(11); + + @$pb.TagNumber(12) + $fixnum.Int64 get wireguardPort => $_getI64(11); + @$pb.TagNumber(12) + set wireguardPort($fixnum.Int64 value) => $_setInt64(11, value); + @$pb.TagNumber(12) + $core.bool hasWireguardPort() => $_has(11); + @$pb.TagNumber(12) + void clearWireguardPort() => $_clearField(12); + + @$pb.TagNumber(13) + $core.String get optionalPreSharedKey => $_getSZ(12); + @$pb.TagNumber(13) + set optionalPreSharedKey($core.String value) => $_setString(12, value); + @$pb.TagNumber(13) + $core.bool hasOptionalPreSharedKey() => $_has(12); + @$pb.TagNumber(13) + void clearOptionalPreSharedKey() => $_clearField(13); + + @$pb.TagNumber(14) + $core.bool get disableAutoConnect => $_getBF(13); + @$pb.TagNumber(14) + set disableAutoConnect($core.bool value) => $_setBool(13, value); + @$pb.TagNumber(14) + $core.bool hasDisableAutoConnect() => $_has(13); + @$pb.TagNumber(14) + void clearDisableAutoConnect() => $_clearField(14); + + @$pb.TagNumber(15) + $core.bool get serverSSHAllowed => $_getBF(14); + @$pb.TagNumber(15) + set serverSSHAllowed($core.bool value) => $_setBool(14, value); + @$pb.TagNumber(15) + $core.bool hasServerSSHAllowed() => $_has(14); + @$pb.TagNumber(15) + void clearServerSSHAllowed() => $_clearField(15); + + @$pb.TagNumber(16) + $core.bool get rosenpassPermissive => $_getBF(15); + @$pb.TagNumber(16) + set rosenpassPermissive($core.bool value) => $_setBool(15, value); + @$pb.TagNumber(16) + $core.bool hasRosenpassPermissive() => $_has(15); + @$pb.TagNumber(16) + void clearRosenpassPermissive() => $_clearField(16); + + @$pb.TagNumber(17) + $pb.PbList<$core.String> get extraIFaceBlacklist => $_getList(16); + + @$pb.TagNumber(18) + $core.bool get networkMonitor => $_getBF(17); + @$pb.TagNumber(18) + set networkMonitor($core.bool value) => $_setBool(17, value); + @$pb.TagNumber(18) + $core.bool hasNetworkMonitor() => $_has(17); + @$pb.TagNumber(18) + void clearNetworkMonitor() => $_clearField(18); + + @$pb.TagNumber(19) + $1.Duration get dnsRouteInterval => $_getN(18); + @$pb.TagNumber(19) + set dnsRouteInterval($1.Duration value) => $_setField(19, value); + @$pb.TagNumber(19) + $core.bool hasDnsRouteInterval() => $_has(18); + @$pb.TagNumber(19) + void clearDnsRouteInterval() => $_clearField(19); + @$pb.TagNumber(19) + $1.Duration ensureDnsRouteInterval() => $_ensure(18); + + @$pb.TagNumber(20) + $core.bool get disableClientRoutes => $_getBF(19); + @$pb.TagNumber(20) + set disableClientRoutes($core.bool value) => $_setBool(19, value); + @$pb.TagNumber(20) + $core.bool hasDisableClientRoutes() => $_has(19); + @$pb.TagNumber(20) + void clearDisableClientRoutes() => $_clearField(20); + + @$pb.TagNumber(21) + $core.bool get disableServerRoutes => $_getBF(20); + @$pb.TagNumber(21) + set disableServerRoutes($core.bool value) => $_setBool(20, value); + @$pb.TagNumber(21) + $core.bool hasDisableServerRoutes() => $_has(20); + @$pb.TagNumber(21) + void clearDisableServerRoutes() => $_clearField(21); + + @$pb.TagNumber(22) + $core.bool get disableDns => $_getBF(21); + @$pb.TagNumber(22) + set disableDns($core.bool value) => $_setBool(21, value); + @$pb.TagNumber(22) + $core.bool hasDisableDns() => $_has(21); + @$pb.TagNumber(22) + void clearDisableDns() => $_clearField(22); + + @$pb.TagNumber(23) + $core.bool get disableFirewall => $_getBF(22); + @$pb.TagNumber(23) + set disableFirewall($core.bool value) => $_setBool(22, value); + @$pb.TagNumber(23) + $core.bool hasDisableFirewall() => $_has(22); + @$pb.TagNumber(23) + void clearDisableFirewall() => $_clearField(23); + + @$pb.TagNumber(24) + $core.bool get blockLanAccess => $_getBF(23); + @$pb.TagNumber(24) + set blockLanAccess($core.bool value) => $_setBool(23, value); + @$pb.TagNumber(24) + $core.bool hasBlockLanAccess() => $_has(23); + @$pb.TagNumber(24) + void clearBlockLanAccess() => $_clearField(24); + + @$pb.TagNumber(25) + $core.bool get disableNotifications => $_getBF(24); + @$pb.TagNumber(25) + set disableNotifications($core.bool value) => $_setBool(24, value); + @$pb.TagNumber(25) + $core.bool hasDisableNotifications() => $_has(24); + @$pb.TagNumber(25) + void clearDisableNotifications() => $_clearField(25); + + @$pb.TagNumber(26) + $pb.PbList<$core.String> get dnsLabels => $_getList(25); + + /// cleanDNSLabels clean map list of DNS labels. + /// This is needed because the generated code + /// omits initialized empty slices due to omitempty tags + @$pb.TagNumber(27) + $core.bool get cleanDNSLabels => $_getBF(26); + @$pb.TagNumber(27) + set cleanDNSLabels($core.bool value) => $_setBool(26, value); + @$pb.TagNumber(27) + $core.bool hasCleanDNSLabels() => $_has(26); + @$pb.TagNumber(27) + void clearCleanDNSLabels() => $_clearField(27); + + @$pb.TagNumber(28) + $core.bool get lazyConnectionEnabled => $_getBF(27); + @$pb.TagNumber(28) + set lazyConnectionEnabled($core.bool value) => $_setBool(27, value); + @$pb.TagNumber(28) + $core.bool hasLazyConnectionEnabled() => $_has(27); + @$pb.TagNumber(28) + void clearLazyConnectionEnabled() => $_clearField(28); + + @$pb.TagNumber(29) + $core.bool get blockInbound => $_getBF(28); + @$pb.TagNumber(29) + set blockInbound($core.bool value) => $_setBool(28, value); + @$pb.TagNumber(29) + $core.bool hasBlockInbound() => $_has(28); + @$pb.TagNumber(29) + void clearBlockInbound() => $_clearField(29); + + @$pb.TagNumber(30) + $core.String get profileName => $_getSZ(29); + @$pb.TagNumber(30) + set profileName($core.String value) => $_setString(29, value); + @$pb.TagNumber(30) + $core.bool hasProfileName() => $_has(29); + @$pb.TagNumber(30) + void clearProfileName() => $_clearField(30); + + @$pb.TagNumber(31) + $core.String get username => $_getSZ(30); + @$pb.TagNumber(31) + set username($core.String value) => $_setString(30, value); + @$pb.TagNumber(31) + $core.bool hasUsername() => $_has(30); + @$pb.TagNumber(31) + void clearUsername() => $_clearField(31); + + @$pb.TagNumber(32) + $fixnum.Int64 get mtu => $_getI64(31); + @$pb.TagNumber(32) + set mtu($fixnum.Int64 value) => $_setInt64(31, value); + @$pb.TagNumber(32) + $core.bool hasMtu() => $_has(31); + @$pb.TagNumber(32) + void clearMtu() => $_clearField(32); + + /// hint is used to pre-fill the email/username field during SSO authentication + @$pb.TagNumber(33) + $core.String get hint => $_getSZ(32); + @$pb.TagNumber(33) + set hint($core.String value) => $_setString(32, value); + @$pb.TagNumber(33) + $core.bool hasHint() => $_has(32); + @$pb.TagNumber(33) + void clearHint() => $_clearField(33); + + @$pb.TagNumber(34) + $core.bool get enableSSHRoot => $_getBF(33); + @$pb.TagNumber(34) + set enableSSHRoot($core.bool value) => $_setBool(33, value); + @$pb.TagNumber(34) + $core.bool hasEnableSSHRoot() => $_has(33); + @$pb.TagNumber(34) + void clearEnableSSHRoot() => $_clearField(34); + + @$pb.TagNumber(35) + $core.bool get enableSSHSFTP => $_getBF(34); + @$pb.TagNumber(35) + set enableSSHSFTP($core.bool value) => $_setBool(34, value); + @$pb.TagNumber(35) + $core.bool hasEnableSSHSFTP() => $_has(34); + @$pb.TagNumber(35) + void clearEnableSSHSFTP() => $_clearField(35); + + @$pb.TagNumber(36) + $core.bool get enableSSHLocalPortForwarding => $_getBF(35); + @$pb.TagNumber(36) + set enableSSHLocalPortForwarding($core.bool value) => $_setBool(35, value); + @$pb.TagNumber(36) + $core.bool hasEnableSSHLocalPortForwarding() => $_has(35); + @$pb.TagNumber(36) + void clearEnableSSHLocalPortForwarding() => $_clearField(36); + + @$pb.TagNumber(37) + $core.bool get enableSSHRemotePortForwarding => $_getBF(36); + @$pb.TagNumber(37) + set enableSSHRemotePortForwarding($core.bool value) => $_setBool(36, value); + @$pb.TagNumber(37) + $core.bool hasEnableSSHRemotePortForwarding() => $_has(36); + @$pb.TagNumber(37) + void clearEnableSSHRemotePortForwarding() => $_clearField(37); + + @$pb.TagNumber(38) + $core.bool get disableSSHAuth => $_getBF(37); + @$pb.TagNumber(38) + set disableSSHAuth($core.bool value) => $_setBool(37, value); + @$pb.TagNumber(38) + $core.bool hasDisableSSHAuth() => $_has(37); + @$pb.TagNumber(38) + void clearDisableSSHAuth() => $_clearField(38); + + @$pb.TagNumber(39) + $core.int get sshJWTCacheTTL => $_getIZ(38); + @$pb.TagNumber(39) + set sshJWTCacheTTL($core.int value) => $_setSignedInt32(38, value); + @$pb.TagNumber(39) + $core.bool hasSshJWTCacheTTL() => $_has(38); + @$pb.TagNumber(39) + void clearSshJWTCacheTTL() => $_clearField(39); +} + +class LoginResponse extends $pb.GeneratedMessage { + factory LoginResponse({ + $core.bool? needsSSOLogin, + $core.String? userCode, + $core.String? verificationURI, + $core.String? verificationURIComplete, + }) { + final result = create(); + if (needsSSOLogin != null) result.needsSSOLogin = needsSSOLogin; + if (userCode != null) result.userCode = userCode; + if (verificationURI != null) result.verificationURI = verificationURI; + if (verificationURIComplete != null) + result.verificationURIComplete = verificationURIComplete; + return result; + } + + LoginResponse._(); + + factory LoginResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LoginResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LoginResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'needsSSOLogin', protoName: 'needsSSOLogin') + ..aOS(2, _omitFieldNames ? '' : 'userCode', protoName: 'userCode') + ..aOS(3, _omitFieldNames ? '' : 'verificationURI', + protoName: 'verificationURI') + ..aOS(4, _omitFieldNames ? '' : 'verificationURIComplete', + protoName: 'verificationURIComplete') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LoginResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LoginResponse copyWith(void Function(LoginResponse) updates) => + super.copyWith((message) => updates(message as LoginResponse)) + as LoginResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LoginResponse create() => LoginResponse._(); + @$core.override + LoginResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static LoginResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static LoginResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get needsSSOLogin => $_getBF(0); + @$pb.TagNumber(1) + set needsSSOLogin($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasNeedsSSOLogin() => $_has(0); + @$pb.TagNumber(1) + void clearNeedsSSOLogin() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get userCode => $_getSZ(1); + @$pb.TagNumber(2) + set userCode($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUserCode() => $_has(1); + @$pb.TagNumber(2) + void clearUserCode() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get verificationURI => $_getSZ(2); + @$pb.TagNumber(3) + set verificationURI($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasVerificationURI() => $_has(2); + @$pb.TagNumber(3) + void clearVerificationURI() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get verificationURIComplete => $_getSZ(3); + @$pb.TagNumber(4) + set verificationURIComplete($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasVerificationURIComplete() => $_has(3); + @$pb.TagNumber(4) + void clearVerificationURIComplete() => $_clearField(4); +} + +class WaitSSOLoginRequest extends $pb.GeneratedMessage { + factory WaitSSOLoginRequest({ + $core.String? userCode, + $core.String? hostname, + }) { + final result = create(); + if (userCode != null) result.userCode = userCode; + if (hostname != null) result.hostname = hostname; + return result; + } + + WaitSSOLoginRequest._(); + + factory WaitSSOLoginRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WaitSSOLoginRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WaitSSOLoginRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'userCode', protoName: 'userCode') + ..aOS(2, _omitFieldNames ? '' : 'hostname') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitSSOLoginRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitSSOLoginRequest copyWith(void Function(WaitSSOLoginRequest) updates) => + super.copyWith((message) => updates(message as WaitSSOLoginRequest)) + as WaitSSOLoginRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WaitSSOLoginRequest create() => WaitSSOLoginRequest._(); + @$core.override + WaitSSOLoginRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static WaitSSOLoginRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static WaitSSOLoginRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get userCode => $_getSZ(0); + @$pb.TagNumber(1) + set userCode($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasUserCode() => $_has(0); + @$pb.TagNumber(1) + void clearUserCode() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get hostname => $_getSZ(1); + @$pb.TagNumber(2) + set hostname($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasHostname() => $_has(1); + @$pb.TagNumber(2) + void clearHostname() => $_clearField(2); +} + +class WaitSSOLoginResponse extends $pb.GeneratedMessage { + factory WaitSSOLoginResponse({ + $core.String? email, + }) { + final result = create(); + if (email != null) result.email = email; + return result; + } + + WaitSSOLoginResponse._(); + + factory WaitSSOLoginResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WaitSSOLoginResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WaitSSOLoginResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'email') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitSSOLoginResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitSSOLoginResponse copyWith(void Function(WaitSSOLoginResponse) updates) => + super.copyWith((message) => updates(message as WaitSSOLoginResponse)) + as WaitSSOLoginResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WaitSSOLoginResponse create() => WaitSSOLoginResponse._(); + @$core.override + WaitSSOLoginResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static WaitSSOLoginResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static WaitSSOLoginResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get email => $_getSZ(0); + @$pb.TagNumber(1) + set email($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasEmail() => $_has(0); + @$pb.TagNumber(1) + void clearEmail() => $_clearField(1); +} + +class UpRequest extends $pb.GeneratedMessage { + factory UpRequest({ + $core.String? profileName, + $core.String? username, + }) { + final result = create(); + if (profileName != null) result.profileName = profileName; + if (username != null) result.username = username; + return result; + } + + UpRequest._(); + + factory UpRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory UpRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UpRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(2, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UpRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UpRequest copyWith(void Function(UpRequest) updates) => + super.copyWith((message) => updates(message as UpRequest)) as UpRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpRequest create() => UpRequest._(); + @$core.override + UpRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static UpRequest getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get profileName => $_getSZ(0); + @$pb.TagNumber(1) + set profileName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProfileName() => $_has(0); + @$pb.TagNumber(1) + void clearProfileName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get username => $_getSZ(1); + @$pb.TagNumber(2) + set username($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUsername() => $_has(1); + @$pb.TagNumber(2) + void clearUsername() => $_clearField(2); +} + +class UpResponse extends $pb.GeneratedMessage { + factory UpResponse() => create(); + + UpResponse._(); + + factory UpResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory UpResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UpResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UpResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UpResponse copyWith(void Function(UpResponse) updates) => + super.copyWith((message) => updates(message as UpResponse)) as UpResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpResponse create() => UpResponse._(); + @$core.override + UpResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static UpResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static UpResponse? _defaultInstance; +} + +class StatusRequest extends $pb.GeneratedMessage { + factory StatusRequest({ + $core.bool? getFullPeerStatus, + $core.bool? shouldRunProbes, + $core.bool? waitForReady, + }) { + final result = create(); + if (getFullPeerStatus != null) result.getFullPeerStatus = getFullPeerStatus; + if (shouldRunProbes != null) result.shouldRunProbes = shouldRunProbes; + if (waitForReady != null) result.waitForReady = waitForReady; + return result; + } + + StatusRequest._(); + + factory StatusRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StatusRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StatusRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'getFullPeerStatus', + protoName: 'getFullPeerStatus') + ..aOB(2, _omitFieldNames ? '' : 'shouldRunProbes', + protoName: 'shouldRunProbes') + ..aOB(3, _omitFieldNames ? '' : 'waitForReady', protoName: 'waitForReady') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StatusRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StatusRequest copyWith(void Function(StatusRequest) updates) => + super.copyWith((message) => updates(message as StatusRequest)) + as StatusRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StatusRequest create() => StatusRequest._(); + @$core.override + StatusRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static StatusRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static StatusRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get getFullPeerStatus => $_getBF(0); + @$pb.TagNumber(1) + set getFullPeerStatus($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasGetFullPeerStatus() => $_has(0); + @$pb.TagNumber(1) + void clearGetFullPeerStatus() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get shouldRunProbes => $_getBF(1); + @$pb.TagNumber(2) + set shouldRunProbes($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasShouldRunProbes() => $_has(1); + @$pb.TagNumber(2) + void clearShouldRunProbes() => $_clearField(2); + + /// the UI do not using this yet, but CLIs could use it to wait until the status is ready + @$pb.TagNumber(3) + $core.bool get waitForReady => $_getBF(2); + @$pb.TagNumber(3) + set waitForReady($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasWaitForReady() => $_has(2); + @$pb.TagNumber(3) + void clearWaitForReady() => $_clearField(3); +} + +class StatusResponse extends $pb.GeneratedMessage { + factory StatusResponse({ + $core.String? status, + FullStatus? fullStatus, + $core.String? daemonVersion, + }) { + final result = create(); + if (status != null) result.status = status; + if (fullStatus != null) result.fullStatus = fullStatus; + if (daemonVersion != null) result.daemonVersion = daemonVersion; + return result; + } + + StatusResponse._(); + + factory StatusResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StatusResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StatusResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'status') + ..aOM(2, _omitFieldNames ? '' : 'fullStatus', + protoName: 'fullStatus', subBuilder: FullStatus.create) + ..aOS(3, _omitFieldNames ? '' : 'daemonVersion', protoName: 'daemonVersion') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StatusResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StatusResponse copyWith(void Function(StatusResponse) updates) => + super.copyWith((message) => updates(message as StatusResponse)) + as StatusResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StatusResponse create() => StatusResponse._(); + @$core.override + StatusResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static StatusResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static StatusResponse? _defaultInstance; + + /// status of the server. + @$pb.TagNumber(1) + $core.String get status => $_getSZ(0); + @$pb.TagNumber(1) + set status($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); + + @$pb.TagNumber(2) + FullStatus get fullStatus => $_getN(1); + @$pb.TagNumber(2) + set fullStatus(FullStatus value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasFullStatus() => $_has(1); + @$pb.TagNumber(2) + void clearFullStatus() => $_clearField(2); + @$pb.TagNumber(2) + FullStatus ensureFullStatus() => $_ensure(1); + + /// NetBird daemon version + @$pb.TagNumber(3) + $core.String get daemonVersion => $_getSZ(2); + @$pb.TagNumber(3) + set daemonVersion($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasDaemonVersion() => $_has(2); + @$pb.TagNumber(3) + void clearDaemonVersion() => $_clearField(3); +} + +class DownRequest extends $pb.GeneratedMessage { + factory DownRequest() => create(); + + DownRequest._(); + + factory DownRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DownRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DownRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DownRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DownRequest copyWith(void Function(DownRequest) updates) => + super.copyWith((message) => updates(message as DownRequest)) + as DownRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DownRequest create() => DownRequest._(); + @$core.override + DownRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static DownRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static DownRequest? _defaultInstance; +} + +class DownResponse extends $pb.GeneratedMessage { + factory DownResponse() => create(); + + DownResponse._(); + + factory DownResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DownResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DownResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DownResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DownResponse copyWith(void Function(DownResponse) updates) => + super.copyWith((message) => updates(message as DownResponse)) + as DownResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DownResponse create() => DownResponse._(); + @$core.override + DownResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static DownResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static DownResponse? _defaultInstance; +} + +class GetConfigRequest extends $pb.GeneratedMessage { + factory GetConfigRequest({ + $core.String? profileName, + $core.String? username, + }) { + final result = create(); + if (profileName != null) result.profileName = profileName; + if (username != null) result.username = username; + return result; + } + + GetConfigRequest._(); + + factory GetConfigRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetConfigRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetConfigRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(2, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetConfigRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetConfigRequest copyWith(void Function(GetConfigRequest) updates) => + super.copyWith((message) => updates(message as GetConfigRequest)) + as GetConfigRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetConfigRequest create() => GetConfigRequest._(); + @$core.override + GetConfigRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetConfigRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetConfigRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get profileName => $_getSZ(0); + @$pb.TagNumber(1) + set profileName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProfileName() => $_has(0); + @$pb.TagNumber(1) + void clearProfileName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get username => $_getSZ(1); + @$pb.TagNumber(2) + set username($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUsername() => $_has(1); + @$pb.TagNumber(2) + void clearUsername() => $_clearField(2); +} + +class GetConfigResponse extends $pb.GeneratedMessage { + factory GetConfigResponse({ + $core.String? managementUrl, + $core.String? configFile, + $core.String? logFile, + $core.String? preSharedKey, + $core.String? adminURL, + $core.String? interfaceName, + $fixnum.Int64? wireguardPort, + $fixnum.Int64? mtu, + $core.bool? disableAutoConnect, + $core.bool? serverSSHAllowed, + $core.bool? rosenpassEnabled, + $core.bool? rosenpassPermissive, + $core.bool? disableNotifications, + $core.bool? lazyConnectionEnabled, + $core.bool? blockInbound, + $core.bool? networkMonitor, + $core.bool? disableDns, + $core.bool? disableClientRoutes, + $core.bool? disableServerRoutes, + $core.bool? blockLanAccess, + $core.bool? enableSSHRoot, + $core.bool? enableSSHLocalPortForwarding, + $core.bool? enableSSHRemotePortForwarding, + $core.bool? enableSSHSFTP, + $core.bool? disableSSHAuth, + $core.int? sshJWTCacheTTL, + }) { + final result = create(); + if (managementUrl != null) result.managementUrl = managementUrl; + if (configFile != null) result.configFile = configFile; + if (logFile != null) result.logFile = logFile; + if (preSharedKey != null) result.preSharedKey = preSharedKey; + if (adminURL != null) result.adminURL = adminURL; + if (interfaceName != null) result.interfaceName = interfaceName; + if (wireguardPort != null) result.wireguardPort = wireguardPort; + if (mtu != null) result.mtu = mtu; + if (disableAutoConnect != null) + result.disableAutoConnect = disableAutoConnect; + if (serverSSHAllowed != null) result.serverSSHAllowed = serverSSHAllowed; + if (rosenpassEnabled != null) result.rosenpassEnabled = rosenpassEnabled; + if (rosenpassPermissive != null) + result.rosenpassPermissive = rosenpassPermissive; + if (disableNotifications != null) + result.disableNotifications = disableNotifications; + if (lazyConnectionEnabled != null) + result.lazyConnectionEnabled = lazyConnectionEnabled; + if (blockInbound != null) result.blockInbound = blockInbound; + if (networkMonitor != null) result.networkMonitor = networkMonitor; + if (disableDns != null) result.disableDns = disableDns; + if (disableClientRoutes != null) + result.disableClientRoutes = disableClientRoutes; + if (disableServerRoutes != null) + result.disableServerRoutes = disableServerRoutes; + if (blockLanAccess != null) result.blockLanAccess = blockLanAccess; + if (enableSSHRoot != null) result.enableSSHRoot = enableSSHRoot; + if (enableSSHLocalPortForwarding != null) + result.enableSSHLocalPortForwarding = enableSSHLocalPortForwarding; + if (enableSSHRemotePortForwarding != null) + result.enableSSHRemotePortForwarding = enableSSHRemotePortForwarding; + if (enableSSHSFTP != null) result.enableSSHSFTP = enableSSHSFTP; + if (disableSSHAuth != null) result.disableSSHAuth = disableSSHAuth; + if (sshJWTCacheTTL != null) result.sshJWTCacheTTL = sshJWTCacheTTL; + return result; + } + + GetConfigResponse._(); + + factory GetConfigResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetConfigResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetConfigResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'managementUrl', protoName: 'managementUrl') + ..aOS(2, _omitFieldNames ? '' : 'configFile', protoName: 'configFile') + ..aOS(3, _omitFieldNames ? '' : 'logFile', protoName: 'logFile') + ..aOS(4, _omitFieldNames ? '' : 'preSharedKey', protoName: 'preSharedKey') + ..aOS(5, _omitFieldNames ? '' : 'adminURL', protoName: 'adminURL') + ..aOS(6, _omitFieldNames ? '' : 'interfaceName', protoName: 'interfaceName') + ..aInt64(7, _omitFieldNames ? '' : 'wireguardPort', + protoName: 'wireguardPort') + ..aInt64(8, _omitFieldNames ? '' : 'mtu') + ..aOB(9, _omitFieldNames ? '' : 'disableAutoConnect', + protoName: 'disableAutoConnect') + ..aOB(10, _omitFieldNames ? '' : 'serverSSHAllowed', + protoName: 'serverSSHAllowed') + ..aOB(11, _omitFieldNames ? '' : 'rosenpassEnabled', + protoName: 'rosenpassEnabled') + ..aOB(12, _omitFieldNames ? '' : 'rosenpassPermissive', + protoName: 'rosenpassPermissive') + ..aOB(13, _omitFieldNames ? '' : 'disableNotifications') + ..aOB(14, _omitFieldNames ? '' : 'lazyConnectionEnabled', + protoName: 'lazyConnectionEnabled') + ..aOB(15, _omitFieldNames ? '' : 'blockInbound', protoName: 'blockInbound') + ..aOB(16, _omitFieldNames ? '' : 'networkMonitor', + protoName: 'networkMonitor') + ..aOB(17, _omitFieldNames ? '' : 'disableDns') + ..aOB(18, _omitFieldNames ? '' : 'disableClientRoutes') + ..aOB(19, _omitFieldNames ? '' : 'disableServerRoutes') + ..aOB(20, _omitFieldNames ? '' : 'blockLanAccess') + ..aOB(21, _omitFieldNames ? '' : 'enableSSHRoot', + protoName: 'enableSSHRoot') + ..aOB(22, _omitFieldNames ? '' : 'enableSSHLocalPortForwarding', + protoName: 'enableSSHLocalPortForwarding') + ..aOB(23, _omitFieldNames ? '' : 'enableSSHRemotePortForwarding', + protoName: 'enableSSHRemotePortForwarding') + ..aOB(24, _omitFieldNames ? '' : 'enableSSHSFTP', + protoName: 'enableSSHSFTP') + ..aOB(25, _omitFieldNames ? '' : 'disableSSHAuth', + protoName: 'disableSSHAuth') + ..aI(26, _omitFieldNames ? '' : 'sshJWTCacheTTL', + protoName: 'sshJWTCacheTTL') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetConfigResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetConfigResponse copyWith(void Function(GetConfigResponse) updates) => + super.copyWith((message) => updates(message as GetConfigResponse)) + as GetConfigResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetConfigResponse create() => GetConfigResponse._(); + @$core.override + GetConfigResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetConfigResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetConfigResponse? _defaultInstance; + + /// managementUrl settings value. + @$pb.TagNumber(1) + $core.String get managementUrl => $_getSZ(0); + @$pb.TagNumber(1) + set managementUrl($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasManagementUrl() => $_has(0); + @$pb.TagNumber(1) + void clearManagementUrl() => $_clearField(1); + + /// configFile settings value. + @$pb.TagNumber(2) + $core.String get configFile => $_getSZ(1); + @$pb.TagNumber(2) + set configFile($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasConfigFile() => $_has(1); + @$pb.TagNumber(2) + void clearConfigFile() => $_clearField(2); + + /// logFile settings value. + @$pb.TagNumber(3) + $core.String get logFile => $_getSZ(2); + @$pb.TagNumber(3) + set logFile($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasLogFile() => $_has(2); + @$pb.TagNumber(3) + void clearLogFile() => $_clearField(3); + + /// preSharedKey settings value. + @$pb.TagNumber(4) + $core.String get preSharedKey => $_getSZ(3); + @$pb.TagNumber(4) + set preSharedKey($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasPreSharedKey() => $_has(3); + @$pb.TagNumber(4) + void clearPreSharedKey() => $_clearField(4); + + /// adminURL settings value. + @$pb.TagNumber(5) + $core.String get adminURL => $_getSZ(4); + @$pb.TagNumber(5) + set adminURL($core.String value) => $_setString(4, value); + @$pb.TagNumber(5) + $core.bool hasAdminURL() => $_has(4); + @$pb.TagNumber(5) + void clearAdminURL() => $_clearField(5); + + @$pb.TagNumber(6) + $core.String get interfaceName => $_getSZ(5); + @$pb.TagNumber(6) + set interfaceName($core.String value) => $_setString(5, value); + @$pb.TagNumber(6) + $core.bool hasInterfaceName() => $_has(5); + @$pb.TagNumber(6) + void clearInterfaceName() => $_clearField(6); + + @$pb.TagNumber(7) + $fixnum.Int64 get wireguardPort => $_getI64(6); + @$pb.TagNumber(7) + set wireguardPort($fixnum.Int64 value) => $_setInt64(6, value); + @$pb.TagNumber(7) + $core.bool hasWireguardPort() => $_has(6); + @$pb.TagNumber(7) + void clearWireguardPort() => $_clearField(7); + + @$pb.TagNumber(8) + $fixnum.Int64 get mtu => $_getI64(7); + @$pb.TagNumber(8) + set mtu($fixnum.Int64 value) => $_setInt64(7, value); + @$pb.TagNumber(8) + $core.bool hasMtu() => $_has(7); + @$pb.TagNumber(8) + void clearMtu() => $_clearField(8); + + @$pb.TagNumber(9) + $core.bool get disableAutoConnect => $_getBF(8); + @$pb.TagNumber(9) + set disableAutoConnect($core.bool value) => $_setBool(8, value); + @$pb.TagNumber(9) + $core.bool hasDisableAutoConnect() => $_has(8); + @$pb.TagNumber(9) + void clearDisableAutoConnect() => $_clearField(9); + + @$pb.TagNumber(10) + $core.bool get serverSSHAllowed => $_getBF(9); + @$pb.TagNumber(10) + set serverSSHAllowed($core.bool value) => $_setBool(9, value); + @$pb.TagNumber(10) + $core.bool hasServerSSHAllowed() => $_has(9); + @$pb.TagNumber(10) + void clearServerSSHAllowed() => $_clearField(10); + + @$pb.TagNumber(11) + $core.bool get rosenpassEnabled => $_getBF(10); + @$pb.TagNumber(11) + set rosenpassEnabled($core.bool value) => $_setBool(10, value); + @$pb.TagNumber(11) + $core.bool hasRosenpassEnabled() => $_has(10); + @$pb.TagNumber(11) + void clearRosenpassEnabled() => $_clearField(11); + + @$pb.TagNumber(12) + $core.bool get rosenpassPermissive => $_getBF(11); + @$pb.TagNumber(12) + set rosenpassPermissive($core.bool value) => $_setBool(11, value); + @$pb.TagNumber(12) + $core.bool hasRosenpassPermissive() => $_has(11); + @$pb.TagNumber(12) + void clearRosenpassPermissive() => $_clearField(12); + + @$pb.TagNumber(13) + $core.bool get disableNotifications => $_getBF(12); + @$pb.TagNumber(13) + set disableNotifications($core.bool value) => $_setBool(12, value); + @$pb.TagNumber(13) + $core.bool hasDisableNotifications() => $_has(12); + @$pb.TagNumber(13) + void clearDisableNotifications() => $_clearField(13); + + @$pb.TagNumber(14) + $core.bool get lazyConnectionEnabled => $_getBF(13); + @$pb.TagNumber(14) + set lazyConnectionEnabled($core.bool value) => $_setBool(13, value); + @$pb.TagNumber(14) + $core.bool hasLazyConnectionEnabled() => $_has(13); + @$pb.TagNumber(14) + void clearLazyConnectionEnabled() => $_clearField(14); + + @$pb.TagNumber(15) + $core.bool get blockInbound => $_getBF(14); + @$pb.TagNumber(15) + set blockInbound($core.bool value) => $_setBool(14, value); + @$pb.TagNumber(15) + $core.bool hasBlockInbound() => $_has(14); + @$pb.TagNumber(15) + void clearBlockInbound() => $_clearField(15); + + @$pb.TagNumber(16) + $core.bool get networkMonitor => $_getBF(15); + @$pb.TagNumber(16) + set networkMonitor($core.bool value) => $_setBool(15, value); + @$pb.TagNumber(16) + $core.bool hasNetworkMonitor() => $_has(15); + @$pb.TagNumber(16) + void clearNetworkMonitor() => $_clearField(16); + + @$pb.TagNumber(17) + $core.bool get disableDns => $_getBF(16); + @$pb.TagNumber(17) + set disableDns($core.bool value) => $_setBool(16, value); + @$pb.TagNumber(17) + $core.bool hasDisableDns() => $_has(16); + @$pb.TagNumber(17) + void clearDisableDns() => $_clearField(17); + + @$pb.TagNumber(18) + $core.bool get disableClientRoutes => $_getBF(17); + @$pb.TagNumber(18) + set disableClientRoutes($core.bool value) => $_setBool(17, value); + @$pb.TagNumber(18) + $core.bool hasDisableClientRoutes() => $_has(17); + @$pb.TagNumber(18) + void clearDisableClientRoutes() => $_clearField(18); + + @$pb.TagNumber(19) + $core.bool get disableServerRoutes => $_getBF(18); + @$pb.TagNumber(19) + set disableServerRoutes($core.bool value) => $_setBool(18, value); + @$pb.TagNumber(19) + $core.bool hasDisableServerRoutes() => $_has(18); + @$pb.TagNumber(19) + void clearDisableServerRoutes() => $_clearField(19); + + @$pb.TagNumber(20) + $core.bool get blockLanAccess => $_getBF(19); + @$pb.TagNumber(20) + set blockLanAccess($core.bool value) => $_setBool(19, value); + @$pb.TagNumber(20) + $core.bool hasBlockLanAccess() => $_has(19); + @$pb.TagNumber(20) + void clearBlockLanAccess() => $_clearField(20); + + @$pb.TagNumber(21) + $core.bool get enableSSHRoot => $_getBF(20); + @$pb.TagNumber(21) + set enableSSHRoot($core.bool value) => $_setBool(20, value); + @$pb.TagNumber(21) + $core.bool hasEnableSSHRoot() => $_has(20); + @$pb.TagNumber(21) + void clearEnableSSHRoot() => $_clearField(21); + + @$pb.TagNumber(22) + $core.bool get enableSSHLocalPortForwarding => $_getBF(21); + @$pb.TagNumber(22) + set enableSSHLocalPortForwarding($core.bool value) => $_setBool(21, value); + @$pb.TagNumber(22) + $core.bool hasEnableSSHLocalPortForwarding() => $_has(21); + @$pb.TagNumber(22) + void clearEnableSSHLocalPortForwarding() => $_clearField(22); + + @$pb.TagNumber(23) + $core.bool get enableSSHRemotePortForwarding => $_getBF(22); + @$pb.TagNumber(23) + set enableSSHRemotePortForwarding($core.bool value) => $_setBool(22, value); + @$pb.TagNumber(23) + $core.bool hasEnableSSHRemotePortForwarding() => $_has(22); + @$pb.TagNumber(23) + void clearEnableSSHRemotePortForwarding() => $_clearField(23); + + @$pb.TagNumber(24) + $core.bool get enableSSHSFTP => $_getBF(23); + @$pb.TagNumber(24) + set enableSSHSFTP($core.bool value) => $_setBool(23, value); + @$pb.TagNumber(24) + $core.bool hasEnableSSHSFTP() => $_has(23); + @$pb.TagNumber(24) + void clearEnableSSHSFTP() => $_clearField(24); + + @$pb.TagNumber(25) + $core.bool get disableSSHAuth => $_getBF(24); + @$pb.TagNumber(25) + set disableSSHAuth($core.bool value) => $_setBool(24, value); + @$pb.TagNumber(25) + $core.bool hasDisableSSHAuth() => $_has(24); + @$pb.TagNumber(25) + void clearDisableSSHAuth() => $_clearField(25); + + @$pb.TagNumber(26) + $core.int get sshJWTCacheTTL => $_getIZ(25); + @$pb.TagNumber(26) + set sshJWTCacheTTL($core.int value) => $_setSignedInt32(25, value); + @$pb.TagNumber(26) + $core.bool hasSshJWTCacheTTL() => $_has(25); + @$pb.TagNumber(26) + void clearSshJWTCacheTTL() => $_clearField(26); +} + +/// PeerState contains the latest state of a peer +class PeerState extends $pb.GeneratedMessage { + factory PeerState({ + $core.String? iP, + $core.String? pubKey, + $core.String? connStatus, + $2.Timestamp? connStatusUpdate, + $core.bool? relayed, + $core.String? localIceCandidateType, + $core.String? remoteIceCandidateType, + $core.String? fqdn, + $core.String? localIceCandidateEndpoint, + $core.String? remoteIceCandidateEndpoint, + $2.Timestamp? lastWireguardHandshake, + $fixnum.Int64? bytesRx, + $fixnum.Int64? bytesTx, + $core.bool? rosenpassEnabled, + $core.Iterable<$core.String>? networks, + $1.Duration? latency, + $core.String? relayAddress, + $core.List<$core.int>? sshHostKey, + }) { + final result = create(); + if (iP != null) result.iP = iP; + if (pubKey != null) result.pubKey = pubKey; + if (connStatus != null) result.connStatus = connStatus; + if (connStatusUpdate != null) result.connStatusUpdate = connStatusUpdate; + if (relayed != null) result.relayed = relayed; + if (localIceCandidateType != null) + result.localIceCandidateType = localIceCandidateType; + if (remoteIceCandidateType != null) + result.remoteIceCandidateType = remoteIceCandidateType; + if (fqdn != null) result.fqdn = fqdn; + if (localIceCandidateEndpoint != null) + result.localIceCandidateEndpoint = localIceCandidateEndpoint; + if (remoteIceCandidateEndpoint != null) + result.remoteIceCandidateEndpoint = remoteIceCandidateEndpoint; + if (lastWireguardHandshake != null) + result.lastWireguardHandshake = lastWireguardHandshake; + if (bytesRx != null) result.bytesRx = bytesRx; + if (bytesTx != null) result.bytesTx = bytesTx; + if (rosenpassEnabled != null) result.rosenpassEnabled = rosenpassEnabled; + if (networks != null) result.networks.addAll(networks); + if (latency != null) result.latency = latency; + if (relayAddress != null) result.relayAddress = relayAddress; + if (sshHostKey != null) result.sshHostKey = sshHostKey; + return result; + } + + PeerState._(); + + factory PeerState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory PeerState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'PeerState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'IP', protoName: 'IP') + ..aOS(2, _omitFieldNames ? '' : 'pubKey', protoName: 'pubKey') + ..aOS(3, _omitFieldNames ? '' : 'connStatus', protoName: 'connStatus') + ..aOM<$2.Timestamp>(4, _omitFieldNames ? '' : 'connStatusUpdate', + protoName: 'connStatusUpdate', subBuilder: $2.Timestamp.create) + ..aOB(5, _omitFieldNames ? '' : 'relayed') + ..aOS(7, _omitFieldNames ? '' : 'localIceCandidateType', + protoName: 'localIceCandidateType') + ..aOS(8, _omitFieldNames ? '' : 'remoteIceCandidateType', + protoName: 'remoteIceCandidateType') + ..aOS(9, _omitFieldNames ? '' : 'fqdn') + ..aOS(10, _omitFieldNames ? '' : 'localIceCandidateEndpoint', + protoName: 'localIceCandidateEndpoint') + ..aOS(11, _omitFieldNames ? '' : 'remoteIceCandidateEndpoint', + protoName: 'remoteIceCandidateEndpoint') + ..aOM<$2.Timestamp>(12, _omitFieldNames ? '' : 'lastWireguardHandshake', + protoName: 'lastWireguardHandshake', subBuilder: $2.Timestamp.create) + ..aInt64(13, _omitFieldNames ? '' : 'bytesRx', protoName: 'bytesRx') + ..aInt64(14, _omitFieldNames ? '' : 'bytesTx', protoName: 'bytesTx') + ..aOB(15, _omitFieldNames ? '' : 'rosenpassEnabled', + protoName: 'rosenpassEnabled') + ..pPS(16, _omitFieldNames ? '' : 'networks') + ..aOM<$1.Duration>(17, _omitFieldNames ? '' : 'latency', + subBuilder: $1.Duration.create) + ..aOS(18, _omitFieldNames ? '' : 'relayAddress', protoName: 'relayAddress') + ..a<$core.List<$core.int>>( + 19, _omitFieldNames ? '' : 'sshHostKey', $pb.PbFieldType.OY, + protoName: 'sshHostKey') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PeerState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PeerState copyWith(void Function(PeerState) updates) => + super.copyWith((message) => updates(message as PeerState)) as PeerState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PeerState create() => PeerState._(); + @$core.override + PeerState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static PeerState getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PeerState? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get iP => $_getSZ(0); + @$pb.TagNumber(1) + set iP($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasIP() => $_has(0); + @$pb.TagNumber(1) + void clearIP() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get pubKey => $_getSZ(1); + @$pb.TagNumber(2) + set pubKey($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasPubKey() => $_has(1); + @$pb.TagNumber(2) + void clearPubKey() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get connStatus => $_getSZ(2); + @$pb.TagNumber(3) + set connStatus($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasConnStatus() => $_has(2); + @$pb.TagNumber(3) + void clearConnStatus() => $_clearField(3); + + @$pb.TagNumber(4) + $2.Timestamp get connStatusUpdate => $_getN(3); + @$pb.TagNumber(4) + set connStatusUpdate($2.Timestamp value) => $_setField(4, value); + @$pb.TagNumber(4) + $core.bool hasConnStatusUpdate() => $_has(3); + @$pb.TagNumber(4) + void clearConnStatusUpdate() => $_clearField(4); + @$pb.TagNumber(4) + $2.Timestamp ensureConnStatusUpdate() => $_ensure(3); + + @$pb.TagNumber(5) + $core.bool get relayed => $_getBF(4); + @$pb.TagNumber(5) + set relayed($core.bool value) => $_setBool(4, value); + @$pb.TagNumber(5) + $core.bool hasRelayed() => $_has(4); + @$pb.TagNumber(5) + void clearRelayed() => $_clearField(5); + + @$pb.TagNumber(7) + $core.String get localIceCandidateType => $_getSZ(5); + @$pb.TagNumber(7) + set localIceCandidateType($core.String value) => $_setString(5, value); + @$pb.TagNumber(7) + $core.bool hasLocalIceCandidateType() => $_has(5); + @$pb.TagNumber(7) + void clearLocalIceCandidateType() => $_clearField(7); + + @$pb.TagNumber(8) + $core.String get remoteIceCandidateType => $_getSZ(6); + @$pb.TagNumber(8) + set remoteIceCandidateType($core.String value) => $_setString(6, value); + @$pb.TagNumber(8) + $core.bool hasRemoteIceCandidateType() => $_has(6); + @$pb.TagNumber(8) + void clearRemoteIceCandidateType() => $_clearField(8); + + @$pb.TagNumber(9) + $core.String get fqdn => $_getSZ(7); + @$pb.TagNumber(9) + set fqdn($core.String value) => $_setString(7, value); + @$pb.TagNumber(9) + $core.bool hasFqdn() => $_has(7); + @$pb.TagNumber(9) + void clearFqdn() => $_clearField(9); + + @$pb.TagNumber(10) + $core.String get localIceCandidateEndpoint => $_getSZ(8); + @$pb.TagNumber(10) + set localIceCandidateEndpoint($core.String value) => $_setString(8, value); + @$pb.TagNumber(10) + $core.bool hasLocalIceCandidateEndpoint() => $_has(8); + @$pb.TagNumber(10) + void clearLocalIceCandidateEndpoint() => $_clearField(10); + + @$pb.TagNumber(11) + $core.String get remoteIceCandidateEndpoint => $_getSZ(9); + @$pb.TagNumber(11) + set remoteIceCandidateEndpoint($core.String value) => $_setString(9, value); + @$pb.TagNumber(11) + $core.bool hasRemoteIceCandidateEndpoint() => $_has(9); + @$pb.TagNumber(11) + void clearRemoteIceCandidateEndpoint() => $_clearField(11); + + @$pb.TagNumber(12) + $2.Timestamp get lastWireguardHandshake => $_getN(10); + @$pb.TagNumber(12) + set lastWireguardHandshake($2.Timestamp value) => $_setField(12, value); + @$pb.TagNumber(12) + $core.bool hasLastWireguardHandshake() => $_has(10); + @$pb.TagNumber(12) + void clearLastWireguardHandshake() => $_clearField(12); + @$pb.TagNumber(12) + $2.Timestamp ensureLastWireguardHandshake() => $_ensure(10); + + @$pb.TagNumber(13) + $fixnum.Int64 get bytesRx => $_getI64(11); + @$pb.TagNumber(13) + set bytesRx($fixnum.Int64 value) => $_setInt64(11, value); + @$pb.TagNumber(13) + $core.bool hasBytesRx() => $_has(11); + @$pb.TagNumber(13) + void clearBytesRx() => $_clearField(13); + + @$pb.TagNumber(14) + $fixnum.Int64 get bytesTx => $_getI64(12); + @$pb.TagNumber(14) + set bytesTx($fixnum.Int64 value) => $_setInt64(12, value); + @$pb.TagNumber(14) + $core.bool hasBytesTx() => $_has(12); + @$pb.TagNumber(14) + void clearBytesTx() => $_clearField(14); + + @$pb.TagNumber(15) + $core.bool get rosenpassEnabled => $_getBF(13); + @$pb.TagNumber(15) + set rosenpassEnabled($core.bool value) => $_setBool(13, value); + @$pb.TagNumber(15) + $core.bool hasRosenpassEnabled() => $_has(13); + @$pb.TagNumber(15) + void clearRosenpassEnabled() => $_clearField(15); + + @$pb.TagNumber(16) + $pb.PbList<$core.String> get networks => $_getList(14); + + @$pb.TagNumber(17) + $1.Duration get latency => $_getN(15); + @$pb.TagNumber(17) + set latency($1.Duration value) => $_setField(17, value); + @$pb.TagNumber(17) + $core.bool hasLatency() => $_has(15); + @$pb.TagNumber(17) + void clearLatency() => $_clearField(17); + @$pb.TagNumber(17) + $1.Duration ensureLatency() => $_ensure(15); + + @$pb.TagNumber(18) + $core.String get relayAddress => $_getSZ(16); + @$pb.TagNumber(18) + set relayAddress($core.String value) => $_setString(16, value); + @$pb.TagNumber(18) + $core.bool hasRelayAddress() => $_has(16); + @$pb.TagNumber(18) + void clearRelayAddress() => $_clearField(18); + + @$pb.TagNumber(19) + $core.List<$core.int> get sshHostKey => $_getN(17); + @$pb.TagNumber(19) + set sshHostKey($core.List<$core.int> value) => $_setBytes(17, value); + @$pb.TagNumber(19) + $core.bool hasSshHostKey() => $_has(17); + @$pb.TagNumber(19) + void clearSshHostKey() => $_clearField(19); +} + +/// LocalPeerState contains the latest state of the local peer +class LocalPeerState extends $pb.GeneratedMessage { + factory LocalPeerState({ + $core.String? iP, + $core.String? pubKey, + $core.bool? kernelInterface, + $core.String? fqdn, + $core.bool? rosenpassEnabled, + $core.bool? rosenpassPermissive, + $core.Iterable<$core.String>? networks, + }) { + final result = create(); + if (iP != null) result.iP = iP; + if (pubKey != null) result.pubKey = pubKey; + if (kernelInterface != null) result.kernelInterface = kernelInterface; + if (fqdn != null) result.fqdn = fqdn; + if (rosenpassEnabled != null) result.rosenpassEnabled = rosenpassEnabled; + if (rosenpassPermissive != null) + result.rosenpassPermissive = rosenpassPermissive; + if (networks != null) result.networks.addAll(networks); + return result; + } + + LocalPeerState._(); + + factory LocalPeerState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LocalPeerState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LocalPeerState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'IP', protoName: 'IP') + ..aOS(2, _omitFieldNames ? '' : 'pubKey', protoName: 'pubKey') + ..aOB(3, _omitFieldNames ? '' : 'kernelInterface', + protoName: 'kernelInterface') + ..aOS(4, _omitFieldNames ? '' : 'fqdn') + ..aOB(5, _omitFieldNames ? '' : 'rosenpassEnabled', + protoName: 'rosenpassEnabled') + ..aOB(6, _omitFieldNames ? '' : 'rosenpassPermissive', + protoName: 'rosenpassPermissive') + ..pPS(7, _omitFieldNames ? '' : 'networks') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LocalPeerState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LocalPeerState copyWith(void Function(LocalPeerState) updates) => + super.copyWith((message) => updates(message as LocalPeerState)) + as LocalPeerState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LocalPeerState create() => LocalPeerState._(); + @$core.override + LocalPeerState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static LocalPeerState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static LocalPeerState? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get iP => $_getSZ(0); + @$pb.TagNumber(1) + set iP($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasIP() => $_has(0); + @$pb.TagNumber(1) + void clearIP() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get pubKey => $_getSZ(1); + @$pb.TagNumber(2) + set pubKey($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasPubKey() => $_has(1); + @$pb.TagNumber(2) + void clearPubKey() => $_clearField(2); + + @$pb.TagNumber(3) + $core.bool get kernelInterface => $_getBF(2); + @$pb.TagNumber(3) + set kernelInterface($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasKernelInterface() => $_has(2); + @$pb.TagNumber(3) + void clearKernelInterface() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get fqdn => $_getSZ(3); + @$pb.TagNumber(4) + set fqdn($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasFqdn() => $_has(3); + @$pb.TagNumber(4) + void clearFqdn() => $_clearField(4); + + @$pb.TagNumber(5) + $core.bool get rosenpassEnabled => $_getBF(4); + @$pb.TagNumber(5) + set rosenpassEnabled($core.bool value) => $_setBool(4, value); + @$pb.TagNumber(5) + $core.bool hasRosenpassEnabled() => $_has(4); + @$pb.TagNumber(5) + void clearRosenpassEnabled() => $_clearField(5); + + @$pb.TagNumber(6) + $core.bool get rosenpassPermissive => $_getBF(5); + @$pb.TagNumber(6) + set rosenpassPermissive($core.bool value) => $_setBool(5, value); + @$pb.TagNumber(6) + $core.bool hasRosenpassPermissive() => $_has(5); + @$pb.TagNumber(6) + void clearRosenpassPermissive() => $_clearField(6); + + @$pb.TagNumber(7) + $pb.PbList<$core.String> get networks => $_getList(6); +} + +/// SignalState contains the latest state of a signal connection +class SignalState extends $pb.GeneratedMessage { + factory SignalState({ + $core.String? uRL, + $core.bool? connected, + $core.String? error, + }) { + final result = create(); + if (uRL != null) result.uRL = uRL; + if (connected != null) result.connected = connected; + if (error != null) result.error = error; + return result; + } + + SignalState._(); + + factory SignalState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SignalState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SignalState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'URL', protoName: 'URL') + ..aOB(2, _omitFieldNames ? '' : 'connected') + ..aOS(3, _omitFieldNames ? '' : 'error') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SignalState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SignalState copyWith(void Function(SignalState) updates) => + super.copyWith((message) => updates(message as SignalState)) + as SignalState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SignalState create() => SignalState._(); + @$core.override + SignalState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SignalState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SignalState? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get uRL => $_getSZ(0); + @$pb.TagNumber(1) + set uRL($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasURL() => $_has(0); + @$pb.TagNumber(1) + void clearURL() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get connected => $_getBF(1); + @$pb.TagNumber(2) + set connected($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasConnected() => $_has(1); + @$pb.TagNumber(2) + void clearConnected() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get error => $_getSZ(2); + @$pb.TagNumber(3) + set error($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasError() => $_has(2); + @$pb.TagNumber(3) + void clearError() => $_clearField(3); +} + +/// ManagementState contains the latest state of a management connection +class ManagementState extends $pb.GeneratedMessage { + factory ManagementState({ + $core.String? uRL, + $core.bool? connected, + $core.String? error, + }) { + final result = create(); + if (uRL != null) result.uRL = uRL; + if (connected != null) result.connected = connected; + if (error != null) result.error = error; + return result; + } + + ManagementState._(); + + factory ManagementState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ManagementState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ManagementState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'URL', protoName: 'URL') + ..aOB(2, _omitFieldNames ? '' : 'connected') + ..aOS(3, _omitFieldNames ? '' : 'error') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ManagementState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ManagementState copyWith(void Function(ManagementState) updates) => + super.copyWith((message) => updates(message as ManagementState)) + as ManagementState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ManagementState create() => ManagementState._(); + @$core.override + ManagementState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ManagementState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ManagementState? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get uRL => $_getSZ(0); + @$pb.TagNumber(1) + set uRL($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasURL() => $_has(0); + @$pb.TagNumber(1) + void clearURL() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get connected => $_getBF(1); + @$pb.TagNumber(2) + set connected($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasConnected() => $_has(1); + @$pb.TagNumber(2) + void clearConnected() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get error => $_getSZ(2); + @$pb.TagNumber(3) + set error($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasError() => $_has(2); + @$pb.TagNumber(3) + void clearError() => $_clearField(3); +} + +/// RelayState contains the latest state of the relay +class RelayState extends $pb.GeneratedMessage { + factory RelayState({ + $core.String? uRI, + $core.bool? available, + $core.String? error, + }) { + final result = create(); + if (uRI != null) result.uRI = uRI; + if (available != null) result.available = available; + if (error != null) result.error = error; + return result; + } + + RelayState._(); + + factory RelayState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RelayState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RelayState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'URI', protoName: 'URI') + ..aOB(2, _omitFieldNames ? '' : 'available') + ..aOS(3, _omitFieldNames ? '' : 'error') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RelayState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RelayState copyWith(void Function(RelayState) updates) => + super.copyWith((message) => updates(message as RelayState)) as RelayState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RelayState create() => RelayState._(); + @$core.override + RelayState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RelayState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RelayState? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get uRI => $_getSZ(0); + @$pb.TagNumber(1) + set uRI($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasURI() => $_has(0); + @$pb.TagNumber(1) + void clearURI() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get available => $_getBF(1); + @$pb.TagNumber(2) + set available($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasAvailable() => $_has(1); + @$pb.TagNumber(2) + void clearAvailable() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get error => $_getSZ(2); + @$pb.TagNumber(3) + set error($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasError() => $_has(2); + @$pb.TagNumber(3) + void clearError() => $_clearField(3); +} + +class NSGroupState extends $pb.GeneratedMessage { + factory NSGroupState({ + $core.Iterable<$core.String>? servers, + $core.Iterable<$core.String>? domains, + $core.bool? enabled, + $core.String? error, + }) { + final result = create(); + if (servers != null) result.servers.addAll(servers); + if (domains != null) result.domains.addAll(domains); + if (enabled != null) result.enabled = enabled; + if (error != null) result.error = error; + return result; + } + + NSGroupState._(); + + factory NSGroupState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory NSGroupState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'NSGroupState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'servers') + ..pPS(2, _omitFieldNames ? '' : 'domains') + ..aOB(3, _omitFieldNames ? '' : 'enabled') + ..aOS(4, _omitFieldNames ? '' : 'error') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + NSGroupState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + NSGroupState copyWith(void Function(NSGroupState) updates) => + super.copyWith((message) => updates(message as NSGroupState)) + as NSGroupState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NSGroupState create() => NSGroupState._(); + @$core.override + NSGroupState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static NSGroupState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static NSGroupState? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList<$core.String> get servers => $_getList(0); + + @$pb.TagNumber(2) + $pb.PbList<$core.String> get domains => $_getList(1); + + @$pb.TagNumber(3) + $core.bool get enabled => $_getBF(2); + @$pb.TagNumber(3) + set enabled($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasEnabled() => $_has(2); + @$pb.TagNumber(3) + void clearEnabled() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get error => $_getSZ(3); + @$pb.TagNumber(4) + set error($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasError() => $_has(3); + @$pb.TagNumber(4) + void clearError() => $_clearField(4); +} + +/// SSHSessionInfo contains information about an active SSH session +class SSHSessionInfo extends $pb.GeneratedMessage { + factory SSHSessionInfo({ + $core.String? username, + $core.String? remoteAddress, + $core.String? command, + $core.String? jwtUsername, + $core.Iterable<$core.String>? portForwards, + }) { + final result = create(); + if (username != null) result.username = username; + if (remoteAddress != null) result.remoteAddress = remoteAddress; + if (command != null) result.command = command; + if (jwtUsername != null) result.jwtUsername = jwtUsername; + if (portForwards != null) result.portForwards.addAll(portForwards); + return result; + } + + SSHSessionInfo._(); + + factory SSHSessionInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SSHSessionInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SSHSessionInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..aOS(2, _omitFieldNames ? '' : 'remoteAddress', protoName: 'remoteAddress') + ..aOS(3, _omitFieldNames ? '' : 'command') + ..aOS(4, _omitFieldNames ? '' : 'jwtUsername', protoName: 'jwtUsername') + ..pPS(5, _omitFieldNames ? '' : 'portForwards', protoName: 'portForwards') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SSHSessionInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SSHSessionInfo copyWith(void Function(SSHSessionInfo) updates) => + super.copyWith((message) => updates(message as SSHSessionInfo)) + as SSHSessionInfo; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SSHSessionInfo create() => SSHSessionInfo._(); + @$core.override + SSHSessionInfo createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SSHSessionInfo getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SSHSessionInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get remoteAddress => $_getSZ(1); + @$pb.TagNumber(2) + set remoteAddress($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasRemoteAddress() => $_has(1); + @$pb.TagNumber(2) + void clearRemoteAddress() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get command => $_getSZ(2); + @$pb.TagNumber(3) + set command($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasCommand() => $_has(2); + @$pb.TagNumber(3) + void clearCommand() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get jwtUsername => $_getSZ(3); + @$pb.TagNumber(4) + set jwtUsername($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasJwtUsername() => $_has(3); + @$pb.TagNumber(4) + void clearJwtUsername() => $_clearField(4); + + @$pb.TagNumber(5) + $pb.PbList<$core.String> get portForwards => $_getList(4); +} + +/// SSHServerState contains the latest state of the SSH server +class SSHServerState extends $pb.GeneratedMessage { + factory SSHServerState({ + $core.bool? enabled, + $core.Iterable? sessions, + }) { + final result = create(); + if (enabled != null) result.enabled = enabled; + if (sessions != null) result.sessions.addAll(sessions); + return result; + } + + SSHServerState._(); + + factory SSHServerState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SSHServerState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SSHServerState', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'enabled') + ..pPM(2, _omitFieldNames ? '' : 'sessions', + subBuilder: SSHSessionInfo.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SSHServerState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SSHServerState copyWith(void Function(SSHServerState) updates) => + super.copyWith((message) => updates(message as SSHServerState)) + as SSHServerState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SSHServerState create() => SSHServerState._(); + @$core.override + SSHServerState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SSHServerState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SSHServerState? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get enabled => $_getBF(0); + @$pb.TagNumber(1) + set enabled($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasEnabled() => $_has(0); + @$pb.TagNumber(1) + void clearEnabled() => $_clearField(1); + + @$pb.TagNumber(2) + $pb.PbList get sessions => $_getList(1); +} + +/// FullStatus contains the full state held by the Status instance +class FullStatus extends $pb.GeneratedMessage { + factory FullStatus({ + ManagementState? managementState, + SignalState? signalState, + LocalPeerState? localPeerState, + $core.Iterable? peers, + $core.Iterable? relays, + $core.Iterable? dnsServers, + $core.Iterable? events, + $core.int? numberOfForwardingRules, + $core.bool? lazyConnectionEnabled, + SSHServerState? sshServerState, + }) { + final result = create(); + if (managementState != null) result.managementState = managementState; + if (signalState != null) result.signalState = signalState; + if (localPeerState != null) result.localPeerState = localPeerState; + if (peers != null) result.peers.addAll(peers); + if (relays != null) result.relays.addAll(relays); + if (dnsServers != null) result.dnsServers.addAll(dnsServers); + if (events != null) result.events.addAll(events); + if (numberOfForwardingRules != null) + result.numberOfForwardingRules = numberOfForwardingRules; + if (lazyConnectionEnabled != null) + result.lazyConnectionEnabled = lazyConnectionEnabled; + if (sshServerState != null) result.sshServerState = sshServerState; + return result; + } + + FullStatus._(); + + factory FullStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory FullStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FullStatus', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'managementState', + protoName: 'managementState', subBuilder: ManagementState.create) + ..aOM(2, _omitFieldNames ? '' : 'signalState', + protoName: 'signalState', subBuilder: SignalState.create) + ..aOM(3, _omitFieldNames ? '' : 'localPeerState', + protoName: 'localPeerState', subBuilder: LocalPeerState.create) + ..pPM(4, _omitFieldNames ? '' : 'peers', + subBuilder: PeerState.create) + ..pPM(5, _omitFieldNames ? '' : 'relays', + subBuilder: RelayState.create) + ..pPM(6, _omitFieldNames ? '' : 'dnsServers', + subBuilder: NSGroupState.create) + ..pPM(7, _omitFieldNames ? '' : 'events', + subBuilder: SystemEvent.create) + ..aI(8, _omitFieldNames ? '' : 'NumberOfForwardingRules', + protoName: 'NumberOfForwardingRules') + ..aOB(9, _omitFieldNames ? '' : 'lazyConnectionEnabled', + protoName: 'lazyConnectionEnabled') + ..aOM(10, _omitFieldNames ? '' : 'sshServerState', + protoName: 'sshServerState', subBuilder: SSHServerState.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FullStatus clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FullStatus copyWith(void Function(FullStatus) updates) => + super.copyWith((message) => updates(message as FullStatus)) as FullStatus; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FullStatus create() => FullStatus._(); + @$core.override + FullStatus createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static FullStatus getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static FullStatus? _defaultInstance; + + @$pb.TagNumber(1) + ManagementState get managementState => $_getN(0); + @$pb.TagNumber(1) + set managementState(ManagementState value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasManagementState() => $_has(0); + @$pb.TagNumber(1) + void clearManagementState() => $_clearField(1); + @$pb.TagNumber(1) + ManagementState ensureManagementState() => $_ensure(0); + + @$pb.TagNumber(2) + SignalState get signalState => $_getN(1); + @$pb.TagNumber(2) + set signalState(SignalState value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasSignalState() => $_has(1); + @$pb.TagNumber(2) + void clearSignalState() => $_clearField(2); + @$pb.TagNumber(2) + SignalState ensureSignalState() => $_ensure(1); + + @$pb.TagNumber(3) + LocalPeerState get localPeerState => $_getN(2); + @$pb.TagNumber(3) + set localPeerState(LocalPeerState value) => $_setField(3, value); + @$pb.TagNumber(3) + $core.bool hasLocalPeerState() => $_has(2); + @$pb.TagNumber(3) + void clearLocalPeerState() => $_clearField(3); + @$pb.TagNumber(3) + LocalPeerState ensureLocalPeerState() => $_ensure(2); + + @$pb.TagNumber(4) + $pb.PbList get peers => $_getList(3); + + @$pb.TagNumber(5) + $pb.PbList get relays => $_getList(4); + + @$pb.TagNumber(6) + $pb.PbList get dnsServers => $_getList(5); + + @$pb.TagNumber(7) + $pb.PbList get events => $_getList(6); + + @$pb.TagNumber(8) + $core.int get numberOfForwardingRules => $_getIZ(7); + @$pb.TagNumber(8) + set numberOfForwardingRules($core.int value) => $_setSignedInt32(7, value); + @$pb.TagNumber(8) + $core.bool hasNumberOfForwardingRules() => $_has(7); + @$pb.TagNumber(8) + void clearNumberOfForwardingRules() => $_clearField(8); + + @$pb.TagNumber(9) + $core.bool get lazyConnectionEnabled => $_getBF(8); + @$pb.TagNumber(9) + set lazyConnectionEnabled($core.bool value) => $_setBool(8, value); + @$pb.TagNumber(9) + $core.bool hasLazyConnectionEnabled() => $_has(8); + @$pb.TagNumber(9) + void clearLazyConnectionEnabled() => $_clearField(9); + + @$pb.TagNumber(10) + SSHServerState get sshServerState => $_getN(9); + @$pb.TagNumber(10) + set sshServerState(SSHServerState value) => $_setField(10, value); + @$pb.TagNumber(10) + $core.bool hasSshServerState() => $_has(9); + @$pb.TagNumber(10) + void clearSshServerState() => $_clearField(10); + @$pb.TagNumber(10) + SSHServerState ensureSshServerState() => $_ensure(9); +} + +/// Networks +class ListNetworksRequest extends $pb.GeneratedMessage { + factory ListNetworksRequest() => create(); + + ListNetworksRequest._(); + + factory ListNetworksRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListNetworksRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListNetworksRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListNetworksRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListNetworksRequest copyWith(void Function(ListNetworksRequest) updates) => + super.copyWith((message) => updates(message as ListNetworksRequest)) + as ListNetworksRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListNetworksRequest create() => ListNetworksRequest._(); + @$core.override + ListNetworksRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ListNetworksRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ListNetworksRequest? _defaultInstance; +} + +class ListNetworksResponse extends $pb.GeneratedMessage { + factory ListNetworksResponse({ + $core.Iterable? routes, + }) { + final result = create(); + if (routes != null) result.routes.addAll(routes); + return result; + } + + ListNetworksResponse._(); + + factory ListNetworksResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListNetworksResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListNetworksResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPM(1, _omitFieldNames ? '' : 'routes', + subBuilder: Network.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListNetworksResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListNetworksResponse copyWith(void Function(ListNetworksResponse) updates) => + super.copyWith((message) => updates(message as ListNetworksResponse)) + as ListNetworksResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListNetworksResponse create() => ListNetworksResponse._(); + @$core.override + ListNetworksResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ListNetworksResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ListNetworksResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get routes => $_getList(0); +} + +class SelectNetworksRequest extends $pb.GeneratedMessage { + factory SelectNetworksRequest({ + $core.Iterable<$core.String>? networkIDs, + $core.bool? append, + $core.bool? all, + }) { + final result = create(); + if (networkIDs != null) result.networkIDs.addAll(networkIDs); + if (append != null) result.append = append; + if (all != null) result.all = all; + return result; + } + + SelectNetworksRequest._(); + + factory SelectNetworksRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SelectNetworksRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SelectNetworksRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'networkIDs', protoName: 'networkIDs') + ..aOB(2, _omitFieldNames ? '' : 'append') + ..aOB(3, _omitFieldNames ? '' : 'all') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SelectNetworksRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SelectNetworksRequest copyWith( + void Function(SelectNetworksRequest) updates) => + super.copyWith((message) => updates(message as SelectNetworksRequest)) + as SelectNetworksRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SelectNetworksRequest create() => SelectNetworksRequest._(); + @$core.override + SelectNetworksRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SelectNetworksRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SelectNetworksRequest? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList<$core.String> get networkIDs => $_getList(0); + + @$pb.TagNumber(2) + $core.bool get append => $_getBF(1); + @$pb.TagNumber(2) + set append($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasAppend() => $_has(1); + @$pb.TagNumber(2) + void clearAppend() => $_clearField(2); + + @$pb.TagNumber(3) + $core.bool get all => $_getBF(2); + @$pb.TagNumber(3) + set all($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasAll() => $_has(2); + @$pb.TagNumber(3) + void clearAll() => $_clearField(3); +} + +class SelectNetworksResponse extends $pb.GeneratedMessage { + factory SelectNetworksResponse() => create(); + + SelectNetworksResponse._(); + + factory SelectNetworksResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SelectNetworksResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SelectNetworksResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SelectNetworksResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SelectNetworksResponse copyWith( + void Function(SelectNetworksResponse) updates) => + super.copyWith((message) => updates(message as SelectNetworksResponse)) + as SelectNetworksResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SelectNetworksResponse create() => SelectNetworksResponse._(); + @$core.override + SelectNetworksResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SelectNetworksResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SelectNetworksResponse? _defaultInstance; +} + +class IPList extends $pb.GeneratedMessage { + factory IPList({ + $core.Iterable<$core.String>? ips, + }) { + final result = create(); + if (ips != null) result.ips.addAll(ips); + return result; + } + + IPList._(); + + factory IPList.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory IPList.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'IPList', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'ips') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + IPList clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + IPList copyWith(void Function(IPList) updates) => + super.copyWith((message) => updates(message as IPList)) as IPList; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static IPList create() => IPList._(); + @$core.override + IPList createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static IPList getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static IPList? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList<$core.String> get ips => $_getList(0); +} + +class Network extends $pb.GeneratedMessage { + factory Network({ + $core.String? iD, + $core.String? range, + $core.bool? selected, + $core.Iterable<$core.String>? domains, + $core.Iterable<$core.MapEntry<$core.String, IPList>>? resolvedIPs, + }) { + final result = create(); + if (iD != null) result.iD = iD; + if (range != null) result.range = range; + if (selected != null) result.selected = selected; + if (domains != null) result.domains.addAll(domains); + if (resolvedIPs != null) result.resolvedIPs.addEntries(resolvedIPs); + return result; + } + + Network._(); + + factory Network.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Network.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Network', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'ID', protoName: 'ID') + ..aOS(2, _omitFieldNames ? '' : 'range') + ..aOB(3, _omitFieldNames ? '' : 'selected') + ..pPS(4, _omitFieldNames ? '' : 'domains') + ..m<$core.String, IPList>(5, _omitFieldNames ? '' : 'resolvedIPs', + protoName: 'resolvedIPs', + entryClassName: 'Network.ResolvedIPsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OM, + valueCreator: IPList.create, + valueDefaultOrMaker: IPList.getDefault, + packageName: const $pb.PackageName('daemon')) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Network clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Network copyWith(void Function(Network) updates) => + super.copyWith((message) => updates(message as Network)) as Network; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Network create() => Network._(); + @$core.override + Network createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static Network getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Network? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get iD => $_getSZ(0); + @$pb.TagNumber(1) + set iD($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasID() => $_has(0); + @$pb.TagNumber(1) + void clearID() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get range => $_getSZ(1); + @$pb.TagNumber(2) + set range($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasRange() => $_has(1); + @$pb.TagNumber(2) + void clearRange() => $_clearField(2); + + @$pb.TagNumber(3) + $core.bool get selected => $_getBF(2); + @$pb.TagNumber(3) + set selected($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasSelected() => $_has(2); + @$pb.TagNumber(3) + void clearSelected() => $_clearField(3); + + @$pb.TagNumber(4) + $pb.PbList<$core.String> get domains => $_getList(3); + + @$pb.TagNumber(5) + $pb.PbMap<$core.String, IPList> get resolvedIPs => $_getMap(4); +} + +class PortInfo_Range extends $pb.GeneratedMessage { + factory PortInfo_Range({ + $core.int? start, + $core.int? end, + }) { + final result = create(); + if (start != null) result.start = start; + if (end != null) result.end = end; + return result; + } + + PortInfo_Range._(); + + factory PortInfo_Range.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory PortInfo_Range.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'PortInfo.Range', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aI(1, _omitFieldNames ? '' : 'start', fieldType: $pb.PbFieldType.OU3) + ..aI(2, _omitFieldNames ? '' : 'end', fieldType: $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PortInfo_Range clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PortInfo_Range copyWith(void Function(PortInfo_Range) updates) => + super.copyWith((message) => updates(message as PortInfo_Range)) + as PortInfo_Range; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PortInfo_Range create() => PortInfo_Range._(); + @$core.override + PortInfo_Range createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static PortInfo_Range getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static PortInfo_Range? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get start => $_getIZ(0); + @$pb.TagNumber(1) + set start($core.int value) => $_setUnsignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasStart() => $_has(0); + @$pb.TagNumber(1) + void clearStart() => $_clearField(1); + + @$pb.TagNumber(2) + $core.int get end => $_getIZ(1); + @$pb.TagNumber(2) + set end($core.int value) => $_setUnsignedInt32(1, value); + @$pb.TagNumber(2) + $core.bool hasEnd() => $_has(1); + @$pb.TagNumber(2) + void clearEnd() => $_clearField(2); +} + +enum PortInfo_PortSelection { port, range, notSet } + +/// ForwardingRules +class PortInfo extends $pb.GeneratedMessage { + factory PortInfo({ + $core.int? port, + PortInfo_Range? range, + }) { + final result = create(); + if (port != null) result.port = port; + if (range != null) result.range = range; + return result; + } + + PortInfo._(); + + factory PortInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory PortInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, PortInfo_PortSelection> + _PortInfo_PortSelectionByTag = { + 1: PortInfo_PortSelection.port, + 2: PortInfo_PortSelection.range, + 0: PortInfo_PortSelection.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'PortInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aI(1, _omitFieldNames ? '' : 'port', fieldType: $pb.PbFieldType.OU3) + ..aOM(2, _omitFieldNames ? '' : 'range', + subBuilder: PortInfo_Range.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PortInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PortInfo copyWith(void Function(PortInfo) updates) => + super.copyWith((message) => updates(message as PortInfo)) as PortInfo; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PortInfo create() => PortInfo._(); + @$core.override + PortInfo createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static PortInfo getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PortInfo? _defaultInstance; + + @$pb.TagNumber(1) + @$pb.TagNumber(2) + PortInfo_PortSelection whichPortSelection() => + _PortInfo_PortSelectionByTag[$_whichOneof(0)]!; + @$pb.TagNumber(1) + @$pb.TagNumber(2) + void clearPortSelection() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.int get port => $_getIZ(0); + @$pb.TagNumber(1) + set port($core.int value) => $_setUnsignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasPort() => $_has(0); + @$pb.TagNumber(1) + void clearPort() => $_clearField(1); + + @$pb.TagNumber(2) + PortInfo_Range get range => $_getN(1); + @$pb.TagNumber(2) + set range(PortInfo_Range value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasRange() => $_has(1); + @$pb.TagNumber(2) + void clearRange() => $_clearField(2); + @$pb.TagNumber(2) + PortInfo_Range ensureRange() => $_ensure(1); +} + +class ForwardingRule extends $pb.GeneratedMessage { + factory ForwardingRule({ + $core.String? protocol, + PortInfo? destinationPort, + $core.String? translatedAddress, + $core.String? translatedHostname, + PortInfo? translatedPort, + }) { + final result = create(); + if (protocol != null) result.protocol = protocol; + if (destinationPort != null) result.destinationPort = destinationPort; + if (translatedAddress != null) result.translatedAddress = translatedAddress; + if (translatedHostname != null) + result.translatedHostname = translatedHostname; + if (translatedPort != null) result.translatedPort = translatedPort; + return result; + } + + ForwardingRule._(); + + factory ForwardingRule.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ForwardingRule.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ForwardingRule', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'protocol') + ..aOM(2, _omitFieldNames ? '' : 'destinationPort', + protoName: 'destinationPort', subBuilder: PortInfo.create) + ..aOS(3, _omitFieldNames ? '' : 'translatedAddress', + protoName: 'translatedAddress') + ..aOS(4, _omitFieldNames ? '' : 'translatedHostname', + protoName: 'translatedHostname') + ..aOM(5, _omitFieldNames ? '' : 'translatedPort', + protoName: 'translatedPort', subBuilder: PortInfo.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ForwardingRule clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ForwardingRule copyWith(void Function(ForwardingRule) updates) => + super.copyWith((message) => updates(message as ForwardingRule)) + as ForwardingRule; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ForwardingRule create() => ForwardingRule._(); + @$core.override + ForwardingRule createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ForwardingRule getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ForwardingRule? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get protocol => $_getSZ(0); + @$pb.TagNumber(1) + set protocol($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProtocol() => $_has(0); + @$pb.TagNumber(1) + void clearProtocol() => $_clearField(1); + + @$pb.TagNumber(2) + PortInfo get destinationPort => $_getN(1); + @$pb.TagNumber(2) + set destinationPort(PortInfo value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasDestinationPort() => $_has(1); + @$pb.TagNumber(2) + void clearDestinationPort() => $_clearField(2); + @$pb.TagNumber(2) + PortInfo ensureDestinationPort() => $_ensure(1); + + @$pb.TagNumber(3) + $core.String get translatedAddress => $_getSZ(2); + @$pb.TagNumber(3) + set translatedAddress($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasTranslatedAddress() => $_has(2); + @$pb.TagNumber(3) + void clearTranslatedAddress() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get translatedHostname => $_getSZ(3); + @$pb.TagNumber(4) + set translatedHostname($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasTranslatedHostname() => $_has(3); + @$pb.TagNumber(4) + void clearTranslatedHostname() => $_clearField(4); + + @$pb.TagNumber(5) + PortInfo get translatedPort => $_getN(4); + @$pb.TagNumber(5) + set translatedPort(PortInfo value) => $_setField(5, value); + @$pb.TagNumber(5) + $core.bool hasTranslatedPort() => $_has(4); + @$pb.TagNumber(5) + void clearTranslatedPort() => $_clearField(5); + @$pb.TagNumber(5) + PortInfo ensureTranslatedPort() => $_ensure(4); +} + +class ForwardingRulesResponse extends $pb.GeneratedMessage { + factory ForwardingRulesResponse({ + $core.Iterable? rules, + }) { + final result = create(); + if (rules != null) result.rules.addAll(rules); + return result; + } + + ForwardingRulesResponse._(); + + factory ForwardingRulesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ForwardingRulesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ForwardingRulesResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPM(1, _omitFieldNames ? '' : 'rules', + subBuilder: ForwardingRule.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ForwardingRulesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ForwardingRulesResponse copyWith( + void Function(ForwardingRulesResponse) updates) => + super.copyWith((message) => updates(message as ForwardingRulesResponse)) + as ForwardingRulesResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ForwardingRulesResponse create() => ForwardingRulesResponse._(); + @$core.override + ForwardingRulesResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ForwardingRulesResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ForwardingRulesResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get rules => $_getList(0); +} + +/// DebugBundler +class DebugBundleRequest extends $pb.GeneratedMessage { + factory DebugBundleRequest({ + $core.bool? anonymize, + $core.bool? systemInfo, + $core.String? uploadURL, + $core.int? logFileCount, + }) { + final result = create(); + if (anonymize != null) result.anonymize = anonymize; + if (systemInfo != null) result.systemInfo = systemInfo; + if (uploadURL != null) result.uploadURL = uploadURL; + if (logFileCount != null) result.logFileCount = logFileCount; + return result; + } + + DebugBundleRequest._(); + + factory DebugBundleRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DebugBundleRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DebugBundleRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'anonymize') + ..aOB(3, _omitFieldNames ? '' : 'systemInfo', protoName: 'systemInfo') + ..aOS(4, _omitFieldNames ? '' : 'uploadURL', protoName: 'uploadURL') + ..aI(5, _omitFieldNames ? '' : 'logFileCount', + protoName: 'logFileCount', fieldType: $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DebugBundleRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DebugBundleRequest copyWith(void Function(DebugBundleRequest) updates) => + super.copyWith((message) => updates(message as DebugBundleRequest)) + as DebugBundleRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DebugBundleRequest create() => DebugBundleRequest._(); + @$core.override + DebugBundleRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static DebugBundleRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static DebugBundleRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get anonymize => $_getBF(0); + @$pb.TagNumber(1) + set anonymize($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasAnonymize() => $_has(0); + @$pb.TagNumber(1) + void clearAnonymize() => $_clearField(1); + + @$pb.TagNumber(3) + $core.bool get systemInfo => $_getBF(1); + @$pb.TagNumber(3) + set systemInfo($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(3) + $core.bool hasSystemInfo() => $_has(1); + @$pb.TagNumber(3) + void clearSystemInfo() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get uploadURL => $_getSZ(2); + @$pb.TagNumber(4) + set uploadURL($core.String value) => $_setString(2, value); + @$pb.TagNumber(4) + $core.bool hasUploadURL() => $_has(2); + @$pb.TagNumber(4) + void clearUploadURL() => $_clearField(4); + + @$pb.TagNumber(5) + $core.int get logFileCount => $_getIZ(3); + @$pb.TagNumber(5) + set logFileCount($core.int value) => $_setUnsignedInt32(3, value); + @$pb.TagNumber(5) + $core.bool hasLogFileCount() => $_has(3); + @$pb.TagNumber(5) + void clearLogFileCount() => $_clearField(5); +} + +class DebugBundleResponse extends $pb.GeneratedMessage { + factory DebugBundleResponse({ + $core.String? path, + $core.String? uploadedKey, + $core.String? uploadFailureReason, + }) { + final result = create(); + if (path != null) result.path = path; + if (uploadedKey != null) result.uploadedKey = uploadedKey; + if (uploadFailureReason != null) + result.uploadFailureReason = uploadFailureReason; + return result; + } + + DebugBundleResponse._(); + + factory DebugBundleResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DebugBundleResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DebugBundleResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'path') + ..aOS(2, _omitFieldNames ? '' : 'uploadedKey', protoName: 'uploadedKey') + ..aOS(3, _omitFieldNames ? '' : 'uploadFailureReason', + protoName: 'uploadFailureReason') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DebugBundleResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DebugBundleResponse copyWith(void Function(DebugBundleResponse) updates) => + super.copyWith((message) => updates(message as DebugBundleResponse)) + as DebugBundleResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DebugBundleResponse create() => DebugBundleResponse._(); + @$core.override + DebugBundleResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static DebugBundleResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static DebugBundleResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get path => $_getSZ(0); + @$pb.TagNumber(1) + set path($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasPath() => $_has(0); + @$pb.TagNumber(1) + void clearPath() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get uploadedKey => $_getSZ(1); + @$pb.TagNumber(2) + set uploadedKey($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUploadedKey() => $_has(1); + @$pb.TagNumber(2) + void clearUploadedKey() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get uploadFailureReason => $_getSZ(2); + @$pb.TagNumber(3) + set uploadFailureReason($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasUploadFailureReason() => $_has(2); + @$pb.TagNumber(3) + void clearUploadFailureReason() => $_clearField(3); +} + +class GetLogLevelRequest extends $pb.GeneratedMessage { + factory GetLogLevelRequest() => create(); + + GetLogLevelRequest._(); + + factory GetLogLevelRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetLogLevelRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetLogLevelRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetLogLevelRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetLogLevelRequest copyWith(void Function(GetLogLevelRequest) updates) => + super.copyWith((message) => updates(message as GetLogLevelRequest)) + as GetLogLevelRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetLogLevelRequest create() => GetLogLevelRequest._(); + @$core.override + GetLogLevelRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetLogLevelRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetLogLevelRequest? _defaultInstance; +} + +class GetLogLevelResponse extends $pb.GeneratedMessage { + factory GetLogLevelResponse({ + LogLevel? level, + }) { + final result = create(); + if (level != null) result.level = level; + return result; + } + + GetLogLevelResponse._(); + + factory GetLogLevelResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetLogLevelResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetLogLevelResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aE(1, _omitFieldNames ? '' : 'level', + enumValues: LogLevel.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetLogLevelResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetLogLevelResponse copyWith(void Function(GetLogLevelResponse) updates) => + super.copyWith((message) => updates(message as GetLogLevelResponse)) + as GetLogLevelResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetLogLevelResponse create() => GetLogLevelResponse._(); + @$core.override + GetLogLevelResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetLogLevelResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetLogLevelResponse? _defaultInstance; + + @$pb.TagNumber(1) + LogLevel get level => $_getN(0); + @$pb.TagNumber(1) + set level(LogLevel value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasLevel() => $_has(0); + @$pb.TagNumber(1) + void clearLevel() => $_clearField(1); +} + +class SetLogLevelRequest extends $pb.GeneratedMessage { + factory SetLogLevelRequest({ + LogLevel? level, + }) { + final result = create(); + if (level != null) result.level = level; + return result; + } + + SetLogLevelRequest._(); + + factory SetLogLevelRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SetLogLevelRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SetLogLevelRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aE(1, _omitFieldNames ? '' : 'level', + enumValues: LogLevel.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetLogLevelRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetLogLevelRequest copyWith(void Function(SetLogLevelRequest) updates) => + super.copyWith((message) => updates(message as SetLogLevelRequest)) + as SetLogLevelRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetLogLevelRequest create() => SetLogLevelRequest._(); + @$core.override + SetLogLevelRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SetLogLevelRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SetLogLevelRequest? _defaultInstance; + + @$pb.TagNumber(1) + LogLevel get level => $_getN(0); + @$pb.TagNumber(1) + set level(LogLevel value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasLevel() => $_has(0); + @$pb.TagNumber(1) + void clearLevel() => $_clearField(1); +} + +class SetLogLevelResponse extends $pb.GeneratedMessage { + factory SetLogLevelResponse() => create(); + + SetLogLevelResponse._(); + + factory SetLogLevelResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SetLogLevelResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SetLogLevelResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetLogLevelResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetLogLevelResponse copyWith(void Function(SetLogLevelResponse) updates) => + super.copyWith((message) => updates(message as SetLogLevelResponse)) + as SetLogLevelResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetLogLevelResponse create() => SetLogLevelResponse._(); + @$core.override + SetLogLevelResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SetLogLevelResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SetLogLevelResponse? _defaultInstance; +} + +/// State represents a daemon state entry +class State extends $pb.GeneratedMessage { + factory State({ + $core.String? name, + }) { + final result = create(); + if (name != null) result.name = name; + return result; + } + + State._(); + + factory State.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory State.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'State', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + State clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + State copyWith(void Function(State) updates) => + super.copyWith((message) => updates(message as State)) as State; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static State create() => State._(); + @$core.override + State createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static State getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static State? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); +} + +/// ListStatesRequest is empty as it requires no parameters +class ListStatesRequest extends $pb.GeneratedMessage { + factory ListStatesRequest() => create(); + + ListStatesRequest._(); + + factory ListStatesRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListStatesRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListStatesRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListStatesRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListStatesRequest copyWith(void Function(ListStatesRequest) updates) => + super.copyWith((message) => updates(message as ListStatesRequest)) + as ListStatesRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListStatesRequest create() => ListStatesRequest._(); + @$core.override + ListStatesRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ListStatesRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ListStatesRequest? _defaultInstance; +} + +/// ListStatesResponse contains a list of states +class ListStatesResponse extends $pb.GeneratedMessage { + factory ListStatesResponse({ + $core.Iterable? states, + }) { + final result = create(); + if (states != null) result.states.addAll(states); + return result; + } + + ListStatesResponse._(); + + factory ListStatesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListStatesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListStatesResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPM(1, _omitFieldNames ? '' : 'states', subBuilder: State.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListStatesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListStatesResponse copyWith(void Function(ListStatesResponse) updates) => + super.copyWith((message) => updates(message as ListStatesResponse)) + as ListStatesResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListStatesResponse create() => ListStatesResponse._(); + @$core.override + ListStatesResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ListStatesResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ListStatesResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get states => $_getList(0); +} + +/// CleanStateRequest for cleaning states +class CleanStateRequest extends $pb.GeneratedMessage { + factory CleanStateRequest({ + $core.String? stateName, + $core.bool? all, + }) { + final result = create(); + if (stateName != null) result.stateName = stateName; + if (all != null) result.all = all; + return result; + } + + CleanStateRequest._(); + + factory CleanStateRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CleanStateRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CleanStateRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'stateName') + ..aOB(2, _omitFieldNames ? '' : 'all') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CleanStateRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CleanStateRequest copyWith(void Function(CleanStateRequest) updates) => + super.copyWith((message) => updates(message as CleanStateRequest)) + as CleanStateRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CleanStateRequest create() => CleanStateRequest._(); + @$core.override + CleanStateRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CleanStateRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CleanStateRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get stateName => $_getSZ(0); + @$pb.TagNumber(1) + set stateName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasStateName() => $_has(0); + @$pb.TagNumber(1) + void clearStateName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get all => $_getBF(1); + @$pb.TagNumber(2) + set all($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasAll() => $_has(1); + @$pb.TagNumber(2) + void clearAll() => $_clearField(2); +} + +/// CleanStateResponse contains the result of the clean operation +class CleanStateResponse extends $pb.GeneratedMessage { + factory CleanStateResponse({ + $core.int? cleanedStates, + }) { + final result = create(); + if (cleanedStates != null) result.cleanedStates = cleanedStates; + return result; + } + + CleanStateResponse._(); + + factory CleanStateResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CleanStateResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CleanStateResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aI(1, _omitFieldNames ? '' : 'cleanedStates') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CleanStateResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CleanStateResponse copyWith(void Function(CleanStateResponse) updates) => + super.copyWith((message) => updates(message as CleanStateResponse)) + as CleanStateResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CleanStateResponse create() => CleanStateResponse._(); + @$core.override + CleanStateResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CleanStateResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CleanStateResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get cleanedStates => $_getIZ(0); + @$pb.TagNumber(1) + set cleanedStates($core.int value) => $_setSignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasCleanedStates() => $_has(0); + @$pb.TagNumber(1) + void clearCleanedStates() => $_clearField(1); +} + +/// DeleteStateRequest for deleting states +class DeleteStateRequest extends $pb.GeneratedMessage { + factory DeleteStateRequest({ + $core.String? stateName, + $core.bool? all, + }) { + final result = create(); + if (stateName != null) result.stateName = stateName; + if (all != null) result.all = all; + return result; + } + + DeleteStateRequest._(); + + factory DeleteStateRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DeleteStateRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DeleteStateRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'stateName') + ..aOB(2, _omitFieldNames ? '' : 'all') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteStateRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteStateRequest copyWith(void Function(DeleteStateRequest) updates) => + super.copyWith((message) => updates(message as DeleteStateRequest)) + as DeleteStateRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteStateRequest create() => DeleteStateRequest._(); + @$core.override + DeleteStateRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static DeleteStateRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static DeleteStateRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get stateName => $_getSZ(0); + @$pb.TagNumber(1) + set stateName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasStateName() => $_has(0); + @$pb.TagNumber(1) + void clearStateName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get all => $_getBF(1); + @$pb.TagNumber(2) + set all($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasAll() => $_has(1); + @$pb.TagNumber(2) + void clearAll() => $_clearField(2); +} + +/// DeleteStateResponse contains the result of the delete operation +class DeleteStateResponse extends $pb.GeneratedMessage { + factory DeleteStateResponse({ + $core.int? deletedStates, + }) { + final result = create(); + if (deletedStates != null) result.deletedStates = deletedStates; + return result; + } + + DeleteStateResponse._(); + + factory DeleteStateResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DeleteStateResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DeleteStateResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aI(1, _omitFieldNames ? '' : 'deletedStates') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteStateResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteStateResponse copyWith(void Function(DeleteStateResponse) updates) => + super.copyWith((message) => updates(message as DeleteStateResponse)) + as DeleteStateResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteStateResponse create() => DeleteStateResponse._(); + @$core.override + DeleteStateResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static DeleteStateResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static DeleteStateResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get deletedStates => $_getIZ(0); + @$pb.TagNumber(1) + set deletedStates($core.int value) => $_setSignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasDeletedStates() => $_has(0); + @$pb.TagNumber(1) + void clearDeletedStates() => $_clearField(1); +} + +class SetSyncResponsePersistenceRequest extends $pb.GeneratedMessage { + factory SetSyncResponsePersistenceRequest({ + $core.bool? enabled, + }) { + final result = create(); + if (enabled != null) result.enabled = enabled; + return result; + } + + SetSyncResponsePersistenceRequest._(); + + factory SetSyncResponsePersistenceRequest.fromBuffer( + $core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SetSyncResponsePersistenceRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SetSyncResponsePersistenceRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'enabled') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetSyncResponsePersistenceRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetSyncResponsePersistenceRequest copyWith( + void Function(SetSyncResponsePersistenceRequest) updates) => + super.copyWith((message) => + updates(message as SetSyncResponsePersistenceRequest)) + as SetSyncResponsePersistenceRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetSyncResponsePersistenceRequest create() => + SetSyncResponsePersistenceRequest._(); + @$core.override + SetSyncResponsePersistenceRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SetSyncResponsePersistenceRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor( + create); + static SetSyncResponsePersistenceRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get enabled => $_getBF(0); + @$pb.TagNumber(1) + set enabled($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasEnabled() => $_has(0); + @$pb.TagNumber(1) + void clearEnabled() => $_clearField(1); +} + +class SetSyncResponsePersistenceResponse extends $pb.GeneratedMessage { + factory SetSyncResponsePersistenceResponse() => create(); + + SetSyncResponsePersistenceResponse._(); + + factory SetSyncResponsePersistenceResponse.fromBuffer( + $core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SetSyncResponsePersistenceResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SetSyncResponsePersistenceResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetSyncResponsePersistenceResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetSyncResponsePersistenceResponse copyWith( + void Function(SetSyncResponsePersistenceResponse) updates) => + super.copyWith((message) => + updates(message as SetSyncResponsePersistenceResponse)) + as SetSyncResponsePersistenceResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetSyncResponsePersistenceResponse create() => + SetSyncResponsePersistenceResponse._(); + @$core.override + SetSyncResponsePersistenceResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SetSyncResponsePersistenceResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor( + create); + static SetSyncResponsePersistenceResponse? _defaultInstance; +} + +class TCPFlags extends $pb.GeneratedMessage { + factory TCPFlags({ + $core.bool? syn, + $core.bool? ack, + $core.bool? fin, + $core.bool? rst, + $core.bool? psh, + $core.bool? urg, + }) { + final result = create(); + if (syn != null) result.syn = syn; + if (ack != null) result.ack = ack; + if (fin != null) result.fin = fin; + if (rst != null) result.rst = rst; + if (psh != null) result.psh = psh; + if (urg != null) result.urg = urg; + return result; + } + + TCPFlags._(); + + factory TCPFlags.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TCPFlags.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TCPFlags', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'syn') + ..aOB(2, _omitFieldNames ? '' : 'ack') + ..aOB(3, _omitFieldNames ? '' : 'fin') + ..aOB(4, _omitFieldNames ? '' : 'rst') + ..aOB(5, _omitFieldNames ? '' : 'psh') + ..aOB(6, _omitFieldNames ? '' : 'urg') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TCPFlags clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TCPFlags copyWith(void Function(TCPFlags) updates) => + super.copyWith((message) => updates(message as TCPFlags)) as TCPFlags; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TCPFlags create() => TCPFlags._(); + @$core.override + TCPFlags createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static TCPFlags getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TCPFlags? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get syn => $_getBF(0); + @$pb.TagNumber(1) + set syn($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasSyn() => $_has(0); + @$pb.TagNumber(1) + void clearSyn() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get ack => $_getBF(1); + @$pb.TagNumber(2) + set ack($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasAck() => $_has(1); + @$pb.TagNumber(2) + void clearAck() => $_clearField(2); + + @$pb.TagNumber(3) + $core.bool get fin => $_getBF(2); + @$pb.TagNumber(3) + set fin($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasFin() => $_has(2); + @$pb.TagNumber(3) + void clearFin() => $_clearField(3); + + @$pb.TagNumber(4) + $core.bool get rst => $_getBF(3); + @$pb.TagNumber(4) + set rst($core.bool value) => $_setBool(3, value); + @$pb.TagNumber(4) + $core.bool hasRst() => $_has(3); + @$pb.TagNumber(4) + void clearRst() => $_clearField(4); + + @$pb.TagNumber(5) + $core.bool get psh => $_getBF(4); + @$pb.TagNumber(5) + set psh($core.bool value) => $_setBool(4, value); + @$pb.TagNumber(5) + $core.bool hasPsh() => $_has(4); + @$pb.TagNumber(5) + void clearPsh() => $_clearField(5); + + @$pb.TagNumber(6) + $core.bool get urg => $_getBF(5); + @$pb.TagNumber(6) + set urg($core.bool value) => $_setBool(5, value); + @$pb.TagNumber(6) + $core.bool hasUrg() => $_has(5); + @$pb.TagNumber(6) + void clearUrg() => $_clearField(6); +} + +class TracePacketRequest extends $pb.GeneratedMessage { + factory TracePacketRequest({ + $core.String? sourceIp, + $core.String? destinationIp, + $core.String? protocol, + $core.int? sourcePort, + $core.int? destinationPort, + $core.String? direction, + TCPFlags? tcpFlags, + $core.int? icmpType, + $core.int? icmpCode, + }) { + final result = create(); + if (sourceIp != null) result.sourceIp = sourceIp; + if (destinationIp != null) result.destinationIp = destinationIp; + if (protocol != null) result.protocol = protocol; + if (sourcePort != null) result.sourcePort = sourcePort; + if (destinationPort != null) result.destinationPort = destinationPort; + if (direction != null) result.direction = direction; + if (tcpFlags != null) result.tcpFlags = tcpFlags; + if (icmpType != null) result.icmpType = icmpType; + if (icmpCode != null) result.icmpCode = icmpCode; + return result; + } + + TracePacketRequest._(); + + factory TracePacketRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TracePacketRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TracePacketRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'sourceIp') + ..aOS(2, _omitFieldNames ? '' : 'destinationIp') + ..aOS(3, _omitFieldNames ? '' : 'protocol') + ..aI(4, _omitFieldNames ? '' : 'sourcePort', fieldType: $pb.PbFieldType.OU3) + ..aI(5, _omitFieldNames ? '' : 'destinationPort', + fieldType: $pb.PbFieldType.OU3) + ..aOS(6, _omitFieldNames ? '' : 'direction') + ..aOM(7, _omitFieldNames ? '' : 'tcpFlags', + subBuilder: TCPFlags.create) + ..aI(8, _omitFieldNames ? '' : 'icmpType', fieldType: $pb.PbFieldType.OU3) + ..aI(9, _omitFieldNames ? '' : 'icmpCode', fieldType: $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TracePacketRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TracePacketRequest copyWith(void Function(TracePacketRequest) updates) => + super.copyWith((message) => updates(message as TracePacketRequest)) + as TracePacketRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TracePacketRequest create() => TracePacketRequest._(); + @$core.override + TracePacketRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static TracePacketRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static TracePacketRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get sourceIp => $_getSZ(0); + @$pb.TagNumber(1) + set sourceIp($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasSourceIp() => $_has(0); + @$pb.TagNumber(1) + void clearSourceIp() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get destinationIp => $_getSZ(1); + @$pb.TagNumber(2) + set destinationIp($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasDestinationIp() => $_has(1); + @$pb.TagNumber(2) + void clearDestinationIp() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get protocol => $_getSZ(2); + @$pb.TagNumber(3) + set protocol($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasProtocol() => $_has(2); + @$pb.TagNumber(3) + void clearProtocol() => $_clearField(3); + + @$pb.TagNumber(4) + $core.int get sourcePort => $_getIZ(3); + @$pb.TagNumber(4) + set sourcePort($core.int value) => $_setUnsignedInt32(3, value); + @$pb.TagNumber(4) + $core.bool hasSourcePort() => $_has(3); + @$pb.TagNumber(4) + void clearSourcePort() => $_clearField(4); + + @$pb.TagNumber(5) + $core.int get destinationPort => $_getIZ(4); + @$pb.TagNumber(5) + set destinationPort($core.int value) => $_setUnsignedInt32(4, value); + @$pb.TagNumber(5) + $core.bool hasDestinationPort() => $_has(4); + @$pb.TagNumber(5) + void clearDestinationPort() => $_clearField(5); + + @$pb.TagNumber(6) + $core.String get direction => $_getSZ(5); + @$pb.TagNumber(6) + set direction($core.String value) => $_setString(5, value); + @$pb.TagNumber(6) + $core.bool hasDirection() => $_has(5); + @$pb.TagNumber(6) + void clearDirection() => $_clearField(6); + + @$pb.TagNumber(7) + TCPFlags get tcpFlags => $_getN(6); + @$pb.TagNumber(7) + set tcpFlags(TCPFlags value) => $_setField(7, value); + @$pb.TagNumber(7) + $core.bool hasTcpFlags() => $_has(6); + @$pb.TagNumber(7) + void clearTcpFlags() => $_clearField(7); + @$pb.TagNumber(7) + TCPFlags ensureTcpFlags() => $_ensure(6); + + @$pb.TagNumber(8) + $core.int get icmpType => $_getIZ(7); + @$pb.TagNumber(8) + set icmpType($core.int value) => $_setUnsignedInt32(7, value); + @$pb.TagNumber(8) + $core.bool hasIcmpType() => $_has(7); + @$pb.TagNumber(8) + void clearIcmpType() => $_clearField(8); + + @$pb.TagNumber(9) + $core.int get icmpCode => $_getIZ(8); + @$pb.TagNumber(9) + set icmpCode($core.int value) => $_setUnsignedInt32(8, value); + @$pb.TagNumber(9) + $core.bool hasIcmpCode() => $_has(8); + @$pb.TagNumber(9) + void clearIcmpCode() => $_clearField(9); +} + +class TraceStage extends $pb.GeneratedMessage { + factory TraceStage({ + $core.String? name, + $core.String? message, + $core.bool? allowed, + $core.String? forwardingDetails, + }) { + final result = create(); + if (name != null) result.name = name; + if (message != null) result.message = message; + if (allowed != null) result.allowed = allowed; + if (forwardingDetails != null) result.forwardingDetails = forwardingDetails; + return result; + } + + TraceStage._(); + + factory TraceStage.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TraceStage.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TraceStage', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'message') + ..aOB(3, _omitFieldNames ? '' : 'allowed') + ..aOS(4, _omitFieldNames ? '' : 'forwardingDetails') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TraceStage clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TraceStage copyWith(void Function(TraceStage) updates) => + super.copyWith((message) => updates(message as TraceStage)) as TraceStage; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TraceStage create() => TraceStage._(); + @$core.override + TraceStage createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static TraceStage getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static TraceStage? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get message => $_getSZ(1); + @$pb.TagNumber(2) + set message($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasMessage() => $_has(1); + @$pb.TagNumber(2) + void clearMessage() => $_clearField(2); + + @$pb.TagNumber(3) + $core.bool get allowed => $_getBF(2); + @$pb.TagNumber(3) + set allowed($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasAllowed() => $_has(2); + @$pb.TagNumber(3) + void clearAllowed() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get forwardingDetails => $_getSZ(3); + @$pb.TagNumber(4) + set forwardingDetails($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasForwardingDetails() => $_has(3); + @$pb.TagNumber(4) + void clearForwardingDetails() => $_clearField(4); +} + +class TracePacketResponse extends $pb.GeneratedMessage { + factory TracePacketResponse({ + $core.Iterable? stages, + $core.bool? finalDisposition, + }) { + final result = create(); + if (stages != null) result.stages.addAll(stages); + if (finalDisposition != null) result.finalDisposition = finalDisposition; + return result; + } + + TracePacketResponse._(); + + factory TracePacketResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TracePacketResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TracePacketResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPM(1, _omitFieldNames ? '' : 'stages', + subBuilder: TraceStage.create) + ..aOB(2, _omitFieldNames ? '' : 'finalDisposition') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TracePacketResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TracePacketResponse copyWith(void Function(TracePacketResponse) updates) => + super.copyWith((message) => updates(message as TracePacketResponse)) + as TracePacketResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TracePacketResponse create() => TracePacketResponse._(); + @$core.override + TracePacketResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static TracePacketResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static TracePacketResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get stages => $_getList(0); + + @$pb.TagNumber(2) + $core.bool get finalDisposition => $_getBF(1); + @$pb.TagNumber(2) + set finalDisposition($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasFinalDisposition() => $_has(1); + @$pb.TagNumber(2) + void clearFinalDisposition() => $_clearField(2); +} + +class SubscribeRequest extends $pb.GeneratedMessage { + factory SubscribeRequest() => create(); + + SubscribeRequest._(); + + factory SubscribeRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SubscribeRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SubscribeRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SubscribeRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SubscribeRequest copyWith(void Function(SubscribeRequest) updates) => + super.copyWith((message) => updates(message as SubscribeRequest)) + as SubscribeRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SubscribeRequest create() => SubscribeRequest._(); + @$core.override + SubscribeRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SubscribeRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SubscribeRequest? _defaultInstance; +} + +class SystemEvent extends $pb.GeneratedMessage { + factory SystemEvent({ + $core.String? id, + SystemEvent_Severity? severity, + SystemEvent_Category? category, + $core.String? message, + $core.String? userMessage, + $2.Timestamp? timestamp, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata, + }) { + final result = create(); + if (id != null) result.id = id; + if (severity != null) result.severity = severity; + if (category != null) result.category = category; + if (message != null) result.message = message; + if (userMessage != null) result.userMessage = userMessage; + if (timestamp != null) result.timestamp = timestamp; + if (metadata != null) result.metadata.addEntries(metadata); + return result; + } + + SystemEvent._(); + + factory SystemEvent.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SystemEvent.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SystemEvent', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aE(2, _omitFieldNames ? '' : 'severity', + enumValues: SystemEvent_Severity.values) + ..aE(3, _omitFieldNames ? '' : 'category', + enumValues: SystemEvent_Category.values) + ..aOS(4, _omitFieldNames ? '' : 'message') + ..aOS(5, _omitFieldNames ? '' : 'userMessage', protoName: 'userMessage') + ..aOM<$2.Timestamp>(6, _omitFieldNames ? '' : 'timestamp', + subBuilder: $2.Timestamp.create) + ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'metadata', + entryClassName: 'SystemEvent.MetadataEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + packageName: const $pb.PackageName('daemon')) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SystemEvent clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SystemEvent copyWith(void Function(SystemEvent) updates) => + super.copyWith((message) => updates(message as SystemEvent)) + as SystemEvent; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SystemEvent create() => SystemEvent._(); + @$core.override + SystemEvent createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SystemEvent getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SystemEvent? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => $_clearField(1); + + @$pb.TagNumber(2) + SystemEvent_Severity get severity => $_getN(1); + @$pb.TagNumber(2) + set severity(SystemEvent_Severity value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasSeverity() => $_has(1); + @$pb.TagNumber(2) + void clearSeverity() => $_clearField(2); + + @$pb.TagNumber(3) + SystemEvent_Category get category => $_getN(2); + @$pb.TagNumber(3) + set category(SystemEvent_Category value) => $_setField(3, value); + @$pb.TagNumber(3) + $core.bool hasCategory() => $_has(2); + @$pb.TagNumber(3) + void clearCategory() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get message => $_getSZ(3); + @$pb.TagNumber(4) + set message($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasMessage() => $_has(3); + @$pb.TagNumber(4) + void clearMessage() => $_clearField(4); + + @$pb.TagNumber(5) + $core.String get userMessage => $_getSZ(4); + @$pb.TagNumber(5) + set userMessage($core.String value) => $_setString(4, value); + @$pb.TagNumber(5) + $core.bool hasUserMessage() => $_has(4); + @$pb.TagNumber(5) + void clearUserMessage() => $_clearField(5); + + @$pb.TagNumber(6) + $2.Timestamp get timestamp => $_getN(5); + @$pb.TagNumber(6) + set timestamp($2.Timestamp value) => $_setField(6, value); + @$pb.TagNumber(6) + $core.bool hasTimestamp() => $_has(5); + @$pb.TagNumber(6) + void clearTimestamp() => $_clearField(6); + @$pb.TagNumber(6) + $2.Timestamp ensureTimestamp() => $_ensure(5); + + @$pb.TagNumber(7) + $pb.PbMap<$core.String, $core.String> get metadata => $_getMap(6); +} + +class GetEventsRequest extends $pb.GeneratedMessage { + factory GetEventsRequest() => create(); + + GetEventsRequest._(); + + factory GetEventsRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetEventsRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetEventsRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetEventsRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetEventsRequest copyWith(void Function(GetEventsRequest) updates) => + super.copyWith((message) => updates(message as GetEventsRequest)) + as GetEventsRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetEventsRequest create() => GetEventsRequest._(); + @$core.override + GetEventsRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetEventsRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetEventsRequest? _defaultInstance; +} + +class GetEventsResponse extends $pb.GeneratedMessage { + factory GetEventsResponse({ + $core.Iterable? events, + }) { + final result = create(); + if (events != null) result.events.addAll(events); + return result; + } + + GetEventsResponse._(); + + factory GetEventsResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetEventsResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetEventsResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPM(1, _omitFieldNames ? '' : 'events', + subBuilder: SystemEvent.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetEventsResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetEventsResponse copyWith(void Function(GetEventsResponse) updates) => + super.copyWith((message) => updates(message as GetEventsResponse)) + as GetEventsResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetEventsResponse create() => GetEventsResponse._(); + @$core.override + GetEventsResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetEventsResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetEventsResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get events => $_getList(0); +} + +class SwitchProfileRequest extends $pb.GeneratedMessage { + factory SwitchProfileRequest({ + $core.String? profileName, + $core.String? username, + }) { + final result = create(); + if (profileName != null) result.profileName = profileName; + if (username != null) result.username = username; + return result; + } + + SwitchProfileRequest._(); + + factory SwitchProfileRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SwitchProfileRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SwitchProfileRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(2, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SwitchProfileRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SwitchProfileRequest copyWith(void Function(SwitchProfileRequest) updates) => + super.copyWith((message) => updates(message as SwitchProfileRequest)) + as SwitchProfileRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SwitchProfileRequest create() => SwitchProfileRequest._(); + @$core.override + SwitchProfileRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SwitchProfileRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SwitchProfileRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get profileName => $_getSZ(0); + @$pb.TagNumber(1) + set profileName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProfileName() => $_has(0); + @$pb.TagNumber(1) + void clearProfileName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get username => $_getSZ(1); + @$pb.TagNumber(2) + set username($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUsername() => $_has(1); + @$pb.TagNumber(2) + void clearUsername() => $_clearField(2); +} + +class SwitchProfileResponse extends $pb.GeneratedMessage { + factory SwitchProfileResponse() => create(); + + SwitchProfileResponse._(); + + factory SwitchProfileResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SwitchProfileResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SwitchProfileResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SwitchProfileResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SwitchProfileResponse copyWith( + void Function(SwitchProfileResponse) updates) => + super.copyWith((message) => updates(message as SwitchProfileResponse)) + as SwitchProfileResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SwitchProfileResponse create() => SwitchProfileResponse._(); + @$core.override + SwitchProfileResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SwitchProfileResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SwitchProfileResponse? _defaultInstance; +} + +class SetConfigRequest extends $pb.GeneratedMessage { + factory SetConfigRequest({ + $core.String? username, + $core.String? profileName, + $core.String? managementUrl, + $core.String? adminURL, + $core.bool? rosenpassEnabled, + $core.String? interfaceName, + $fixnum.Int64? wireguardPort, + $core.String? optionalPreSharedKey, + $core.bool? disableAutoConnect, + $core.bool? serverSSHAllowed, + $core.bool? rosenpassPermissive, + $core.bool? networkMonitor, + $core.bool? disableClientRoutes, + $core.bool? disableServerRoutes, + $core.bool? disableDns, + $core.bool? disableFirewall, + $core.bool? blockLanAccess, + $core.bool? disableNotifications, + $core.bool? lazyConnectionEnabled, + $core.bool? blockInbound, + $core.Iterable<$core.String>? natExternalIPs, + $core.bool? cleanNATExternalIPs, + $core.List<$core.int>? customDNSAddress, + $core.Iterable<$core.String>? extraIFaceBlacklist, + $core.Iterable<$core.String>? dnsLabels, + $core.bool? cleanDNSLabels, + $1.Duration? dnsRouteInterval, + $fixnum.Int64? mtu, + $core.bool? enableSSHRoot, + $core.bool? enableSSHSFTP, + $core.bool? enableSSHLocalPortForwarding, + $core.bool? enableSSHRemotePortForwarding, + $core.bool? disableSSHAuth, + $core.int? sshJWTCacheTTL, + }) { + final result = create(); + if (username != null) result.username = username; + if (profileName != null) result.profileName = profileName; + if (managementUrl != null) result.managementUrl = managementUrl; + if (adminURL != null) result.adminURL = adminURL; + if (rosenpassEnabled != null) result.rosenpassEnabled = rosenpassEnabled; + if (interfaceName != null) result.interfaceName = interfaceName; + if (wireguardPort != null) result.wireguardPort = wireguardPort; + if (optionalPreSharedKey != null) + result.optionalPreSharedKey = optionalPreSharedKey; + if (disableAutoConnect != null) + result.disableAutoConnect = disableAutoConnect; + if (serverSSHAllowed != null) result.serverSSHAllowed = serverSSHAllowed; + if (rosenpassPermissive != null) + result.rosenpassPermissive = rosenpassPermissive; + if (networkMonitor != null) result.networkMonitor = networkMonitor; + if (disableClientRoutes != null) + result.disableClientRoutes = disableClientRoutes; + if (disableServerRoutes != null) + result.disableServerRoutes = disableServerRoutes; + if (disableDns != null) result.disableDns = disableDns; + if (disableFirewall != null) result.disableFirewall = disableFirewall; + if (blockLanAccess != null) result.blockLanAccess = blockLanAccess; + if (disableNotifications != null) + result.disableNotifications = disableNotifications; + if (lazyConnectionEnabled != null) + result.lazyConnectionEnabled = lazyConnectionEnabled; + if (blockInbound != null) result.blockInbound = blockInbound; + if (natExternalIPs != null) result.natExternalIPs.addAll(natExternalIPs); + if (cleanNATExternalIPs != null) + result.cleanNATExternalIPs = cleanNATExternalIPs; + if (customDNSAddress != null) result.customDNSAddress = customDNSAddress; + if (extraIFaceBlacklist != null) + result.extraIFaceBlacklist.addAll(extraIFaceBlacklist); + if (dnsLabels != null) result.dnsLabels.addAll(dnsLabels); + if (cleanDNSLabels != null) result.cleanDNSLabels = cleanDNSLabels; + if (dnsRouteInterval != null) result.dnsRouteInterval = dnsRouteInterval; + if (mtu != null) result.mtu = mtu; + if (enableSSHRoot != null) result.enableSSHRoot = enableSSHRoot; + if (enableSSHSFTP != null) result.enableSSHSFTP = enableSSHSFTP; + if (enableSSHLocalPortForwarding != null) + result.enableSSHLocalPortForwarding = enableSSHLocalPortForwarding; + if (enableSSHRemotePortForwarding != null) + result.enableSSHRemotePortForwarding = enableSSHRemotePortForwarding; + if (disableSSHAuth != null) result.disableSSHAuth = disableSSHAuth; + if (sshJWTCacheTTL != null) result.sshJWTCacheTTL = sshJWTCacheTTL; + return result; + } + + SetConfigRequest._(); + + factory SetConfigRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SetConfigRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SetConfigRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..aOS(2, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(3, _omitFieldNames ? '' : 'managementUrl', protoName: 'managementUrl') + ..aOS(4, _omitFieldNames ? '' : 'adminURL', protoName: 'adminURL') + ..aOB(5, _omitFieldNames ? '' : 'rosenpassEnabled', + protoName: 'rosenpassEnabled') + ..aOS(6, _omitFieldNames ? '' : 'interfaceName', protoName: 'interfaceName') + ..aInt64(7, _omitFieldNames ? '' : 'wireguardPort', + protoName: 'wireguardPort') + ..aOS(8, _omitFieldNames ? '' : 'optionalPreSharedKey', + protoName: 'optionalPreSharedKey') + ..aOB(9, _omitFieldNames ? '' : 'disableAutoConnect', + protoName: 'disableAutoConnect') + ..aOB(10, _omitFieldNames ? '' : 'serverSSHAllowed', + protoName: 'serverSSHAllowed') + ..aOB(11, _omitFieldNames ? '' : 'rosenpassPermissive', + protoName: 'rosenpassPermissive') + ..aOB(12, _omitFieldNames ? '' : 'networkMonitor', + protoName: 'networkMonitor') + ..aOB(13, _omitFieldNames ? '' : 'disableClientRoutes') + ..aOB(14, _omitFieldNames ? '' : 'disableServerRoutes') + ..aOB(15, _omitFieldNames ? '' : 'disableDns') + ..aOB(16, _omitFieldNames ? '' : 'disableFirewall') + ..aOB(17, _omitFieldNames ? '' : 'blockLanAccess') + ..aOB(18, _omitFieldNames ? '' : 'disableNotifications') + ..aOB(19, _omitFieldNames ? '' : 'lazyConnectionEnabled', + protoName: 'lazyConnectionEnabled') + ..aOB(20, _omitFieldNames ? '' : 'blockInbound') + ..pPS(21, _omitFieldNames ? '' : 'natExternalIPs', + protoName: 'natExternalIPs') + ..aOB(22, _omitFieldNames ? '' : 'cleanNATExternalIPs', + protoName: 'cleanNATExternalIPs') + ..a<$core.List<$core.int>>( + 23, _omitFieldNames ? '' : 'customDNSAddress', $pb.PbFieldType.OY, + protoName: 'customDNSAddress') + ..pPS(24, _omitFieldNames ? '' : 'extraIFaceBlacklist', + protoName: 'extraIFaceBlacklist') + ..pPS(25, _omitFieldNames ? '' : 'dnsLabels') + ..aOB(26, _omitFieldNames ? '' : 'cleanDNSLabels', + protoName: 'cleanDNSLabels') + ..aOM<$1.Duration>(27, _omitFieldNames ? '' : 'dnsRouteInterval', + protoName: 'dnsRouteInterval', subBuilder: $1.Duration.create) + ..aInt64(28, _omitFieldNames ? '' : 'mtu') + ..aOB(29, _omitFieldNames ? '' : 'enableSSHRoot', + protoName: 'enableSSHRoot') + ..aOB(30, _omitFieldNames ? '' : 'enableSSHSFTP', + protoName: 'enableSSHSFTP') + ..aOB(31, _omitFieldNames ? '' : 'enableSSHLocalPortForwarding', + protoName: 'enableSSHLocalPortForwarding') + ..aOB(32, _omitFieldNames ? '' : 'enableSSHRemotePortForwarding', + protoName: 'enableSSHRemotePortForwarding') + ..aOB(33, _omitFieldNames ? '' : 'disableSSHAuth', + protoName: 'disableSSHAuth') + ..aI(34, _omitFieldNames ? '' : 'sshJWTCacheTTL', + protoName: 'sshJWTCacheTTL') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetConfigRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetConfigRequest copyWith(void Function(SetConfigRequest) updates) => + super.copyWith((message) => updates(message as SetConfigRequest)) + as SetConfigRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetConfigRequest create() => SetConfigRequest._(); + @$core.override + SetConfigRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SetConfigRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SetConfigRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get profileName => $_getSZ(1); + @$pb.TagNumber(2) + set profileName($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasProfileName() => $_has(1); + @$pb.TagNumber(2) + void clearProfileName() => $_clearField(2); + + /// managementUrl to authenticate. + @$pb.TagNumber(3) + $core.String get managementUrl => $_getSZ(2); + @$pb.TagNumber(3) + set managementUrl($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasManagementUrl() => $_has(2); + @$pb.TagNumber(3) + void clearManagementUrl() => $_clearField(3); + + /// adminUrl to manage keys. + @$pb.TagNumber(4) + $core.String get adminURL => $_getSZ(3); + @$pb.TagNumber(4) + set adminURL($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasAdminURL() => $_has(3); + @$pb.TagNumber(4) + void clearAdminURL() => $_clearField(4); + + @$pb.TagNumber(5) + $core.bool get rosenpassEnabled => $_getBF(4); + @$pb.TagNumber(5) + set rosenpassEnabled($core.bool value) => $_setBool(4, value); + @$pb.TagNumber(5) + $core.bool hasRosenpassEnabled() => $_has(4); + @$pb.TagNumber(5) + void clearRosenpassEnabled() => $_clearField(5); + + @$pb.TagNumber(6) + $core.String get interfaceName => $_getSZ(5); + @$pb.TagNumber(6) + set interfaceName($core.String value) => $_setString(5, value); + @$pb.TagNumber(6) + $core.bool hasInterfaceName() => $_has(5); + @$pb.TagNumber(6) + void clearInterfaceName() => $_clearField(6); + + @$pb.TagNumber(7) + $fixnum.Int64 get wireguardPort => $_getI64(6); + @$pb.TagNumber(7) + set wireguardPort($fixnum.Int64 value) => $_setInt64(6, value); + @$pb.TagNumber(7) + $core.bool hasWireguardPort() => $_has(6); + @$pb.TagNumber(7) + void clearWireguardPort() => $_clearField(7); + + @$pb.TagNumber(8) + $core.String get optionalPreSharedKey => $_getSZ(7); + @$pb.TagNumber(8) + set optionalPreSharedKey($core.String value) => $_setString(7, value); + @$pb.TagNumber(8) + $core.bool hasOptionalPreSharedKey() => $_has(7); + @$pb.TagNumber(8) + void clearOptionalPreSharedKey() => $_clearField(8); + + @$pb.TagNumber(9) + $core.bool get disableAutoConnect => $_getBF(8); + @$pb.TagNumber(9) + set disableAutoConnect($core.bool value) => $_setBool(8, value); + @$pb.TagNumber(9) + $core.bool hasDisableAutoConnect() => $_has(8); + @$pb.TagNumber(9) + void clearDisableAutoConnect() => $_clearField(9); + + @$pb.TagNumber(10) + $core.bool get serverSSHAllowed => $_getBF(9); + @$pb.TagNumber(10) + set serverSSHAllowed($core.bool value) => $_setBool(9, value); + @$pb.TagNumber(10) + $core.bool hasServerSSHAllowed() => $_has(9); + @$pb.TagNumber(10) + void clearServerSSHAllowed() => $_clearField(10); + + @$pb.TagNumber(11) + $core.bool get rosenpassPermissive => $_getBF(10); + @$pb.TagNumber(11) + set rosenpassPermissive($core.bool value) => $_setBool(10, value); + @$pb.TagNumber(11) + $core.bool hasRosenpassPermissive() => $_has(10); + @$pb.TagNumber(11) + void clearRosenpassPermissive() => $_clearField(11); + + @$pb.TagNumber(12) + $core.bool get networkMonitor => $_getBF(11); + @$pb.TagNumber(12) + set networkMonitor($core.bool value) => $_setBool(11, value); + @$pb.TagNumber(12) + $core.bool hasNetworkMonitor() => $_has(11); + @$pb.TagNumber(12) + void clearNetworkMonitor() => $_clearField(12); + + @$pb.TagNumber(13) + $core.bool get disableClientRoutes => $_getBF(12); + @$pb.TagNumber(13) + set disableClientRoutes($core.bool value) => $_setBool(12, value); + @$pb.TagNumber(13) + $core.bool hasDisableClientRoutes() => $_has(12); + @$pb.TagNumber(13) + void clearDisableClientRoutes() => $_clearField(13); + + @$pb.TagNumber(14) + $core.bool get disableServerRoutes => $_getBF(13); + @$pb.TagNumber(14) + set disableServerRoutes($core.bool value) => $_setBool(13, value); + @$pb.TagNumber(14) + $core.bool hasDisableServerRoutes() => $_has(13); + @$pb.TagNumber(14) + void clearDisableServerRoutes() => $_clearField(14); + + @$pb.TagNumber(15) + $core.bool get disableDns => $_getBF(14); + @$pb.TagNumber(15) + set disableDns($core.bool value) => $_setBool(14, value); + @$pb.TagNumber(15) + $core.bool hasDisableDns() => $_has(14); + @$pb.TagNumber(15) + void clearDisableDns() => $_clearField(15); + + @$pb.TagNumber(16) + $core.bool get disableFirewall => $_getBF(15); + @$pb.TagNumber(16) + set disableFirewall($core.bool value) => $_setBool(15, value); + @$pb.TagNumber(16) + $core.bool hasDisableFirewall() => $_has(15); + @$pb.TagNumber(16) + void clearDisableFirewall() => $_clearField(16); + + @$pb.TagNumber(17) + $core.bool get blockLanAccess => $_getBF(16); + @$pb.TagNumber(17) + set blockLanAccess($core.bool value) => $_setBool(16, value); + @$pb.TagNumber(17) + $core.bool hasBlockLanAccess() => $_has(16); + @$pb.TagNumber(17) + void clearBlockLanAccess() => $_clearField(17); + + @$pb.TagNumber(18) + $core.bool get disableNotifications => $_getBF(17); + @$pb.TagNumber(18) + set disableNotifications($core.bool value) => $_setBool(17, value); + @$pb.TagNumber(18) + $core.bool hasDisableNotifications() => $_has(17); + @$pb.TagNumber(18) + void clearDisableNotifications() => $_clearField(18); + + @$pb.TagNumber(19) + $core.bool get lazyConnectionEnabled => $_getBF(18); + @$pb.TagNumber(19) + set lazyConnectionEnabled($core.bool value) => $_setBool(18, value); + @$pb.TagNumber(19) + $core.bool hasLazyConnectionEnabled() => $_has(18); + @$pb.TagNumber(19) + void clearLazyConnectionEnabled() => $_clearField(19); + + @$pb.TagNumber(20) + $core.bool get blockInbound => $_getBF(19); + @$pb.TagNumber(20) + set blockInbound($core.bool value) => $_setBool(19, value); + @$pb.TagNumber(20) + $core.bool hasBlockInbound() => $_has(19); + @$pb.TagNumber(20) + void clearBlockInbound() => $_clearField(20); + + @$pb.TagNumber(21) + $pb.PbList<$core.String> get natExternalIPs => $_getList(20); + + @$pb.TagNumber(22) + $core.bool get cleanNATExternalIPs => $_getBF(21); + @$pb.TagNumber(22) + set cleanNATExternalIPs($core.bool value) => $_setBool(21, value); + @$pb.TagNumber(22) + $core.bool hasCleanNATExternalIPs() => $_has(21); + @$pb.TagNumber(22) + void clearCleanNATExternalIPs() => $_clearField(22); + + @$pb.TagNumber(23) + $core.List<$core.int> get customDNSAddress => $_getN(22); + @$pb.TagNumber(23) + set customDNSAddress($core.List<$core.int> value) => $_setBytes(22, value); + @$pb.TagNumber(23) + $core.bool hasCustomDNSAddress() => $_has(22); + @$pb.TagNumber(23) + void clearCustomDNSAddress() => $_clearField(23); + + @$pb.TagNumber(24) + $pb.PbList<$core.String> get extraIFaceBlacklist => $_getList(23); + + @$pb.TagNumber(25) + $pb.PbList<$core.String> get dnsLabels => $_getList(24); + + /// cleanDNSLabels clean map list of DNS labels. + @$pb.TagNumber(26) + $core.bool get cleanDNSLabels => $_getBF(25); + @$pb.TagNumber(26) + set cleanDNSLabels($core.bool value) => $_setBool(25, value); + @$pb.TagNumber(26) + $core.bool hasCleanDNSLabels() => $_has(25); + @$pb.TagNumber(26) + void clearCleanDNSLabels() => $_clearField(26); + + @$pb.TagNumber(27) + $1.Duration get dnsRouteInterval => $_getN(26); + @$pb.TagNumber(27) + set dnsRouteInterval($1.Duration value) => $_setField(27, value); + @$pb.TagNumber(27) + $core.bool hasDnsRouteInterval() => $_has(26); + @$pb.TagNumber(27) + void clearDnsRouteInterval() => $_clearField(27); + @$pb.TagNumber(27) + $1.Duration ensureDnsRouteInterval() => $_ensure(26); + + @$pb.TagNumber(28) + $fixnum.Int64 get mtu => $_getI64(27); + @$pb.TagNumber(28) + set mtu($fixnum.Int64 value) => $_setInt64(27, value); + @$pb.TagNumber(28) + $core.bool hasMtu() => $_has(27); + @$pb.TagNumber(28) + void clearMtu() => $_clearField(28); + + @$pb.TagNumber(29) + $core.bool get enableSSHRoot => $_getBF(28); + @$pb.TagNumber(29) + set enableSSHRoot($core.bool value) => $_setBool(28, value); + @$pb.TagNumber(29) + $core.bool hasEnableSSHRoot() => $_has(28); + @$pb.TagNumber(29) + void clearEnableSSHRoot() => $_clearField(29); + + @$pb.TagNumber(30) + $core.bool get enableSSHSFTP => $_getBF(29); + @$pb.TagNumber(30) + set enableSSHSFTP($core.bool value) => $_setBool(29, value); + @$pb.TagNumber(30) + $core.bool hasEnableSSHSFTP() => $_has(29); + @$pb.TagNumber(30) + void clearEnableSSHSFTP() => $_clearField(30); + + @$pb.TagNumber(31) + $core.bool get enableSSHLocalPortForwarding => $_getBF(30); + @$pb.TagNumber(31) + set enableSSHLocalPortForwarding($core.bool value) => $_setBool(30, value); + @$pb.TagNumber(31) + $core.bool hasEnableSSHLocalPortForwarding() => $_has(30); + @$pb.TagNumber(31) + void clearEnableSSHLocalPortForwarding() => $_clearField(31); + + @$pb.TagNumber(32) + $core.bool get enableSSHRemotePortForwarding => $_getBF(31); + @$pb.TagNumber(32) + set enableSSHRemotePortForwarding($core.bool value) => $_setBool(31, value); + @$pb.TagNumber(32) + $core.bool hasEnableSSHRemotePortForwarding() => $_has(31); + @$pb.TagNumber(32) + void clearEnableSSHRemotePortForwarding() => $_clearField(32); + + @$pb.TagNumber(33) + $core.bool get disableSSHAuth => $_getBF(32); + @$pb.TagNumber(33) + set disableSSHAuth($core.bool value) => $_setBool(32, value); + @$pb.TagNumber(33) + $core.bool hasDisableSSHAuth() => $_has(32); + @$pb.TagNumber(33) + void clearDisableSSHAuth() => $_clearField(33); + + @$pb.TagNumber(34) + $core.int get sshJWTCacheTTL => $_getIZ(33); + @$pb.TagNumber(34) + set sshJWTCacheTTL($core.int value) => $_setSignedInt32(33, value); + @$pb.TagNumber(34) + $core.bool hasSshJWTCacheTTL() => $_has(33); + @$pb.TagNumber(34) + void clearSshJWTCacheTTL() => $_clearField(34); +} + +class SetConfigResponse extends $pb.GeneratedMessage { + factory SetConfigResponse() => create(); + + SetConfigResponse._(); + + factory SetConfigResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SetConfigResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SetConfigResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetConfigResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SetConfigResponse copyWith(void Function(SetConfigResponse) updates) => + super.copyWith((message) => updates(message as SetConfigResponse)) + as SetConfigResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetConfigResponse create() => SetConfigResponse._(); + @$core.override + SetConfigResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SetConfigResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SetConfigResponse? _defaultInstance; +} + +class AddProfileRequest extends $pb.GeneratedMessage { + factory AddProfileRequest({ + $core.String? username, + $core.String? profileName, + }) { + final result = create(); + if (username != null) result.username = username; + if (profileName != null) result.profileName = profileName; + return result; + } + + AddProfileRequest._(); + + factory AddProfileRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory AddProfileRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'AddProfileRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..aOS(2, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + AddProfileRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + AddProfileRequest copyWith(void Function(AddProfileRequest) updates) => + super.copyWith((message) => updates(message as AddProfileRequest)) + as AddProfileRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AddProfileRequest create() => AddProfileRequest._(); + @$core.override + AddProfileRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static AddProfileRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static AddProfileRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get profileName => $_getSZ(1); + @$pb.TagNumber(2) + set profileName($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasProfileName() => $_has(1); + @$pb.TagNumber(2) + void clearProfileName() => $_clearField(2); +} + +class AddProfileResponse extends $pb.GeneratedMessage { + factory AddProfileResponse() => create(); + + AddProfileResponse._(); + + factory AddProfileResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory AddProfileResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'AddProfileResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + AddProfileResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + AddProfileResponse copyWith(void Function(AddProfileResponse) updates) => + super.copyWith((message) => updates(message as AddProfileResponse)) + as AddProfileResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AddProfileResponse create() => AddProfileResponse._(); + @$core.override + AddProfileResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static AddProfileResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static AddProfileResponse? _defaultInstance; +} + +class RemoveProfileRequest extends $pb.GeneratedMessage { + factory RemoveProfileRequest({ + $core.String? username, + $core.String? profileName, + }) { + final result = create(); + if (username != null) result.username = username; + if (profileName != null) result.profileName = profileName; + return result; + } + + RemoveProfileRequest._(); + + factory RemoveProfileRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RemoveProfileRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RemoveProfileRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..aOS(2, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RemoveProfileRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RemoveProfileRequest copyWith(void Function(RemoveProfileRequest) updates) => + super.copyWith((message) => updates(message as RemoveProfileRequest)) + as RemoveProfileRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RemoveProfileRequest create() => RemoveProfileRequest._(); + @$core.override + RemoveProfileRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RemoveProfileRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RemoveProfileRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get profileName => $_getSZ(1); + @$pb.TagNumber(2) + set profileName($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasProfileName() => $_has(1); + @$pb.TagNumber(2) + void clearProfileName() => $_clearField(2); +} + +class RemoveProfileResponse extends $pb.GeneratedMessage { + factory RemoveProfileResponse() => create(); + + RemoveProfileResponse._(); + + factory RemoveProfileResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RemoveProfileResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RemoveProfileResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RemoveProfileResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RemoveProfileResponse copyWith( + void Function(RemoveProfileResponse) updates) => + super.copyWith((message) => updates(message as RemoveProfileResponse)) + as RemoveProfileResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RemoveProfileResponse create() => RemoveProfileResponse._(); + @$core.override + RemoveProfileResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RemoveProfileResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RemoveProfileResponse? _defaultInstance; +} + +class ListProfilesRequest extends $pb.GeneratedMessage { + factory ListProfilesRequest({ + $core.String? username, + }) { + final result = create(); + if (username != null) result.username = username; + return result; + } + + ListProfilesRequest._(); + + factory ListProfilesRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListProfilesRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListProfilesRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListProfilesRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListProfilesRequest copyWith(void Function(ListProfilesRequest) updates) => + super.copyWith((message) => updates(message as ListProfilesRequest)) + as ListProfilesRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListProfilesRequest create() => ListProfilesRequest._(); + @$core.override + ListProfilesRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ListProfilesRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ListProfilesRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => $_clearField(1); +} + +class ListProfilesResponse extends $pb.GeneratedMessage { + factory ListProfilesResponse({ + $core.Iterable? profiles, + }) { + final result = create(); + if (profiles != null) result.profiles.addAll(profiles); + return result; + } + + ListProfilesResponse._(); + + factory ListProfilesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListProfilesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListProfilesResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..pPM(1, _omitFieldNames ? '' : 'profiles', + subBuilder: Profile.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListProfilesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListProfilesResponse copyWith(void Function(ListProfilesResponse) updates) => + super.copyWith((message) => updates(message as ListProfilesResponse)) + as ListProfilesResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListProfilesResponse create() => ListProfilesResponse._(); + @$core.override + ListProfilesResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ListProfilesResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ListProfilesResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get profiles => $_getList(0); +} + +class Profile extends $pb.GeneratedMessage { + factory Profile({ + $core.String? name, + $core.bool? isActive, + }) { + final result = create(); + if (name != null) result.name = name; + if (isActive != null) result.isActive = isActive; + return result; + } + + Profile._(); + + factory Profile.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Profile.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Profile', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOB(2, _omitFieldNames ? '' : 'isActive') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Profile clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Profile copyWith(void Function(Profile) updates) => + super.copyWith((message) => updates(message as Profile)) as Profile; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Profile create() => Profile._(); + @$core.override + Profile createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static Profile getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Profile? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get isActive => $_getBF(1); + @$pb.TagNumber(2) + set isActive($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasIsActive() => $_has(1); + @$pb.TagNumber(2) + void clearIsActive() => $_clearField(2); +} + +class GetActiveProfileRequest extends $pb.GeneratedMessage { + factory GetActiveProfileRequest() => create(); + + GetActiveProfileRequest._(); + + factory GetActiveProfileRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetActiveProfileRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetActiveProfileRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetActiveProfileRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetActiveProfileRequest copyWith( + void Function(GetActiveProfileRequest) updates) => + super.copyWith((message) => updates(message as GetActiveProfileRequest)) + as GetActiveProfileRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetActiveProfileRequest create() => GetActiveProfileRequest._(); + @$core.override + GetActiveProfileRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetActiveProfileRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetActiveProfileRequest? _defaultInstance; +} + +class GetActiveProfileResponse extends $pb.GeneratedMessage { + factory GetActiveProfileResponse({ + $core.String? profileName, + $core.String? username, + }) { + final result = create(); + if (profileName != null) result.profileName = profileName; + if (username != null) result.username = username; + return result; + } + + GetActiveProfileResponse._(); + + factory GetActiveProfileResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetActiveProfileResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetActiveProfileResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(2, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetActiveProfileResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetActiveProfileResponse copyWith( + void Function(GetActiveProfileResponse) updates) => + super.copyWith((message) => updates(message as GetActiveProfileResponse)) + as GetActiveProfileResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetActiveProfileResponse create() => GetActiveProfileResponse._(); + @$core.override + GetActiveProfileResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetActiveProfileResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetActiveProfileResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get profileName => $_getSZ(0); + @$pb.TagNumber(1) + set profileName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProfileName() => $_has(0); + @$pb.TagNumber(1) + void clearProfileName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get username => $_getSZ(1); + @$pb.TagNumber(2) + set username($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUsername() => $_has(1); + @$pb.TagNumber(2) + void clearUsername() => $_clearField(2); +} + +class LogoutRequest extends $pb.GeneratedMessage { + factory LogoutRequest({ + $core.String? profileName, + $core.String? username, + }) { + final result = create(); + if (profileName != null) result.profileName = profileName; + if (username != null) result.username = username; + return result; + } + + LogoutRequest._(); + + factory LogoutRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LogoutRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LogoutRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'profileName', protoName: 'profileName') + ..aOS(2, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogoutRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogoutRequest copyWith(void Function(LogoutRequest) updates) => + super.copyWith((message) => updates(message as LogoutRequest)) + as LogoutRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LogoutRequest create() => LogoutRequest._(); + @$core.override + LogoutRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static LogoutRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static LogoutRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get profileName => $_getSZ(0); + @$pb.TagNumber(1) + set profileName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProfileName() => $_has(0); + @$pb.TagNumber(1) + void clearProfileName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get username => $_getSZ(1); + @$pb.TagNumber(2) + set username($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUsername() => $_has(1); + @$pb.TagNumber(2) + void clearUsername() => $_clearField(2); +} + +class LogoutResponse extends $pb.GeneratedMessage { + factory LogoutResponse() => create(); + + LogoutResponse._(); + + factory LogoutResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LogoutResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LogoutResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogoutResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogoutResponse copyWith(void Function(LogoutResponse) updates) => + super.copyWith((message) => updates(message as LogoutResponse)) + as LogoutResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LogoutResponse create() => LogoutResponse._(); + @$core.override + LogoutResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static LogoutResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static LogoutResponse? _defaultInstance; +} + +class GetFeaturesRequest extends $pb.GeneratedMessage { + factory GetFeaturesRequest() => create(); + + GetFeaturesRequest._(); + + factory GetFeaturesRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetFeaturesRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetFeaturesRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetFeaturesRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetFeaturesRequest copyWith(void Function(GetFeaturesRequest) updates) => + super.copyWith((message) => updates(message as GetFeaturesRequest)) + as GetFeaturesRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetFeaturesRequest create() => GetFeaturesRequest._(); + @$core.override + GetFeaturesRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetFeaturesRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetFeaturesRequest? _defaultInstance; +} + +class GetFeaturesResponse extends $pb.GeneratedMessage { + factory GetFeaturesResponse({ + $core.bool? disableProfiles, + $core.bool? disableUpdateSettings, + $core.bool? disableNetworks, + }) { + final result = create(); + if (disableProfiles != null) result.disableProfiles = disableProfiles; + if (disableUpdateSettings != null) + result.disableUpdateSettings = disableUpdateSettings; + if (disableNetworks != null) result.disableNetworks = disableNetworks; + return result; + } + + GetFeaturesResponse._(); + + factory GetFeaturesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetFeaturesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetFeaturesResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'disableProfiles') + ..aOB(2, _omitFieldNames ? '' : 'disableUpdateSettings') + ..aOB(3, _omitFieldNames ? '' : 'disableNetworks') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetFeaturesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetFeaturesResponse copyWith(void Function(GetFeaturesResponse) updates) => + super.copyWith((message) => updates(message as GetFeaturesResponse)) + as GetFeaturesResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetFeaturesResponse create() => GetFeaturesResponse._(); + @$core.override + GetFeaturesResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetFeaturesResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetFeaturesResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get disableProfiles => $_getBF(0); + @$pb.TagNumber(1) + set disableProfiles($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasDisableProfiles() => $_has(0); + @$pb.TagNumber(1) + void clearDisableProfiles() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get disableUpdateSettings => $_getBF(1); + @$pb.TagNumber(2) + set disableUpdateSettings($core.bool value) => $_setBool(1, value); + @$pb.TagNumber(2) + $core.bool hasDisableUpdateSettings() => $_has(1); + @$pb.TagNumber(2) + void clearDisableUpdateSettings() => $_clearField(2); + + @$pb.TagNumber(3) + $core.bool get disableNetworks => $_getBF(2); + @$pb.TagNumber(3) + set disableNetworks($core.bool value) => $_setBool(2, value); + @$pb.TagNumber(3) + $core.bool hasDisableNetworks() => $_has(2); + @$pb.TagNumber(3) + void clearDisableNetworks() => $_clearField(3); +} + +class TriggerUpdateRequest extends $pb.GeneratedMessage { + factory TriggerUpdateRequest() => create(); + + TriggerUpdateRequest._(); + + factory TriggerUpdateRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TriggerUpdateRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TriggerUpdateRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TriggerUpdateRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TriggerUpdateRequest copyWith(void Function(TriggerUpdateRequest) updates) => + super.copyWith((message) => updates(message as TriggerUpdateRequest)) + as TriggerUpdateRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TriggerUpdateRequest create() => TriggerUpdateRequest._(); + @$core.override + TriggerUpdateRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static TriggerUpdateRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static TriggerUpdateRequest? _defaultInstance; +} + +class TriggerUpdateResponse extends $pb.GeneratedMessage { + factory TriggerUpdateResponse({ + $core.bool? success, + $core.String? errorMsg, + }) { + final result = create(); + if (success != null) result.success = success; + if (errorMsg != null) result.errorMsg = errorMsg; + return result; + } + + TriggerUpdateResponse._(); + + factory TriggerUpdateResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TriggerUpdateResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TriggerUpdateResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'success') + ..aOS(2, _omitFieldNames ? '' : 'errorMsg', protoName: 'errorMsg') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TriggerUpdateResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TriggerUpdateResponse copyWith( + void Function(TriggerUpdateResponse) updates) => + super.copyWith((message) => updates(message as TriggerUpdateResponse)) + as TriggerUpdateResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TriggerUpdateResponse create() => TriggerUpdateResponse._(); + @$core.override + TriggerUpdateResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static TriggerUpdateResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static TriggerUpdateResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get success => $_getBF(0); + @$pb.TagNumber(1) + set success($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasSuccess() => $_has(0); + @$pb.TagNumber(1) + void clearSuccess() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get errorMsg => $_getSZ(1); + @$pb.TagNumber(2) + set errorMsg($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasErrorMsg() => $_has(1); + @$pb.TagNumber(2) + void clearErrorMsg() => $_clearField(2); +} + +/// GetPeerSSHHostKeyRequest for retrieving SSH host key for a specific peer +class GetPeerSSHHostKeyRequest extends $pb.GeneratedMessage { + factory GetPeerSSHHostKeyRequest({ + $core.String? peerAddress, + }) { + final result = create(); + if (peerAddress != null) result.peerAddress = peerAddress; + return result; + } + + GetPeerSSHHostKeyRequest._(); + + factory GetPeerSSHHostKeyRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetPeerSSHHostKeyRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetPeerSSHHostKeyRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'peerAddress', protoName: 'peerAddress') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetPeerSSHHostKeyRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetPeerSSHHostKeyRequest copyWith( + void Function(GetPeerSSHHostKeyRequest) updates) => + super.copyWith((message) => updates(message as GetPeerSSHHostKeyRequest)) + as GetPeerSSHHostKeyRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetPeerSSHHostKeyRequest create() => GetPeerSSHHostKeyRequest._(); + @$core.override + GetPeerSSHHostKeyRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetPeerSSHHostKeyRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetPeerSSHHostKeyRequest? _defaultInstance; + + /// peer IP address or FQDN to get SSH host key for + @$pb.TagNumber(1) + $core.String get peerAddress => $_getSZ(0); + @$pb.TagNumber(1) + set peerAddress($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasPeerAddress() => $_has(0); + @$pb.TagNumber(1) + void clearPeerAddress() => $_clearField(1); +} + +/// GetPeerSSHHostKeyResponse contains the SSH host key for the requested peer +class GetPeerSSHHostKeyResponse extends $pb.GeneratedMessage { + factory GetPeerSSHHostKeyResponse({ + $core.List<$core.int>? sshHostKey, + $core.String? peerIP, + $core.String? peerFQDN, + $core.bool? found, + }) { + final result = create(); + if (sshHostKey != null) result.sshHostKey = sshHostKey; + if (peerIP != null) result.peerIP = peerIP; + if (peerFQDN != null) result.peerFQDN = peerFQDN; + if (found != null) result.found = found; + return result; + } + + GetPeerSSHHostKeyResponse._(); + + factory GetPeerSSHHostKeyResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory GetPeerSSHHostKeyResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetPeerSSHHostKeyResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..a<$core.List<$core.int>>( + 1, _omitFieldNames ? '' : 'sshHostKey', $pb.PbFieldType.OY, + protoName: 'sshHostKey') + ..aOS(2, _omitFieldNames ? '' : 'peerIP', protoName: 'peerIP') + ..aOS(3, _omitFieldNames ? '' : 'peerFQDN', protoName: 'peerFQDN') + ..aOB(4, _omitFieldNames ? '' : 'found') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetPeerSSHHostKeyResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetPeerSSHHostKeyResponse copyWith( + void Function(GetPeerSSHHostKeyResponse) updates) => + super.copyWith((message) => updates(message as GetPeerSSHHostKeyResponse)) + as GetPeerSSHHostKeyResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetPeerSSHHostKeyResponse create() => GetPeerSSHHostKeyResponse._(); + @$core.override + GetPeerSSHHostKeyResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static GetPeerSSHHostKeyResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static GetPeerSSHHostKeyResponse? _defaultInstance; + + /// SSH host key in SSH public key format (e.g., "ssh-ed25519 AAAAC3... hostname") + @$pb.TagNumber(1) + $core.List<$core.int> get sshHostKey => $_getN(0); + @$pb.TagNumber(1) + set sshHostKey($core.List<$core.int> value) => $_setBytes(0, value); + @$pb.TagNumber(1) + $core.bool hasSshHostKey() => $_has(0); + @$pb.TagNumber(1) + void clearSshHostKey() => $_clearField(1); + + /// peer IP address + @$pb.TagNumber(2) + $core.String get peerIP => $_getSZ(1); + @$pb.TagNumber(2) + set peerIP($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasPeerIP() => $_has(1); + @$pb.TagNumber(2) + void clearPeerIP() => $_clearField(2); + + /// peer FQDN + @$pb.TagNumber(3) + $core.String get peerFQDN => $_getSZ(2); + @$pb.TagNumber(3) + set peerFQDN($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasPeerFQDN() => $_has(2); + @$pb.TagNumber(3) + void clearPeerFQDN() => $_clearField(3); + + /// indicates if the SSH host key was found + @$pb.TagNumber(4) + $core.bool get found => $_getBF(3); + @$pb.TagNumber(4) + set found($core.bool value) => $_setBool(3, value); + @$pb.TagNumber(4) + $core.bool hasFound() => $_has(3); + @$pb.TagNumber(4) + void clearFound() => $_clearField(4); +} + +/// RequestJWTAuthRequest for initiating JWT authentication flow +class RequestJWTAuthRequest extends $pb.GeneratedMessage { + factory RequestJWTAuthRequest({ + $core.String? hint, + }) { + final result = create(); + if (hint != null) result.hint = hint; + return result; + } + + RequestJWTAuthRequest._(); + + factory RequestJWTAuthRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RequestJWTAuthRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RequestJWTAuthRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'hint') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RequestJWTAuthRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RequestJWTAuthRequest copyWith( + void Function(RequestJWTAuthRequest) updates) => + super.copyWith((message) => updates(message as RequestJWTAuthRequest)) + as RequestJWTAuthRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RequestJWTAuthRequest create() => RequestJWTAuthRequest._(); + @$core.override + RequestJWTAuthRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RequestJWTAuthRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RequestJWTAuthRequest? _defaultInstance; + + /// hint for OIDC login_hint parameter (typically email address) + @$pb.TagNumber(1) + $core.String get hint => $_getSZ(0); + @$pb.TagNumber(1) + set hint($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasHint() => $_has(0); + @$pb.TagNumber(1) + void clearHint() => $_clearField(1); +} + +/// RequestJWTAuthResponse contains authentication flow information +class RequestJWTAuthResponse extends $pb.GeneratedMessage { + factory RequestJWTAuthResponse({ + $core.String? verificationURI, + $core.String? verificationURIComplete, + $core.String? userCode, + $core.String? deviceCode, + $fixnum.Int64? expiresIn, + $core.String? cachedToken, + $fixnum.Int64? maxTokenAge, + }) { + final result = create(); + if (verificationURI != null) result.verificationURI = verificationURI; + if (verificationURIComplete != null) + result.verificationURIComplete = verificationURIComplete; + if (userCode != null) result.userCode = userCode; + if (deviceCode != null) result.deviceCode = deviceCode; + if (expiresIn != null) result.expiresIn = expiresIn; + if (cachedToken != null) result.cachedToken = cachedToken; + if (maxTokenAge != null) result.maxTokenAge = maxTokenAge; + return result; + } + + RequestJWTAuthResponse._(); + + factory RequestJWTAuthResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RequestJWTAuthResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RequestJWTAuthResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'verificationURI', + protoName: 'verificationURI') + ..aOS(2, _omitFieldNames ? '' : 'verificationURIComplete', + protoName: 'verificationURIComplete') + ..aOS(3, _omitFieldNames ? '' : 'userCode', protoName: 'userCode') + ..aOS(4, _omitFieldNames ? '' : 'deviceCode', protoName: 'deviceCode') + ..aInt64(5, _omitFieldNames ? '' : 'expiresIn', protoName: 'expiresIn') + ..aOS(6, _omitFieldNames ? '' : 'cachedToken', protoName: 'cachedToken') + ..aInt64(7, _omitFieldNames ? '' : 'maxTokenAge', protoName: 'maxTokenAge') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RequestJWTAuthResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RequestJWTAuthResponse copyWith( + void Function(RequestJWTAuthResponse) updates) => + super.copyWith((message) => updates(message as RequestJWTAuthResponse)) + as RequestJWTAuthResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RequestJWTAuthResponse create() => RequestJWTAuthResponse._(); + @$core.override + RequestJWTAuthResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RequestJWTAuthResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RequestJWTAuthResponse? _defaultInstance; + + /// verification URI for user authentication + @$pb.TagNumber(1) + $core.String get verificationURI => $_getSZ(0); + @$pb.TagNumber(1) + set verificationURI($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasVerificationURI() => $_has(0); + @$pb.TagNumber(1) + void clearVerificationURI() => $_clearField(1); + + /// complete verification URI (with embedded user code) + @$pb.TagNumber(2) + $core.String get verificationURIComplete => $_getSZ(1); + @$pb.TagNumber(2) + set verificationURIComplete($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasVerificationURIComplete() => $_has(1); + @$pb.TagNumber(2) + void clearVerificationURIComplete() => $_clearField(2); + + /// user code to enter on verification URI + @$pb.TagNumber(3) + $core.String get userCode => $_getSZ(2); + @$pb.TagNumber(3) + set userCode($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasUserCode() => $_has(2); + @$pb.TagNumber(3) + void clearUserCode() => $_clearField(3); + + /// device code for polling + @$pb.TagNumber(4) + $core.String get deviceCode => $_getSZ(3); + @$pb.TagNumber(4) + set deviceCode($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasDeviceCode() => $_has(3); + @$pb.TagNumber(4) + void clearDeviceCode() => $_clearField(4); + + /// expiration time in seconds + @$pb.TagNumber(5) + $fixnum.Int64 get expiresIn => $_getI64(4); + @$pb.TagNumber(5) + set expiresIn($fixnum.Int64 value) => $_setInt64(4, value); + @$pb.TagNumber(5) + $core.bool hasExpiresIn() => $_has(4); + @$pb.TagNumber(5) + void clearExpiresIn() => $_clearField(5); + + /// if a cached token is available, it will be returned here + @$pb.TagNumber(6) + $core.String get cachedToken => $_getSZ(5); + @$pb.TagNumber(6) + set cachedToken($core.String value) => $_setString(5, value); + @$pb.TagNumber(6) + $core.bool hasCachedToken() => $_has(5); + @$pb.TagNumber(6) + void clearCachedToken() => $_clearField(6); + + /// maximum age of JWT tokens in seconds (from management server) + @$pb.TagNumber(7) + $fixnum.Int64 get maxTokenAge => $_getI64(6); + @$pb.TagNumber(7) + set maxTokenAge($fixnum.Int64 value) => $_setInt64(6, value); + @$pb.TagNumber(7) + $core.bool hasMaxTokenAge() => $_has(6); + @$pb.TagNumber(7) + void clearMaxTokenAge() => $_clearField(7); +} + +/// WaitJWTTokenRequest for waiting for authentication completion +class WaitJWTTokenRequest extends $pb.GeneratedMessage { + factory WaitJWTTokenRequest({ + $core.String? deviceCode, + $core.String? userCode, + }) { + final result = create(); + if (deviceCode != null) result.deviceCode = deviceCode; + if (userCode != null) result.userCode = userCode; + return result; + } + + WaitJWTTokenRequest._(); + + factory WaitJWTTokenRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WaitJWTTokenRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WaitJWTTokenRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceCode', protoName: 'deviceCode') + ..aOS(2, _omitFieldNames ? '' : 'userCode', protoName: 'userCode') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitJWTTokenRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitJWTTokenRequest copyWith(void Function(WaitJWTTokenRequest) updates) => + super.copyWith((message) => updates(message as WaitJWTTokenRequest)) + as WaitJWTTokenRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WaitJWTTokenRequest create() => WaitJWTTokenRequest._(); + @$core.override + WaitJWTTokenRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static WaitJWTTokenRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static WaitJWTTokenRequest? _defaultInstance; + + /// device code from RequestJWTAuthResponse + @$pb.TagNumber(1) + $core.String get deviceCode => $_getSZ(0); + @$pb.TagNumber(1) + set deviceCode($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasDeviceCode() => $_has(0); + @$pb.TagNumber(1) + void clearDeviceCode() => $_clearField(1); + + /// user code for verification + @$pb.TagNumber(2) + $core.String get userCode => $_getSZ(1); + @$pb.TagNumber(2) + set userCode($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasUserCode() => $_has(1); + @$pb.TagNumber(2) + void clearUserCode() => $_clearField(2); +} + +/// WaitJWTTokenResponse contains the JWT token after authentication +class WaitJWTTokenResponse extends $pb.GeneratedMessage { + factory WaitJWTTokenResponse({ + $core.String? token, + $core.String? tokenType, + $fixnum.Int64? expiresIn, + }) { + final result = create(); + if (token != null) result.token = token; + if (tokenType != null) result.tokenType = tokenType; + if (expiresIn != null) result.expiresIn = expiresIn; + return result; + } + + WaitJWTTokenResponse._(); + + factory WaitJWTTokenResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WaitJWTTokenResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WaitJWTTokenResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'token') + ..aOS(2, _omitFieldNames ? '' : 'tokenType', protoName: 'tokenType') + ..aInt64(3, _omitFieldNames ? '' : 'expiresIn', protoName: 'expiresIn') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitJWTTokenResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WaitJWTTokenResponse copyWith(void Function(WaitJWTTokenResponse) updates) => + super.copyWith((message) => updates(message as WaitJWTTokenResponse)) + as WaitJWTTokenResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WaitJWTTokenResponse create() => WaitJWTTokenResponse._(); + @$core.override + WaitJWTTokenResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static WaitJWTTokenResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static WaitJWTTokenResponse? _defaultInstance; + + /// JWT token (access token or ID token) + @$pb.TagNumber(1) + $core.String get token => $_getSZ(0); + @$pb.TagNumber(1) + set token($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasToken() => $_has(0); + @$pb.TagNumber(1) + void clearToken() => $_clearField(1); + + /// token type (e.g., "Bearer") + @$pb.TagNumber(2) + $core.String get tokenType => $_getSZ(1); + @$pb.TagNumber(2) + set tokenType($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasTokenType() => $_has(1); + @$pb.TagNumber(2) + void clearTokenType() => $_clearField(2); + + /// expiration time in seconds + @$pb.TagNumber(3) + $fixnum.Int64 get expiresIn => $_getI64(2); + @$pb.TagNumber(3) + set expiresIn($fixnum.Int64 value) => $_setInt64(2, value); + @$pb.TagNumber(3) + $core.bool hasExpiresIn() => $_has(2); + @$pb.TagNumber(3) + void clearExpiresIn() => $_clearField(3); +} + +/// StartCPUProfileRequest for starting CPU profiling +class StartCPUProfileRequest extends $pb.GeneratedMessage { + factory StartCPUProfileRequest() => create(); + + StartCPUProfileRequest._(); + + factory StartCPUProfileRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StartCPUProfileRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StartCPUProfileRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StartCPUProfileRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StartCPUProfileRequest copyWith( + void Function(StartCPUProfileRequest) updates) => + super.copyWith((message) => updates(message as StartCPUProfileRequest)) + as StartCPUProfileRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StartCPUProfileRequest create() => StartCPUProfileRequest._(); + @$core.override + StartCPUProfileRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static StartCPUProfileRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static StartCPUProfileRequest? _defaultInstance; +} + +/// StartCPUProfileResponse confirms CPU profiling has started +class StartCPUProfileResponse extends $pb.GeneratedMessage { + factory StartCPUProfileResponse() => create(); + + StartCPUProfileResponse._(); + + factory StartCPUProfileResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StartCPUProfileResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StartCPUProfileResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StartCPUProfileResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StartCPUProfileResponse copyWith( + void Function(StartCPUProfileResponse) updates) => + super.copyWith((message) => updates(message as StartCPUProfileResponse)) + as StartCPUProfileResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StartCPUProfileResponse create() => StartCPUProfileResponse._(); + @$core.override + StartCPUProfileResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static StartCPUProfileResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static StartCPUProfileResponse? _defaultInstance; +} + +/// StopCPUProfileRequest for stopping CPU profiling +class StopCPUProfileRequest extends $pb.GeneratedMessage { + factory StopCPUProfileRequest() => create(); + + StopCPUProfileRequest._(); + + factory StopCPUProfileRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StopCPUProfileRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StopCPUProfileRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StopCPUProfileRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StopCPUProfileRequest copyWith( + void Function(StopCPUProfileRequest) updates) => + super.copyWith((message) => updates(message as StopCPUProfileRequest)) + as StopCPUProfileRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StopCPUProfileRequest create() => StopCPUProfileRequest._(); + @$core.override + StopCPUProfileRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static StopCPUProfileRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static StopCPUProfileRequest? _defaultInstance; +} + +/// StopCPUProfileResponse confirms CPU profiling has stopped +class StopCPUProfileResponse extends $pb.GeneratedMessage { + factory StopCPUProfileResponse() => create(); + + StopCPUProfileResponse._(); + + factory StopCPUProfileResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StopCPUProfileResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StopCPUProfileResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StopCPUProfileResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StopCPUProfileResponse copyWith( + void Function(StopCPUProfileResponse) updates) => + super.copyWith((message) => updates(message as StopCPUProfileResponse)) + as StopCPUProfileResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StopCPUProfileResponse create() => StopCPUProfileResponse._(); + @$core.override + StopCPUProfileResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static StopCPUProfileResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static StopCPUProfileResponse? _defaultInstance; +} + +class InstallerResultRequest extends $pb.GeneratedMessage { + factory InstallerResultRequest() => create(); + + InstallerResultRequest._(); + + factory InstallerResultRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory InstallerResultRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'InstallerResultRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallerResultRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallerResultRequest copyWith( + void Function(InstallerResultRequest) updates) => + super.copyWith((message) => updates(message as InstallerResultRequest)) + as InstallerResultRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InstallerResultRequest create() => InstallerResultRequest._(); + @$core.override + InstallerResultRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static InstallerResultRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static InstallerResultRequest? _defaultInstance; +} + +class InstallerResultResponse extends $pb.GeneratedMessage { + factory InstallerResultResponse({ + $core.bool? success, + $core.String? errorMsg, + }) { + final result = create(); + if (success != null) result.success = success; + if (errorMsg != null) result.errorMsg = errorMsg; + return result; + } + + InstallerResultResponse._(); + + factory InstallerResultResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory InstallerResultResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'InstallerResultResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'success') + ..aOS(2, _omitFieldNames ? '' : 'errorMsg', protoName: 'errorMsg') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallerResultResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallerResultResponse copyWith( + void Function(InstallerResultResponse) updates) => + super.copyWith((message) => updates(message as InstallerResultResponse)) + as InstallerResultResponse; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InstallerResultResponse create() => InstallerResultResponse._(); + @$core.override + InstallerResultResponse createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static InstallerResultResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static InstallerResultResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get success => $_getBF(0); + @$pb.TagNumber(1) + set success($core.bool value) => $_setBool(0, value); + @$pb.TagNumber(1) + $core.bool hasSuccess() => $_has(0); + @$pb.TagNumber(1) + void clearSuccess() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get errorMsg => $_getSZ(1); + @$pb.TagNumber(2) + set errorMsg($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasErrorMsg() => $_has(1); + @$pb.TagNumber(2) + void clearErrorMsg() => $_clearField(2); +} + +class ExposeServiceRequest extends $pb.GeneratedMessage { + factory ExposeServiceRequest({ + $core.int? port, + ExposeProtocol? protocol, + $core.String? pin, + $core.String? password, + $core.Iterable<$core.String>? userGroups, + $core.String? domain, + $core.String? namePrefix, + $core.int? listenPort, + }) { + final result = create(); + if (port != null) result.port = port; + if (protocol != null) result.protocol = protocol; + if (pin != null) result.pin = pin; + if (password != null) result.password = password; + if (userGroups != null) result.userGroups.addAll(userGroups); + if (domain != null) result.domain = domain; + if (namePrefix != null) result.namePrefix = namePrefix; + if (listenPort != null) result.listenPort = listenPort; + return result; + } + + ExposeServiceRequest._(); + + factory ExposeServiceRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ExposeServiceRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ExposeServiceRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aI(1, _omitFieldNames ? '' : 'port', fieldType: $pb.PbFieldType.OU3) + ..aE(2, _omitFieldNames ? '' : 'protocol', + enumValues: ExposeProtocol.values) + ..aOS(3, _omitFieldNames ? '' : 'pin') + ..aOS(4, _omitFieldNames ? '' : 'password') + ..pPS(5, _omitFieldNames ? '' : 'userGroups') + ..aOS(6, _omitFieldNames ? '' : 'domain') + ..aOS(7, _omitFieldNames ? '' : 'namePrefix') + ..aI(8, _omitFieldNames ? '' : 'listenPort', fieldType: $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExposeServiceRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExposeServiceRequest copyWith(void Function(ExposeServiceRequest) updates) => + super.copyWith((message) => updates(message as ExposeServiceRequest)) + as ExposeServiceRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExposeServiceRequest create() => ExposeServiceRequest._(); + @$core.override + ExposeServiceRequest createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ExposeServiceRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ExposeServiceRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get port => $_getIZ(0); + @$pb.TagNumber(1) + set port($core.int value) => $_setUnsignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasPort() => $_has(0); + @$pb.TagNumber(1) + void clearPort() => $_clearField(1); + + @$pb.TagNumber(2) + ExposeProtocol get protocol => $_getN(1); + @$pb.TagNumber(2) + set protocol(ExposeProtocol value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasProtocol() => $_has(1); + @$pb.TagNumber(2) + void clearProtocol() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get pin => $_getSZ(2); + @$pb.TagNumber(3) + set pin($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasPin() => $_has(2); + @$pb.TagNumber(3) + void clearPin() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get password => $_getSZ(3); + @$pb.TagNumber(4) + set password($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasPassword() => $_has(3); + @$pb.TagNumber(4) + void clearPassword() => $_clearField(4); + + @$pb.TagNumber(5) + $pb.PbList<$core.String> get userGroups => $_getList(4); + + @$pb.TagNumber(6) + $core.String get domain => $_getSZ(5); + @$pb.TagNumber(6) + set domain($core.String value) => $_setString(5, value); + @$pb.TagNumber(6) + $core.bool hasDomain() => $_has(5); + @$pb.TagNumber(6) + void clearDomain() => $_clearField(6); + + @$pb.TagNumber(7) + $core.String get namePrefix => $_getSZ(6); + @$pb.TagNumber(7) + set namePrefix($core.String value) => $_setString(6, value); + @$pb.TagNumber(7) + $core.bool hasNamePrefix() => $_has(6); + @$pb.TagNumber(7) + void clearNamePrefix() => $_clearField(7); + + @$pb.TagNumber(8) + $core.int get listenPort => $_getIZ(7); + @$pb.TagNumber(8) + set listenPort($core.int value) => $_setUnsignedInt32(7, value); + @$pb.TagNumber(8) + $core.bool hasListenPort() => $_has(7); + @$pb.TagNumber(8) + void clearListenPort() => $_clearField(8); +} + +enum ExposeServiceEvent_Event { ready, notSet } + +class ExposeServiceEvent extends $pb.GeneratedMessage { + factory ExposeServiceEvent({ + ExposeServiceReady? ready, + }) { + final result = create(); + if (ready != null) result.ready = ready; + return result; + } + + ExposeServiceEvent._(); + + factory ExposeServiceEvent.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ExposeServiceEvent.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, ExposeServiceEvent_Event> + _ExposeServiceEvent_EventByTag = { + 1: ExposeServiceEvent_Event.ready, + 0: ExposeServiceEvent_Event.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ExposeServiceEvent', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..oo(0, [1]) + ..aOM(1, _omitFieldNames ? '' : 'ready', + subBuilder: ExposeServiceReady.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExposeServiceEvent clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExposeServiceEvent copyWith(void Function(ExposeServiceEvent) updates) => + super.copyWith((message) => updates(message as ExposeServiceEvent)) + as ExposeServiceEvent; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExposeServiceEvent create() => ExposeServiceEvent._(); + @$core.override + ExposeServiceEvent createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ExposeServiceEvent getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ExposeServiceEvent? _defaultInstance; + + @$pb.TagNumber(1) + ExposeServiceEvent_Event whichEvent() => + _ExposeServiceEvent_EventByTag[$_whichOneof(0)]!; + @$pb.TagNumber(1) + void clearEvent() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + ExposeServiceReady get ready => $_getN(0); + @$pb.TagNumber(1) + set ready(ExposeServiceReady value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasReady() => $_has(0); + @$pb.TagNumber(1) + void clearReady() => $_clearField(1); + @$pb.TagNumber(1) + ExposeServiceReady ensureReady() => $_ensure(0); +} + +class ExposeServiceReady extends $pb.GeneratedMessage { + factory ExposeServiceReady({ + $core.String? serviceName, + $core.String? serviceUrl, + $core.String? domain, + $core.bool? portAutoAssigned, + }) { + final result = create(); + if (serviceName != null) result.serviceName = serviceName; + if (serviceUrl != null) result.serviceUrl = serviceUrl; + if (domain != null) result.domain = domain; + if (portAutoAssigned != null) result.portAutoAssigned = portAutoAssigned; + return result; + } + + ExposeServiceReady._(); + + factory ExposeServiceReady.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ExposeServiceReady.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ExposeServiceReady', + package: const $pb.PackageName(_omitMessageNames ? '' : 'daemon'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'serviceName') + ..aOS(2, _omitFieldNames ? '' : 'serviceUrl') + ..aOS(3, _omitFieldNames ? '' : 'domain') + ..aOB(4, _omitFieldNames ? '' : 'portAutoAssigned') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExposeServiceReady clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExposeServiceReady copyWith(void Function(ExposeServiceReady) updates) => + super.copyWith((message) => updates(message as ExposeServiceReady)) + as ExposeServiceReady; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExposeServiceReady create() => ExposeServiceReady._(); + @$core.override + ExposeServiceReady createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ExposeServiceReady getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ExposeServiceReady? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get serviceName => $_getSZ(0); + @$pb.TagNumber(1) + set serviceName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasServiceName() => $_has(0); + @$pb.TagNumber(1) + void clearServiceName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get serviceUrl => $_getSZ(1); + @$pb.TagNumber(2) + set serviceUrl($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasServiceUrl() => $_has(1); + @$pb.TagNumber(2) + void clearServiceUrl() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get domain => $_getSZ(2); + @$pb.TagNumber(3) + set domain($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasDomain() => $_has(2); + @$pb.TagNumber(3) + void clearDomain() => $_clearField(3); + + @$pb.TagNumber(4) + $core.bool get portAutoAssigned => $_getBF(3); + @$pb.TagNumber(4) + set portAutoAssigned($core.bool value) => $_setBool(3, value); + @$pb.TagNumber(4) + $core.bool hasPortAutoAssigned() => $_has(3); + @$pb.TagNumber(4) + void clearPortAutoAssigned() => $_clearField(4); +} + +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/client/flutter_ui/lib/src/generated/daemon.pbenum.dart b/client/flutter_ui/lib/src/generated/daemon.pbenum.dart new file mode 100644 index 000000000..bd2be46b4 --- /dev/null +++ b/client/flutter_ui/lib/src/generated/daemon.pbenum.dart @@ -0,0 +1,153 @@ +// This is a generated file - do not edit. +// +// Generated from daemon.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class LogLevel extends $pb.ProtobufEnum { + static const LogLevel UNKNOWN = + LogLevel._(0, _omitEnumNames ? '' : 'UNKNOWN'); + static const LogLevel PANIC = LogLevel._(1, _omitEnumNames ? '' : 'PANIC'); + static const LogLevel FATAL = LogLevel._(2, _omitEnumNames ? '' : 'FATAL'); + static const LogLevel ERROR = LogLevel._(3, _omitEnumNames ? '' : 'ERROR'); + static const LogLevel WARN = LogLevel._(4, _omitEnumNames ? '' : 'WARN'); + static const LogLevel INFO = LogLevel._(5, _omitEnumNames ? '' : 'INFO'); + static const LogLevel DEBUG = LogLevel._(6, _omitEnumNames ? '' : 'DEBUG'); + static const LogLevel TRACE = LogLevel._(7, _omitEnumNames ? '' : 'TRACE'); + + static const $core.List values = [ + UNKNOWN, + PANIC, + FATAL, + ERROR, + WARN, + INFO, + DEBUG, + TRACE, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 7); + static LogLevel? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const LogLevel._(super.value, super.name); +} + +class ExposeProtocol extends $pb.ProtobufEnum { + static const ExposeProtocol EXPOSE_HTTP = + ExposeProtocol._(0, _omitEnumNames ? '' : 'EXPOSE_HTTP'); + static const ExposeProtocol EXPOSE_HTTPS = + ExposeProtocol._(1, _omitEnumNames ? '' : 'EXPOSE_HTTPS'); + static const ExposeProtocol EXPOSE_TCP = + ExposeProtocol._(2, _omitEnumNames ? '' : 'EXPOSE_TCP'); + static const ExposeProtocol EXPOSE_UDP = + ExposeProtocol._(3, _omitEnumNames ? '' : 'EXPOSE_UDP'); + static const ExposeProtocol EXPOSE_TLS = + ExposeProtocol._(4, _omitEnumNames ? '' : 'EXPOSE_TLS'); + + static const $core.List values = [ + EXPOSE_HTTP, + EXPOSE_HTTPS, + EXPOSE_TCP, + EXPOSE_UDP, + EXPOSE_TLS, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 4); + static ExposeProtocol? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const ExposeProtocol._(super.value, super.name); +} + +/// avoid collision with loglevel enum +class OSLifecycleRequest_CycleType extends $pb.ProtobufEnum { + static const OSLifecycleRequest_CycleType UNKNOWN = + OSLifecycleRequest_CycleType._(0, _omitEnumNames ? '' : 'UNKNOWN'); + static const OSLifecycleRequest_CycleType SLEEP = + OSLifecycleRequest_CycleType._(1, _omitEnumNames ? '' : 'SLEEP'); + static const OSLifecycleRequest_CycleType WAKEUP = + OSLifecycleRequest_CycleType._(2, _omitEnumNames ? '' : 'WAKEUP'); + + static const $core.List values = + [ + UNKNOWN, + SLEEP, + WAKEUP, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 2); + static OSLifecycleRequest_CycleType? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const OSLifecycleRequest_CycleType._(super.value, super.name); +} + +class SystemEvent_Severity extends $pb.ProtobufEnum { + static const SystemEvent_Severity INFO = + SystemEvent_Severity._(0, _omitEnumNames ? '' : 'INFO'); + static const SystemEvent_Severity WARNING = + SystemEvent_Severity._(1, _omitEnumNames ? '' : 'WARNING'); + static const SystemEvent_Severity ERROR = + SystemEvent_Severity._(2, _omitEnumNames ? '' : 'ERROR'); + static const SystemEvent_Severity CRITICAL = + SystemEvent_Severity._(3, _omitEnumNames ? '' : 'CRITICAL'); + + static const $core.List values = [ + INFO, + WARNING, + ERROR, + CRITICAL, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 3); + static SystemEvent_Severity? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const SystemEvent_Severity._(super.value, super.name); +} + +class SystemEvent_Category extends $pb.ProtobufEnum { + static const SystemEvent_Category NETWORK = + SystemEvent_Category._(0, _omitEnumNames ? '' : 'NETWORK'); + static const SystemEvent_Category DNS = + SystemEvent_Category._(1, _omitEnumNames ? '' : 'DNS'); + static const SystemEvent_Category AUTHENTICATION = + SystemEvent_Category._(2, _omitEnumNames ? '' : 'AUTHENTICATION'); + static const SystemEvent_Category CONNECTIVITY = + SystemEvent_Category._(3, _omitEnumNames ? '' : 'CONNECTIVITY'); + static const SystemEvent_Category SYSTEM = + SystemEvent_Category._(4, _omitEnumNames ? '' : 'SYSTEM'); + + static const $core.List values = [ + NETWORK, + DNS, + AUTHENTICATION, + CONNECTIVITY, + SYSTEM, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 4); + static SystemEvent_Category? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const SystemEvent_Category._(super.value, super.name); +} + +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/client/flutter_ui/lib/src/generated/daemon.pbgrpc.dart b/client/flutter_ui/lib/src/generated/daemon.pbgrpc.dart new file mode 100644 index 000000000..4c4942b76 --- /dev/null +++ b/client/flutter_ui/lib/src/generated/daemon.pbgrpc.dart @@ -0,0 +1,1141 @@ +// This is a generated file - do not edit. +// +// Generated from daemon.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'daemon.pb.dart' as $0; + +export 'daemon.pb.dart'; + +@$pb.GrpcServiceName('daemon.DaemonService') +class DaemonServiceClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = ''; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; + + DaemonServiceClient(super.channel, {super.options, super.interceptors}); + + /// Login uses setup key to prepare configuration for the daemon. + $grpc.ResponseFuture<$0.LoginResponse> login( + $0.LoginRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$login, request, options: options); + } + + /// WaitSSOLogin uses the userCode to validate the TokenInfo and + /// waits for the user to continue with the login on a browser + $grpc.ResponseFuture<$0.WaitSSOLoginResponse> waitSSOLogin( + $0.WaitSSOLoginRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$waitSSOLogin, request, options: options); + } + + /// Up starts engine work in the daemon. + $grpc.ResponseFuture<$0.UpResponse> up( + $0.UpRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$up, request, options: options); + } + + /// Status of the service. + $grpc.ResponseFuture<$0.StatusResponse> status( + $0.StatusRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$status, request, options: options); + } + + /// Down stops engine work in the daemon. + $grpc.ResponseFuture<$0.DownResponse> down( + $0.DownRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$down, request, options: options); + } + + /// GetConfig of the daemon. + $grpc.ResponseFuture<$0.GetConfigResponse> getConfig( + $0.GetConfigRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getConfig, request, options: options); + } + + /// List available networks + $grpc.ResponseFuture<$0.ListNetworksResponse> listNetworks( + $0.ListNetworksRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$listNetworks, request, options: options); + } + + /// Select specific routes + $grpc.ResponseFuture<$0.SelectNetworksResponse> selectNetworks( + $0.SelectNetworksRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$selectNetworks, request, options: options); + } + + /// Deselect specific routes + $grpc.ResponseFuture<$0.SelectNetworksResponse> deselectNetworks( + $0.SelectNetworksRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$deselectNetworks, request, options: options); + } + + $grpc.ResponseFuture<$0.ForwardingRulesResponse> forwardingRules( + $0.EmptyRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$forwardingRules, request, options: options); + } + + /// DebugBundle creates a debug bundle + $grpc.ResponseFuture<$0.DebugBundleResponse> debugBundle( + $0.DebugBundleRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$debugBundle, request, options: options); + } + + /// GetLogLevel gets the log level of the daemon + $grpc.ResponseFuture<$0.GetLogLevelResponse> getLogLevel( + $0.GetLogLevelRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getLogLevel, request, options: options); + } + + /// SetLogLevel sets the log level of the daemon + $grpc.ResponseFuture<$0.SetLogLevelResponse> setLogLevel( + $0.SetLogLevelRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$setLogLevel, request, options: options); + } + + /// List all states + $grpc.ResponseFuture<$0.ListStatesResponse> listStates( + $0.ListStatesRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$listStates, request, options: options); + } + + /// Clean specific state or all states + $grpc.ResponseFuture<$0.CleanStateResponse> cleanState( + $0.CleanStateRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$cleanState, request, options: options); + } + + /// Delete specific state or all states + $grpc.ResponseFuture<$0.DeleteStateResponse> deleteState( + $0.DeleteStateRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$deleteState, request, options: options); + } + + /// SetSyncResponsePersistence enables or disables sync response persistence + $grpc.ResponseFuture<$0.SetSyncResponsePersistenceResponse> + setSyncResponsePersistence( + $0.SetSyncResponsePersistenceRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$setSyncResponsePersistence, request, + options: options); + } + + $grpc.ResponseFuture<$0.TracePacketResponse> tracePacket( + $0.TracePacketRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$tracePacket, request, options: options); + } + + $grpc.ResponseStream<$0.SystemEvent> subscribeEvents( + $0.SubscribeRequest request, { + $grpc.CallOptions? options, + }) { + return $createStreamingCall( + _$subscribeEvents, $async.Stream.fromIterable([request]), + options: options); + } + + $grpc.ResponseFuture<$0.GetEventsResponse> getEvents( + $0.GetEventsRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getEvents, request, options: options); + } + + $grpc.ResponseFuture<$0.SwitchProfileResponse> switchProfile( + $0.SwitchProfileRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$switchProfile, request, options: options); + } + + $grpc.ResponseFuture<$0.SetConfigResponse> setConfig( + $0.SetConfigRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$setConfig, request, options: options); + } + + $grpc.ResponseFuture<$0.AddProfileResponse> addProfile( + $0.AddProfileRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$addProfile, request, options: options); + } + + $grpc.ResponseFuture<$0.RemoveProfileResponse> removeProfile( + $0.RemoveProfileRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$removeProfile, request, options: options); + } + + $grpc.ResponseFuture<$0.ListProfilesResponse> listProfiles( + $0.ListProfilesRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$listProfiles, request, options: options); + } + + $grpc.ResponseFuture<$0.GetActiveProfileResponse> getActiveProfile( + $0.GetActiveProfileRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getActiveProfile, request, options: options); + } + + /// Logout disconnects from the network and deletes the peer from the management server + $grpc.ResponseFuture<$0.LogoutResponse> logout( + $0.LogoutRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$logout, request, options: options); + } + + $grpc.ResponseFuture<$0.GetFeaturesResponse> getFeatures( + $0.GetFeaturesRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getFeatures, request, options: options); + } + + /// TriggerUpdate initiates installation of the pending enforced version. + /// Called when the user clicks the install button in the UI (Mode 2 / enforced update). + $grpc.ResponseFuture<$0.TriggerUpdateResponse> triggerUpdate( + $0.TriggerUpdateRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$triggerUpdate, request, options: options); + } + + /// GetPeerSSHHostKey retrieves SSH host key for a specific peer + $grpc.ResponseFuture<$0.GetPeerSSHHostKeyResponse> getPeerSSHHostKey( + $0.GetPeerSSHHostKeyRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getPeerSSHHostKey, request, options: options); + } + + /// RequestJWTAuth initiates JWT authentication flow for SSH + $grpc.ResponseFuture<$0.RequestJWTAuthResponse> requestJWTAuth( + $0.RequestJWTAuthRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$requestJWTAuth, request, options: options); + } + + /// WaitJWTToken waits for JWT authentication completion + $grpc.ResponseFuture<$0.WaitJWTTokenResponse> waitJWTToken( + $0.WaitJWTTokenRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$waitJWTToken, request, options: options); + } + + /// StartCPUProfile starts CPU profiling in the daemon + $grpc.ResponseFuture<$0.StartCPUProfileResponse> startCPUProfile( + $0.StartCPUProfileRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$startCPUProfile, request, options: options); + } + + /// StopCPUProfile stops CPU profiling in the daemon + $grpc.ResponseFuture<$0.StopCPUProfileResponse> stopCPUProfile( + $0.StopCPUProfileRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$stopCPUProfile, request, options: options); + } + + $grpc.ResponseFuture<$0.OSLifecycleResponse> notifyOSLifecycle( + $0.OSLifecycleRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$notifyOSLifecycle, request, options: options); + } + + $grpc.ResponseFuture<$0.InstallerResultResponse> getInstallerResult( + $0.InstallerResultRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$getInstallerResult, request, options: options); + } + + /// ExposeService exposes a local port via the NetBird reverse proxy + $grpc.ResponseStream<$0.ExposeServiceEvent> exposeService( + $0.ExposeServiceRequest request, { + $grpc.CallOptions? options, + }) { + return $createStreamingCall( + _$exposeService, $async.Stream.fromIterable([request]), + options: options); + } + + // method descriptors + + static final _$login = $grpc.ClientMethod<$0.LoginRequest, $0.LoginResponse>( + '/daemon.DaemonService/Login', + ($0.LoginRequest value) => value.writeToBuffer(), + $0.LoginResponse.fromBuffer); + static final _$waitSSOLogin = + $grpc.ClientMethod<$0.WaitSSOLoginRequest, $0.WaitSSOLoginResponse>( + '/daemon.DaemonService/WaitSSOLogin', + ($0.WaitSSOLoginRequest value) => value.writeToBuffer(), + $0.WaitSSOLoginResponse.fromBuffer); + static final _$up = $grpc.ClientMethod<$0.UpRequest, $0.UpResponse>( + '/daemon.DaemonService/Up', + ($0.UpRequest value) => value.writeToBuffer(), + $0.UpResponse.fromBuffer); + static final _$status = + $grpc.ClientMethod<$0.StatusRequest, $0.StatusResponse>( + '/daemon.DaemonService/Status', + ($0.StatusRequest value) => value.writeToBuffer(), + $0.StatusResponse.fromBuffer); + static final _$down = $grpc.ClientMethod<$0.DownRequest, $0.DownResponse>( + '/daemon.DaemonService/Down', + ($0.DownRequest value) => value.writeToBuffer(), + $0.DownResponse.fromBuffer); + static final _$getConfig = + $grpc.ClientMethod<$0.GetConfigRequest, $0.GetConfigResponse>( + '/daemon.DaemonService/GetConfig', + ($0.GetConfigRequest value) => value.writeToBuffer(), + $0.GetConfigResponse.fromBuffer); + static final _$listNetworks = + $grpc.ClientMethod<$0.ListNetworksRequest, $0.ListNetworksResponse>( + '/daemon.DaemonService/ListNetworks', + ($0.ListNetworksRequest value) => value.writeToBuffer(), + $0.ListNetworksResponse.fromBuffer); + static final _$selectNetworks = + $grpc.ClientMethod<$0.SelectNetworksRequest, $0.SelectNetworksResponse>( + '/daemon.DaemonService/SelectNetworks', + ($0.SelectNetworksRequest value) => value.writeToBuffer(), + $0.SelectNetworksResponse.fromBuffer); + static final _$deselectNetworks = + $grpc.ClientMethod<$0.SelectNetworksRequest, $0.SelectNetworksResponse>( + '/daemon.DaemonService/DeselectNetworks', + ($0.SelectNetworksRequest value) => value.writeToBuffer(), + $0.SelectNetworksResponse.fromBuffer); + static final _$forwardingRules = + $grpc.ClientMethod<$0.EmptyRequest, $0.ForwardingRulesResponse>( + '/daemon.DaemonService/ForwardingRules', + ($0.EmptyRequest value) => value.writeToBuffer(), + $0.ForwardingRulesResponse.fromBuffer); + static final _$debugBundle = + $grpc.ClientMethod<$0.DebugBundleRequest, $0.DebugBundleResponse>( + '/daemon.DaemonService/DebugBundle', + ($0.DebugBundleRequest value) => value.writeToBuffer(), + $0.DebugBundleResponse.fromBuffer); + static final _$getLogLevel = + $grpc.ClientMethod<$0.GetLogLevelRequest, $0.GetLogLevelResponse>( + '/daemon.DaemonService/GetLogLevel', + ($0.GetLogLevelRequest value) => value.writeToBuffer(), + $0.GetLogLevelResponse.fromBuffer); + static final _$setLogLevel = + $grpc.ClientMethod<$0.SetLogLevelRequest, $0.SetLogLevelResponse>( + '/daemon.DaemonService/SetLogLevel', + ($0.SetLogLevelRequest value) => value.writeToBuffer(), + $0.SetLogLevelResponse.fromBuffer); + static final _$listStates = + $grpc.ClientMethod<$0.ListStatesRequest, $0.ListStatesResponse>( + '/daemon.DaemonService/ListStates', + ($0.ListStatesRequest value) => value.writeToBuffer(), + $0.ListStatesResponse.fromBuffer); + static final _$cleanState = + $grpc.ClientMethod<$0.CleanStateRequest, $0.CleanStateResponse>( + '/daemon.DaemonService/CleanState', + ($0.CleanStateRequest value) => value.writeToBuffer(), + $0.CleanStateResponse.fromBuffer); + static final _$deleteState = + $grpc.ClientMethod<$0.DeleteStateRequest, $0.DeleteStateResponse>( + '/daemon.DaemonService/DeleteState', + ($0.DeleteStateRequest value) => value.writeToBuffer(), + $0.DeleteStateResponse.fromBuffer); + static final _$setSyncResponsePersistence = $grpc.ClientMethod< + $0.SetSyncResponsePersistenceRequest, + $0.SetSyncResponsePersistenceResponse>( + '/daemon.DaemonService/SetSyncResponsePersistence', + ($0.SetSyncResponsePersistenceRequest value) => value.writeToBuffer(), + $0.SetSyncResponsePersistenceResponse.fromBuffer); + static final _$tracePacket = + $grpc.ClientMethod<$0.TracePacketRequest, $0.TracePacketResponse>( + '/daemon.DaemonService/TracePacket', + ($0.TracePacketRequest value) => value.writeToBuffer(), + $0.TracePacketResponse.fromBuffer); + static final _$subscribeEvents = + $grpc.ClientMethod<$0.SubscribeRequest, $0.SystemEvent>( + '/daemon.DaemonService/SubscribeEvents', + ($0.SubscribeRequest value) => value.writeToBuffer(), + $0.SystemEvent.fromBuffer); + static final _$getEvents = + $grpc.ClientMethod<$0.GetEventsRequest, $0.GetEventsResponse>( + '/daemon.DaemonService/GetEvents', + ($0.GetEventsRequest value) => value.writeToBuffer(), + $0.GetEventsResponse.fromBuffer); + static final _$switchProfile = + $grpc.ClientMethod<$0.SwitchProfileRequest, $0.SwitchProfileResponse>( + '/daemon.DaemonService/SwitchProfile', + ($0.SwitchProfileRequest value) => value.writeToBuffer(), + $0.SwitchProfileResponse.fromBuffer); + static final _$setConfig = + $grpc.ClientMethod<$0.SetConfigRequest, $0.SetConfigResponse>( + '/daemon.DaemonService/SetConfig', + ($0.SetConfigRequest value) => value.writeToBuffer(), + $0.SetConfigResponse.fromBuffer); + static final _$addProfile = + $grpc.ClientMethod<$0.AddProfileRequest, $0.AddProfileResponse>( + '/daemon.DaemonService/AddProfile', + ($0.AddProfileRequest value) => value.writeToBuffer(), + $0.AddProfileResponse.fromBuffer); + static final _$removeProfile = + $grpc.ClientMethod<$0.RemoveProfileRequest, $0.RemoveProfileResponse>( + '/daemon.DaemonService/RemoveProfile', + ($0.RemoveProfileRequest value) => value.writeToBuffer(), + $0.RemoveProfileResponse.fromBuffer); + static final _$listProfiles = + $grpc.ClientMethod<$0.ListProfilesRequest, $0.ListProfilesResponse>( + '/daemon.DaemonService/ListProfiles', + ($0.ListProfilesRequest value) => value.writeToBuffer(), + $0.ListProfilesResponse.fromBuffer); + static final _$getActiveProfile = $grpc.ClientMethod< + $0.GetActiveProfileRequest, $0.GetActiveProfileResponse>( + '/daemon.DaemonService/GetActiveProfile', + ($0.GetActiveProfileRequest value) => value.writeToBuffer(), + $0.GetActiveProfileResponse.fromBuffer); + static final _$logout = + $grpc.ClientMethod<$0.LogoutRequest, $0.LogoutResponse>( + '/daemon.DaemonService/Logout', + ($0.LogoutRequest value) => value.writeToBuffer(), + $0.LogoutResponse.fromBuffer); + static final _$getFeatures = + $grpc.ClientMethod<$0.GetFeaturesRequest, $0.GetFeaturesResponse>( + '/daemon.DaemonService/GetFeatures', + ($0.GetFeaturesRequest value) => value.writeToBuffer(), + $0.GetFeaturesResponse.fromBuffer); + static final _$triggerUpdate = + $grpc.ClientMethod<$0.TriggerUpdateRequest, $0.TriggerUpdateResponse>( + '/daemon.DaemonService/TriggerUpdate', + ($0.TriggerUpdateRequest value) => value.writeToBuffer(), + $0.TriggerUpdateResponse.fromBuffer); + static final _$getPeerSSHHostKey = $grpc.ClientMethod< + $0.GetPeerSSHHostKeyRequest, $0.GetPeerSSHHostKeyResponse>( + '/daemon.DaemonService/GetPeerSSHHostKey', + ($0.GetPeerSSHHostKeyRequest value) => value.writeToBuffer(), + $0.GetPeerSSHHostKeyResponse.fromBuffer); + static final _$requestJWTAuth = + $grpc.ClientMethod<$0.RequestJWTAuthRequest, $0.RequestJWTAuthResponse>( + '/daemon.DaemonService/RequestJWTAuth', + ($0.RequestJWTAuthRequest value) => value.writeToBuffer(), + $0.RequestJWTAuthResponse.fromBuffer); + static final _$waitJWTToken = + $grpc.ClientMethod<$0.WaitJWTTokenRequest, $0.WaitJWTTokenResponse>( + '/daemon.DaemonService/WaitJWTToken', + ($0.WaitJWTTokenRequest value) => value.writeToBuffer(), + $0.WaitJWTTokenResponse.fromBuffer); + static final _$startCPUProfile = + $grpc.ClientMethod<$0.StartCPUProfileRequest, $0.StartCPUProfileResponse>( + '/daemon.DaemonService/StartCPUProfile', + ($0.StartCPUProfileRequest value) => value.writeToBuffer(), + $0.StartCPUProfileResponse.fromBuffer); + static final _$stopCPUProfile = + $grpc.ClientMethod<$0.StopCPUProfileRequest, $0.StopCPUProfileResponse>( + '/daemon.DaemonService/StopCPUProfile', + ($0.StopCPUProfileRequest value) => value.writeToBuffer(), + $0.StopCPUProfileResponse.fromBuffer); + static final _$notifyOSLifecycle = + $grpc.ClientMethod<$0.OSLifecycleRequest, $0.OSLifecycleResponse>( + '/daemon.DaemonService/NotifyOSLifecycle', + ($0.OSLifecycleRequest value) => value.writeToBuffer(), + $0.OSLifecycleResponse.fromBuffer); + static final _$getInstallerResult = + $grpc.ClientMethod<$0.InstallerResultRequest, $0.InstallerResultResponse>( + '/daemon.DaemonService/GetInstallerResult', + ($0.InstallerResultRequest value) => value.writeToBuffer(), + $0.InstallerResultResponse.fromBuffer); + static final _$exposeService = + $grpc.ClientMethod<$0.ExposeServiceRequest, $0.ExposeServiceEvent>( + '/daemon.DaemonService/ExposeService', + ($0.ExposeServiceRequest value) => value.writeToBuffer(), + $0.ExposeServiceEvent.fromBuffer); +} + +@$pb.GrpcServiceName('daemon.DaemonService') +abstract class DaemonServiceBase extends $grpc.Service { + $core.String get $name => 'daemon.DaemonService'; + + DaemonServiceBase() { + $addMethod($grpc.ServiceMethod<$0.LoginRequest, $0.LoginResponse>( + 'Login', + login_Pre, + false, + false, + ($core.List<$core.int> value) => $0.LoginRequest.fromBuffer(value), + ($0.LoginResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.WaitSSOLoginRequest, $0.WaitSSOLoginResponse>( + 'WaitSSOLogin', + waitSSOLogin_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.WaitSSOLoginRequest.fromBuffer(value), + ($0.WaitSSOLoginResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.UpRequest, $0.UpResponse>( + 'Up', + up_Pre, + false, + false, + ($core.List<$core.int> value) => $0.UpRequest.fromBuffer(value), + ($0.UpResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.StatusRequest, $0.StatusResponse>( + 'Status', + status_Pre, + false, + false, + ($core.List<$core.int> value) => $0.StatusRequest.fromBuffer(value), + ($0.StatusResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.DownRequest, $0.DownResponse>( + 'Down', + down_Pre, + false, + false, + ($core.List<$core.int> value) => $0.DownRequest.fromBuffer(value), + ($0.DownResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetConfigRequest, $0.GetConfigResponse>( + 'GetConfig', + getConfig_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetConfigRequest.fromBuffer(value), + ($0.GetConfigResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.ListNetworksRequest, $0.ListNetworksResponse>( + 'ListNetworks', + listNetworks_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.ListNetworksRequest.fromBuffer(value), + ($0.ListNetworksResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SelectNetworksRequest, + $0.SelectNetworksResponse>( + 'SelectNetworks', + selectNetworks_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.SelectNetworksRequest.fromBuffer(value), + ($0.SelectNetworksResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SelectNetworksRequest, + $0.SelectNetworksResponse>( + 'DeselectNetworks', + deselectNetworks_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.SelectNetworksRequest.fromBuffer(value), + ($0.SelectNetworksResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.EmptyRequest, $0.ForwardingRulesResponse>( + 'ForwardingRules', + forwardingRules_Pre, + false, + false, + ($core.List<$core.int> value) => $0.EmptyRequest.fromBuffer(value), + ($0.ForwardingRulesResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.DebugBundleRequest, $0.DebugBundleResponse>( + 'DebugBundle', + debugBundle_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.DebugBundleRequest.fromBuffer(value), + ($0.DebugBundleResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetLogLevelRequest, $0.GetLogLevelResponse>( + 'GetLogLevel', + getLogLevel_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetLogLevelRequest.fromBuffer(value), + ($0.GetLogLevelResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.SetLogLevelRequest, $0.SetLogLevelResponse>( + 'SetLogLevel', + setLogLevel_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.SetLogLevelRequest.fromBuffer(value), + ($0.SetLogLevelResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ListStatesRequest, $0.ListStatesResponse>( + 'ListStates', + listStates_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ListStatesRequest.fromBuffer(value), + ($0.ListStatesResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.CleanStateRequest, $0.CleanStateResponse>( + 'CleanState', + cleanState_Pre, + false, + false, + ($core.List<$core.int> value) => $0.CleanStateRequest.fromBuffer(value), + ($0.CleanStateResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.DeleteStateRequest, $0.DeleteStateResponse>( + 'DeleteState', + deleteState_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.DeleteStateRequest.fromBuffer(value), + ($0.DeleteStateResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SetSyncResponsePersistenceRequest, + $0.SetSyncResponsePersistenceResponse>( + 'SetSyncResponsePersistence', + setSyncResponsePersistence_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.SetSyncResponsePersistenceRequest.fromBuffer(value), + ($0.SetSyncResponsePersistenceResponse value) => + value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.TracePacketRequest, $0.TracePacketResponse>( + 'TracePacket', + tracePacket_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.TracePacketRequest.fromBuffer(value), + ($0.TracePacketResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SubscribeRequest, $0.SystemEvent>( + 'SubscribeEvents', + subscribeEvents_Pre, + false, + true, + ($core.List<$core.int> value) => $0.SubscribeRequest.fromBuffer(value), + ($0.SystemEvent value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetEventsRequest, $0.GetEventsResponse>( + 'GetEvents', + getEvents_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetEventsRequest.fromBuffer(value), + ($0.GetEventsResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.SwitchProfileRequest, $0.SwitchProfileResponse>( + 'SwitchProfile', + switchProfile_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.SwitchProfileRequest.fromBuffer(value), + ($0.SwitchProfileResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SetConfigRequest, $0.SetConfigResponse>( + 'SetConfig', + setConfig_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SetConfigRequest.fromBuffer(value), + ($0.SetConfigResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.AddProfileRequest, $0.AddProfileResponse>( + 'AddProfile', + addProfile_Pre, + false, + false, + ($core.List<$core.int> value) => $0.AddProfileRequest.fromBuffer(value), + ($0.AddProfileResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.RemoveProfileRequest, $0.RemoveProfileResponse>( + 'RemoveProfile', + removeProfile_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.RemoveProfileRequest.fromBuffer(value), + ($0.RemoveProfileResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.ListProfilesRequest, $0.ListProfilesResponse>( + 'ListProfiles', + listProfiles_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.ListProfilesRequest.fromBuffer(value), + ($0.ListProfilesResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetActiveProfileRequest, + $0.GetActiveProfileResponse>( + 'GetActiveProfile', + getActiveProfile_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetActiveProfileRequest.fromBuffer(value), + ($0.GetActiveProfileResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.LogoutRequest, $0.LogoutResponse>( + 'Logout', + logout_Pre, + false, + false, + ($core.List<$core.int> value) => $0.LogoutRequest.fromBuffer(value), + ($0.LogoutResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetFeaturesRequest, $0.GetFeaturesResponse>( + 'GetFeatures', + getFeatures_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetFeaturesRequest.fromBuffer(value), + ($0.GetFeaturesResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.TriggerUpdateRequest, $0.TriggerUpdateResponse>( + 'TriggerUpdate', + triggerUpdate_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.TriggerUpdateRequest.fromBuffer(value), + ($0.TriggerUpdateResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPeerSSHHostKeyRequest, + $0.GetPeerSSHHostKeyResponse>( + 'GetPeerSSHHostKey', + getPeerSSHHostKey_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPeerSSHHostKeyRequest.fromBuffer(value), + ($0.GetPeerSSHHostKeyResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.RequestJWTAuthRequest, + $0.RequestJWTAuthResponse>( + 'RequestJWTAuth', + requestJWTAuth_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.RequestJWTAuthRequest.fromBuffer(value), + ($0.RequestJWTAuthResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.WaitJWTTokenRequest, $0.WaitJWTTokenResponse>( + 'WaitJWTToken', + waitJWTToken_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.WaitJWTTokenRequest.fromBuffer(value), + ($0.WaitJWTTokenResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.StartCPUProfileRequest, + $0.StartCPUProfileResponse>( + 'StartCPUProfile', + startCPUProfile_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.StartCPUProfileRequest.fromBuffer(value), + ($0.StartCPUProfileResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.StopCPUProfileRequest, + $0.StopCPUProfileResponse>( + 'StopCPUProfile', + stopCPUProfile_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.StopCPUProfileRequest.fromBuffer(value), + ($0.StopCPUProfileResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.OSLifecycleRequest, $0.OSLifecycleResponse>( + 'NotifyOSLifecycle', + notifyOSLifecycle_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.OSLifecycleRequest.fromBuffer(value), + ($0.OSLifecycleResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.InstallerResultRequest, + $0.InstallerResultResponse>( + 'GetInstallerResult', + getInstallerResult_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.InstallerResultRequest.fromBuffer(value), + ($0.InstallerResultResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.ExposeServiceRequest, $0.ExposeServiceEvent>( + 'ExposeService', + exposeService_Pre, + false, + true, + ($core.List<$core.int> value) => + $0.ExposeServiceRequest.fromBuffer(value), + ($0.ExposeServiceEvent value) => value.writeToBuffer())); + } + + $async.Future<$0.LoginResponse> login_Pre( + $grpc.ServiceCall $call, $async.Future<$0.LoginRequest> $request) async { + return login($call, await $request); + } + + $async.Future<$0.LoginResponse> login( + $grpc.ServiceCall call, $0.LoginRequest request); + + $async.Future<$0.WaitSSOLoginResponse> waitSSOLogin_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.WaitSSOLoginRequest> $request) async { + return waitSSOLogin($call, await $request); + } + + $async.Future<$0.WaitSSOLoginResponse> waitSSOLogin( + $grpc.ServiceCall call, $0.WaitSSOLoginRequest request); + + $async.Future<$0.UpResponse> up_Pre( + $grpc.ServiceCall $call, $async.Future<$0.UpRequest> $request) async { + return up($call, await $request); + } + + $async.Future<$0.UpResponse> up($grpc.ServiceCall call, $0.UpRequest request); + + $async.Future<$0.StatusResponse> status_Pre( + $grpc.ServiceCall $call, $async.Future<$0.StatusRequest> $request) async { + return status($call, await $request); + } + + $async.Future<$0.StatusResponse> status( + $grpc.ServiceCall call, $0.StatusRequest request); + + $async.Future<$0.DownResponse> down_Pre( + $grpc.ServiceCall $call, $async.Future<$0.DownRequest> $request) async { + return down($call, await $request); + } + + $async.Future<$0.DownResponse> down( + $grpc.ServiceCall call, $0.DownRequest request); + + $async.Future<$0.GetConfigResponse> getConfig_Pre($grpc.ServiceCall $call, + $async.Future<$0.GetConfigRequest> $request) async { + return getConfig($call, await $request); + } + + $async.Future<$0.GetConfigResponse> getConfig( + $grpc.ServiceCall call, $0.GetConfigRequest request); + + $async.Future<$0.ListNetworksResponse> listNetworks_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.ListNetworksRequest> $request) async { + return listNetworks($call, await $request); + } + + $async.Future<$0.ListNetworksResponse> listNetworks( + $grpc.ServiceCall call, $0.ListNetworksRequest request); + + $async.Future<$0.SelectNetworksResponse> selectNetworks_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.SelectNetworksRequest> $request) async { + return selectNetworks($call, await $request); + } + + $async.Future<$0.SelectNetworksResponse> selectNetworks( + $grpc.ServiceCall call, $0.SelectNetworksRequest request); + + $async.Future<$0.SelectNetworksResponse> deselectNetworks_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.SelectNetworksRequest> $request) async { + return deselectNetworks($call, await $request); + } + + $async.Future<$0.SelectNetworksResponse> deselectNetworks( + $grpc.ServiceCall call, $0.SelectNetworksRequest request); + + $async.Future<$0.ForwardingRulesResponse> forwardingRules_Pre( + $grpc.ServiceCall $call, $async.Future<$0.EmptyRequest> $request) async { + return forwardingRules($call, await $request); + } + + $async.Future<$0.ForwardingRulesResponse> forwardingRules( + $grpc.ServiceCall call, $0.EmptyRequest request); + + $async.Future<$0.DebugBundleResponse> debugBundle_Pre($grpc.ServiceCall $call, + $async.Future<$0.DebugBundleRequest> $request) async { + return debugBundle($call, await $request); + } + + $async.Future<$0.DebugBundleResponse> debugBundle( + $grpc.ServiceCall call, $0.DebugBundleRequest request); + + $async.Future<$0.GetLogLevelResponse> getLogLevel_Pre($grpc.ServiceCall $call, + $async.Future<$0.GetLogLevelRequest> $request) async { + return getLogLevel($call, await $request); + } + + $async.Future<$0.GetLogLevelResponse> getLogLevel( + $grpc.ServiceCall call, $0.GetLogLevelRequest request); + + $async.Future<$0.SetLogLevelResponse> setLogLevel_Pre($grpc.ServiceCall $call, + $async.Future<$0.SetLogLevelRequest> $request) async { + return setLogLevel($call, await $request); + } + + $async.Future<$0.SetLogLevelResponse> setLogLevel( + $grpc.ServiceCall call, $0.SetLogLevelRequest request); + + $async.Future<$0.ListStatesResponse> listStates_Pre($grpc.ServiceCall $call, + $async.Future<$0.ListStatesRequest> $request) async { + return listStates($call, await $request); + } + + $async.Future<$0.ListStatesResponse> listStates( + $grpc.ServiceCall call, $0.ListStatesRequest request); + + $async.Future<$0.CleanStateResponse> cleanState_Pre($grpc.ServiceCall $call, + $async.Future<$0.CleanStateRequest> $request) async { + return cleanState($call, await $request); + } + + $async.Future<$0.CleanStateResponse> cleanState( + $grpc.ServiceCall call, $0.CleanStateRequest request); + + $async.Future<$0.DeleteStateResponse> deleteState_Pre($grpc.ServiceCall $call, + $async.Future<$0.DeleteStateRequest> $request) async { + return deleteState($call, await $request); + } + + $async.Future<$0.DeleteStateResponse> deleteState( + $grpc.ServiceCall call, $0.DeleteStateRequest request); + + $async.Future<$0.SetSyncResponsePersistenceResponse> + setSyncResponsePersistence_Pre($grpc.ServiceCall $call, + $async.Future<$0.SetSyncResponsePersistenceRequest> $request) async { + return setSyncResponsePersistence($call, await $request); + } + + $async.Future<$0.SetSyncResponsePersistenceResponse> + setSyncResponsePersistence( + $grpc.ServiceCall call, $0.SetSyncResponsePersistenceRequest request); + + $async.Future<$0.TracePacketResponse> tracePacket_Pre($grpc.ServiceCall $call, + $async.Future<$0.TracePacketRequest> $request) async { + return tracePacket($call, await $request); + } + + $async.Future<$0.TracePacketResponse> tracePacket( + $grpc.ServiceCall call, $0.TracePacketRequest request); + + $async.Stream<$0.SystemEvent> subscribeEvents_Pre($grpc.ServiceCall $call, + $async.Future<$0.SubscribeRequest> $request) async* { + yield* subscribeEvents($call, await $request); + } + + $async.Stream<$0.SystemEvent> subscribeEvents( + $grpc.ServiceCall call, $0.SubscribeRequest request); + + $async.Future<$0.GetEventsResponse> getEvents_Pre($grpc.ServiceCall $call, + $async.Future<$0.GetEventsRequest> $request) async { + return getEvents($call, await $request); + } + + $async.Future<$0.GetEventsResponse> getEvents( + $grpc.ServiceCall call, $0.GetEventsRequest request); + + $async.Future<$0.SwitchProfileResponse> switchProfile_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.SwitchProfileRequest> $request) async { + return switchProfile($call, await $request); + } + + $async.Future<$0.SwitchProfileResponse> switchProfile( + $grpc.ServiceCall call, $0.SwitchProfileRequest request); + + $async.Future<$0.SetConfigResponse> setConfig_Pre($grpc.ServiceCall $call, + $async.Future<$0.SetConfigRequest> $request) async { + return setConfig($call, await $request); + } + + $async.Future<$0.SetConfigResponse> setConfig( + $grpc.ServiceCall call, $0.SetConfigRequest request); + + $async.Future<$0.AddProfileResponse> addProfile_Pre($grpc.ServiceCall $call, + $async.Future<$0.AddProfileRequest> $request) async { + return addProfile($call, await $request); + } + + $async.Future<$0.AddProfileResponse> addProfile( + $grpc.ServiceCall call, $0.AddProfileRequest request); + + $async.Future<$0.RemoveProfileResponse> removeProfile_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.RemoveProfileRequest> $request) async { + return removeProfile($call, await $request); + } + + $async.Future<$0.RemoveProfileResponse> removeProfile( + $grpc.ServiceCall call, $0.RemoveProfileRequest request); + + $async.Future<$0.ListProfilesResponse> listProfiles_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.ListProfilesRequest> $request) async { + return listProfiles($call, await $request); + } + + $async.Future<$0.ListProfilesResponse> listProfiles( + $grpc.ServiceCall call, $0.ListProfilesRequest request); + + $async.Future<$0.GetActiveProfileResponse> getActiveProfile_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.GetActiveProfileRequest> $request) async { + return getActiveProfile($call, await $request); + } + + $async.Future<$0.GetActiveProfileResponse> getActiveProfile( + $grpc.ServiceCall call, $0.GetActiveProfileRequest request); + + $async.Future<$0.LogoutResponse> logout_Pre( + $grpc.ServiceCall $call, $async.Future<$0.LogoutRequest> $request) async { + return logout($call, await $request); + } + + $async.Future<$0.LogoutResponse> logout( + $grpc.ServiceCall call, $0.LogoutRequest request); + + $async.Future<$0.GetFeaturesResponse> getFeatures_Pre($grpc.ServiceCall $call, + $async.Future<$0.GetFeaturesRequest> $request) async { + return getFeatures($call, await $request); + } + + $async.Future<$0.GetFeaturesResponse> getFeatures( + $grpc.ServiceCall call, $0.GetFeaturesRequest request); + + $async.Future<$0.TriggerUpdateResponse> triggerUpdate_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.TriggerUpdateRequest> $request) async { + return triggerUpdate($call, await $request); + } + + $async.Future<$0.TriggerUpdateResponse> triggerUpdate( + $grpc.ServiceCall call, $0.TriggerUpdateRequest request); + + $async.Future<$0.GetPeerSSHHostKeyResponse> getPeerSSHHostKey_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.GetPeerSSHHostKeyRequest> $request) async { + return getPeerSSHHostKey($call, await $request); + } + + $async.Future<$0.GetPeerSSHHostKeyResponse> getPeerSSHHostKey( + $grpc.ServiceCall call, $0.GetPeerSSHHostKeyRequest request); + + $async.Future<$0.RequestJWTAuthResponse> requestJWTAuth_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.RequestJWTAuthRequest> $request) async { + return requestJWTAuth($call, await $request); + } + + $async.Future<$0.RequestJWTAuthResponse> requestJWTAuth( + $grpc.ServiceCall call, $0.RequestJWTAuthRequest request); + + $async.Future<$0.WaitJWTTokenResponse> waitJWTToken_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.WaitJWTTokenRequest> $request) async { + return waitJWTToken($call, await $request); + } + + $async.Future<$0.WaitJWTTokenResponse> waitJWTToken( + $grpc.ServiceCall call, $0.WaitJWTTokenRequest request); + + $async.Future<$0.StartCPUProfileResponse> startCPUProfile_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.StartCPUProfileRequest> $request) async { + return startCPUProfile($call, await $request); + } + + $async.Future<$0.StartCPUProfileResponse> startCPUProfile( + $grpc.ServiceCall call, $0.StartCPUProfileRequest request); + + $async.Future<$0.StopCPUProfileResponse> stopCPUProfile_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.StopCPUProfileRequest> $request) async { + return stopCPUProfile($call, await $request); + } + + $async.Future<$0.StopCPUProfileResponse> stopCPUProfile( + $grpc.ServiceCall call, $0.StopCPUProfileRequest request); + + $async.Future<$0.OSLifecycleResponse> notifyOSLifecycle_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.OSLifecycleRequest> $request) async { + return notifyOSLifecycle($call, await $request); + } + + $async.Future<$0.OSLifecycleResponse> notifyOSLifecycle( + $grpc.ServiceCall call, $0.OSLifecycleRequest request); + + $async.Future<$0.InstallerResultResponse> getInstallerResult_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.InstallerResultRequest> $request) async { + return getInstallerResult($call, await $request); + } + + $async.Future<$0.InstallerResultResponse> getInstallerResult( + $grpc.ServiceCall call, $0.InstallerResultRequest request); + + $async.Stream<$0.ExposeServiceEvent> exposeService_Pre( + $grpc.ServiceCall $call, + $async.Future<$0.ExposeServiceRequest> $request) async* { + yield* exposeService($call, await $request); + } + + $async.Stream<$0.ExposeServiceEvent> exposeService( + $grpc.ServiceCall call, $0.ExposeServiceRequest request); +} diff --git a/client/flutter_ui/lib/src/generated/daemon.pbjson.dart b/client/flutter_ui/lib/src/generated/daemon.pbjson.dart new file mode 100644 index 000000000..5191f475f --- /dev/null +++ b/client/flutter_ui/lib/src/generated/daemon.pbjson.dart @@ -0,0 +1,2589 @@ +// This is a generated file - do not edit. +// +// Generated from daemon.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use logLevelDescriptor instead') +const LogLevel$json = { + '1': 'LogLevel', + '2': [ + {'1': 'UNKNOWN', '2': 0}, + {'1': 'PANIC', '2': 1}, + {'1': 'FATAL', '2': 2}, + {'1': 'ERROR', '2': 3}, + {'1': 'WARN', '2': 4}, + {'1': 'INFO', '2': 5}, + {'1': 'DEBUG', '2': 6}, + {'1': 'TRACE', '2': 7}, + ], +}; + +/// Descriptor for `LogLevel`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List logLevelDescriptor = $convert.base64Decode( + 'CghMb2dMZXZlbBILCgdVTktOT1dOEAASCQoFUEFOSUMQARIJCgVGQVRBTBACEgkKBUVSUk9SEA' + 'MSCAoEV0FSThAEEggKBElORk8QBRIJCgVERUJVRxAGEgkKBVRSQUNFEAc='); + +@$core.Deprecated('Use exposeProtocolDescriptor instead') +const ExposeProtocol$json = { + '1': 'ExposeProtocol', + '2': [ + {'1': 'EXPOSE_HTTP', '2': 0}, + {'1': 'EXPOSE_HTTPS', '2': 1}, + {'1': 'EXPOSE_TCP', '2': 2}, + {'1': 'EXPOSE_UDP', '2': 3}, + {'1': 'EXPOSE_TLS', '2': 4}, + ], +}; + +/// Descriptor for `ExposeProtocol`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List exposeProtocolDescriptor = $convert.base64Decode( + 'Cg5FeHBvc2VQcm90b2NvbBIPCgtFWFBPU0VfSFRUUBAAEhAKDEVYUE9TRV9IVFRQUxABEg4KCk' + 'VYUE9TRV9UQ1AQAhIOCgpFWFBPU0VfVURQEAMSDgoKRVhQT1NFX1RMUxAE'); + +@$core.Deprecated('Use emptyRequestDescriptor instead') +const EmptyRequest$json = { + '1': 'EmptyRequest', +}; + +/// Descriptor for `EmptyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List emptyRequestDescriptor = + $convert.base64Decode('CgxFbXB0eVJlcXVlc3Q='); + +@$core.Deprecated('Use oSLifecycleRequestDescriptor instead') +const OSLifecycleRequest$json = { + '1': 'OSLifecycleRequest', + '2': [ + { + '1': 'type', + '3': 1, + '4': 1, + '5': 14, + '6': '.daemon.OSLifecycleRequest.CycleType', + '10': 'type' + }, + ], + '4': [OSLifecycleRequest_CycleType$json], +}; + +@$core.Deprecated('Use oSLifecycleRequestDescriptor instead') +const OSLifecycleRequest_CycleType$json = { + '1': 'CycleType', + '2': [ + {'1': 'UNKNOWN', '2': 0}, + {'1': 'SLEEP', '2': 1}, + {'1': 'WAKEUP', '2': 2}, + ], +}; + +/// Descriptor for `OSLifecycleRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List oSLifecycleRequestDescriptor = $convert.base64Decode( + 'ChJPU0xpZmVjeWNsZVJlcXVlc3QSOAoEdHlwZRgBIAEoDjIkLmRhZW1vbi5PU0xpZmVjeWNsZV' + 'JlcXVlc3QuQ3ljbGVUeXBlUgR0eXBlIi8KCUN5Y2xlVHlwZRILCgdVTktOT1dOEAASCQoFU0xF' + 'RVAQARIKCgZXQUtFVVAQAg=='); + +@$core.Deprecated('Use oSLifecycleResponseDescriptor instead') +const OSLifecycleResponse$json = { + '1': 'OSLifecycleResponse', +}; + +/// Descriptor for `OSLifecycleResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List oSLifecycleResponseDescriptor = + $convert.base64Decode('ChNPU0xpZmVjeWNsZVJlc3BvbnNl'); + +@$core.Deprecated('Use loginRequestDescriptor instead') +const LoginRequest$json = { + '1': 'LoginRequest', + '2': [ + {'1': 'setupKey', '3': 1, '4': 1, '5': 9, '10': 'setupKey'}, + { + '1': 'preSharedKey', + '3': 2, + '4': 1, + '5': 9, + '8': {'3': true}, + '10': 'preSharedKey', + }, + {'1': 'managementUrl', '3': 3, '4': 1, '5': 9, '10': 'managementUrl'}, + {'1': 'adminURL', '3': 4, '4': 1, '5': 9, '10': 'adminURL'}, + {'1': 'natExternalIPs', '3': 5, '4': 3, '5': 9, '10': 'natExternalIPs'}, + { + '1': 'cleanNATExternalIPs', + '3': 6, + '4': 1, + '5': 8, + '10': 'cleanNATExternalIPs' + }, + { + '1': 'customDNSAddress', + '3': 7, + '4': 1, + '5': 12, + '10': 'customDNSAddress' + }, + { + '1': 'isUnixDesktopClient', + '3': 8, + '4': 1, + '5': 8, + '10': 'isUnixDesktopClient' + }, + {'1': 'hostname', '3': 9, '4': 1, '5': 9, '10': 'hostname'}, + { + '1': 'rosenpassEnabled', + '3': 10, + '4': 1, + '5': 8, + '9': 0, + '10': 'rosenpassEnabled', + '17': true + }, + { + '1': 'interfaceName', + '3': 11, + '4': 1, + '5': 9, + '9': 1, + '10': 'interfaceName', + '17': true + }, + { + '1': 'wireguardPort', + '3': 12, + '4': 1, + '5': 3, + '9': 2, + '10': 'wireguardPort', + '17': true + }, + { + '1': 'optionalPreSharedKey', + '3': 13, + '4': 1, + '5': 9, + '9': 3, + '10': 'optionalPreSharedKey', + '17': true + }, + { + '1': 'disableAutoConnect', + '3': 14, + '4': 1, + '5': 8, + '9': 4, + '10': 'disableAutoConnect', + '17': true + }, + { + '1': 'serverSSHAllowed', + '3': 15, + '4': 1, + '5': 8, + '9': 5, + '10': 'serverSSHAllowed', + '17': true + }, + { + '1': 'rosenpassPermissive', + '3': 16, + '4': 1, + '5': 8, + '9': 6, + '10': 'rosenpassPermissive', + '17': true + }, + { + '1': 'extraIFaceBlacklist', + '3': 17, + '4': 3, + '5': 9, + '10': 'extraIFaceBlacklist' + }, + { + '1': 'networkMonitor', + '3': 18, + '4': 1, + '5': 8, + '9': 7, + '10': 'networkMonitor', + '17': true + }, + { + '1': 'dnsRouteInterval', + '3': 19, + '4': 1, + '5': 11, + '6': '.google.protobuf.Duration', + '9': 8, + '10': 'dnsRouteInterval', + '17': true + }, + { + '1': 'disable_client_routes', + '3': 20, + '4': 1, + '5': 8, + '9': 9, + '10': 'disableClientRoutes', + '17': true + }, + { + '1': 'disable_server_routes', + '3': 21, + '4': 1, + '5': 8, + '9': 10, + '10': 'disableServerRoutes', + '17': true + }, + { + '1': 'disable_dns', + '3': 22, + '4': 1, + '5': 8, + '9': 11, + '10': 'disableDns', + '17': true + }, + { + '1': 'disable_firewall', + '3': 23, + '4': 1, + '5': 8, + '9': 12, + '10': 'disableFirewall', + '17': true + }, + { + '1': 'block_lan_access', + '3': 24, + '4': 1, + '5': 8, + '9': 13, + '10': 'blockLanAccess', + '17': true + }, + { + '1': 'disable_notifications', + '3': 25, + '4': 1, + '5': 8, + '9': 14, + '10': 'disableNotifications', + '17': true + }, + {'1': 'dns_labels', '3': 26, '4': 3, '5': 9, '10': 'dnsLabels'}, + {'1': 'cleanDNSLabels', '3': 27, '4': 1, '5': 8, '10': 'cleanDNSLabels'}, + { + '1': 'lazyConnectionEnabled', + '3': 28, + '4': 1, + '5': 8, + '9': 15, + '10': 'lazyConnectionEnabled', + '17': true + }, + { + '1': 'block_inbound', + '3': 29, + '4': 1, + '5': 8, + '9': 16, + '10': 'blockInbound', + '17': true + }, + { + '1': 'profileName', + '3': 30, + '4': 1, + '5': 9, + '9': 17, + '10': 'profileName', + '17': true + }, + { + '1': 'username', + '3': 31, + '4': 1, + '5': 9, + '9': 18, + '10': 'username', + '17': true + }, + {'1': 'mtu', '3': 32, '4': 1, '5': 3, '9': 19, '10': 'mtu', '17': true}, + {'1': 'hint', '3': 33, '4': 1, '5': 9, '9': 20, '10': 'hint', '17': true}, + { + '1': 'enableSSHRoot', + '3': 34, + '4': 1, + '5': 8, + '9': 21, + '10': 'enableSSHRoot', + '17': true + }, + { + '1': 'enableSSHSFTP', + '3': 35, + '4': 1, + '5': 8, + '9': 22, + '10': 'enableSSHSFTP', + '17': true + }, + { + '1': 'enableSSHLocalPortForwarding', + '3': 36, + '4': 1, + '5': 8, + '9': 23, + '10': 'enableSSHLocalPortForwarding', + '17': true + }, + { + '1': 'enableSSHRemotePortForwarding', + '3': 37, + '4': 1, + '5': 8, + '9': 24, + '10': 'enableSSHRemotePortForwarding', + '17': true + }, + { + '1': 'disableSSHAuth', + '3': 38, + '4': 1, + '5': 8, + '9': 25, + '10': 'disableSSHAuth', + '17': true + }, + { + '1': 'sshJWTCacheTTL', + '3': 39, + '4': 1, + '5': 5, + '9': 26, + '10': 'sshJWTCacheTTL', + '17': true + }, + ], + '8': [ + {'1': '_rosenpassEnabled'}, + {'1': '_interfaceName'}, + {'1': '_wireguardPort'}, + {'1': '_optionalPreSharedKey'}, + {'1': '_disableAutoConnect'}, + {'1': '_serverSSHAllowed'}, + {'1': '_rosenpassPermissive'}, + {'1': '_networkMonitor'}, + {'1': '_dnsRouteInterval'}, + {'1': '_disable_client_routes'}, + {'1': '_disable_server_routes'}, + {'1': '_disable_dns'}, + {'1': '_disable_firewall'}, + {'1': '_block_lan_access'}, + {'1': '_disable_notifications'}, + {'1': '_lazyConnectionEnabled'}, + {'1': '_block_inbound'}, + {'1': '_profileName'}, + {'1': '_username'}, + {'1': '_mtu'}, + {'1': '_hint'}, + {'1': '_enableSSHRoot'}, + {'1': '_enableSSHSFTP'}, + {'1': '_enableSSHLocalPortForwarding'}, + {'1': '_enableSSHRemotePortForwarding'}, + {'1': '_disableSSHAuth'}, + {'1': '_sshJWTCacheTTL'}, + ], +}; + +/// Descriptor for `LoginRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List loginRequestDescriptor = $convert.base64Decode( + 'CgxMb2dpblJlcXVlc3QSGgoIc2V0dXBLZXkYASABKAlSCHNldHVwS2V5EiYKDHByZVNoYXJlZE' + 'tleRgCIAEoCUICGAFSDHByZVNoYXJlZEtleRIkCg1tYW5hZ2VtZW50VXJsGAMgASgJUg1tYW5h' + 'Z2VtZW50VXJsEhoKCGFkbWluVVJMGAQgASgJUghhZG1pblVSTBImCg5uYXRFeHRlcm5hbElQcx' + 'gFIAMoCVIObmF0RXh0ZXJuYWxJUHMSMAoTY2xlYW5OQVRFeHRlcm5hbElQcxgGIAEoCFITY2xl' + 'YW5OQVRFeHRlcm5hbElQcxIqChBjdXN0b21ETlNBZGRyZXNzGAcgASgMUhBjdXN0b21ETlNBZG' + 'RyZXNzEjAKE2lzVW5peERlc2t0b3BDbGllbnQYCCABKAhSE2lzVW5peERlc2t0b3BDbGllbnQS' + 'GgoIaG9zdG5hbWUYCSABKAlSCGhvc3RuYW1lEi8KEHJvc2VucGFzc0VuYWJsZWQYCiABKAhIAF' + 'IQcm9zZW5wYXNzRW5hYmxlZIgBARIpCg1pbnRlcmZhY2VOYW1lGAsgASgJSAFSDWludGVyZmFj' + 'ZU5hbWWIAQESKQoNd2lyZWd1YXJkUG9ydBgMIAEoA0gCUg13aXJlZ3VhcmRQb3J0iAEBEjcKFG' + '9wdGlvbmFsUHJlU2hhcmVkS2V5GA0gASgJSANSFG9wdGlvbmFsUHJlU2hhcmVkS2V5iAEBEjMK' + 'EmRpc2FibGVBdXRvQ29ubmVjdBgOIAEoCEgEUhJkaXNhYmxlQXV0b0Nvbm5lY3SIAQESLwoQc2' + 'VydmVyU1NIQWxsb3dlZBgPIAEoCEgFUhBzZXJ2ZXJTU0hBbGxvd2VkiAEBEjUKE3Jvc2VucGFz' + 'c1Blcm1pc3NpdmUYECABKAhIBlITcm9zZW5wYXNzUGVybWlzc2l2ZYgBARIwChNleHRyYUlGYW' + 'NlQmxhY2tsaXN0GBEgAygJUhNleHRyYUlGYWNlQmxhY2tsaXN0EisKDm5ldHdvcmtNb25pdG9y' + 'GBIgASgISAdSDm5ldHdvcmtNb25pdG9yiAEBEkoKEGRuc1JvdXRlSW50ZXJ2YWwYEyABKAsyGS' + '5nb29nbGUucHJvdG9idWYuRHVyYXRpb25ICFIQZG5zUm91dGVJbnRlcnZhbIgBARI3ChVkaXNh' + 'YmxlX2NsaWVudF9yb3V0ZXMYFCABKAhICVITZGlzYWJsZUNsaWVudFJvdXRlc4gBARI3ChVkaX' + 'NhYmxlX3NlcnZlcl9yb3V0ZXMYFSABKAhIClITZGlzYWJsZVNlcnZlclJvdXRlc4gBARIkCgtk' + 'aXNhYmxlX2RucxgWIAEoCEgLUgpkaXNhYmxlRG5ziAEBEi4KEGRpc2FibGVfZmlyZXdhbGwYFy' + 'ABKAhIDFIPZGlzYWJsZUZpcmV3YWxsiAEBEi0KEGJsb2NrX2xhbl9hY2Nlc3MYGCABKAhIDVIO' + 'YmxvY2tMYW5BY2Nlc3OIAQESOAoVZGlzYWJsZV9ub3RpZmljYXRpb25zGBkgASgISA5SFGRpc2' + 'FibGVOb3RpZmljYXRpb25ziAEBEh0KCmRuc19sYWJlbHMYGiADKAlSCWRuc0xhYmVscxImCg5j' + 'bGVhbkROU0xhYmVscxgbIAEoCFIOY2xlYW5ETlNMYWJlbHMSOQoVbGF6eUNvbm5lY3Rpb25Fbm' + 'FibGVkGBwgASgISA9SFWxhenlDb25uZWN0aW9uRW5hYmxlZIgBARIoCg1ibG9ja19pbmJvdW5k' + 'GB0gASgISBBSDGJsb2NrSW5ib3VuZIgBARIlCgtwcm9maWxlTmFtZRgeIAEoCUgRUgtwcm9maW' + 'xlTmFtZYgBARIfCgh1c2VybmFtZRgfIAEoCUgSUgh1c2VybmFtZYgBARIVCgNtdHUYICABKANI' + 'E1IDbXR1iAEBEhcKBGhpbnQYISABKAlIFFIEaGludIgBARIpCg1lbmFibGVTU0hSb290GCIgAS' + 'gISBVSDWVuYWJsZVNTSFJvb3SIAQESKQoNZW5hYmxlU1NIU0ZUUBgjIAEoCEgWUg1lbmFibGVT' + 'U0hTRlRQiAEBEkcKHGVuYWJsZVNTSExvY2FsUG9ydEZvcndhcmRpbmcYJCABKAhIF1IcZW5hYm' + 'xlU1NITG9jYWxQb3J0Rm9yd2FyZGluZ4gBARJJCh1lbmFibGVTU0hSZW1vdGVQb3J0Rm9yd2Fy' + 'ZGluZxglIAEoCEgYUh1lbmFibGVTU0hSZW1vdGVQb3J0Rm9yd2FyZGluZ4gBARIrCg5kaXNhYm' + 'xlU1NIQXV0aBgmIAEoCEgZUg5kaXNhYmxlU1NIQXV0aIgBARIrCg5zc2hKV1RDYWNoZVRUTBgn' + 'IAEoBUgaUg5zc2hKV1RDYWNoZVRUTIgBAUITChFfcm9zZW5wYXNzRW5hYmxlZEIQCg5faW50ZX' + 'JmYWNlTmFtZUIQCg5fd2lyZWd1YXJkUG9ydEIXChVfb3B0aW9uYWxQcmVTaGFyZWRLZXlCFQoT' + 'X2Rpc2FibGVBdXRvQ29ubmVjdEITChFfc2VydmVyU1NIQWxsb3dlZEIWChRfcm9zZW5wYXNzUG' + 'VybWlzc2l2ZUIRCg9fbmV0d29ya01vbml0b3JCEwoRX2Ruc1JvdXRlSW50ZXJ2YWxCGAoWX2Rp' + 'c2FibGVfY2xpZW50X3JvdXRlc0IYChZfZGlzYWJsZV9zZXJ2ZXJfcm91dGVzQg4KDF9kaXNhYm' + 'xlX2Ruc0ITChFfZGlzYWJsZV9maXJld2FsbEITChFfYmxvY2tfbGFuX2FjY2Vzc0IYChZfZGlz' + 'YWJsZV9ub3RpZmljYXRpb25zQhgKFl9sYXp5Q29ubmVjdGlvbkVuYWJsZWRCEAoOX2Jsb2NrX2' + 'luYm91bmRCDgoMX3Byb2ZpbGVOYW1lQgsKCV91c2VybmFtZUIGCgRfbXR1QgcKBV9oaW50QhAK' + 'Dl9lbmFibGVTU0hSb290QhAKDl9lbmFibGVTU0hTRlRQQh8KHV9lbmFibGVTU0hMb2NhbFBvcn' + 'RGb3J3YXJkaW5nQiAKHl9lbmFibGVTU0hSZW1vdGVQb3J0Rm9yd2FyZGluZ0IRCg9fZGlzYWJs' + 'ZVNTSEF1dGhCEQoPX3NzaEpXVENhY2hlVFRM'); + +@$core.Deprecated('Use loginResponseDescriptor instead') +const LoginResponse$json = { + '1': 'LoginResponse', + '2': [ + {'1': 'needsSSOLogin', '3': 1, '4': 1, '5': 8, '10': 'needsSSOLogin'}, + {'1': 'userCode', '3': 2, '4': 1, '5': 9, '10': 'userCode'}, + {'1': 'verificationURI', '3': 3, '4': 1, '5': 9, '10': 'verificationURI'}, + { + '1': 'verificationURIComplete', + '3': 4, + '4': 1, + '5': 9, + '10': 'verificationURIComplete' + }, + ], +}; + +/// Descriptor for `LoginResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List loginResponseDescriptor = $convert.base64Decode( + 'Cg1Mb2dpblJlc3BvbnNlEiQKDW5lZWRzU1NPTG9naW4YASABKAhSDW5lZWRzU1NPTG9naW4SGg' + 'oIdXNlckNvZGUYAiABKAlSCHVzZXJDb2RlEigKD3ZlcmlmaWNhdGlvblVSSRgDIAEoCVIPdmVy' + 'aWZpY2F0aW9uVVJJEjgKF3ZlcmlmaWNhdGlvblVSSUNvbXBsZXRlGAQgASgJUhd2ZXJpZmljYX' + 'Rpb25VUklDb21wbGV0ZQ=='); + +@$core.Deprecated('Use waitSSOLoginRequestDescriptor instead') +const WaitSSOLoginRequest$json = { + '1': 'WaitSSOLoginRequest', + '2': [ + {'1': 'userCode', '3': 1, '4': 1, '5': 9, '10': 'userCode'}, + {'1': 'hostname', '3': 2, '4': 1, '5': 9, '10': 'hostname'}, + ], +}; + +/// Descriptor for `WaitSSOLoginRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List waitSSOLoginRequestDescriptor = $convert.base64Decode( + 'ChNXYWl0U1NPTG9naW5SZXF1ZXN0EhoKCHVzZXJDb2RlGAEgASgJUgh1c2VyQ29kZRIaCghob3' + 'N0bmFtZRgCIAEoCVIIaG9zdG5hbWU='); + +@$core.Deprecated('Use waitSSOLoginResponseDescriptor instead') +const WaitSSOLoginResponse$json = { + '1': 'WaitSSOLoginResponse', + '2': [ + {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'}, + ], +}; + +/// Descriptor for `WaitSSOLoginResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List waitSSOLoginResponseDescriptor = + $convert.base64Decode( + 'ChRXYWl0U1NPTG9naW5SZXNwb25zZRIUCgVlbWFpbBgBIAEoCVIFZW1haWw='); + +@$core.Deprecated('Use upRequestDescriptor instead') +const UpRequest$json = { + '1': 'UpRequest', + '2': [ + { + '1': 'profileName', + '3': 1, + '4': 1, + '5': 9, + '9': 0, + '10': 'profileName', + '17': true + }, + { + '1': 'username', + '3': 2, + '4': 1, + '5': 9, + '9': 1, + '10': 'username', + '17': true + }, + ], + '8': [ + {'1': '_profileName'}, + {'1': '_username'}, + ], + '9': [ + {'1': 3, '2': 4}, + ], +}; + +/// Descriptor for `UpRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List upRequestDescriptor = $convert.base64Decode( + 'CglVcFJlcXVlc3QSJQoLcHJvZmlsZU5hbWUYASABKAlIAFILcHJvZmlsZU5hbWWIAQESHwoIdX' + 'Nlcm5hbWUYAiABKAlIAVIIdXNlcm5hbWWIAQFCDgoMX3Byb2ZpbGVOYW1lQgsKCV91c2VybmFt' + 'ZUoECAMQBA=='); + +@$core.Deprecated('Use upResponseDescriptor instead') +const UpResponse$json = { + '1': 'UpResponse', +}; + +/// Descriptor for `UpResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List upResponseDescriptor = + $convert.base64Decode('CgpVcFJlc3BvbnNl'); + +@$core.Deprecated('Use statusRequestDescriptor instead') +const StatusRequest$json = { + '1': 'StatusRequest', + '2': [ + { + '1': 'getFullPeerStatus', + '3': 1, + '4': 1, + '5': 8, + '10': 'getFullPeerStatus' + }, + {'1': 'shouldRunProbes', '3': 2, '4': 1, '5': 8, '10': 'shouldRunProbes'}, + { + '1': 'waitForReady', + '3': 3, + '4': 1, + '5': 8, + '9': 0, + '10': 'waitForReady', + '17': true + }, + ], + '8': [ + {'1': '_waitForReady'}, + ], +}; + +/// Descriptor for `StatusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List statusRequestDescriptor = $convert.base64Decode( + 'Cg1TdGF0dXNSZXF1ZXN0EiwKEWdldEZ1bGxQZWVyU3RhdHVzGAEgASgIUhFnZXRGdWxsUGVlcl' + 'N0YXR1cxIoCg9zaG91bGRSdW5Qcm9iZXMYAiABKAhSD3Nob3VsZFJ1blByb2JlcxInCgx3YWl0' + 'Rm9yUmVhZHkYAyABKAhIAFIMd2FpdEZvclJlYWR5iAEBQg8KDV93YWl0Rm9yUmVhZHk='); + +@$core.Deprecated('Use statusResponseDescriptor instead') +const StatusResponse$json = { + '1': 'StatusResponse', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 9, '10': 'status'}, + { + '1': 'fullStatus', + '3': 2, + '4': 1, + '5': 11, + '6': '.daemon.FullStatus', + '10': 'fullStatus' + }, + {'1': 'daemonVersion', '3': 3, '4': 1, '5': 9, '10': 'daemonVersion'}, + ], +}; + +/// Descriptor for `StatusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List statusResponseDescriptor = $convert.base64Decode( + 'Cg5TdGF0dXNSZXNwb25zZRIWCgZzdGF0dXMYASABKAlSBnN0YXR1cxIyCgpmdWxsU3RhdHVzGA' + 'IgASgLMhIuZGFlbW9uLkZ1bGxTdGF0dXNSCmZ1bGxTdGF0dXMSJAoNZGFlbW9uVmVyc2lvbhgD' + 'IAEoCVINZGFlbW9uVmVyc2lvbg=='); + +@$core.Deprecated('Use downRequestDescriptor instead') +const DownRequest$json = { + '1': 'DownRequest', +}; + +/// Descriptor for `DownRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List downRequestDescriptor = + $convert.base64Decode('CgtEb3duUmVxdWVzdA=='); + +@$core.Deprecated('Use downResponseDescriptor instead') +const DownResponse$json = { + '1': 'DownResponse', +}; + +/// Descriptor for `DownResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List downResponseDescriptor = + $convert.base64Decode('CgxEb3duUmVzcG9uc2U='); + +@$core.Deprecated('Use getConfigRequestDescriptor instead') +const GetConfigRequest$json = { + '1': 'GetConfigRequest', + '2': [ + {'1': 'profileName', '3': 1, '4': 1, '5': 9, '10': 'profileName'}, + {'1': 'username', '3': 2, '4': 1, '5': 9, '10': 'username'}, + ], +}; + +/// Descriptor for `GetConfigRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getConfigRequestDescriptor = $convert.base64Decode( + 'ChBHZXRDb25maWdSZXF1ZXN0EiAKC3Byb2ZpbGVOYW1lGAEgASgJUgtwcm9maWxlTmFtZRIaCg' + 'h1c2VybmFtZRgCIAEoCVIIdXNlcm5hbWU='); + +@$core.Deprecated('Use getConfigResponseDescriptor instead') +const GetConfigResponse$json = { + '1': 'GetConfigResponse', + '2': [ + {'1': 'managementUrl', '3': 1, '4': 1, '5': 9, '10': 'managementUrl'}, + {'1': 'configFile', '3': 2, '4': 1, '5': 9, '10': 'configFile'}, + {'1': 'logFile', '3': 3, '4': 1, '5': 9, '10': 'logFile'}, + {'1': 'preSharedKey', '3': 4, '4': 1, '5': 9, '10': 'preSharedKey'}, + {'1': 'adminURL', '3': 5, '4': 1, '5': 9, '10': 'adminURL'}, + {'1': 'interfaceName', '3': 6, '4': 1, '5': 9, '10': 'interfaceName'}, + {'1': 'wireguardPort', '3': 7, '4': 1, '5': 3, '10': 'wireguardPort'}, + {'1': 'mtu', '3': 8, '4': 1, '5': 3, '10': 'mtu'}, + { + '1': 'disableAutoConnect', + '3': 9, + '4': 1, + '5': 8, + '10': 'disableAutoConnect' + }, + { + '1': 'serverSSHAllowed', + '3': 10, + '4': 1, + '5': 8, + '10': 'serverSSHAllowed' + }, + { + '1': 'rosenpassEnabled', + '3': 11, + '4': 1, + '5': 8, + '10': 'rosenpassEnabled' + }, + { + '1': 'rosenpassPermissive', + '3': 12, + '4': 1, + '5': 8, + '10': 'rosenpassPermissive' + }, + { + '1': 'disable_notifications', + '3': 13, + '4': 1, + '5': 8, + '10': 'disableNotifications' + }, + { + '1': 'lazyConnectionEnabled', + '3': 14, + '4': 1, + '5': 8, + '10': 'lazyConnectionEnabled' + }, + {'1': 'blockInbound', '3': 15, '4': 1, '5': 8, '10': 'blockInbound'}, + {'1': 'networkMonitor', '3': 16, '4': 1, '5': 8, '10': 'networkMonitor'}, + {'1': 'disable_dns', '3': 17, '4': 1, '5': 8, '10': 'disableDns'}, + { + '1': 'disable_client_routes', + '3': 18, + '4': 1, + '5': 8, + '10': 'disableClientRoutes' + }, + { + '1': 'disable_server_routes', + '3': 19, + '4': 1, + '5': 8, + '10': 'disableServerRoutes' + }, + {'1': 'block_lan_access', '3': 20, '4': 1, '5': 8, '10': 'blockLanAccess'}, + {'1': 'enableSSHRoot', '3': 21, '4': 1, '5': 8, '10': 'enableSSHRoot'}, + {'1': 'enableSSHSFTP', '3': 24, '4': 1, '5': 8, '10': 'enableSSHSFTP'}, + { + '1': 'enableSSHLocalPortForwarding', + '3': 22, + '4': 1, + '5': 8, + '10': 'enableSSHLocalPortForwarding' + }, + { + '1': 'enableSSHRemotePortForwarding', + '3': 23, + '4': 1, + '5': 8, + '10': 'enableSSHRemotePortForwarding' + }, + {'1': 'disableSSHAuth', '3': 25, '4': 1, '5': 8, '10': 'disableSSHAuth'}, + {'1': 'sshJWTCacheTTL', '3': 26, '4': 1, '5': 5, '10': 'sshJWTCacheTTL'}, + ], +}; + +/// Descriptor for `GetConfigResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getConfigResponseDescriptor = $convert.base64Decode( + 'ChFHZXRDb25maWdSZXNwb25zZRIkCg1tYW5hZ2VtZW50VXJsGAEgASgJUg1tYW5hZ2VtZW50VX' + 'JsEh4KCmNvbmZpZ0ZpbGUYAiABKAlSCmNvbmZpZ0ZpbGUSGAoHbG9nRmlsZRgDIAEoCVIHbG9n' + 'RmlsZRIiCgxwcmVTaGFyZWRLZXkYBCABKAlSDHByZVNoYXJlZEtleRIaCghhZG1pblVSTBgFIA' + 'EoCVIIYWRtaW5VUkwSJAoNaW50ZXJmYWNlTmFtZRgGIAEoCVINaW50ZXJmYWNlTmFtZRIkCg13' + 'aXJlZ3VhcmRQb3J0GAcgASgDUg13aXJlZ3VhcmRQb3J0EhAKA210dRgIIAEoA1IDbXR1Ei4KEm' + 'Rpc2FibGVBdXRvQ29ubmVjdBgJIAEoCFISZGlzYWJsZUF1dG9Db25uZWN0EioKEHNlcnZlclNT' + 'SEFsbG93ZWQYCiABKAhSEHNlcnZlclNTSEFsbG93ZWQSKgoQcm9zZW5wYXNzRW5hYmxlZBgLIA' + 'EoCFIQcm9zZW5wYXNzRW5hYmxlZBIwChNyb3NlbnBhc3NQZXJtaXNzaXZlGAwgASgIUhNyb3Nl' + 'bnBhc3NQZXJtaXNzaXZlEjMKFWRpc2FibGVfbm90aWZpY2F0aW9ucxgNIAEoCFIUZGlzYWJsZU' + '5vdGlmaWNhdGlvbnMSNAoVbGF6eUNvbm5lY3Rpb25FbmFibGVkGA4gASgIUhVsYXp5Q29ubmVj' + 'dGlvbkVuYWJsZWQSIgoMYmxvY2tJbmJvdW5kGA8gASgIUgxibG9ja0luYm91bmQSJgoObmV0d2' + '9ya01vbml0b3IYECABKAhSDm5ldHdvcmtNb25pdG9yEh8KC2Rpc2FibGVfZG5zGBEgASgIUgpk' + 'aXNhYmxlRG5zEjIKFWRpc2FibGVfY2xpZW50X3JvdXRlcxgSIAEoCFITZGlzYWJsZUNsaWVudF' + 'JvdXRlcxIyChVkaXNhYmxlX3NlcnZlcl9yb3V0ZXMYEyABKAhSE2Rpc2FibGVTZXJ2ZXJSb3V0' + 'ZXMSKAoQYmxvY2tfbGFuX2FjY2VzcxgUIAEoCFIOYmxvY2tMYW5BY2Nlc3MSJAoNZW5hYmxlU1' + 'NIUm9vdBgVIAEoCFINZW5hYmxlU1NIUm9vdBIkCg1lbmFibGVTU0hTRlRQGBggASgIUg1lbmFi' + 'bGVTU0hTRlRQEkIKHGVuYWJsZVNTSExvY2FsUG9ydEZvcndhcmRpbmcYFiABKAhSHGVuYWJsZV' + 'NTSExvY2FsUG9ydEZvcndhcmRpbmcSRAodZW5hYmxlU1NIUmVtb3RlUG9ydEZvcndhcmRpbmcY' + 'FyABKAhSHWVuYWJsZVNTSFJlbW90ZVBvcnRGb3J3YXJkaW5nEiYKDmRpc2FibGVTU0hBdXRoGB' + 'kgASgIUg5kaXNhYmxlU1NIQXV0aBImCg5zc2hKV1RDYWNoZVRUTBgaIAEoBVIOc3NoSldUQ2Fj' + 'aGVUVEw='); + +@$core.Deprecated('Use peerStateDescriptor instead') +const PeerState$json = { + '1': 'PeerState', + '2': [ + {'1': 'IP', '3': 1, '4': 1, '5': 9, '10': 'IP'}, + {'1': 'pubKey', '3': 2, '4': 1, '5': 9, '10': 'pubKey'}, + {'1': 'connStatus', '3': 3, '4': 1, '5': 9, '10': 'connStatus'}, + { + '1': 'connStatusUpdate', + '3': 4, + '4': 1, + '5': 11, + '6': '.google.protobuf.Timestamp', + '10': 'connStatusUpdate' + }, + {'1': 'relayed', '3': 5, '4': 1, '5': 8, '10': 'relayed'}, + { + '1': 'localIceCandidateType', + '3': 7, + '4': 1, + '5': 9, + '10': 'localIceCandidateType' + }, + { + '1': 'remoteIceCandidateType', + '3': 8, + '4': 1, + '5': 9, + '10': 'remoteIceCandidateType' + }, + {'1': 'fqdn', '3': 9, '4': 1, '5': 9, '10': 'fqdn'}, + { + '1': 'localIceCandidateEndpoint', + '3': 10, + '4': 1, + '5': 9, + '10': 'localIceCandidateEndpoint' + }, + { + '1': 'remoteIceCandidateEndpoint', + '3': 11, + '4': 1, + '5': 9, + '10': 'remoteIceCandidateEndpoint' + }, + { + '1': 'lastWireguardHandshake', + '3': 12, + '4': 1, + '5': 11, + '6': '.google.protobuf.Timestamp', + '10': 'lastWireguardHandshake' + }, + {'1': 'bytesRx', '3': 13, '4': 1, '5': 3, '10': 'bytesRx'}, + {'1': 'bytesTx', '3': 14, '4': 1, '5': 3, '10': 'bytesTx'}, + { + '1': 'rosenpassEnabled', + '3': 15, + '4': 1, + '5': 8, + '10': 'rosenpassEnabled' + }, + {'1': 'networks', '3': 16, '4': 3, '5': 9, '10': 'networks'}, + { + '1': 'latency', + '3': 17, + '4': 1, + '5': 11, + '6': '.google.protobuf.Duration', + '10': 'latency' + }, + {'1': 'relayAddress', '3': 18, '4': 1, '5': 9, '10': 'relayAddress'}, + {'1': 'sshHostKey', '3': 19, '4': 1, '5': 12, '10': 'sshHostKey'}, + ], +}; + +/// Descriptor for `PeerState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List peerStateDescriptor = $convert.base64Decode( + 'CglQZWVyU3RhdGUSDgoCSVAYASABKAlSAklQEhYKBnB1YktleRgCIAEoCVIGcHViS2V5Eh4KCm' + 'Nvbm5TdGF0dXMYAyABKAlSCmNvbm5TdGF0dXMSRgoQY29ublN0YXR1c1VwZGF0ZRgEIAEoCzIa' + 'Lmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSEGNvbm5TdGF0dXNVcGRhdGUSGAoHcmVsYXllZB' + 'gFIAEoCFIHcmVsYXllZBI0ChVsb2NhbEljZUNhbmRpZGF0ZVR5cGUYByABKAlSFWxvY2FsSWNl' + 'Q2FuZGlkYXRlVHlwZRI2ChZyZW1vdGVJY2VDYW5kaWRhdGVUeXBlGAggASgJUhZyZW1vdGVJY2' + 'VDYW5kaWRhdGVUeXBlEhIKBGZxZG4YCSABKAlSBGZxZG4SPAoZbG9jYWxJY2VDYW5kaWRhdGVF' + 'bmRwb2ludBgKIAEoCVIZbG9jYWxJY2VDYW5kaWRhdGVFbmRwb2ludBI+ChpyZW1vdGVJY2VDYW' + '5kaWRhdGVFbmRwb2ludBgLIAEoCVIacmVtb3RlSWNlQ2FuZGlkYXRlRW5kcG9pbnQSUgoWbGFz' + 'dFdpcmVndWFyZEhhbmRzaGFrZRgMIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSFm' + 'xhc3RXaXJlZ3VhcmRIYW5kc2hha2USGAoHYnl0ZXNSeBgNIAEoA1IHYnl0ZXNSeBIYCgdieXRl' + 'c1R4GA4gASgDUgdieXRlc1R4EioKEHJvc2VucGFzc0VuYWJsZWQYDyABKAhSEHJvc2VucGFzc0' + 'VuYWJsZWQSGgoIbmV0d29ya3MYECADKAlSCG5ldHdvcmtzEjMKB2xhdGVuY3kYESABKAsyGS5n' + 'b29nbGUucHJvdG9idWYuRHVyYXRpb25SB2xhdGVuY3kSIgoMcmVsYXlBZGRyZXNzGBIgASgJUg' + 'xyZWxheUFkZHJlc3MSHgoKc3NoSG9zdEtleRgTIAEoDFIKc3NoSG9zdEtleQ=='); + +@$core.Deprecated('Use localPeerStateDescriptor instead') +const LocalPeerState$json = { + '1': 'LocalPeerState', + '2': [ + {'1': 'IP', '3': 1, '4': 1, '5': 9, '10': 'IP'}, + {'1': 'pubKey', '3': 2, '4': 1, '5': 9, '10': 'pubKey'}, + {'1': 'kernelInterface', '3': 3, '4': 1, '5': 8, '10': 'kernelInterface'}, + {'1': 'fqdn', '3': 4, '4': 1, '5': 9, '10': 'fqdn'}, + {'1': 'rosenpassEnabled', '3': 5, '4': 1, '5': 8, '10': 'rosenpassEnabled'}, + { + '1': 'rosenpassPermissive', + '3': 6, + '4': 1, + '5': 8, + '10': 'rosenpassPermissive' + }, + {'1': 'networks', '3': 7, '4': 3, '5': 9, '10': 'networks'}, + ], +}; + +/// Descriptor for `LocalPeerState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List localPeerStateDescriptor = $convert.base64Decode( + 'Cg5Mb2NhbFBlZXJTdGF0ZRIOCgJJUBgBIAEoCVICSVASFgoGcHViS2V5GAIgASgJUgZwdWJLZX' + 'kSKAoPa2VybmVsSW50ZXJmYWNlGAMgASgIUg9rZXJuZWxJbnRlcmZhY2USEgoEZnFkbhgEIAEo' + 'CVIEZnFkbhIqChByb3NlbnBhc3NFbmFibGVkGAUgASgIUhByb3NlbnBhc3NFbmFibGVkEjAKE3' + 'Jvc2VucGFzc1Blcm1pc3NpdmUYBiABKAhSE3Jvc2VucGFzc1Blcm1pc3NpdmUSGgoIbmV0d29y' + 'a3MYByADKAlSCG5ldHdvcmtz'); + +@$core.Deprecated('Use signalStateDescriptor instead') +const SignalState$json = { + '1': 'SignalState', + '2': [ + {'1': 'URL', '3': 1, '4': 1, '5': 9, '10': 'URL'}, + {'1': 'connected', '3': 2, '4': 1, '5': 8, '10': 'connected'}, + {'1': 'error', '3': 3, '4': 1, '5': 9, '10': 'error'}, + ], +}; + +/// Descriptor for `SignalState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signalStateDescriptor = $convert.base64Decode( + 'CgtTaWduYWxTdGF0ZRIQCgNVUkwYASABKAlSA1VSTBIcCgljb25uZWN0ZWQYAiABKAhSCWNvbm' + '5lY3RlZBIUCgVlcnJvchgDIAEoCVIFZXJyb3I='); + +@$core.Deprecated('Use managementStateDescriptor instead') +const ManagementState$json = { + '1': 'ManagementState', + '2': [ + {'1': 'URL', '3': 1, '4': 1, '5': 9, '10': 'URL'}, + {'1': 'connected', '3': 2, '4': 1, '5': 8, '10': 'connected'}, + {'1': 'error', '3': 3, '4': 1, '5': 9, '10': 'error'}, + ], +}; + +/// Descriptor for `ManagementState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List managementStateDescriptor = $convert.base64Decode( + 'Cg9NYW5hZ2VtZW50U3RhdGUSEAoDVVJMGAEgASgJUgNVUkwSHAoJY29ubmVjdGVkGAIgASgIUg' + 'ljb25uZWN0ZWQSFAoFZXJyb3IYAyABKAlSBWVycm9y'); + +@$core.Deprecated('Use relayStateDescriptor instead') +const RelayState$json = { + '1': 'RelayState', + '2': [ + {'1': 'URI', '3': 1, '4': 1, '5': 9, '10': 'URI'}, + {'1': 'available', '3': 2, '4': 1, '5': 8, '10': 'available'}, + {'1': 'error', '3': 3, '4': 1, '5': 9, '10': 'error'}, + ], +}; + +/// Descriptor for `RelayState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List relayStateDescriptor = $convert.base64Decode( + 'CgpSZWxheVN0YXRlEhAKA1VSSRgBIAEoCVIDVVJJEhwKCWF2YWlsYWJsZRgCIAEoCFIJYXZhaW' + 'xhYmxlEhQKBWVycm9yGAMgASgJUgVlcnJvcg=='); + +@$core.Deprecated('Use nSGroupStateDescriptor instead') +const NSGroupState$json = { + '1': 'NSGroupState', + '2': [ + {'1': 'servers', '3': 1, '4': 3, '5': 9, '10': 'servers'}, + {'1': 'domains', '3': 2, '4': 3, '5': 9, '10': 'domains'}, + {'1': 'enabled', '3': 3, '4': 1, '5': 8, '10': 'enabled'}, + {'1': 'error', '3': 4, '4': 1, '5': 9, '10': 'error'}, + ], +}; + +/// Descriptor for `NSGroupState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nSGroupStateDescriptor = $convert.base64Decode( + 'CgxOU0dyb3VwU3RhdGUSGAoHc2VydmVycxgBIAMoCVIHc2VydmVycxIYCgdkb21haW5zGAIgAy' + 'gJUgdkb21haW5zEhgKB2VuYWJsZWQYAyABKAhSB2VuYWJsZWQSFAoFZXJyb3IYBCABKAlSBWVy' + 'cm9y'); + +@$core.Deprecated('Use sSHSessionInfoDescriptor instead') +const SSHSessionInfo$json = { + '1': 'SSHSessionInfo', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + {'1': 'remoteAddress', '3': 2, '4': 1, '5': 9, '10': 'remoteAddress'}, + {'1': 'command', '3': 3, '4': 1, '5': 9, '10': 'command'}, + {'1': 'jwtUsername', '3': 4, '4': 1, '5': 9, '10': 'jwtUsername'}, + {'1': 'portForwards', '3': 5, '4': 3, '5': 9, '10': 'portForwards'}, + ], +}; + +/// Descriptor for `SSHSessionInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sSHSessionInfoDescriptor = $convert.base64Decode( + 'Cg5TU0hTZXNzaW9uSW5mbxIaCgh1c2VybmFtZRgBIAEoCVIIdXNlcm5hbWUSJAoNcmVtb3RlQW' + 'RkcmVzcxgCIAEoCVINcmVtb3RlQWRkcmVzcxIYCgdjb21tYW5kGAMgASgJUgdjb21tYW5kEiAK' + 'C2p3dFVzZXJuYW1lGAQgASgJUgtqd3RVc2VybmFtZRIiCgxwb3J0Rm9yd2FyZHMYBSADKAlSDH' + 'BvcnRGb3J3YXJkcw=='); + +@$core.Deprecated('Use sSHServerStateDescriptor instead') +const SSHServerState$json = { + '1': 'SSHServerState', + '2': [ + {'1': 'enabled', '3': 1, '4': 1, '5': 8, '10': 'enabled'}, + { + '1': 'sessions', + '3': 2, + '4': 3, + '5': 11, + '6': '.daemon.SSHSessionInfo', + '10': 'sessions' + }, + ], +}; + +/// Descriptor for `SSHServerState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sSHServerStateDescriptor = $convert.base64Decode( + 'Cg5TU0hTZXJ2ZXJTdGF0ZRIYCgdlbmFibGVkGAEgASgIUgdlbmFibGVkEjIKCHNlc3Npb25zGA' + 'IgAygLMhYuZGFlbW9uLlNTSFNlc3Npb25JbmZvUghzZXNzaW9ucw=='); + +@$core.Deprecated('Use fullStatusDescriptor instead') +const FullStatus$json = { + '1': 'FullStatus', + '2': [ + { + '1': 'managementState', + '3': 1, + '4': 1, + '5': 11, + '6': '.daemon.ManagementState', + '10': 'managementState' + }, + { + '1': 'signalState', + '3': 2, + '4': 1, + '5': 11, + '6': '.daemon.SignalState', + '10': 'signalState' + }, + { + '1': 'localPeerState', + '3': 3, + '4': 1, + '5': 11, + '6': '.daemon.LocalPeerState', + '10': 'localPeerState' + }, + { + '1': 'peers', + '3': 4, + '4': 3, + '5': 11, + '6': '.daemon.PeerState', + '10': 'peers' + }, + { + '1': 'relays', + '3': 5, + '4': 3, + '5': 11, + '6': '.daemon.RelayState', + '10': 'relays' + }, + { + '1': 'dns_servers', + '3': 6, + '4': 3, + '5': 11, + '6': '.daemon.NSGroupState', + '10': 'dnsServers' + }, + { + '1': 'NumberOfForwardingRules', + '3': 8, + '4': 1, + '5': 5, + '10': 'NumberOfForwardingRules' + }, + { + '1': 'events', + '3': 7, + '4': 3, + '5': 11, + '6': '.daemon.SystemEvent', + '10': 'events' + }, + { + '1': 'lazyConnectionEnabled', + '3': 9, + '4': 1, + '5': 8, + '10': 'lazyConnectionEnabled' + }, + { + '1': 'sshServerState', + '3': 10, + '4': 1, + '5': 11, + '6': '.daemon.SSHServerState', + '10': 'sshServerState' + }, + ], +}; + +/// Descriptor for `FullStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fullStatusDescriptor = $convert.base64Decode( + 'CgpGdWxsU3RhdHVzEkEKD21hbmFnZW1lbnRTdGF0ZRgBIAEoCzIXLmRhZW1vbi5NYW5hZ2VtZW' + '50U3RhdGVSD21hbmFnZW1lbnRTdGF0ZRI1CgtzaWduYWxTdGF0ZRgCIAEoCzITLmRhZW1vbi5T' + 'aWduYWxTdGF0ZVILc2lnbmFsU3RhdGUSPgoObG9jYWxQZWVyU3RhdGUYAyABKAsyFi5kYWVtb2' + '4uTG9jYWxQZWVyU3RhdGVSDmxvY2FsUGVlclN0YXRlEicKBXBlZXJzGAQgAygLMhEuZGFlbW9u' + 'LlBlZXJTdGF0ZVIFcGVlcnMSKgoGcmVsYXlzGAUgAygLMhIuZGFlbW9uLlJlbGF5U3RhdGVSBn' + 'JlbGF5cxI1CgtkbnNfc2VydmVycxgGIAMoCzIULmRhZW1vbi5OU0dyb3VwU3RhdGVSCmRuc1Nl' + 'cnZlcnMSOAoXTnVtYmVyT2ZGb3J3YXJkaW5nUnVsZXMYCCABKAVSF051bWJlck9mRm9yd2FyZG' + 'luZ1J1bGVzEisKBmV2ZW50cxgHIAMoCzITLmRhZW1vbi5TeXN0ZW1FdmVudFIGZXZlbnRzEjQK' + 'FWxhenlDb25uZWN0aW9uRW5hYmxlZBgJIAEoCFIVbGF6eUNvbm5lY3Rpb25FbmFibGVkEj4KDn' + 'NzaFNlcnZlclN0YXRlGAogASgLMhYuZGFlbW9uLlNTSFNlcnZlclN0YXRlUg5zc2hTZXJ2ZXJT' + 'dGF0ZQ=='); + +@$core.Deprecated('Use listNetworksRequestDescriptor instead') +const ListNetworksRequest$json = { + '1': 'ListNetworksRequest', +}; + +/// Descriptor for `ListNetworksRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listNetworksRequestDescriptor = + $convert.base64Decode('ChNMaXN0TmV0d29ya3NSZXF1ZXN0'); + +@$core.Deprecated('Use listNetworksResponseDescriptor instead') +const ListNetworksResponse$json = { + '1': 'ListNetworksResponse', + '2': [ + { + '1': 'routes', + '3': 1, + '4': 3, + '5': 11, + '6': '.daemon.Network', + '10': 'routes' + }, + ], +}; + +/// Descriptor for `ListNetworksResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listNetworksResponseDescriptor = $convert.base64Decode( + 'ChRMaXN0TmV0d29ya3NSZXNwb25zZRInCgZyb3V0ZXMYASADKAsyDy5kYWVtb24uTmV0d29ya1' + 'IGcm91dGVz'); + +@$core.Deprecated('Use selectNetworksRequestDescriptor instead') +const SelectNetworksRequest$json = { + '1': 'SelectNetworksRequest', + '2': [ + {'1': 'networkIDs', '3': 1, '4': 3, '5': 9, '10': 'networkIDs'}, + {'1': 'append', '3': 2, '4': 1, '5': 8, '10': 'append'}, + {'1': 'all', '3': 3, '4': 1, '5': 8, '10': 'all'}, + ], +}; + +/// Descriptor for `SelectNetworksRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List selectNetworksRequestDescriptor = $convert.base64Decode( + 'ChVTZWxlY3ROZXR3b3Jrc1JlcXVlc3QSHgoKbmV0d29ya0lEcxgBIAMoCVIKbmV0d29ya0lEcx' + 'IWCgZhcHBlbmQYAiABKAhSBmFwcGVuZBIQCgNhbGwYAyABKAhSA2FsbA=='); + +@$core.Deprecated('Use selectNetworksResponseDescriptor instead') +const SelectNetworksResponse$json = { + '1': 'SelectNetworksResponse', +}; + +/// Descriptor for `SelectNetworksResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List selectNetworksResponseDescriptor = + $convert.base64Decode('ChZTZWxlY3ROZXR3b3Jrc1Jlc3BvbnNl'); + +@$core.Deprecated('Use iPListDescriptor instead') +const IPList$json = { + '1': 'IPList', + '2': [ + {'1': 'ips', '3': 1, '4': 3, '5': 9, '10': 'ips'}, + ], +}; + +/// Descriptor for `IPList`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List iPListDescriptor = + $convert.base64Decode('CgZJUExpc3QSEAoDaXBzGAEgAygJUgNpcHM='); + +@$core.Deprecated('Use networkDescriptor instead') +const Network$json = { + '1': 'Network', + '2': [ + {'1': 'ID', '3': 1, '4': 1, '5': 9, '10': 'ID'}, + {'1': 'range', '3': 2, '4': 1, '5': 9, '10': 'range'}, + {'1': 'selected', '3': 3, '4': 1, '5': 8, '10': 'selected'}, + {'1': 'domains', '3': 4, '4': 3, '5': 9, '10': 'domains'}, + { + '1': 'resolvedIPs', + '3': 5, + '4': 3, + '5': 11, + '6': '.daemon.Network.ResolvedIPsEntry', + '10': 'resolvedIPs' + }, + ], + '3': [Network_ResolvedIPsEntry$json], +}; + +@$core.Deprecated('Use networkDescriptor instead') +const Network_ResolvedIPsEntry$json = { + '1': 'ResolvedIPsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + { + '1': 'value', + '3': 2, + '4': 1, + '5': 11, + '6': '.daemon.IPList', + '10': 'value' + }, + ], + '7': {'7': true}, +}; + +/// Descriptor for `Network`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List networkDescriptor = $convert.base64Decode( + 'CgdOZXR3b3JrEg4KAklEGAEgASgJUgJJRBIUCgVyYW5nZRgCIAEoCVIFcmFuZ2USGgoIc2VsZW' + 'N0ZWQYAyABKAhSCHNlbGVjdGVkEhgKB2RvbWFpbnMYBCADKAlSB2RvbWFpbnMSQgoLcmVzb2x2' + 'ZWRJUHMYBSADKAsyIC5kYWVtb24uTmV0d29yay5SZXNvbHZlZElQc0VudHJ5UgtyZXNvbHZlZE' + 'lQcxpOChBSZXNvbHZlZElQc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiQKBXZhbHVlGAIgASgL' + 'Mg4uZGFlbW9uLklQTGlzdFIFdmFsdWU6AjgB'); + +@$core.Deprecated('Use portInfoDescriptor instead') +const PortInfo$json = { + '1': 'PortInfo', + '2': [ + {'1': 'port', '3': 1, '4': 1, '5': 13, '9': 0, '10': 'port'}, + { + '1': 'range', + '3': 2, + '4': 1, + '5': 11, + '6': '.daemon.PortInfo.Range', + '9': 0, + '10': 'range' + }, + ], + '3': [PortInfo_Range$json], + '8': [ + {'1': 'portSelection'}, + ], +}; + +@$core.Deprecated('Use portInfoDescriptor instead') +const PortInfo_Range$json = { + '1': 'Range', + '2': [ + {'1': 'start', '3': 1, '4': 1, '5': 13, '10': 'start'}, + {'1': 'end', '3': 2, '4': 1, '5': 13, '10': 'end'}, + ], +}; + +/// Descriptor for `PortInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List portInfoDescriptor = $convert.base64Decode( + 'CghQb3J0SW5mbxIUCgRwb3J0GAEgASgNSABSBHBvcnQSLgoFcmFuZ2UYAiABKAsyFi5kYWVtb2' + '4uUG9ydEluZm8uUmFuZ2VIAFIFcmFuZ2UaLwoFUmFuZ2USFAoFc3RhcnQYASABKA1SBXN0YXJ0' + 'EhAKA2VuZBgCIAEoDVIDZW5kQg8KDXBvcnRTZWxlY3Rpb24='); + +@$core.Deprecated('Use forwardingRuleDescriptor instead') +const ForwardingRule$json = { + '1': 'ForwardingRule', + '2': [ + {'1': 'protocol', '3': 1, '4': 1, '5': 9, '10': 'protocol'}, + { + '1': 'destinationPort', + '3': 2, + '4': 1, + '5': 11, + '6': '.daemon.PortInfo', + '10': 'destinationPort' + }, + { + '1': 'translatedAddress', + '3': 3, + '4': 1, + '5': 9, + '10': 'translatedAddress' + }, + { + '1': 'translatedHostname', + '3': 4, + '4': 1, + '5': 9, + '10': 'translatedHostname' + }, + { + '1': 'translatedPort', + '3': 5, + '4': 1, + '5': 11, + '6': '.daemon.PortInfo', + '10': 'translatedPort' + }, + ], +}; + +/// Descriptor for `ForwardingRule`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List forwardingRuleDescriptor = $convert.base64Decode( + 'Cg5Gb3J3YXJkaW5nUnVsZRIaCghwcm90b2NvbBgBIAEoCVIIcHJvdG9jb2wSOgoPZGVzdGluYX' + 'Rpb25Qb3J0GAIgASgLMhAuZGFlbW9uLlBvcnRJbmZvUg9kZXN0aW5hdGlvblBvcnQSLAoRdHJh' + 'bnNsYXRlZEFkZHJlc3MYAyABKAlSEXRyYW5zbGF0ZWRBZGRyZXNzEi4KEnRyYW5zbGF0ZWRIb3' + 'N0bmFtZRgEIAEoCVISdHJhbnNsYXRlZEhvc3RuYW1lEjgKDnRyYW5zbGF0ZWRQb3J0GAUgASgL' + 'MhAuZGFlbW9uLlBvcnRJbmZvUg50cmFuc2xhdGVkUG9ydA=='); + +@$core.Deprecated('Use forwardingRulesResponseDescriptor instead') +const ForwardingRulesResponse$json = { + '1': 'ForwardingRulesResponse', + '2': [ + { + '1': 'rules', + '3': 1, + '4': 3, + '5': 11, + '6': '.daemon.ForwardingRule', + '10': 'rules' + }, + ], +}; + +/// Descriptor for `ForwardingRulesResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List forwardingRulesResponseDescriptor = + $convert.base64Decode( + 'ChdGb3J3YXJkaW5nUnVsZXNSZXNwb25zZRIsCgVydWxlcxgBIAMoCzIWLmRhZW1vbi5Gb3J3YX' + 'JkaW5nUnVsZVIFcnVsZXM='); + +@$core.Deprecated('Use debugBundleRequestDescriptor instead') +const DebugBundleRequest$json = { + '1': 'DebugBundleRequest', + '2': [ + {'1': 'anonymize', '3': 1, '4': 1, '5': 8, '10': 'anonymize'}, + {'1': 'systemInfo', '3': 3, '4': 1, '5': 8, '10': 'systemInfo'}, + {'1': 'uploadURL', '3': 4, '4': 1, '5': 9, '10': 'uploadURL'}, + {'1': 'logFileCount', '3': 5, '4': 1, '5': 13, '10': 'logFileCount'}, + ], +}; + +/// Descriptor for `DebugBundleRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List debugBundleRequestDescriptor = $convert.base64Decode( + 'ChJEZWJ1Z0J1bmRsZVJlcXVlc3QSHAoJYW5vbnltaXplGAEgASgIUglhbm9ueW1pemUSHgoKc3' + 'lzdGVtSW5mbxgDIAEoCFIKc3lzdGVtSW5mbxIcCgl1cGxvYWRVUkwYBCABKAlSCXVwbG9hZFVS' + 'TBIiCgxsb2dGaWxlQ291bnQYBSABKA1SDGxvZ0ZpbGVDb3VudA=='); + +@$core.Deprecated('Use debugBundleResponseDescriptor instead') +const DebugBundleResponse$json = { + '1': 'DebugBundleResponse', + '2': [ + {'1': 'path', '3': 1, '4': 1, '5': 9, '10': 'path'}, + {'1': 'uploadedKey', '3': 2, '4': 1, '5': 9, '10': 'uploadedKey'}, + { + '1': 'uploadFailureReason', + '3': 3, + '4': 1, + '5': 9, + '10': 'uploadFailureReason' + }, + ], +}; + +/// Descriptor for `DebugBundleResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List debugBundleResponseDescriptor = $convert.base64Decode( + 'ChNEZWJ1Z0J1bmRsZVJlc3BvbnNlEhIKBHBhdGgYASABKAlSBHBhdGgSIAoLdXBsb2FkZWRLZX' + 'kYAiABKAlSC3VwbG9hZGVkS2V5EjAKE3VwbG9hZEZhaWx1cmVSZWFzb24YAyABKAlSE3VwbG9h' + 'ZEZhaWx1cmVSZWFzb24='); + +@$core.Deprecated('Use getLogLevelRequestDescriptor instead') +const GetLogLevelRequest$json = { + '1': 'GetLogLevelRequest', +}; + +/// Descriptor for `GetLogLevelRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getLogLevelRequestDescriptor = + $convert.base64Decode('ChJHZXRMb2dMZXZlbFJlcXVlc3Q='); + +@$core.Deprecated('Use getLogLevelResponseDescriptor instead') +const GetLogLevelResponse$json = { + '1': 'GetLogLevelResponse', + '2': [ + { + '1': 'level', + '3': 1, + '4': 1, + '5': 14, + '6': '.daemon.LogLevel', + '10': 'level' + }, + ], +}; + +/// Descriptor for `GetLogLevelResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getLogLevelResponseDescriptor = $convert.base64Decode( + 'ChNHZXRMb2dMZXZlbFJlc3BvbnNlEiYKBWxldmVsGAEgASgOMhAuZGFlbW9uLkxvZ0xldmVsUg' + 'VsZXZlbA=='); + +@$core.Deprecated('Use setLogLevelRequestDescriptor instead') +const SetLogLevelRequest$json = { + '1': 'SetLogLevelRequest', + '2': [ + { + '1': 'level', + '3': 1, + '4': 1, + '5': 14, + '6': '.daemon.LogLevel', + '10': 'level' + }, + ], +}; + +/// Descriptor for `SetLogLevelRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setLogLevelRequestDescriptor = $convert.base64Decode( + 'ChJTZXRMb2dMZXZlbFJlcXVlc3QSJgoFbGV2ZWwYASABKA4yEC5kYWVtb24uTG9nTGV2ZWxSBW' + 'xldmVs'); + +@$core.Deprecated('Use setLogLevelResponseDescriptor instead') +const SetLogLevelResponse$json = { + '1': 'SetLogLevelResponse', +}; + +/// Descriptor for `SetLogLevelResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setLogLevelResponseDescriptor = + $convert.base64Decode('ChNTZXRMb2dMZXZlbFJlc3BvbnNl'); + +@$core.Deprecated('Use stateDescriptor instead') +const State$json = { + '1': 'State', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `State`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List stateDescriptor = + $convert.base64Decode('CgVTdGF0ZRISCgRuYW1lGAEgASgJUgRuYW1l'); + +@$core.Deprecated('Use listStatesRequestDescriptor instead') +const ListStatesRequest$json = { + '1': 'ListStatesRequest', +}; + +/// Descriptor for `ListStatesRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listStatesRequestDescriptor = + $convert.base64Decode('ChFMaXN0U3RhdGVzUmVxdWVzdA=='); + +@$core.Deprecated('Use listStatesResponseDescriptor instead') +const ListStatesResponse$json = { + '1': 'ListStatesResponse', + '2': [ + { + '1': 'states', + '3': 1, + '4': 3, + '5': 11, + '6': '.daemon.State', + '10': 'states' + }, + ], +}; + +/// Descriptor for `ListStatesResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listStatesResponseDescriptor = $convert.base64Decode( + 'ChJMaXN0U3RhdGVzUmVzcG9uc2USJQoGc3RhdGVzGAEgAygLMg0uZGFlbW9uLlN0YXRlUgZzdG' + 'F0ZXM='); + +@$core.Deprecated('Use cleanStateRequestDescriptor instead') +const CleanStateRequest$json = { + '1': 'CleanStateRequest', + '2': [ + {'1': 'state_name', '3': 1, '4': 1, '5': 9, '10': 'stateName'}, + {'1': 'all', '3': 2, '4': 1, '5': 8, '10': 'all'}, + ], +}; + +/// Descriptor for `CleanStateRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cleanStateRequestDescriptor = $convert.base64Decode( + 'ChFDbGVhblN0YXRlUmVxdWVzdBIdCgpzdGF0ZV9uYW1lGAEgASgJUglzdGF0ZU5hbWUSEAoDYW' + 'xsGAIgASgIUgNhbGw='); + +@$core.Deprecated('Use cleanStateResponseDescriptor instead') +const CleanStateResponse$json = { + '1': 'CleanStateResponse', + '2': [ + {'1': 'cleaned_states', '3': 1, '4': 1, '5': 5, '10': 'cleanedStates'}, + ], +}; + +/// Descriptor for `CleanStateResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cleanStateResponseDescriptor = $convert.base64Decode( + 'ChJDbGVhblN0YXRlUmVzcG9uc2USJQoOY2xlYW5lZF9zdGF0ZXMYASABKAVSDWNsZWFuZWRTdG' + 'F0ZXM='); + +@$core.Deprecated('Use deleteStateRequestDescriptor instead') +const DeleteStateRequest$json = { + '1': 'DeleteStateRequest', + '2': [ + {'1': 'state_name', '3': 1, '4': 1, '5': 9, '10': 'stateName'}, + {'1': 'all', '3': 2, '4': 1, '5': 8, '10': 'all'}, + ], +}; + +/// Descriptor for `DeleteStateRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deleteStateRequestDescriptor = $convert.base64Decode( + 'ChJEZWxldGVTdGF0ZVJlcXVlc3QSHQoKc3RhdGVfbmFtZRgBIAEoCVIJc3RhdGVOYW1lEhAKA2' + 'FsbBgCIAEoCFIDYWxs'); + +@$core.Deprecated('Use deleteStateResponseDescriptor instead') +const DeleteStateResponse$json = { + '1': 'DeleteStateResponse', + '2': [ + {'1': 'deleted_states', '3': 1, '4': 1, '5': 5, '10': 'deletedStates'}, + ], +}; + +/// Descriptor for `DeleteStateResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deleteStateResponseDescriptor = $convert.base64Decode( + 'ChNEZWxldGVTdGF0ZVJlc3BvbnNlEiUKDmRlbGV0ZWRfc3RhdGVzGAEgASgFUg1kZWxldGVkU3' + 'RhdGVz'); + +@$core.Deprecated('Use setSyncResponsePersistenceRequestDescriptor instead') +const SetSyncResponsePersistenceRequest$json = { + '1': 'SetSyncResponsePersistenceRequest', + '2': [ + {'1': 'enabled', '3': 1, '4': 1, '5': 8, '10': 'enabled'}, + ], +}; + +/// Descriptor for `SetSyncResponsePersistenceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setSyncResponsePersistenceRequestDescriptor = + $convert.base64Decode( + 'CiFTZXRTeW5jUmVzcG9uc2VQZXJzaXN0ZW5jZVJlcXVlc3QSGAoHZW5hYmxlZBgBIAEoCFIHZW' + '5hYmxlZA=='); + +@$core.Deprecated('Use setSyncResponsePersistenceResponseDescriptor instead') +const SetSyncResponsePersistenceResponse$json = { + '1': 'SetSyncResponsePersistenceResponse', +}; + +/// Descriptor for `SetSyncResponsePersistenceResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setSyncResponsePersistenceResponseDescriptor = + $convert.base64Decode('CiJTZXRTeW5jUmVzcG9uc2VQZXJzaXN0ZW5jZVJlc3BvbnNl'); + +@$core.Deprecated('Use tCPFlagsDescriptor instead') +const TCPFlags$json = { + '1': 'TCPFlags', + '2': [ + {'1': 'syn', '3': 1, '4': 1, '5': 8, '10': 'syn'}, + {'1': 'ack', '3': 2, '4': 1, '5': 8, '10': 'ack'}, + {'1': 'fin', '3': 3, '4': 1, '5': 8, '10': 'fin'}, + {'1': 'rst', '3': 4, '4': 1, '5': 8, '10': 'rst'}, + {'1': 'psh', '3': 5, '4': 1, '5': 8, '10': 'psh'}, + {'1': 'urg', '3': 6, '4': 1, '5': 8, '10': 'urg'}, + ], +}; + +/// Descriptor for `TCPFlags`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List tCPFlagsDescriptor = $convert.base64Decode( + 'CghUQ1BGbGFncxIQCgNzeW4YASABKAhSA3N5bhIQCgNhY2sYAiABKAhSA2FjaxIQCgNmaW4YAy' + 'ABKAhSA2ZpbhIQCgNyc3QYBCABKAhSA3JzdBIQCgNwc2gYBSABKAhSA3BzaBIQCgN1cmcYBiAB' + 'KAhSA3VyZw=='); + +@$core.Deprecated('Use tracePacketRequestDescriptor instead') +const TracePacketRequest$json = { + '1': 'TracePacketRequest', + '2': [ + {'1': 'source_ip', '3': 1, '4': 1, '5': 9, '10': 'sourceIp'}, + {'1': 'destination_ip', '3': 2, '4': 1, '5': 9, '10': 'destinationIp'}, + {'1': 'protocol', '3': 3, '4': 1, '5': 9, '10': 'protocol'}, + {'1': 'source_port', '3': 4, '4': 1, '5': 13, '10': 'sourcePort'}, + {'1': 'destination_port', '3': 5, '4': 1, '5': 13, '10': 'destinationPort'}, + {'1': 'direction', '3': 6, '4': 1, '5': 9, '10': 'direction'}, + { + '1': 'tcp_flags', + '3': 7, + '4': 1, + '5': 11, + '6': '.daemon.TCPFlags', + '9': 0, + '10': 'tcpFlags', + '17': true + }, + { + '1': 'icmp_type', + '3': 8, + '4': 1, + '5': 13, + '9': 1, + '10': 'icmpType', + '17': true + }, + { + '1': 'icmp_code', + '3': 9, + '4': 1, + '5': 13, + '9': 2, + '10': 'icmpCode', + '17': true + }, + ], + '8': [ + {'1': '_tcp_flags'}, + {'1': '_icmp_type'}, + {'1': '_icmp_code'}, + ], +}; + +/// Descriptor for `TracePacketRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List tracePacketRequestDescriptor = $convert.base64Decode( + 'ChJUcmFjZVBhY2tldFJlcXVlc3QSGwoJc291cmNlX2lwGAEgASgJUghzb3VyY2VJcBIlCg5kZX' + 'N0aW5hdGlvbl9pcBgCIAEoCVINZGVzdGluYXRpb25JcBIaCghwcm90b2NvbBgDIAEoCVIIcHJv' + 'dG9jb2wSHwoLc291cmNlX3BvcnQYBCABKA1SCnNvdXJjZVBvcnQSKQoQZGVzdGluYXRpb25fcG' + '9ydBgFIAEoDVIPZGVzdGluYXRpb25Qb3J0EhwKCWRpcmVjdGlvbhgGIAEoCVIJZGlyZWN0aW9u' + 'EjIKCXRjcF9mbGFncxgHIAEoCzIQLmRhZW1vbi5UQ1BGbGFnc0gAUgh0Y3BGbGFnc4gBARIgCg' + 'lpY21wX3R5cGUYCCABKA1IAVIIaWNtcFR5cGWIAQESIAoJaWNtcF9jb2RlGAkgASgNSAJSCGlj' + 'bXBDb2RliAEBQgwKCl90Y3BfZmxhZ3NCDAoKX2ljbXBfdHlwZUIMCgpfaWNtcF9jb2Rl'); + +@$core.Deprecated('Use traceStageDescriptor instead') +const TraceStage$json = { + '1': 'TraceStage', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + {'1': 'allowed', '3': 3, '4': 1, '5': 8, '10': 'allowed'}, + { + '1': 'forwarding_details', + '3': 4, + '4': 1, + '5': 9, + '9': 0, + '10': 'forwardingDetails', + '17': true + }, + ], + '8': [ + {'1': '_forwarding_details'}, + ], +}; + +/// Descriptor for `TraceStage`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List traceStageDescriptor = $convert.base64Decode( + 'CgpUcmFjZVN0YWdlEhIKBG5hbWUYASABKAlSBG5hbWUSGAoHbWVzc2FnZRgCIAEoCVIHbWVzc2' + 'FnZRIYCgdhbGxvd2VkGAMgASgIUgdhbGxvd2VkEjIKEmZvcndhcmRpbmdfZGV0YWlscxgEIAEo' + 'CUgAUhFmb3J3YXJkaW5nRGV0YWlsc4gBAUIVChNfZm9yd2FyZGluZ19kZXRhaWxz'); + +@$core.Deprecated('Use tracePacketResponseDescriptor instead') +const TracePacketResponse$json = { + '1': 'TracePacketResponse', + '2': [ + { + '1': 'stages', + '3': 1, + '4': 3, + '5': 11, + '6': '.daemon.TraceStage', + '10': 'stages' + }, + { + '1': 'final_disposition', + '3': 2, + '4': 1, + '5': 8, + '10': 'finalDisposition' + }, + ], +}; + +/// Descriptor for `TracePacketResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List tracePacketResponseDescriptor = $convert.base64Decode( + 'ChNUcmFjZVBhY2tldFJlc3BvbnNlEioKBnN0YWdlcxgBIAMoCzISLmRhZW1vbi5UcmFjZVN0YW' + 'dlUgZzdGFnZXMSKwoRZmluYWxfZGlzcG9zaXRpb24YAiABKAhSEGZpbmFsRGlzcG9zaXRpb24='); + +@$core.Deprecated('Use subscribeRequestDescriptor instead') +const SubscribeRequest$json = { + '1': 'SubscribeRequest', +}; + +/// Descriptor for `SubscribeRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List subscribeRequestDescriptor = + $convert.base64Decode('ChBTdWJzY3JpYmVSZXF1ZXN0'); + +@$core.Deprecated('Use systemEventDescriptor instead') +const SystemEvent$json = { + '1': 'SystemEvent', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + { + '1': 'severity', + '3': 2, + '4': 1, + '5': 14, + '6': '.daemon.SystemEvent.Severity', + '10': 'severity' + }, + { + '1': 'category', + '3': 3, + '4': 1, + '5': 14, + '6': '.daemon.SystemEvent.Category', + '10': 'category' + }, + {'1': 'message', '3': 4, '4': 1, '5': 9, '10': 'message'}, + {'1': 'userMessage', '3': 5, '4': 1, '5': 9, '10': 'userMessage'}, + { + '1': 'timestamp', + '3': 6, + '4': 1, + '5': 11, + '6': '.google.protobuf.Timestamp', + '10': 'timestamp' + }, + { + '1': 'metadata', + '3': 7, + '4': 3, + '5': 11, + '6': '.daemon.SystemEvent.MetadataEntry', + '10': 'metadata' + }, + ], + '3': [SystemEvent_MetadataEntry$json], + '4': [SystemEvent_Severity$json, SystemEvent_Category$json], +}; + +@$core.Deprecated('Use systemEventDescriptor instead') +const SystemEvent_MetadataEntry$json = { + '1': 'MetadataEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + ], + '7': {'7': true}, +}; + +@$core.Deprecated('Use systemEventDescriptor instead') +const SystemEvent_Severity$json = { + '1': 'Severity', + '2': [ + {'1': 'INFO', '2': 0}, + {'1': 'WARNING', '2': 1}, + {'1': 'ERROR', '2': 2}, + {'1': 'CRITICAL', '2': 3}, + ], +}; + +@$core.Deprecated('Use systemEventDescriptor instead') +const SystemEvent_Category$json = { + '1': 'Category', + '2': [ + {'1': 'NETWORK', '2': 0}, + {'1': 'DNS', '2': 1}, + {'1': 'AUTHENTICATION', '2': 2}, + {'1': 'CONNECTIVITY', '2': 3}, + {'1': 'SYSTEM', '2': 4}, + ], +}; + +/// Descriptor for `SystemEvent`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List systemEventDescriptor = $convert.base64Decode( + 'CgtTeXN0ZW1FdmVudBIOCgJpZBgBIAEoCVICaWQSOAoIc2V2ZXJpdHkYAiABKA4yHC5kYWVtb2' + '4uU3lzdGVtRXZlbnQuU2V2ZXJpdHlSCHNldmVyaXR5EjgKCGNhdGVnb3J5GAMgASgOMhwuZGFl' + 'bW9uLlN5c3RlbUV2ZW50LkNhdGVnb3J5UghjYXRlZ29yeRIYCgdtZXNzYWdlGAQgASgJUgdtZX' + 'NzYWdlEiAKC3VzZXJNZXNzYWdlGAUgASgJUgt1c2VyTWVzc2FnZRI4Cgl0aW1lc3RhbXAYBiAB' + 'KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW1lc3RhbXASPQoIbWV0YWRhdGEYBy' + 'ADKAsyIS5kYWVtb24uU3lzdGVtRXZlbnQuTWV0YWRhdGFFbnRyeVIIbWV0YWRhdGEaOwoNTWV0' + 'YWRhdGFFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgBIj' + 'oKCFNldmVyaXR5EggKBElORk8QABILCgdXQVJOSU5HEAESCQoFRVJST1IQAhIMCghDUklUSUNB' + 'TBADIlIKCENhdGVnb3J5EgsKB05FVFdPUksQABIHCgNETlMQARISCg5BVVRIRU5USUNBVElPTh' + 'ACEhAKDENPTk5FQ1RJVklUWRADEgoKBlNZU1RFTRAE'); + +@$core.Deprecated('Use getEventsRequestDescriptor instead') +const GetEventsRequest$json = { + '1': 'GetEventsRequest', +}; + +/// Descriptor for `GetEventsRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getEventsRequestDescriptor = + $convert.base64Decode('ChBHZXRFdmVudHNSZXF1ZXN0'); + +@$core.Deprecated('Use getEventsResponseDescriptor instead') +const GetEventsResponse$json = { + '1': 'GetEventsResponse', + '2': [ + { + '1': 'events', + '3': 1, + '4': 3, + '5': 11, + '6': '.daemon.SystemEvent', + '10': 'events' + }, + ], +}; + +/// Descriptor for `GetEventsResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getEventsResponseDescriptor = $convert.base64Decode( + 'ChFHZXRFdmVudHNSZXNwb25zZRIrCgZldmVudHMYASADKAsyEy5kYWVtb24uU3lzdGVtRXZlbn' + 'RSBmV2ZW50cw=='); + +@$core.Deprecated('Use switchProfileRequestDescriptor instead') +const SwitchProfileRequest$json = { + '1': 'SwitchProfileRequest', + '2': [ + { + '1': 'profileName', + '3': 1, + '4': 1, + '5': 9, + '9': 0, + '10': 'profileName', + '17': true + }, + { + '1': 'username', + '3': 2, + '4': 1, + '5': 9, + '9': 1, + '10': 'username', + '17': true + }, + ], + '8': [ + {'1': '_profileName'}, + {'1': '_username'}, + ], +}; + +/// Descriptor for `SwitchProfileRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List switchProfileRequestDescriptor = $convert.base64Decode( + 'ChRTd2l0Y2hQcm9maWxlUmVxdWVzdBIlCgtwcm9maWxlTmFtZRgBIAEoCUgAUgtwcm9maWxlTm' + 'FtZYgBARIfCgh1c2VybmFtZRgCIAEoCUgBUgh1c2VybmFtZYgBAUIOCgxfcHJvZmlsZU5hbWVC' + 'CwoJX3VzZXJuYW1l'); + +@$core.Deprecated('Use switchProfileResponseDescriptor instead') +const SwitchProfileResponse$json = { + '1': 'SwitchProfileResponse', +}; + +/// Descriptor for `SwitchProfileResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List switchProfileResponseDescriptor = + $convert.base64Decode('ChVTd2l0Y2hQcm9maWxlUmVzcG9uc2U='); + +@$core.Deprecated('Use setConfigRequestDescriptor instead') +const SetConfigRequest$json = { + '1': 'SetConfigRequest', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + {'1': 'profileName', '3': 2, '4': 1, '5': 9, '10': 'profileName'}, + {'1': 'managementUrl', '3': 3, '4': 1, '5': 9, '10': 'managementUrl'}, + {'1': 'adminURL', '3': 4, '4': 1, '5': 9, '10': 'adminURL'}, + { + '1': 'rosenpassEnabled', + '3': 5, + '4': 1, + '5': 8, + '9': 0, + '10': 'rosenpassEnabled', + '17': true + }, + { + '1': 'interfaceName', + '3': 6, + '4': 1, + '5': 9, + '9': 1, + '10': 'interfaceName', + '17': true + }, + { + '1': 'wireguardPort', + '3': 7, + '4': 1, + '5': 3, + '9': 2, + '10': 'wireguardPort', + '17': true + }, + { + '1': 'optionalPreSharedKey', + '3': 8, + '4': 1, + '5': 9, + '9': 3, + '10': 'optionalPreSharedKey', + '17': true + }, + { + '1': 'disableAutoConnect', + '3': 9, + '4': 1, + '5': 8, + '9': 4, + '10': 'disableAutoConnect', + '17': true + }, + { + '1': 'serverSSHAllowed', + '3': 10, + '4': 1, + '5': 8, + '9': 5, + '10': 'serverSSHAllowed', + '17': true + }, + { + '1': 'rosenpassPermissive', + '3': 11, + '4': 1, + '5': 8, + '9': 6, + '10': 'rosenpassPermissive', + '17': true + }, + { + '1': 'networkMonitor', + '3': 12, + '4': 1, + '5': 8, + '9': 7, + '10': 'networkMonitor', + '17': true + }, + { + '1': 'disable_client_routes', + '3': 13, + '4': 1, + '5': 8, + '9': 8, + '10': 'disableClientRoutes', + '17': true + }, + { + '1': 'disable_server_routes', + '3': 14, + '4': 1, + '5': 8, + '9': 9, + '10': 'disableServerRoutes', + '17': true + }, + { + '1': 'disable_dns', + '3': 15, + '4': 1, + '5': 8, + '9': 10, + '10': 'disableDns', + '17': true + }, + { + '1': 'disable_firewall', + '3': 16, + '4': 1, + '5': 8, + '9': 11, + '10': 'disableFirewall', + '17': true + }, + { + '1': 'block_lan_access', + '3': 17, + '4': 1, + '5': 8, + '9': 12, + '10': 'blockLanAccess', + '17': true + }, + { + '1': 'disable_notifications', + '3': 18, + '4': 1, + '5': 8, + '9': 13, + '10': 'disableNotifications', + '17': true + }, + { + '1': 'lazyConnectionEnabled', + '3': 19, + '4': 1, + '5': 8, + '9': 14, + '10': 'lazyConnectionEnabled', + '17': true + }, + { + '1': 'block_inbound', + '3': 20, + '4': 1, + '5': 8, + '9': 15, + '10': 'blockInbound', + '17': true + }, + {'1': 'natExternalIPs', '3': 21, '4': 3, '5': 9, '10': 'natExternalIPs'}, + { + '1': 'cleanNATExternalIPs', + '3': 22, + '4': 1, + '5': 8, + '10': 'cleanNATExternalIPs' + }, + { + '1': 'customDNSAddress', + '3': 23, + '4': 1, + '5': 12, + '10': 'customDNSAddress' + }, + { + '1': 'extraIFaceBlacklist', + '3': 24, + '4': 3, + '5': 9, + '10': 'extraIFaceBlacklist' + }, + {'1': 'dns_labels', '3': 25, '4': 3, '5': 9, '10': 'dnsLabels'}, + {'1': 'cleanDNSLabels', '3': 26, '4': 1, '5': 8, '10': 'cleanDNSLabels'}, + { + '1': 'dnsRouteInterval', + '3': 27, + '4': 1, + '5': 11, + '6': '.google.protobuf.Duration', + '9': 16, + '10': 'dnsRouteInterval', + '17': true + }, + {'1': 'mtu', '3': 28, '4': 1, '5': 3, '9': 17, '10': 'mtu', '17': true}, + { + '1': 'enableSSHRoot', + '3': 29, + '4': 1, + '5': 8, + '9': 18, + '10': 'enableSSHRoot', + '17': true + }, + { + '1': 'enableSSHSFTP', + '3': 30, + '4': 1, + '5': 8, + '9': 19, + '10': 'enableSSHSFTP', + '17': true + }, + { + '1': 'enableSSHLocalPortForwarding', + '3': 31, + '4': 1, + '5': 8, + '9': 20, + '10': 'enableSSHLocalPortForwarding', + '17': true + }, + { + '1': 'enableSSHRemotePortForwarding', + '3': 32, + '4': 1, + '5': 8, + '9': 21, + '10': 'enableSSHRemotePortForwarding', + '17': true + }, + { + '1': 'disableSSHAuth', + '3': 33, + '4': 1, + '5': 8, + '9': 22, + '10': 'disableSSHAuth', + '17': true + }, + { + '1': 'sshJWTCacheTTL', + '3': 34, + '4': 1, + '5': 5, + '9': 23, + '10': 'sshJWTCacheTTL', + '17': true + }, + ], + '8': [ + {'1': '_rosenpassEnabled'}, + {'1': '_interfaceName'}, + {'1': '_wireguardPort'}, + {'1': '_optionalPreSharedKey'}, + {'1': '_disableAutoConnect'}, + {'1': '_serverSSHAllowed'}, + {'1': '_rosenpassPermissive'}, + {'1': '_networkMonitor'}, + {'1': '_disable_client_routes'}, + {'1': '_disable_server_routes'}, + {'1': '_disable_dns'}, + {'1': '_disable_firewall'}, + {'1': '_block_lan_access'}, + {'1': '_disable_notifications'}, + {'1': '_lazyConnectionEnabled'}, + {'1': '_block_inbound'}, + {'1': '_dnsRouteInterval'}, + {'1': '_mtu'}, + {'1': '_enableSSHRoot'}, + {'1': '_enableSSHSFTP'}, + {'1': '_enableSSHLocalPortForwarding'}, + {'1': '_enableSSHRemotePortForwarding'}, + {'1': '_disableSSHAuth'}, + {'1': '_sshJWTCacheTTL'}, + ], +}; + +/// Descriptor for `SetConfigRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setConfigRequestDescriptor = $convert.base64Decode( + 'ChBTZXRDb25maWdSZXF1ZXN0EhoKCHVzZXJuYW1lGAEgASgJUgh1c2VybmFtZRIgCgtwcm9maW' + 'xlTmFtZRgCIAEoCVILcHJvZmlsZU5hbWUSJAoNbWFuYWdlbWVudFVybBgDIAEoCVINbWFuYWdl' + 'bWVudFVybBIaCghhZG1pblVSTBgEIAEoCVIIYWRtaW5VUkwSLwoQcm9zZW5wYXNzRW5hYmxlZB' + 'gFIAEoCEgAUhByb3NlbnBhc3NFbmFibGVkiAEBEikKDWludGVyZmFjZU5hbWUYBiABKAlIAVIN' + 'aW50ZXJmYWNlTmFtZYgBARIpCg13aXJlZ3VhcmRQb3J0GAcgASgDSAJSDXdpcmVndWFyZFBvcn' + 'SIAQESNwoUb3B0aW9uYWxQcmVTaGFyZWRLZXkYCCABKAlIA1IUb3B0aW9uYWxQcmVTaGFyZWRL' + 'ZXmIAQESMwoSZGlzYWJsZUF1dG9Db25uZWN0GAkgASgISARSEmRpc2FibGVBdXRvQ29ubmVjdI' + 'gBARIvChBzZXJ2ZXJTU0hBbGxvd2VkGAogASgISAVSEHNlcnZlclNTSEFsbG93ZWSIAQESNQoT' + 'cm9zZW5wYXNzUGVybWlzc2l2ZRgLIAEoCEgGUhNyb3NlbnBhc3NQZXJtaXNzaXZliAEBEisKDm' + '5ldHdvcmtNb25pdG9yGAwgASgISAdSDm5ldHdvcmtNb25pdG9yiAEBEjcKFWRpc2FibGVfY2xp' + 'ZW50X3JvdXRlcxgNIAEoCEgIUhNkaXNhYmxlQ2xpZW50Um91dGVziAEBEjcKFWRpc2FibGVfc2' + 'VydmVyX3JvdXRlcxgOIAEoCEgJUhNkaXNhYmxlU2VydmVyUm91dGVziAEBEiQKC2Rpc2FibGVf' + 'ZG5zGA8gASgISApSCmRpc2FibGVEbnOIAQESLgoQZGlzYWJsZV9maXJld2FsbBgQIAEoCEgLUg' + '9kaXNhYmxlRmlyZXdhbGyIAQESLQoQYmxvY2tfbGFuX2FjY2VzcxgRIAEoCEgMUg5ibG9ja0xh' + 'bkFjY2Vzc4gBARI4ChVkaXNhYmxlX25vdGlmaWNhdGlvbnMYEiABKAhIDVIUZGlzYWJsZU5vdG' + 'lmaWNhdGlvbnOIAQESOQoVbGF6eUNvbm5lY3Rpb25FbmFibGVkGBMgASgISA5SFWxhenlDb25u' + 'ZWN0aW9uRW5hYmxlZIgBARIoCg1ibG9ja19pbmJvdW5kGBQgASgISA9SDGJsb2NrSW5ib3VuZI' + 'gBARImCg5uYXRFeHRlcm5hbElQcxgVIAMoCVIObmF0RXh0ZXJuYWxJUHMSMAoTY2xlYW5OQVRF' + 'eHRlcm5hbElQcxgWIAEoCFITY2xlYW5OQVRFeHRlcm5hbElQcxIqChBjdXN0b21ETlNBZGRyZX' + 'NzGBcgASgMUhBjdXN0b21ETlNBZGRyZXNzEjAKE2V4dHJhSUZhY2VCbGFja2xpc3QYGCADKAlS' + 'E2V4dHJhSUZhY2VCbGFja2xpc3QSHQoKZG5zX2xhYmVscxgZIAMoCVIJZG5zTGFiZWxzEiYKDm' + 'NsZWFuRE5TTGFiZWxzGBogASgIUg5jbGVhbkROU0xhYmVscxJKChBkbnNSb3V0ZUludGVydmFs' + 'GBsgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uSBBSEGRuc1JvdXRlSW50ZXJ2YWyIAQ' + 'ESFQoDbXR1GBwgASgDSBFSA210dYgBARIpCg1lbmFibGVTU0hSb290GB0gASgISBJSDWVuYWJs' + 'ZVNTSFJvb3SIAQESKQoNZW5hYmxlU1NIU0ZUUBgeIAEoCEgTUg1lbmFibGVTU0hTRlRQiAEBEk' + 'cKHGVuYWJsZVNTSExvY2FsUG9ydEZvcndhcmRpbmcYHyABKAhIFFIcZW5hYmxlU1NITG9jYWxQ' + 'b3J0Rm9yd2FyZGluZ4gBARJJCh1lbmFibGVTU0hSZW1vdGVQb3J0Rm9yd2FyZGluZxggIAEoCE' + 'gVUh1lbmFibGVTU0hSZW1vdGVQb3J0Rm9yd2FyZGluZ4gBARIrCg5kaXNhYmxlU1NIQXV0aBgh' + 'IAEoCEgWUg5kaXNhYmxlU1NIQXV0aIgBARIrCg5zc2hKV1RDYWNoZVRUTBgiIAEoBUgXUg5zc2' + 'hKV1RDYWNoZVRUTIgBAUITChFfcm9zZW5wYXNzRW5hYmxlZEIQCg5faW50ZXJmYWNlTmFtZUIQ' + 'Cg5fd2lyZWd1YXJkUG9ydEIXChVfb3B0aW9uYWxQcmVTaGFyZWRLZXlCFQoTX2Rpc2FibGVBdX' + 'RvQ29ubmVjdEITChFfc2VydmVyU1NIQWxsb3dlZEIWChRfcm9zZW5wYXNzUGVybWlzc2l2ZUIR' + 'Cg9fbmV0d29ya01vbml0b3JCGAoWX2Rpc2FibGVfY2xpZW50X3JvdXRlc0IYChZfZGlzYWJsZV' + '9zZXJ2ZXJfcm91dGVzQg4KDF9kaXNhYmxlX2Ruc0ITChFfZGlzYWJsZV9maXJld2FsbEITChFf' + 'YmxvY2tfbGFuX2FjY2Vzc0IYChZfZGlzYWJsZV9ub3RpZmljYXRpb25zQhgKFl9sYXp5Q29ubm' + 'VjdGlvbkVuYWJsZWRCEAoOX2Jsb2NrX2luYm91bmRCEwoRX2Ruc1JvdXRlSW50ZXJ2YWxCBgoE' + 'X210dUIQCg5fZW5hYmxlU1NIUm9vdEIQCg5fZW5hYmxlU1NIU0ZUUEIfCh1fZW5hYmxlU1NITG' + '9jYWxQb3J0Rm9yd2FyZGluZ0IgCh5fZW5hYmxlU1NIUmVtb3RlUG9ydEZvcndhcmRpbmdCEQoP' + 'X2Rpc2FibGVTU0hBdXRoQhEKD19zc2hKV1RDYWNoZVRUTA=='); + +@$core.Deprecated('Use setConfigResponseDescriptor instead') +const SetConfigResponse$json = { + '1': 'SetConfigResponse', +}; + +/// Descriptor for `SetConfigResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setConfigResponseDescriptor = + $convert.base64Decode('ChFTZXRDb25maWdSZXNwb25zZQ=='); + +@$core.Deprecated('Use addProfileRequestDescriptor instead') +const AddProfileRequest$json = { + '1': 'AddProfileRequest', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + {'1': 'profileName', '3': 2, '4': 1, '5': 9, '10': 'profileName'}, + ], +}; + +/// Descriptor for `AddProfileRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List addProfileRequestDescriptor = $convert.base64Decode( + 'ChFBZGRQcm9maWxlUmVxdWVzdBIaCgh1c2VybmFtZRgBIAEoCVIIdXNlcm5hbWUSIAoLcHJvZm' + 'lsZU5hbWUYAiABKAlSC3Byb2ZpbGVOYW1l'); + +@$core.Deprecated('Use addProfileResponseDescriptor instead') +const AddProfileResponse$json = { + '1': 'AddProfileResponse', +}; + +/// Descriptor for `AddProfileResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List addProfileResponseDescriptor = + $convert.base64Decode('ChJBZGRQcm9maWxlUmVzcG9uc2U='); + +@$core.Deprecated('Use removeProfileRequestDescriptor instead') +const RemoveProfileRequest$json = { + '1': 'RemoveProfileRequest', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + {'1': 'profileName', '3': 2, '4': 1, '5': 9, '10': 'profileName'}, + ], +}; + +/// Descriptor for `RemoveProfileRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List removeProfileRequestDescriptor = $convert.base64Decode( + 'ChRSZW1vdmVQcm9maWxlUmVxdWVzdBIaCgh1c2VybmFtZRgBIAEoCVIIdXNlcm5hbWUSIAoLcH' + 'JvZmlsZU5hbWUYAiABKAlSC3Byb2ZpbGVOYW1l'); + +@$core.Deprecated('Use removeProfileResponseDescriptor instead') +const RemoveProfileResponse$json = { + '1': 'RemoveProfileResponse', +}; + +/// Descriptor for `RemoveProfileResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List removeProfileResponseDescriptor = + $convert.base64Decode('ChVSZW1vdmVQcm9maWxlUmVzcG9uc2U='); + +@$core.Deprecated('Use listProfilesRequestDescriptor instead') +const ListProfilesRequest$json = { + '1': 'ListProfilesRequest', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + ], +}; + +/// Descriptor for `ListProfilesRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listProfilesRequestDescriptor = + $convert.base64Decode( + 'ChNMaXN0UHJvZmlsZXNSZXF1ZXN0EhoKCHVzZXJuYW1lGAEgASgJUgh1c2VybmFtZQ=='); + +@$core.Deprecated('Use listProfilesResponseDescriptor instead') +const ListProfilesResponse$json = { + '1': 'ListProfilesResponse', + '2': [ + { + '1': 'profiles', + '3': 1, + '4': 3, + '5': 11, + '6': '.daemon.Profile', + '10': 'profiles' + }, + ], +}; + +/// Descriptor for `ListProfilesResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listProfilesResponseDescriptor = $convert.base64Decode( + 'ChRMaXN0UHJvZmlsZXNSZXNwb25zZRIrCghwcm9maWxlcxgBIAMoCzIPLmRhZW1vbi5Qcm9maW' + 'xlUghwcm9maWxlcw=='); + +@$core.Deprecated('Use profileDescriptor instead') +const Profile$json = { + '1': 'Profile', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'is_active', '3': 2, '4': 1, '5': 8, '10': 'isActive'}, + ], +}; + +/// Descriptor for `Profile`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List profileDescriptor = $convert.base64Decode( + 'CgdQcm9maWxlEhIKBG5hbWUYASABKAlSBG5hbWUSGwoJaXNfYWN0aXZlGAIgASgIUghpc0FjdG' + 'l2ZQ=='); + +@$core.Deprecated('Use getActiveProfileRequestDescriptor instead') +const GetActiveProfileRequest$json = { + '1': 'GetActiveProfileRequest', +}; + +/// Descriptor for `GetActiveProfileRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getActiveProfileRequestDescriptor = + $convert.base64Decode('ChdHZXRBY3RpdmVQcm9maWxlUmVxdWVzdA=='); + +@$core.Deprecated('Use getActiveProfileResponseDescriptor instead') +const GetActiveProfileResponse$json = { + '1': 'GetActiveProfileResponse', + '2': [ + {'1': 'profileName', '3': 1, '4': 1, '5': 9, '10': 'profileName'}, + {'1': 'username', '3': 2, '4': 1, '5': 9, '10': 'username'}, + ], +}; + +/// Descriptor for `GetActiveProfileResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getActiveProfileResponseDescriptor = + $convert.base64Decode( + 'ChhHZXRBY3RpdmVQcm9maWxlUmVzcG9uc2USIAoLcHJvZmlsZU5hbWUYASABKAlSC3Byb2ZpbG' + 'VOYW1lEhoKCHVzZXJuYW1lGAIgASgJUgh1c2VybmFtZQ=='); + +@$core.Deprecated('Use logoutRequestDescriptor instead') +const LogoutRequest$json = { + '1': 'LogoutRequest', + '2': [ + { + '1': 'profileName', + '3': 1, + '4': 1, + '5': 9, + '9': 0, + '10': 'profileName', + '17': true + }, + { + '1': 'username', + '3': 2, + '4': 1, + '5': 9, + '9': 1, + '10': 'username', + '17': true + }, + ], + '8': [ + {'1': '_profileName'}, + {'1': '_username'}, + ], +}; + +/// Descriptor for `LogoutRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List logoutRequestDescriptor = $convert.base64Decode( + 'Cg1Mb2dvdXRSZXF1ZXN0EiUKC3Byb2ZpbGVOYW1lGAEgASgJSABSC3Byb2ZpbGVOYW1liAEBEh' + '8KCHVzZXJuYW1lGAIgASgJSAFSCHVzZXJuYW1liAEBQg4KDF9wcm9maWxlTmFtZUILCglfdXNl' + 'cm5hbWU='); + +@$core.Deprecated('Use logoutResponseDescriptor instead') +const LogoutResponse$json = { + '1': 'LogoutResponse', +}; + +/// Descriptor for `LogoutResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List logoutResponseDescriptor = + $convert.base64Decode('Cg5Mb2dvdXRSZXNwb25zZQ=='); + +@$core.Deprecated('Use getFeaturesRequestDescriptor instead') +const GetFeaturesRequest$json = { + '1': 'GetFeaturesRequest', +}; + +/// Descriptor for `GetFeaturesRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getFeaturesRequestDescriptor = + $convert.base64Decode('ChJHZXRGZWF0dXJlc1JlcXVlc3Q='); + +@$core.Deprecated('Use getFeaturesResponseDescriptor instead') +const GetFeaturesResponse$json = { + '1': 'GetFeaturesResponse', + '2': [ + {'1': 'disable_profiles', '3': 1, '4': 1, '5': 8, '10': 'disableProfiles'}, + { + '1': 'disable_update_settings', + '3': 2, + '4': 1, + '5': 8, + '10': 'disableUpdateSettings' + }, + {'1': 'disable_networks', '3': 3, '4': 1, '5': 8, '10': 'disableNetworks'}, + ], +}; + +/// Descriptor for `GetFeaturesResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getFeaturesResponseDescriptor = $convert.base64Decode( + 'ChNHZXRGZWF0dXJlc1Jlc3BvbnNlEikKEGRpc2FibGVfcHJvZmlsZXMYASABKAhSD2Rpc2FibG' + 'VQcm9maWxlcxI2ChdkaXNhYmxlX3VwZGF0ZV9zZXR0aW5ncxgCIAEoCFIVZGlzYWJsZVVwZGF0' + 'ZVNldHRpbmdzEikKEGRpc2FibGVfbmV0d29ya3MYAyABKAhSD2Rpc2FibGVOZXR3b3Jrcw=='); + +@$core.Deprecated('Use triggerUpdateRequestDescriptor instead') +const TriggerUpdateRequest$json = { + '1': 'TriggerUpdateRequest', +}; + +/// Descriptor for `TriggerUpdateRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List triggerUpdateRequestDescriptor = + $convert.base64Decode('ChRUcmlnZ2VyVXBkYXRlUmVxdWVzdA=='); + +@$core.Deprecated('Use triggerUpdateResponseDescriptor instead') +const TriggerUpdateResponse$json = { + '1': 'TriggerUpdateResponse', + '2': [ + {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, + {'1': 'errorMsg', '3': 2, '4': 1, '5': 9, '10': 'errorMsg'}, + ], +}; + +/// Descriptor for `TriggerUpdateResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List triggerUpdateResponseDescriptor = $convert.base64Decode( + 'ChVUcmlnZ2VyVXBkYXRlUmVzcG9uc2USGAoHc3VjY2VzcxgBIAEoCFIHc3VjY2VzcxIaCghlcn' + 'Jvck1zZxgCIAEoCVIIZXJyb3JNc2c='); + +@$core.Deprecated('Use getPeerSSHHostKeyRequestDescriptor instead') +const GetPeerSSHHostKeyRequest$json = { + '1': 'GetPeerSSHHostKeyRequest', + '2': [ + {'1': 'peerAddress', '3': 1, '4': 1, '5': 9, '10': 'peerAddress'}, + ], +}; + +/// Descriptor for `GetPeerSSHHostKeyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPeerSSHHostKeyRequestDescriptor = + $convert.base64Decode( + 'ChhHZXRQZWVyU1NISG9zdEtleVJlcXVlc3QSIAoLcGVlckFkZHJlc3MYASABKAlSC3BlZXJBZG' + 'RyZXNz'); + +@$core.Deprecated('Use getPeerSSHHostKeyResponseDescriptor instead') +const GetPeerSSHHostKeyResponse$json = { + '1': 'GetPeerSSHHostKeyResponse', + '2': [ + {'1': 'sshHostKey', '3': 1, '4': 1, '5': 12, '10': 'sshHostKey'}, + {'1': 'peerIP', '3': 2, '4': 1, '5': 9, '10': 'peerIP'}, + {'1': 'peerFQDN', '3': 3, '4': 1, '5': 9, '10': 'peerFQDN'}, + {'1': 'found', '3': 4, '4': 1, '5': 8, '10': 'found'}, + ], +}; + +/// Descriptor for `GetPeerSSHHostKeyResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPeerSSHHostKeyResponseDescriptor = $convert.base64Decode( + 'ChlHZXRQZWVyU1NISG9zdEtleVJlc3BvbnNlEh4KCnNzaEhvc3RLZXkYASABKAxSCnNzaEhvc3' + 'RLZXkSFgoGcGVlcklQGAIgASgJUgZwZWVySVASGgoIcGVlckZRRE4YAyABKAlSCHBlZXJGUURO' + 'EhQKBWZvdW5kGAQgASgIUgVmb3VuZA=='); + +@$core.Deprecated('Use requestJWTAuthRequestDescriptor instead') +const RequestJWTAuthRequest$json = { + '1': 'RequestJWTAuthRequest', + '2': [ + {'1': 'hint', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'hint', '17': true}, + ], + '8': [ + {'1': '_hint'}, + ], +}; + +/// Descriptor for `RequestJWTAuthRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List requestJWTAuthRequestDescriptor = $convert.base64Decode( + 'ChVSZXF1ZXN0SldUQXV0aFJlcXVlc3QSFwoEaGludBgBIAEoCUgAUgRoaW50iAEBQgcKBV9oaW' + '50'); + +@$core.Deprecated('Use requestJWTAuthResponseDescriptor instead') +const RequestJWTAuthResponse$json = { + '1': 'RequestJWTAuthResponse', + '2': [ + {'1': 'verificationURI', '3': 1, '4': 1, '5': 9, '10': 'verificationURI'}, + { + '1': 'verificationURIComplete', + '3': 2, + '4': 1, + '5': 9, + '10': 'verificationURIComplete' + }, + {'1': 'userCode', '3': 3, '4': 1, '5': 9, '10': 'userCode'}, + {'1': 'deviceCode', '3': 4, '4': 1, '5': 9, '10': 'deviceCode'}, + {'1': 'expiresIn', '3': 5, '4': 1, '5': 3, '10': 'expiresIn'}, + {'1': 'cachedToken', '3': 6, '4': 1, '5': 9, '10': 'cachedToken'}, + {'1': 'maxTokenAge', '3': 7, '4': 1, '5': 3, '10': 'maxTokenAge'}, + ], +}; + +/// Descriptor for `RequestJWTAuthResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List requestJWTAuthResponseDescriptor = $convert.base64Decode( + 'ChZSZXF1ZXN0SldUQXV0aFJlc3BvbnNlEigKD3ZlcmlmaWNhdGlvblVSSRgBIAEoCVIPdmVyaW' + 'ZpY2F0aW9uVVJJEjgKF3ZlcmlmaWNhdGlvblVSSUNvbXBsZXRlGAIgASgJUhd2ZXJpZmljYXRp' + 'b25VUklDb21wbGV0ZRIaCgh1c2VyQ29kZRgDIAEoCVIIdXNlckNvZGUSHgoKZGV2aWNlQ29kZR' + 'gEIAEoCVIKZGV2aWNlQ29kZRIcCglleHBpcmVzSW4YBSABKANSCWV4cGlyZXNJbhIgCgtjYWNo' + 'ZWRUb2tlbhgGIAEoCVILY2FjaGVkVG9rZW4SIAoLbWF4VG9rZW5BZ2UYByABKANSC21heFRva2' + 'VuQWdl'); + +@$core.Deprecated('Use waitJWTTokenRequestDescriptor instead') +const WaitJWTTokenRequest$json = { + '1': 'WaitJWTTokenRequest', + '2': [ + {'1': 'deviceCode', '3': 1, '4': 1, '5': 9, '10': 'deviceCode'}, + {'1': 'userCode', '3': 2, '4': 1, '5': 9, '10': 'userCode'}, + ], +}; + +/// Descriptor for `WaitJWTTokenRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List waitJWTTokenRequestDescriptor = $convert.base64Decode( + 'ChNXYWl0SldUVG9rZW5SZXF1ZXN0Eh4KCmRldmljZUNvZGUYASABKAlSCmRldmljZUNvZGUSGg' + 'oIdXNlckNvZGUYAiABKAlSCHVzZXJDb2Rl'); + +@$core.Deprecated('Use waitJWTTokenResponseDescriptor instead') +const WaitJWTTokenResponse$json = { + '1': 'WaitJWTTokenResponse', + '2': [ + {'1': 'token', '3': 1, '4': 1, '5': 9, '10': 'token'}, + {'1': 'tokenType', '3': 2, '4': 1, '5': 9, '10': 'tokenType'}, + {'1': 'expiresIn', '3': 3, '4': 1, '5': 3, '10': 'expiresIn'}, + ], +}; + +/// Descriptor for `WaitJWTTokenResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List waitJWTTokenResponseDescriptor = $convert.base64Decode( + 'ChRXYWl0SldUVG9rZW5SZXNwb25zZRIUCgV0b2tlbhgBIAEoCVIFdG9rZW4SHAoJdG9rZW5UeX' + 'BlGAIgASgJUgl0b2tlblR5cGUSHAoJZXhwaXJlc0luGAMgASgDUglleHBpcmVzSW4='); + +@$core.Deprecated('Use startCPUProfileRequestDescriptor instead') +const StartCPUProfileRequest$json = { + '1': 'StartCPUProfileRequest', +}; + +/// Descriptor for `StartCPUProfileRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List startCPUProfileRequestDescriptor = + $convert.base64Decode('ChZTdGFydENQVVByb2ZpbGVSZXF1ZXN0'); + +@$core.Deprecated('Use startCPUProfileResponseDescriptor instead') +const StartCPUProfileResponse$json = { + '1': 'StartCPUProfileResponse', +}; + +/// Descriptor for `StartCPUProfileResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List startCPUProfileResponseDescriptor = + $convert.base64Decode('ChdTdGFydENQVVByb2ZpbGVSZXNwb25zZQ=='); + +@$core.Deprecated('Use stopCPUProfileRequestDescriptor instead') +const StopCPUProfileRequest$json = { + '1': 'StopCPUProfileRequest', +}; + +/// Descriptor for `StopCPUProfileRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List stopCPUProfileRequestDescriptor = + $convert.base64Decode('ChVTdG9wQ1BVUHJvZmlsZVJlcXVlc3Q='); + +@$core.Deprecated('Use stopCPUProfileResponseDescriptor instead') +const StopCPUProfileResponse$json = { + '1': 'StopCPUProfileResponse', +}; + +/// Descriptor for `StopCPUProfileResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List stopCPUProfileResponseDescriptor = + $convert.base64Decode('ChZTdG9wQ1BVUHJvZmlsZVJlc3BvbnNl'); + +@$core.Deprecated('Use installerResultRequestDescriptor instead') +const InstallerResultRequest$json = { + '1': 'InstallerResultRequest', +}; + +/// Descriptor for `InstallerResultRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List installerResultRequestDescriptor = + $convert.base64Decode('ChZJbnN0YWxsZXJSZXN1bHRSZXF1ZXN0'); + +@$core.Deprecated('Use installerResultResponseDescriptor instead') +const InstallerResultResponse$json = { + '1': 'InstallerResultResponse', + '2': [ + {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, + {'1': 'errorMsg', '3': 2, '4': 1, '5': 9, '10': 'errorMsg'}, + ], +}; + +/// Descriptor for `InstallerResultResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List installerResultResponseDescriptor = + $convert.base64Decode( + 'ChdJbnN0YWxsZXJSZXN1bHRSZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEhoKCG' + 'Vycm9yTXNnGAIgASgJUghlcnJvck1zZw=='); + +@$core.Deprecated('Use exposeServiceRequestDescriptor instead') +const ExposeServiceRequest$json = { + '1': 'ExposeServiceRequest', + '2': [ + {'1': 'port', '3': 1, '4': 1, '5': 13, '10': 'port'}, + { + '1': 'protocol', + '3': 2, + '4': 1, + '5': 14, + '6': '.daemon.ExposeProtocol', + '10': 'protocol' + }, + {'1': 'pin', '3': 3, '4': 1, '5': 9, '10': 'pin'}, + {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'}, + {'1': 'user_groups', '3': 5, '4': 3, '5': 9, '10': 'userGroups'}, + {'1': 'domain', '3': 6, '4': 1, '5': 9, '10': 'domain'}, + {'1': 'name_prefix', '3': 7, '4': 1, '5': 9, '10': 'namePrefix'}, + {'1': 'listen_port', '3': 8, '4': 1, '5': 13, '10': 'listenPort'}, + ], +}; + +/// Descriptor for `ExposeServiceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exposeServiceRequestDescriptor = $convert.base64Decode( + 'ChRFeHBvc2VTZXJ2aWNlUmVxdWVzdBISCgRwb3J0GAEgASgNUgRwb3J0EjIKCHByb3RvY29sGA' + 'IgASgOMhYuZGFlbW9uLkV4cG9zZVByb3RvY29sUghwcm90b2NvbBIQCgNwaW4YAyABKAlSA3Bp' + 'bhIaCghwYXNzd29yZBgEIAEoCVIIcGFzc3dvcmQSHwoLdXNlcl9ncm91cHMYBSADKAlSCnVzZX' + 'JHcm91cHMSFgoGZG9tYWluGAYgASgJUgZkb21haW4SHwoLbmFtZV9wcmVmaXgYByABKAlSCm5h' + 'bWVQcmVmaXgSHwoLbGlzdGVuX3BvcnQYCCABKA1SCmxpc3RlblBvcnQ='); + +@$core.Deprecated('Use exposeServiceEventDescriptor instead') +const ExposeServiceEvent$json = { + '1': 'ExposeServiceEvent', + '2': [ + { + '1': 'ready', + '3': 1, + '4': 1, + '5': 11, + '6': '.daemon.ExposeServiceReady', + '9': 0, + '10': 'ready' + }, + ], + '8': [ + {'1': 'event'}, + ], +}; + +/// Descriptor for `ExposeServiceEvent`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exposeServiceEventDescriptor = $convert.base64Decode( + 'ChJFeHBvc2VTZXJ2aWNlRXZlbnQSMgoFcmVhZHkYASABKAsyGi5kYWVtb24uRXhwb3NlU2Vydm' + 'ljZVJlYWR5SABSBXJlYWR5QgcKBWV2ZW50'); + +@$core.Deprecated('Use exposeServiceReadyDescriptor instead') +const ExposeServiceReady$json = { + '1': 'ExposeServiceReady', + '2': [ + {'1': 'service_name', '3': 1, '4': 1, '5': 9, '10': 'serviceName'}, + {'1': 'service_url', '3': 2, '4': 1, '5': 9, '10': 'serviceUrl'}, + {'1': 'domain', '3': 3, '4': 1, '5': 9, '10': 'domain'}, + { + '1': 'port_auto_assigned', + '3': 4, + '4': 1, + '5': 8, + '10': 'portAutoAssigned' + }, + ], +}; + +/// Descriptor for `ExposeServiceReady`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exposeServiceReadyDescriptor = $convert.base64Decode( + 'ChJFeHBvc2VTZXJ2aWNlUmVhZHkSIQoMc2VydmljZV9uYW1lGAEgASgJUgtzZXJ2aWNlTmFtZR' + 'IfCgtzZXJ2aWNlX3VybBgCIAEoCVIKc2VydmljZVVybBIWCgZkb21haW4YAyABKAlSBmRvbWFp' + 'bhIsChJwb3J0X2F1dG9fYXNzaWduZWQYBCABKAhSEHBvcnRBdXRvQXNzaWduZWQ='); diff --git a/client/flutter_ui/lib/src/models.dart b/client/flutter_ui/lib/src/models.dart new file mode 100644 index 000000000..d689a0827 --- /dev/null +++ b/client/flutter_ui/lib/src/models.dart @@ -0,0 +1,257 @@ +enum ConnectionStatus { + disconnected, + connecting, + awaitingLogin, + connected, + error; + + String get label { + return switch (this) { + ConnectionStatus.disconnected => 'Disconnected', + ConnectionStatus.connecting => 'Connecting', + ConnectionStatus.awaitingLogin => 'Awaiting login', + ConnectionStatus.connected => 'Connected', + ConnectionStatus.error => 'Error', + }; + } +} + +enum NetworkFilter { + all, + overlapping, + exitNode; + + bool matches(NetworkRoute route) { + return switch (this) { + NetworkFilter.all => true, + NetworkFilter.overlapping => route.overlapping, + NetworkFilter.exitNode => route.isExitNode, + }; + } +} + +class ClientSnapshot { + const ClientSnapshot({ + required this.daemonAddr, + required this.daemonVersion, + required this.status, + required this.activeProfile, + required this.profiles, + required this.networks, + required this.settings, + this.errorMessage, + this.pendingLogin, + }); + + factory ClientSnapshot.initial(String daemonAddr) { + return ClientSnapshot( + daemonAddr: daemonAddr, + daemonVersion: 'unknown', + status: ConnectionStatus.disconnected, + activeProfile: const ProfileInfo(name: 'default', active: true), + profiles: const [ProfileInfo(name: 'default', active: true)], + networks: const [], + settings: const ClientSettings(), + ); + } + + final String daemonAddr; + final String daemonVersion; + final ConnectionStatus status; + final ProfileInfo activeProfile; + final List profiles; + final List networks; + final ClientSettings settings; + final String? errorMessage; + final PendingLogin? pendingLogin; + + ClientSnapshot copyWith({ + String? daemonAddr, + String? daemonVersion, + ConnectionStatus? status, + ProfileInfo? activeProfile, + List? profiles, + List? networks, + ClientSettings? settings, + String? errorMessage, + PendingLogin? pendingLogin, + bool clearError = false, + bool clearPendingLogin = false, + }) { + return ClientSnapshot( + daemonAddr: daemonAddr ?? this.daemonAddr, + daemonVersion: daemonVersion ?? this.daemonVersion, + status: status ?? this.status, + activeProfile: activeProfile ?? this.activeProfile, + profiles: profiles ?? this.profiles, + networks: networks ?? this.networks, + settings: settings ?? this.settings, + errorMessage: clearError ? null : errorMessage ?? this.errorMessage, + pendingLogin: clearPendingLogin + ? null + : pendingLogin ?? this.pendingLogin, + ); + } +} + +class PendingLogin { + const PendingLogin({ + required this.verificationUri, + required this.userCode, + }); + + final String verificationUri; + final String userCode; +} + +class ProfileInfo { + const ProfileInfo({required this.name, required this.active, this.email}); + + final String name; + final String? email; + final bool active; +} + +class NetworkRoute { + const NetworkRoute({ + required this.id, + required this.range, + this.domains = const [], + this.resolvedIps = const {}, + this.selected = false, + this.overlapping = false, + }); + + final String id; + final String range; + final List domains; + final Map> resolvedIps; + final bool selected; + final bool overlapping; + + bool get isExitNode => range == '0.0.0.0/0'; +} + +enum DaemonLogLevel { unknown, panic, fatal, error, warn, info, debug, trace } + +class DebugBundleResult { + const DebugBundleResult({ + required this.path, + this.uploadedKey = '', + this.uploadFailureReason = '', + }); + + final String path; + final String uploadedKey; + final String uploadFailureReason; + + bool get uploaded => uploadedKey.isNotEmpty && uploadFailureReason.isEmpty; + bool get uploadFailed => uploadFailureReason.isNotEmpty; +} + +class TriggerUpdateResult { + const TriggerUpdateResult({required this.success, this.errorMessage = ''}); + + final bool success; + final String errorMessage; +} + +class InstallerResult { + const InstallerResult({required this.success, this.errorMessage = ''}); + + final bool success; + final String errorMessage; +} + +class UpdateProgressEvent { + const UpdateProgressEvent({required this.version}); + final String version; +} + +enum NotificationSeverity { info, warning, error, critical } + +enum NotificationCategory { + network, + dns, + authentication, + connectivity, + system; + + String get label { + return switch (this) { + NotificationCategory.network => 'Network', + NotificationCategory.dns => 'DNS', + NotificationCategory.authentication => 'Authentication', + NotificationCategory.connectivity => 'Connectivity', + NotificationCategory.system => 'System', + }; + } +} + +class SystemNotification { + const SystemNotification({ + required this.severity, + required this.category, + required this.message, + required this.userMessage, + this.id, + }); + + final NotificationSeverity severity; + final NotificationCategory category; + final String message; + final String userMessage; + final String? id; +} + +class ClientSettings { + const ClientSettings({ + this.managementUrl = 'https://api.netbird.io', + this.interfaceName = 'wt0', + this.wireguardPort = 51820, + this.mtu = 1280, + this.autoConnect = true, + this.allowSsh = false, + this.quantumResistance = false, + this.notifications = true, + this.lazyConnection = false, + this.blockInbound = false, + }); + + final String managementUrl; + final String interfaceName; + final int wireguardPort; + final int mtu; + final bool autoConnect; + final bool allowSsh; + final bool quantumResistance; + final bool notifications; + final bool lazyConnection; + final bool blockInbound; + + ClientSettings copyWith({ + String? managementUrl, + String? interfaceName, + int? wireguardPort, + int? mtu, + bool? autoConnect, + bool? allowSsh, + bool? quantumResistance, + bool? notifications, + bool? lazyConnection, + bool? blockInbound, + }) { + return ClientSettings( + managementUrl: managementUrl ?? this.managementUrl, + interfaceName: interfaceName ?? this.interfaceName, + wireguardPort: wireguardPort ?? this.wireguardPort, + mtu: mtu ?? this.mtu, + autoConnect: autoConnect ?? this.autoConnect, + allowSsh: allowSsh ?? this.allowSsh, + quantumResistance: quantumResistance ?? this.quantumResistance, + notifications: notifications ?? this.notifications, + lazyConnection: lazyConnection ?? this.lazyConnection, + blockInbound: blockInbound ?? this.blockInbound, + ); + } +} diff --git a/client/flutter_ui/lib/src/platform.dart b/client/flutter_ui/lib/src/platform.dart new file mode 100644 index 000000000..931e009e5 --- /dev/null +++ b/client/flutter_ui/lib/src/platform.dart @@ -0,0 +1,22 @@ +import 'dart:io'; + +/// Opens a URL in the user's default browser. Returns false if the platform +/// helper exits non-zero or is missing. Mirrors the Go UI's `openURL` logic. +Future openExternalUrl(String url) async { + try { + final ProcessResult result; + if (Platform.isMacOS) { + result = await Process.run('open', [url]); + } else if (Platform.isWindows) { + result = await Process.run('rundll32', [ + 'url.dll,FileProtocolHandler', + url, + ]); + } else { + result = await Process.run('xdg-open', [url]); + } + return result.exitCode == 0; + } catch (_) { + return false; + } +} diff --git a/client/flutter_ui/lib/src/update_progress.dart b/client/flutter_ui/lib/src/update_progress.dart new file mode 100644 index 000000000..81e80fc4a --- /dev/null +++ b/client/flutter_ui/lib/src/update_progress.dart @@ -0,0 +1,140 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; + +import 'daemon_client.dart'; +import 'models.dart'; + +const _allowCloseAfter = Duration(seconds: 10); +const _dotInterval = Duration(seconds: 1); + +/// Shows a modal dialog while the daemon installs an update. Polls +/// `GetInstallerResult` and resolves when the daemon finishes or fails. +Future showUpdateProgressDialog({ + required BuildContext context, + required DaemonClient client, + required UpdateProgressEvent event, +}) { + return showDialog( + context: context, + barrierDismissible: false, + builder: (context) => _UpdateProgressDialog(client: client, event: event), + ); +} + +class _UpdateProgressDialog extends StatefulWidget { + const _UpdateProgressDialog({required this.client, required this.event}); + + final DaemonClient client; + final UpdateProgressEvent event; + + @override + State<_UpdateProgressDialog> createState() => _UpdateProgressDialogState(); +} + +class _UpdateProgressDialogState extends State<_UpdateProgressDialog> { + Timer? _dotTimer; + Timer? _allowCloseTimer; + int _dots = 0; + bool _canClose = false; + String _status = 'Updating'; + String? _error; + bool _resolved = false; + + @override + void initState() { + super.initState(); + _dotTimer = Timer.periodic(_dotInterval, (_) => _tick()); + _allowCloseTimer = Timer(_allowCloseAfter, () { + if (mounted) { + setState(() => _canClose = true); + } + }); + unawaited(_pollInstaller()); + } + + @override + void dispose() { + _dotTimer?.cancel(); + _allowCloseTimer?.cancel(); + super.dispose(); + } + + void _tick() { + if (!mounted) { + return; + } + setState(() { + _dots = (_dots + 1) % 4; + _status = 'Updating${'.' * _dots}'; + }); + } + + Future _pollInstaller() async { + try { + final result = await widget.client.getInstallerResult(); + if (!mounted) { + return; + } + if (result.success) { + Navigator.of(context).pop(); + return; + } + setState(() { + _resolved = true; + _canClose = true; + _status = 'Update failed'; + _error = result.errorMessage.isEmpty + ? 'Unknown error' + : result.errorMessage; + }); + } catch (error) { + if (!mounted) { + return; + } + setState(() { + _resolved = true; + _canClose = true; + _status = 'Update timed out'; + _error = error.toString(); + }); + } + } + + @override + Widget build(BuildContext context) { + return PopScope( + canPop: _canClose, + child: AlertDialog( + title: const Text('Updating client'), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Your client version is older than the auto-update version set in ' + 'Management.\nUpdating client to ${widget.event.version}.', + ), + const SizedBox(height: 16), + if (!_resolved) const LinearProgressIndicator(), + const SizedBox(height: 12), + Text(_status), + if (_error != null) ...[ + const SizedBox(height: 12), + Text( + _error!, + style: TextStyle(color: Theme.of(context).colorScheme.error), + ), + ], + ], + ), + actions: [ + TextButton( + onPressed: _canClose ? () => Navigator.of(context).pop() : null, + child: const Text('Close'), + ), + ], + ), + ); + } +} diff --git a/client/flutter_ui/linux/.gitignore b/client/flutter_ui/linux/.gitignore new file mode 100644 index 000000000..d3896c984 --- /dev/null +++ b/client/flutter_ui/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/client/flutter_ui/linux/CMakeLists.txt b/client/flutter_ui/linux/CMakeLists.txt new file mode 100644 index 000000000..e6552e203 --- /dev/null +++ b/client/flutter_ui/linux/CMakeLists.txt @@ -0,0 +1,128 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "netbird_flutter_ui") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "io.netbird.netbird_flutter_ui") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/client/flutter_ui/linux/flutter/CMakeLists.txt b/client/flutter_ui/linux/flutter/CMakeLists.txt new file mode 100644 index 000000000..d5bd01648 --- /dev/null +++ b/client/flutter_ui/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/client/flutter_ui/linux/flutter/generated_plugin_registrant.cc b/client/flutter_ui/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 000000000..f3c8c8825 --- /dev/null +++ b/client/flutter_ui/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,27 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include +#include +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) local_notifier_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "LocalNotifierPlugin"); + local_notifier_plugin_register_with_registrar(local_notifier_registrar); + g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin"); + screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar); + g_autoptr(FlPluginRegistrar) tray_manager_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "TrayManagerPlugin"); + tray_manager_plugin_register_with_registrar(tray_manager_registrar); + g_autoptr(FlPluginRegistrar) window_manager_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); + window_manager_plugin_register_with_registrar(window_manager_registrar); +} diff --git a/client/flutter_ui/linux/flutter/generated_plugin_registrant.h b/client/flutter_ui/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 000000000..e0f0a47bc --- /dev/null +++ b/client/flutter_ui/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/client/flutter_ui/linux/flutter/generated_plugins.cmake b/client/flutter_ui/linux/flutter/generated_plugins.cmake new file mode 100644 index 000000000..ae9d73fcd --- /dev/null +++ b/client/flutter_ui/linux/flutter/generated_plugins.cmake @@ -0,0 +1,27 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + local_notifier + screen_retriever_linux + tray_manager + window_manager +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/client/flutter_ui/linux/runner/CMakeLists.txt b/client/flutter_ui/linux/runner/CMakeLists.txt new file mode 100644 index 000000000..e97dabc70 --- /dev/null +++ b/client/flutter_ui/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/client/flutter_ui/linux/runner/main.cc b/client/flutter_ui/linux/runner/main.cc new file mode 100644 index 000000000..e7c5c5437 --- /dev/null +++ b/client/flutter_ui/linux/runner/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/client/flutter_ui/linux/runner/my_application.cc b/client/flutter_ui/linux/runner/my_application.cc new file mode 100644 index 000000000..fa5dbd1ed --- /dev/null +++ b/client/flutter_ui/linux/runner/my_application.cc @@ -0,0 +1,148 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Called when first Flutter frame received. +static void first_frame_cb(MyApplication* self, FlView* view) { + gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); +} + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "netbird_flutter_ui"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "netbird_flutter_ui"); + } + + gtk_window_set_default_size(window, 1280, 720); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments( + project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + GdkRGBA background_color; + // Background defaults to black, override it here if necessary, e.g. #00000000 + // for transparent. + gdk_rgba_parse(&background_color, "#000000"); + fl_view_set_background_color(view, &background_color); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + // Show the window when Flutter renders. + // Requires the view to be realized so we can start rendering. + g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), + self); + gtk_widget_realize(GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, + gchar*** arguments, + int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = + my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, "flags", + G_APPLICATION_NON_UNIQUE, nullptr)); +} diff --git a/client/flutter_ui/linux/runner/my_application.h b/client/flutter_ui/linux/runner/my_application.h new file mode 100644 index 000000000..db16367a7 --- /dev/null +++ b/client/flutter_ui/linux/runner/my_application.h @@ -0,0 +1,21 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, + my_application, + MY, + APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/client/flutter_ui/macos/.gitignore b/client/flutter_ui/macos/.gitignore new file mode 100644 index 000000000..746adbb6b --- /dev/null +++ b/client/flutter_ui/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/client/flutter_ui/macos/Flutter/Flutter-Debug.xcconfig b/client/flutter_ui/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 000000000..4b81f9b2d --- /dev/null +++ b/client/flutter_ui/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/client/flutter_ui/macos/Flutter/Flutter-Release.xcconfig b/client/flutter_ui/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 000000000..5caa9d157 --- /dev/null +++ b/client/flutter_ui/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/client/flutter_ui/macos/Flutter/GeneratedPluginRegistrant.swift b/client/flutter_ui/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 000000000..17b0d5c9c --- /dev/null +++ b/client/flutter_ui/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,18 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import local_notifier +import screen_retriever_macos +import tray_manager +import window_manager + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + LocalNotifierPlugin.register(with: registry.registrar(forPlugin: "LocalNotifierPlugin")) + ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin")) + TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin")) + WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) +} diff --git a/client/flutter_ui/macos/Podfile b/client/flutter_ui/macos/Podfile new file mode 100644 index 000000000..ff5ddb3b8 --- /dev/null +++ b/client/flutter_ui/macos/Podfile @@ -0,0 +1,42 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/client/flutter_ui/macos/Podfile.lock b/client/flutter_ui/macos/Podfile.lock new file mode 100644 index 000000000..4dfc3baef --- /dev/null +++ b/client/flutter_ui/macos/Podfile.lock @@ -0,0 +1,40 @@ +PODS: + - FlutterMacOS (1.0.0) + - local_notifier (0.1.0): + - FlutterMacOS + - screen_retriever_macos (0.0.1): + - FlutterMacOS + - tray_manager (0.0.1): + - FlutterMacOS + - window_manager (0.5.0): + - FlutterMacOS + +DEPENDENCIES: + - FlutterMacOS (from `Flutter/ephemeral`) + - local_notifier (from `Flutter/ephemeral/.symlinks/plugins/local_notifier/macos`) + - screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos`) + - tray_manager (from `Flutter/ephemeral/.symlinks/plugins/tray_manager/macos`) + - window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`) + +EXTERNAL SOURCES: + FlutterMacOS: + :path: Flutter/ephemeral + local_notifier: + :path: Flutter/ephemeral/.symlinks/plugins/local_notifier/macos + screen_retriever_macos: + :path: Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos + tray_manager: + :path: Flutter/ephemeral/.symlinks/plugins/tray_manager/macos + window_manager: + :path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos + +SPEC CHECKSUMS: + FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1 + local_notifier: ebf072651e35ae5e47280ad52e2707375cb2ae4e + screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f + tray_manager: a104b5c81b578d83f3c3d0f40a997c8b10810166 + window_manager: b729e31d38fb04905235df9ea896128991cad99e + +PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009 + +COCOAPODS: 1.16.2 diff --git a/client/flutter_ui/macos/Runner.xcodeproj/project.pbxproj b/client/flutter_ui/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..6edaedf27 --- /dev/null +++ b/client/flutter_ui/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,801 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 5F10F38F17483368E6B26C16 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D1C698E330CDD6D9457E84F /* Pods_RunnerTests.framework */; }; + 6E2193E107D1C306C0B38295 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA24562430C7E3798566E220 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 14CA49126DC810A7FD8021C0 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 2D1C698E330CDD6D9457E84F /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* netbird_flutter_ui.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = netbird_flutter_ui.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 3B081925C026B73446CD514F /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 5344037698CB477EF6AE75A3 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + 97BFF106FF1D50C0EF3C4AF6 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + AA24562430C7E3798566E220 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E69F59E3113C82C71F7A2757 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + EB350F2E61DA77DD3D20E0EB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5F10F38F17483368E6B26C16 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6E2193E107D1C306C0B38295 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 16123F31EB7196617B509F9C /* Pods */ = { + isa = PBXGroup; + children = ( + 5344037698CB477EF6AE75A3 /* Pods-Runner.debug.xcconfig */, + E69F59E3113C82C71F7A2757 /* Pods-Runner.release.xcconfig */, + EB350F2E61DA77DD3D20E0EB /* Pods-Runner.profile.xcconfig */, + 97BFF106FF1D50C0EF3C4AF6 /* Pods-RunnerTests.debug.xcconfig */, + 3B081925C026B73446CD514F /* Pods-RunnerTests.release.xcconfig */, + 14CA49126DC810A7FD8021C0 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 16123F31EB7196617B509F9C /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* netbird_flutter_ui.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + AA24562430C7E3798566E220 /* Pods_Runner.framework */, + 2D1C698E330CDD6D9457E84F /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 13F875F4B0174355038870C8 /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 6D776BDDAB33DFA32528CFE2 /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + DF9F03510A6543FA652C823E /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* netbird_flutter_ui.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 13F875F4B0174355038870C8 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 6D776BDDAB33DFA32528CFE2 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + DF9F03510A6543FA652C823E /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 97BFF106FF1D50C0EF3C4AF6 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.netbird.netbirdFlutterUi.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/netbird_flutter_ui.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/netbird_flutter_ui"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B081925C026B73446CD514F /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.netbird.netbirdFlutterUi.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/netbird_flutter_ui.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/netbird_flutter_ui"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 14CA49126DC810A7FD8021C0 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.netbird.netbirdFlutterUi.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/netbird_flutter_ui.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/netbird_flutter_ui"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/client/flutter_ui/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/client/flutter_ui/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/client/flutter_ui/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/client/flutter_ui/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/client/flutter_ui/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..934e68713 --- /dev/null +++ b/client/flutter_ui/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/flutter_ui/macos/Runner.xcworkspace/contents.xcworkspacedata b/client/flutter_ui/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/client/flutter_ui/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/client/flutter_ui/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/client/flutter_ui/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/client/flutter_ui/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/client/flutter_ui/macos/Runner/AppDelegate.swift b/client/flutter_ui/macos/Runner/AppDelegate.swift new file mode 100644 index 000000000..b3c176141 --- /dev/null +++ b/client/flutter_ui/macos/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } +} diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..a2ec33f19 --- /dev/null +++ b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 000000000..82b6f9d9a Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 000000000..13b35eba5 Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 000000000..0a3f5fa40 Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 000000000..bdb57226d Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 000000000..f083318e0 Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 000000000..326c0e72c Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 000000000..2f1632cfd Binary files /dev/null and b/client/flutter_ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/client/flutter_ui/macos/Runner/Base.lproj/MainMenu.xib b/client/flutter_ui/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 000000000..80e867a4e --- /dev/null +++ b/client/flutter_ui/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/flutter_ui/macos/Runner/Configs/AppInfo.xcconfig b/client/flutter_ui/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 000000000..554dca22f --- /dev/null +++ b/client/flutter_ui/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = netbird_flutter_ui + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = io.netbird.netbirdFlutterUi + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2026 io.netbird. All rights reserved. diff --git a/client/flutter_ui/macos/Runner/Configs/Debug.xcconfig b/client/flutter_ui/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 000000000..36b0fd946 --- /dev/null +++ b/client/flutter_ui/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/client/flutter_ui/macos/Runner/Configs/Release.xcconfig b/client/flutter_ui/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 000000000..dff4f4956 --- /dev/null +++ b/client/flutter_ui/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/client/flutter_ui/macos/Runner/Configs/Warnings.xcconfig b/client/flutter_ui/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 000000000..42bcbf478 --- /dev/null +++ b/client/flutter_ui/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/client/flutter_ui/macos/Runner/DebugProfile.entitlements b/client/flutter_ui/macos/Runner/DebugProfile.entitlements new file mode 100644 index 000000000..5d82b3df0 --- /dev/null +++ b/client/flutter_ui/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/client/flutter_ui/macos/Runner/Info.plist b/client/flutter_ui/macos/Runner/Info.plist new file mode 100644 index 000000000..4789daa6a --- /dev/null +++ b/client/flutter_ui/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/client/flutter_ui/macos/Runner/MainFlutterWindow.swift b/client/flutter_ui/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 000000000..3cc05eb23 --- /dev/null +++ b/client/flutter_ui/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/client/flutter_ui/macos/Runner/Release.entitlements b/client/flutter_ui/macos/Runner/Release.entitlements new file mode 100644 index 000000000..c326c8341 --- /dev/null +++ b/client/flutter_ui/macos/Runner/Release.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/client/flutter_ui/macos/RunnerTests/RunnerTests.swift b/client/flutter_ui/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..61f3bd1fc --- /dev/null +++ b/client/flutter_ui/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/client/flutter_ui/pubspec.lock b/client/flutter_ui/pubspec.lock new file mode 100644 index 000000000..344f398c8 --- /dev/null +++ b/client/flutter_ui/pubspec.lock @@ -0,0 +1,413 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 + url: "https://pub.dev" + source: hosted + version: "2.13.1" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b + url: "https://pub.dev" + source: hosted + version: "1.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" + source: hosted + version: "3.0.7" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + fixnum: + dependency: "direct main" + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_cloud: + dependency: transitive + description: + name: google_cloud + sha256: fbcde933b2d8600c3cdb2328f8f4c47628ec29a39e9cef85dee535c7868993c4 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + google_identity_services_web: + dependency: transitive + description: + name: google_identity_services_web + sha256: "5d187c46dc59e02646e10fe82665fc3884a9b71bc1c90c2b8b749316d33ee454" + url: "https://pub.dev" + source: hosted + version: "0.3.3+1" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: "661738b763d3e524de69df53bf4e03943e4e01e98265cebcc6684871b06a5379" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + grpc: + dependency: "direct main" + description: + name: grpc + sha256: "86be3a7d39ad865b214a7370021ac80e68939238b507730de6d97fc662cb2723" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + http: + dependency: transitive + description: + name: http + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" + url: "https://pub.dev" + source: hosted + version: "1.6.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "382d3aefc5bd6dc68c6b892d7664f29b5beb3251611ae946a98d35158a82bbfa" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: cb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8 + url: "https://pub.dev" + source: hosted + version: "4.11.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + lints: + dependency: "direct dev" + description: + name: lints + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" + url: "https://pub.dev" + source: hosted + version: "6.1.0" + local_notifier: + dependency: "direct main" + description: + name: local_notifier + sha256: f6cfc933c6fbc961f4e52b5c880f68e41b2d3cd29aad557cc654fd211093a025 + url: "https://pub.dev" + source: hosted + version: "0.1.6" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 + url: "https://pub.dev" + source: hosted + version: "0.12.19" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" + url: "https://pub.dev" + source: hosted + version: "0.13.0" + menu_base: + dependency: transitive + description: + name: menu_base + sha256: "820368014a171bd1241030278e6c2617354f492f5c703d7b7d4570a6b8b84405" + url: "https://pub.dev" + source: hosted + version: "0.1.1" + meta: + dependency: transitive + description: + name: meta + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + url: "https://pub.dev" + source: hosted + version: "1.17.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + protobuf: + dependency: "direct main" + description: + name: protobuf + sha256: "75ec242d22e950bdcc79ee38dd520ce4ee0bc491d7fadc4ea47694604d22bf06" + url: "https://pub.dev" + source: hosted + version: "6.0.0" + screen_retriever: + dependency: transitive + description: + name: screen_retriever + sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_linux: + dependency: transitive + description: + name: screen_retriever_linux + sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_macos: + dependency: transitive + description: + name: screen_retriever_macos + sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_platform_interface: + dependency: transitive + description: + name: screen_retriever_platform_interface + sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_windows: + dependency: transitive + description: + name: screen_retriever_windows + sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shortid: + dependency: transitive + description: + name: shortid + sha256: d0b40e3dbb50497dad107e19c54ca7de0d1a274eb9b4404991e443dadb9ebedb + url: "https://pub.dev" + source: hosted + version: "0.1.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" + url: "https://pub.dev" + source: hosted + version: "1.10.2" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a" + url: "https://pub.dev" + source: hosted + version: "0.7.10" + tray_manager: + dependency: "direct main" + description: + name: tray_manager + sha256: c5fd83b0ae4d80be6eaedfad87aaefab8787b333b8ebd064b0e442a81006035b + url: "https://pub.dev" + source: hosted + version: "0.5.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489" + url: "https://pub.dev" + source: hosted + version: "4.5.3" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" + source: hosted + version: "2.2.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "046d3928e16fa4dc46e8350415661755ab759d9fc97fc21b5ab295f71e4f0499" + url: "https://pub.dev" + source: hosted + version: "15.1.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + window_manager: + dependency: "direct main" + description: + name: window_manager + sha256: "7eb6d6c4164ec08e1bf978d6e733f3cebe792e2a23fb07cbca25c2872bfdbdcd" + url: "https://pub.dev" + source: hosted + version: "0.5.1" +sdks: + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/client/flutter_ui/pubspec.yaml b/client/flutter_ui/pubspec.yaml new file mode 100644 index 000000000..09e5a36d2 --- /dev/null +++ b/client/flutter_ui/pubspec.yaml @@ -0,0 +1,28 @@ +name: netbird_flutter_ui +description: Experimental Flutter desktop UI for NetBird. +publish_to: none +version: 0.1.0 + +environment: + sdk: ^3.8.0 + +dependencies: + flutter: + sdk: flutter + fixnum: ^1.1.1 + grpc: ^5.1.0 + protobuf: ^6.0.0 + tray_manager: ^0.5.0 + window_manager: ^0.5.1 + local_notifier: ^0.1.6 + +dev_dependencies: + flutter_test: + sdk: flutter + lints: ^6.0.0 + +flutter: + uses-material-design: true + assets: + - assets/tray/ + diff --git a/client/flutter_ui/test/app_shell_test.dart b/client/flutter_ui/test/app_shell_test.dart new file mode 100644 index 000000000..e4b902318 --- /dev/null +++ b/client/flutter_ui/test/app_shell_test.dart @@ -0,0 +1,19 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:netbird_flutter_ui/src/app_shell.dart'; +import 'package:netbird_flutter_ui/src/daemon_client.dart'; + +void main() { + testWidgets('renders the status shell', (tester) async { + await tester.pumpWidget( + NetBirdFlutterApp( + client: FakeDaemonClient(daemonAddr: 'tcp://127.0.0.1:41731'), + ), + ); + + await tester.pump(); + + expect(find.text('Status'), findsWidgets); + expect(find.text('Connect'), findsOneWidget); + expect(find.text('Disconnect'), findsOneWidget); + }); +} diff --git a/client/flutter_ui/tool/bootstrap.sh b/client/flutter_ui/tool/bootstrap.sh new file mode 100755 index 000000000..514282934 --- /dev/null +++ b/client/flutter_ui/tool/bootstrap.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -euo pipefail + +project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +tmp_dir="$(mktemp -d)" + +cleanup() { + rm -rf "$tmp_dir" +} +trap cleanup EXIT + +command -v flutter >/dev/null 2>&1 || { + echo "flutter is not installed" + exit 1 +} + +cp "$project_dir/pubspec.yaml" "$tmp_dir/pubspec.yaml" +cp "$project_dir/analysis_options.yaml" "$tmp_dir/analysis_options.yaml" +cp -R "$project_dir/lib" "$tmp_dir/lib" +cp -R "$project_dir/test" "$tmp_dir/test" + +flutter create \ + --platforms=windows,macos,linux \ + --project-name=netbird_flutter_ui \ + --org=io.netbird \ + "$project_dir" + +cp "$tmp_dir/pubspec.yaml" "$project_dir/pubspec.yaml" +cp "$tmp_dir/analysis_options.yaml" "$project_dir/analysis_options.yaml" +rm -rf "$project_dir/lib" +cp -R "$tmp_dir/lib" "$project_dir/lib" +rm -rf "$project_dir/test" +cp -R "$tmp_dir/test" "$project_dir/test" + +cd "$project_dir" +flutter pub get diff --git a/client/flutter_ui/tool/generate_proto.sh b/client/flutter_ui/tool/generate_proto.sh new file mode 100755 index 000000000..e0cd90dd8 --- /dev/null +++ b/client/flutter_ui/tool/generate_proto.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail + +project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +repo_dir="$(cd "$project_dir/../.." && pwd)" + +command -v protoc >/dev/null 2>&1 || { + echo "protoc is not installed" + exit 1 +} + +command -v dart >/dev/null 2>&1 || { + echo "dart is not installed" + exit 1 +} + +export PATH="$PATH:$HOME/.pub-cache/bin" + +if ! command -v protoc-gen-dart >/dev/null 2>&1; then + dart pub global activate protoc_plugin +fi + +mkdir -p "$project_dir/lib/src/generated" + +protoc \ + -I "$repo_dir/client/proto" \ + --dart_out=grpc:"$project_dir/lib/src/generated" \ + "$repo_dir/client/proto/daemon.proto" + diff --git a/client/flutter_ui/windows/.gitignore b/client/flutter_ui/windows/.gitignore new file mode 100644 index 000000000..d492d0d98 --- /dev/null +++ b/client/flutter_ui/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/client/flutter_ui/windows/CMakeLists.txt b/client/flutter_ui/windows/CMakeLists.txt new file mode 100644 index 000000000..285b2ede1 --- /dev/null +++ b/client/flutter_ui/windows/CMakeLists.txt @@ -0,0 +1,108 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(netbird_flutter_ui LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "netbird_flutter_ui") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/client/flutter_ui/windows/flutter/CMakeLists.txt b/client/flutter_ui/windows/flutter/CMakeLists.txt new file mode 100644 index 000000000..903f4899d --- /dev/null +++ b/client/flutter_ui/windows/flutter/CMakeLists.txt @@ -0,0 +1,109 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + ${FLUTTER_TARGET_PLATFORM} $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/client/flutter_ui/windows/flutter/generated_plugin_registrant.cc b/client/flutter_ui/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 000000000..7b43aeca9 --- /dev/null +++ b/client/flutter_ui/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,23 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include +#include +#include + +void RegisterPlugins(flutter::PluginRegistry* registry) { + LocalNotifierPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("LocalNotifierPlugin")); + ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi")); + TrayManagerPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("TrayManagerPlugin")); + WindowManagerPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("WindowManagerPlugin")); +} diff --git a/client/flutter_ui/windows/flutter/generated_plugin_registrant.h b/client/flutter_ui/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 000000000..dc139d85a --- /dev/null +++ b/client/flutter_ui/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/client/flutter_ui/windows/flutter/generated_plugins.cmake b/client/flutter_ui/windows/flutter/generated_plugins.cmake new file mode 100644 index 000000000..d702c47f8 --- /dev/null +++ b/client/flutter_ui/windows/flutter/generated_plugins.cmake @@ -0,0 +1,27 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + local_notifier + screen_retriever_windows + tray_manager + window_manager +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/client/flutter_ui/windows/runner/CMakeLists.txt b/client/flutter_ui/windows/runner/CMakeLists.txt new file mode 100644 index 000000000..394917c05 --- /dev/null +++ b/client/flutter_ui/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/client/flutter_ui/windows/runner/Runner.rc b/client/flutter_ui/windows/runner/Runner.rc new file mode 100644 index 000000000..9fd19e66b --- /dev/null +++ b/client/flutter_ui/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "io.netbird" "\0" + VALUE "FileDescription", "netbird_flutter_ui" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "netbird_flutter_ui" "\0" + VALUE "LegalCopyright", "Copyright (C) 2026 io.netbird. All rights reserved." "\0" + VALUE "OriginalFilename", "netbird_flutter_ui.exe" "\0" + VALUE "ProductName", "netbird_flutter_ui" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/client/flutter_ui/windows/runner/flutter_window.cpp b/client/flutter_ui/windows/runner/flutter_window.cpp new file mode 100644 index 000000000..955ee3038 --- /dev/null +++ b/client/flutter_ui/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/client/flutter_ui/windows/runner/flutter_window.h b/client/flutter_ui/windows/runner/flutter_window.h new file mode 100644 index 000000000..6da0652f0 --- /dev/null +++ b/client/flutter_ui/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/client/flutter_ui/windows/runner/main.cpp b/client/flutter_ui/windows/runner/main.cpp new file mode 100644 index 000000000..e8432f24b --- /dev/null +++ b/client/flutter_ui/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"netbird_flutter_ui", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/client/flutter_ui/windows/runner/resource.h b/client/flutter_ui/windows/runner/resource.h new file mode 100644 index 000000000..66a65d1e4 --- /dev/null +++ b/client/flutter_ui/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/client/flutter_ui/windows/runner/resources/app_icon.ico b/client/flutter_ui/windows/runner/resources/app_icon.ico new file mode 100644 index 000000000..c04e20caf Binary files /dev/null and b/client/flutter_ui/windows/runner/resources/app_icon.ico differ diff --git a/client/flutter_ui/windows/runner/runner.exe.manifest b/client/flutter_ui/windows/runner/runner.exe.manifest new file mode 100644 index 000000000..153653e8d --- /dev/null +++ b/client/flutter_ui/windows/runner/runner.exe.manifest @@ -0,0 +1,14 @@ + + + + + PerMonitorV2 + + + + + + + + + diff --git a/client/flutter_ui/windows/runner/utils.cpp b/client/flutter_ui/windows/runner/utils.cpp new file mode 100644 index 000000000..3a0b46511 --- /dev/null +++ b/client/flutter_ui/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + unsigned int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length == 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/client/flutter_ui/windows/runner/utils.h b/client/flutter_ui/windows/runner/utils.h new file mode 100644 index 000000000..3879d5475 --- /dev/null +++ b/client/flutter_ui/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/client/flutter_ui/windows/runner/win32_window.cpp b/client/flutter_ui/windows/runner/win32_window.cpp new file mode 100644 index 000000000..60608d0fe --- /dev/null +++ b/client/flutter_ui/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/client/flutter_ui/windows/runner/win32_window.h b/client/flutter_ui/windows/runner/win32_window.h new file mode 100644 index 000000000..e901dde68 --- /dev/null +++ b/client/flutter_ui/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_