class SingleUserChatModel {
  SingleUserChatModel({
    this.userChatHistoryId,
    this.userChatHistoryLineId,
    this.contant,
    this.contantNo,
    this.currentUserId,
    this.currentUserName,
    this.targetUserId,
    this.targetUserName,
    this.encryptedTargetUserId,
    this.encryptedTargetUserName,
    this.chatEventId,
    this.fileTypeId,
    this.isSeen,
    this.isDelivered,
    this.createdDate,
    this.chatSource,
    this.conversationId,
    this.fileTypeResponse,
    this.userChatReplyResponse,
  });

  int? userChatHistoryId;
  int? userChatHistoryLineId;
  String? contant;
  String? contantNo;
  int? currentUserId;
  String? currentUserName;
  int? targetUserId;
  String? targetUserName;
  dynamic encryptedTargetUserId;
  dynamic encryptedTargetUserName;
  int? chatEventId;
  dynamic fileTypeId;
  bool? isSeen;
  bool? isDelivered;
  DateTime? createdDate;
  int? chatSource;
  String? conversationId;
  FileTypeResponse? fileTypeResponse;
  dynamic userChatReplyResponse;

  factory SingleUserChatModel.fromJson(Map<String, dynamic> json) => SingleUserChatModel(
        userChatHistoryId: json["userChatHistoryId"] == null ? null : json["userChatHistoryId"],
        userChatHistoryLineId: json["userChatHistoryLineId"] == null ? null : json["userChatHistoryLineId"],
        contant: json["contant"] == null ? null : json["contant"],
        contantNo: json["contantNo"] == null ? null : json["contantNo"],
        currentUserId: json["currentUserId"] == null ? null : json["currentUserId"],
        currentUserName: json["currentUserName"] == null ? null : json["currentUserName"],
        targetUserId: json["targetUserId"] == null ? null : json["targetUserId"],
        targetUserName: json["targetUserName"] == null ? null : json["targetUserName"],
        encryptedTargetUserId: json["encryptedTargetUserId"],
        encryptedTargetUserName: json["encryptedTargetUserName"],
        chatEventId: json["chatEventId"] == null ? null : json["chatEventId"],
        fileTypeId: json["fileTypeId"],
        isSeen: json["isSeen"] == null ? null : json["isSeen"],
        isDelivered: json["isDelivered"] == null ? null : json["isDelivered"],
        createdDate: json["createdDate"] == null ? null : DateTime.parse(json["createdDate"]),
        chatSource: json["chatSource"] == null ? null : json["chatSource"],
        conversationId: json["conversationId"] == null ? null : json["conversationId"],
        fileTypeResponse: json["fileTypeResponse"] == null ? null : FileTypeResponse.fromJson(json["fileTypeResponse"]),
        userChatReplyResponse: json["userChatReplyResponse"],
      );

  Map<String, dynamic> toJson() => {
        "userChatHistoryId": userChatHistoryId == null ? null : userChatHistoryId,
        "userChatHistoryLineId": userChatHistoryLineId == null ? null : userChatHistoryLineId,
        "contant": contant == null ? null : contant,
        "contantNo": contantNo == null ? null : contantNo,
        "currentUserId": currentUserId == null ? null : currentUserId,
        "currentUserName": currentUserName == null ? null : currentUserName,
        "targetUserId": targetUserId == null ? null : targetUserId,
        "targetUserName": targetUserName == null ? null : targetUserName,
        "encryptedTargetUserId": encryptedTargetUserId,
        "encryptedTargetUserName": encryptedTargetUserName,
        "chatEventId": chatEventId == null ? null : chatEventId,
        "fileTypeId": fileTypeId,
        "isSeen": isSeen == null ? null : isSeen,
        "isDelivered": isDelivered == null ? null : isDelivered,
        "createdDate": createdDate == null ? null : createdDate!.toIso8601String(),
        "chatSource": chatSource == null ? null : chatSource,
        "conversationId": conversationId == null ? null : conversationId,
        "fileTypeResponse": fileTypeResponse == null ? null : fileTypeResponse!.toJson(),
        "userChatReplyResponse": userChatReplyResponse,
      };
}

class FileTypeResponse {
  FileTypeResponse({
    this.fileTypeId,
    this.fileTypeName,
    this.fileTypeDescription,
    this.fileKind,
    this.fileName,
  });

  int? fileTypeId;
  dynamic fileTypeName;
  dynamic fileTypeDescription;
  dynamic fileKind;
  dynamic fileName;

  factory FileTypeResponse.fromJson(Map<String, dynamic> json) => FileTypeResponse(
        fileTypeId: json["fileTypeId"] == null ? null : json["fileTypeId"],
        fileTypeName: json["fileTypeName"],
        fileTypeDescription: json["fileTypeDescription"],
        fileKind: json["fileKind"],
        fileName: json["fileName"],
      );

  Map<String, dynamic> toJson() => {
        "fileTypeId": fileTypeId == null ? null : fileTypeId,
        "fileTypeName": fileTypeName,
        "fileTypeDescription": fileTypeDescription,
        "fileKind": fileKind,
        "fileName": fileName,
      };
}
