CockpitRemoteSessionConfiguration.fromJson constructor

CockpitRemoteSessionConfiguration.fromJson(
  1. Map<String, Object?> json
)

Decodes a CockpitRemoteSessionConfiguration from a JSON object.

Implementation

factory CockpitRemoteSessionConfiguration.fromJson(
  Map<String, Object?> json,
) {
  return CockpitRemoteSessionConfiguration(
    enabled: json['enabled'] as bool? ?? false,
    autoStart: json['autoStart'] as bool? ?? true,
    host: json['host'] as String? ?? _defaultHost,
    port: json['port'] as int? ?? _defaultPort,
    routePrefix: json['routePrefix'] as String? ?? _defaultRoutePrefix,
    launchId: json['launchId'] as String? ?? '',
  );
}