// To parse this JSON data, do
//
//     final document = documentFromJson(jsonString);

import 'dart:convert';

Document documentFromJson(String str) => Document.fromJson(json.decode(str));

String documentToJson(Document data) => json.encode(data.toJson());

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

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

  factory Document.fromJson(Map<String, dynamic> json) => Document(
    totalItemsCount: json["totalItemsCount"] == null ? null : json["totalItemsCount"],
    data: json["data"] == null ? null : List<DocumentData>.from(json["data"].map((x) => DocumentData.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 DocumentData {
  DocumentData({
    this.id,
    this.serviceProviderId,
    this.documentId,
    this.documentUrl,
    this.status,
    this.comment,
    this.isActive,
    this.document,
    this.fileExt,
    this.documentName,
  });

  int? id;
  int? serviceProviderId;
  int? documentId;
  dynamic? documentUrl;
  int? status;
  dynamic? comment;
  bool? isActive;
  String? document;
  String? fileExt;
  String? documentName;

  factory DocumentData.fromJson(Map<String, dynamic> json) => DocumentData(
    id: json["id"] == null ? null : json["id"],
    serviceProviderId: json["serviceProviderID"] == null ? null : json["serviceProviderID"],
    documentId: json["documentID"] == null ? null : json["documentID"],
    documentUrl: json["documentURL"],
    status: json["status"] == null ? null : json["status"],
    comment: json["comment"],
    isActive: json["isActive"] == null ? null : json["isActive"],
    document: null,
    fileExt: null,
    documentName: json["documentName"] == null ? null : json["documentName"],
  );

  Map<String, dynamic> toJson() => {
    "id": id == null ? null : id,
    "serviceProviderID": serviceProviderId == null ? null : serviceProviderId,
    "documentID": documentId == null ? null : documentId,
    "documentURL": documentUrl,
    "status": status == null ? null : status,
    "comment": comment,
    "isActive": isActive == null ? null : isActive,
  };
}
