// To parse this JSON data, do
//
//     final services = servicesFromJson(jsonString);

import 'dart:convert';

Services servicesFromJson(String str) => Services.fromJson(json.decode(str));

String servicesToJson(Services data) => json.encode(data.toJson());

class Services {
  Services({
    this.totalItemsCount,
    this.data,
    this.messageStatus,
    this.message,
  });

  int? totalItemsCount;
  List<ServicesData>? data;
  int? messageStatus;
  String? message;

  factory Services.fromJson(Map<String, dynamic> json) => Services(
        totalItemsCount: json["totalItemsCount"] == null ? null : json["totalItemsCount"],
        data: json["data"] == null ? null : List<ServicesData>.from(json["data"].map((x) => ServicesData.fromJson(x))),
        messageStatus: json["messageStatus"] == null ? null : json["messageStatus"],
        message: json["message"] == null ? null : json["message"],
      );

  Map<String, dynamic> toJson() => {
        "totalItemsCount": totalItemsCount == null ? null : totalItemsCount,
        "data": data == null ? null : List<dynamic>.from(data!.map((x) => x.toJson())),
        "messageStatus": messageStatus == null ? null : messageStatus,
        "message": message == null ? null : message,
      };
}

class ServicesData {
  ServicesData({
    this.id,
    this.description,
    this.descriptionN,
    this.serviceIconUrl,
    this.serviceImageUrl,
    this.serviceCategoryId,
    this.categoryName,
    this.isSelected,
  });

  int? id;
  String? description;
  String? descriptionN;
  dynamic? serviceIconUrl;
  dynamic? serviceImageUrl;
  int? serviceCategoryId;
  dynamic? categoryName;
  bool? isSelected;

  factory ServicesData.fromJson(Map<String, dynamic> json) => ServicesData(
        id: json["id"] == null ? null : json["id"],
        description: json["description"] == null ? null : json["description"],
        descriptionN: json["descriptionN"] == null ? null : json["descriptionN"],
        serviceIconUrl: json["serviceIconUrl"],
        serviceImageUrl: json["serviceImageUrl"],
        serviceCategoryId: json["serviceCategoryID"] == null ? null : json["serviceCategoryID"],
        categoryName: json["categoryName"],
        isSelected: false,
      );

  Map<String, dynamic> toJson() => {
        "id": id == null ? null : id,
        "description": description == null ? null : description,
        "descriptionN": descriptionN == null ? null : descriptionN,
        "serviceIconUrl": serviceIconUrl,
        "serviceImageUrl": serviceImageUrl,
        "serviceCategoryID": serviceCategoryId == null ? null : serviceCategoryId,
        "categoryName": categoryName,
      };
}
