

class DeviceInfoModel {
  final String id;
  final String endpoint;
  final String status;
  final String connectionState;
  final String lastActivityTime;
  final String primaryThumbprint;
  final String secondaryThumbprint;

  const DeviceInfoModel({
    required this.id,
    required this.endpoint,
    required this.status,
    required this.connectionState,
    required this.lastActivityTime,
    required this.primaryThumbprint,
    required this.secondaryThumbprint,
  });

  factory DeviceInfoModel.fromJson(Map<String, dynamic> parsedJson) {
    return DeviceInfoModel(
        id: parsedJson['id'].toString(),
        endpoint: parsedJson['endpoint'],
        status: parsedJson['status'],
        connectionState: parsedJson['connectionState'],
        lastActivityTime: parsedJson['lastActivityTime'],
        primaryThumbprint: parsedJson['primaryThumbprint'],
        secondaryThumbprint: parsedJson['secondaryThumbprint']);
  }

  @override
  String toString() {
    return "{"
        "id: $id, "
        "endpoint: $endpoint, "
        "status: $status, "
        "connectionState: $connectionState, "
        "lastActivityTime: $lastActivityTime, "
        "primaryThumbprint: $primaryThumbprint, "
        "secondaryThumbprint: $secondaryThumbprint"
        "}";
  }
}
