20 lines
623 B
Dart
20 lines
623 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|||
|
|
|
||
|
|
part 'connection.freezed.dart';
|
||
|
|
part 'connection.g.dart';
|
||
|
|
|
||
|
|
/// A saved NodeMaster API endpoint. Client-side only — has no server-side
|
||
|
|
/// counterpart. `baseUrl` excludes the `/v1` suffix (added by
|
||
|
|
/// [NodeMasterApiClient]) and any trailing slash, e.g.
|
||
|
|
/// `https://edge-01.local:8080`.
|
||
|
|
@freezed
|
||
|
|
sealed class Connection with _$Connection {
|
||
|
|
const factory Connection({
|
||
|
|
required String id,
|
||
|
|
required String name,
|
||
|
|
required String baseUrl,
|
||
|
|
}) = _Connection;
|
||
|
|
|
||
|
|
factory Connection.fromJson(Map<String, dynamic> json) => _$ConnectionFromJson(json);
|
||
|
|
}
|