class MessageSettingsStyleModel {
  String appBarName;
  String appBarNameColor;
  String appBarBgColor;
  String bgColor;
  String settingsBgColor;
  String noSelectedColor;
  String selectedColor;
  List<Settings> settings;
  List<Settings> otherSettings;

  MessageSettingsStyleModel(
      {this.appBarName, this.appBarNameColor, this.appBarBgColor, this.bgColor, this.settingsBgColor, this.noSelectedColor, this.selectedColor, this.settings, this.otherSettings});

  MessageSettingsStyleModel.fromJson(Map<String, dynamic> json) {
    appBarName = json['app_bar_name'];
    appBarNameColor = json['app_bar_name_color'];
    appBarBgColor = json['app_bar_bg_color'];
    bgColor = json['bg_color'];
    settingsBgColor = json['settings_bg_color'];
    noSelectedColor = json['no_selected_color'];
    selectedColor = json['selected_color'];
    if (json['settings'] != null) {
      settings = new List<Settings>();
      json['settings'].forEach((v) {
        settings.add(new Settings.fromJson(v));
      });
    }
    if (json['other_settings'] != null) {
      otherSettings = new List<Settings>();
      json['other_settings'].forEach((v) {
        otherSettings.add(new Settings.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['app_bar_name'] = this.appBarName;
    data['app_bar_name_color'] = this.appBarNameColor;
    data['app_bar_bg_color'] = this.appBarBgColor;
    data['bg_color'] = this.bgColor;
    data['settings_bg_color'] = this.settingsBgColor;
    data['no_selected_color'] = this.noSelectedColor;
    data['selected_color'] = this.selectedColor;
    if (this.settings != null) {
      data['settings'] = this.settings.map((v) => v.toJson()).toList();
    }
    if (this.otherSettings != null) {
      data['other_settings'] = this.otherSettings.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Settings {
  List<String> dataKeys;
  String type;
  String name;
  String subName;
  String nameColor;
  String subNameColor;
  String descText;
  String descColor;
  String skipIdentifier;

  Settings({this.dataKeys, this.type, this.name, this.subName, this.nameColor, this.subNameColor, this.descText, this.descColor, this.skipIdentifier});

  Settings.fromJson(Map<String, dynamic> json) {
    dataKeys = json['data_keys'].cast<String>();
    type = json['type'];
    name = json['name'];
    subName = json['sub_name'];
    nameColor = json['name_color'];
    subNameColor = json['sub_name_color'];
    descText = json['desc_text'];
    descColor = json['desc_color'];
    skipIdentifier = json['skip_identifier'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['data_keys'] = this.dataKeys;
    data['type'] = this.type;
    data['name'] = this.name;
    data['sub_name'] = this.subName;
    data['name_color'] = this.nameColor;
    data['sub_name_color'] = this.subNameColor;
    data['desc_text'] = this.descText;
    data['desc_color'] = this.descColor;
    data['skip_identifier'] = this.skipIdentifier;
    return data;
  }
}
