import 'dart:convert';

class AutomationStatusUpdate {
  final String spaceUuid;
  final bool isEnable;

  AutomationStatusUpdate({
    required this.spaceUuid,
    required this.isEnable,
  });

  factory AutomationStatusUpdate.fromRawJson(String str) =>
      AutomationStatusUpdate.fromJson(json.decode(str));

  String toRawJson() => json.encode(toJson());

  factory AutomationStatusUpdate.fromJson(Map<String, dynamic> json) =>
      AutomationStatusUpdate(
        spaceUuid: json["spaceUuid"],
        isEnable: json["isEnable"],
      );

  Map<String, dynamic> toJson() => {
        "spaceUuid": spaceUuid,
        "isEnable": isEnable,
      };

  factory AutomationStatusUpdate.fromMap(Map<String, dynamic> map) =>
      AutomationStatusUpdate(
        spaceUuid: map["spaceUuid"],
        isEnable: map["isEnable"],
      );

  Map<String, dynamic> toMap() => {
        "spaceUuid": spaceUuid,
        "isEnable": isEnable,
      };
}
