class VipCenterStyleModel {
  String appBarName;
  String appBarNameColor;
  String appBarBgImg;
  String appBarBgColor;
  String appBarLeftBackupIcon;
  String appBarRightShareIcon;
  String bgColor;
  String bgImg;
  String avatarLvIcon;
  String avatarLvTextColor;
  String avatarUsernameColor;
  String entitlementsUpIcon;
  List<Entitlements> entitlements;
  MustToDoTaskListStyle mustToDoTaskListStyle;
  SelectedToDoTaskListStyle selectedToDoTaskListStyle;
  BottomBtn bottomBtn;

  VipCenterStyleModel({
    this.appBarName,
    this.appBarNameColor,
    this.appBarBgImg,
    this.appBarBgColor,
    this.appBarLeftBackupIcon,
    this.appBarRightShareIcon,
    this.bgColor,
    this.bgImg,
    this.avatarLvIcon,
    this.avatarLvTextColor,
    this.avatarUsernameColor,
    this.entitlementsUpIcon,
    this.entitlements,
    this.mustToDoTaskListStyle,
    this.selectedToDoTaskListStyle,
    this.bottomBtn,
  });

  VipCenterStyleModel.fromJson(Map<String, dynamic> json) {
    appBarName = json['app_bar_name'];
    appBarNameColor = json['app_bar_name_color'];
    appBarBgImg = json['app_bar_bg_img'];
    appBarBgColor = json['app_bar_bg_color'];
    appBarLeftBackupIcon = json['app_bar_left_backup_icon'];
    appBarRightShareIcon = json['app_bar_right_share_icon'];
    bgColor = json['bg_color'];
    bgImg = json['bg_img'];
    avatarLvIcon = json['avatar_lv_icon'];
    avatarLvTextColor = json['avatar_lv_text_color'];
    avatarUsernameColor = json['avatar_username_color'];
    entitlementsUpIcon = json['entitlements_up_icon'];
    if (json['entitlements'] != null) {
      entitlements = new List<Entitlements>();
      json['entitlements'].forEach((v) {
        entitlements.add(new Entitlements.fromJson(v));
      });
    }
    mustToDoTaskListStyle = json['must_to_do_task_list_style'] != null ? new MustToDoTaskListStyle.fromJson(json['must_to_do_task_list_style']) : null;
    selectedToDoTaskListStyle = json['selected_to_do_task_list_style'] != null ? new SelectedToDoTaskListStyle.fromJson(json['selected_to_do_task_list_style']) : null;
    bottomBtn = json['bottom_btn'] != null ? new BottomBtn.fromJson(json['bottom_btn']) : null;
  }

  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_img'] = this.appBarBgImg;
    data['app_bar_bg_color'] = this.appBarBgColor;
    data['app_bar_left_backup_icon'] = this.appBarLeftBackupIcon;
    data['app_bar_right_share_icon'] = this.appBarRightShareIcon;
    data['bg_color'] = this.bgColor;
    data['bg_img'] = this.bgImg;
    data['avatar_lv_icon'] = this.avatarLvIcon;
    data['avatar_lv_text_color'] = this.avatarLvTextColor;
    data['avatar_username_color'] = this.avatarUsernameColor;
    data['entitlements_up_icon'] = this.entitlementsUpIcon;
    if (this.entitlements != null) {
      data['entitlements'] = this.entitlements.map((v) => v.toJson()).toList();
    }
    if (this.mustToDoTaskListStyle != null) {
      data['must_to_do_task_list_style'] = this.mustToDoTaskListStyle.toJson();
    }
    if (this.selectedToDoTaskListStyle != null) {
      data['selected_to_do_task_list_style'] = this.selectedToDoTaskListStyle.toJson();
    }
    if (this.bottomBtn != null) {
      data['bottom_btn'] = this.bottomBtn.toJson();
    }
    return data;
  }
}

class Entitlements {
  String type;
  String name;
  String nameColor;
  String icon;
  String requiredLogin;
  String requiredTaobaoAuth;
  String skipIdentifier;

  Entitlements({this.type, this.name, this.nameColor, this.icon, this.requiredLogin, this.requiredTaobaoAuth, this.skipIdentifier});

  Entitlements.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    name = json['name'];
    nameColor = json['name_color'];
    icon = json['icon'];
    requiredLogin = json['required_login'];
    requiredTaobaoAuth = json['required_taobao_auth'];
    skipIdentifier = json['skip_identifier'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['name'] = this.name;
    data['name_color'] = this.nameColor;
    data['icon'] = this.icon;
    data['required_login'] = this.requiredLogin;
    data['required_taobao_auth'] = this.requiredTaobaoAuth;
    data['skip_identifier'] = this.skipIdentifier;
    return data;
  }
}

class MustToDoTaskListStyle {
  String name;
  String icon;
  String progressBgColor;
  String progressColor;
  String btnColor;
  String btnImg;
  String btnNameColor;

  MustToDoTaskListStyle({this.name, this.icon, this.progressBgColor, this.progressColor, this.btnColor, this.btnImg, this.btnNameColor});

  MustToDoTaskListStyle.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    icon = json['icon'];
    progressBgColor = json['progress_bg_color'];
    progressColor = json['progress_color'];
    btnColor = json['btn_color'];
    btnImg = json['btn_img'];
    btnNameColor = json['btn_name_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['icon'] = this.icon;
    data['progress_bg_color'] = this.progressBgColor;
    data['progress_color'] = this.progressColor;
    data['btn_color'] = this.btnColor;
    data['btn_img'] = this.btnImg;
    data['btn_name_color'] = this.btnNameColor;
    return data;
  }
}

class SelectedToDoTaskListStyle {
  String name;
  String icon;
  String progressBgColor;
  String progressColor;
  String btnColor;
  String btnImg;

  SelectedToDoTaskListStyle({this.name, this.icon, this.progressBgColor, this.progressColor, this.btnColor, this.btnImg});

  SelectedToDoTaskListStyle.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    icon = json['icon'];
    progressBgColor = json['progress_bg_color'];
    progressColor = json['progress_color'];
    btnColor = json['btn_color'];
    btnImg = json['btn_img'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['icon'] = this.icon;
    data['progress_bg_color'] = this.progressBgColor;
    data['progress_color'] = this.progressColor;
    data['btn_color'] = this.btnColor;
    data['btn_img'] = this.btnImg;
    return data;
  }
}

class BottomBtn {
  String icon;
  String name;
  String img;

  BottomBtn({this.icon, this.name, this.img});

  BottomBtn.fromJson(Map<String, dynamic> json) {
    icon = json['icon'];
    name = json['name'];
    img = json['img'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['icon'] = this.icon;
    data['name'] = this.name;
    data['img'] = this.img;
    return data;
  }
}
