// To parse this JSON data, do
//
//     final itgFormsModel = itgFormsModelFromMap(jsonString);

import 'dart:convert';

import 'package:mohem_flutter_app/models/itg_forms_models/itg_request_model.dart';
import 'package:mohem_flutter_app/models/itg_forms_models/request_type_model.dart';

ItgFormsModel itgFormsModelFromMap(String str) => ItgFormsModel.fromJson(json.decode(str));

String itgFormsModelToMap(ItgFormsModel data) => json.encode(data.toMap());

class ItgFormsModel {
  ItgFormsModel({
    this.date,
    this.languageId,
    this.serviceName,
    this.time,
    this.androidLink,
    this.authenticationTokenId,
    this.data,
    this.dataw,
    this.dietType,
    this.dietTypeId,
    this.errorCode,
    this.errorEndUserMessage,
    this.errorEndUserMessageN,
    this.errorMessage,
    this.errorType,
    this.foodCategory,
    this.iosLink,
    this.isAuthenticated,
    this.mealOrderStatus,
    this.mealType,
    this.messageStatus,
    this.numberOfResultRecords,
    this.patientBlodType,
    this.successMsg,
    this.successMsgN,
    this.vidaUpdatedResponse,
    this.itgRequest,
    this.itgFormAttachmentsList,
    this.message,
    this.mohemmItgDepartmentSectionsList,
    this.mohemmItgProjectDepartmentsList,
    this.mohemmItgResponseItem,
    this.mohemmItgSectionTopicsList,
    this.mohemmItgTicketDetailsList,
    this.mohemmItgTicketTransactionsList,
    this.mohemmItgTicketsByEmployeeList,
    this.mohemmItgProjectsList,
    this.mohemmItgTicketTypesList,
    this.referenceNumber,
    this.requestType,
    this.totalCount,
    this.statuseCode,
  });

  dynamic date;
  int? languageId;
  int? serviceName;
  dynamic time;
  dynamic androidLink;
  dynamic authenticationTokenId;
  dynamic data;
  bool? dataw;
  int? dietType;
  int? dietTypeId;
  dynamic errorCode;
  dynamic errorEndUserMessage;
  dynamic errorEndUserMessageN;
  dynamic errorMessage;
  int? errorType;
  int? foodCategory;
  dynamic iosLink;
  bool? isAuthenticated;
  int? mealOrderStatus;
  int? mealType;
  int? messageStatus;
  int? numberOfResultRecords;
  dynamic patientBlodType;
  String? successMsg;
  dynamic successMsgN;
  dynamic vidaUpdatedResponse;
  ITGRequest? itgRequest;
  dynamic itgFormAttachmentsList;
  String? message;
  dynamic mohemmItgDepartmentSectionsList;
  dynamic mohemmItgProjectDepartmentsList;
  dynamic mohemmItgResponseItem;
  dynamic mohemmItgSectionTopicsList;
  dynamic mohemmItgTicketDetailsList;
  dynamic mohemmItgTicketTransactionsList;
  dynamic mohemmItgTicketsByEmployeeList;
  dynamic mohemmItgProjectsList;
  dynamic mohemmItgTicketTypesList;
  DateTime? referenceNumber;
  List<RequestType>? requestType;
  int? totalCount;
  int? statuseCode;

  factory ItgFormsModel.fromJson(Map<String, dynamic> json) => ItgFormsModel(
        date: json["Date"],
        languageId: json["LanguageID"] == null ? null : json["LanguageID"],
        serviceName: json["ServiceName"] == null ? null : json["ServiceName"],
        time: json["Time"],
        androidLink: json["AndroidLink"],
        authenticationTokenId: json["AuthenticationTokenID"],
        data: json["Data"],
        dataw: json["Dataw"] == null ? null : json["Dataw"],
        dietType: json["DietType"] == null ? null : json["DietType"],
        dietTypeId: json["DietTypeID"] == null ? null : json["DietTypeID"],
        errorCode: json["ErrorCode"],
        errorEndUserMessage: json["ErrorEndUserMessage"],
        errorEndUserMessageN: json["ErrorEndUserMessageN"],
        errorMessage: json["ErrorMessage"],
        errorType: json["ErrorType"] == null ? null : json["ErrorType"],
        foodCategory: json["FoodCategory"] == null ? null : json["FoodCategory"],
        iosLink: json["IOSLink"],
        isAuthenticated: json["IsAuthenticated"] == null ? null : json["IsAuthenticated"],
        mealOrderStatus: json["MealOrderStatus"] == null ? null : json["MealOrderStatus"],
        mealType: json["MealType"] == null ? null : json["MealType"],
        messageStatus: json["MessageStatus"] == null ? null : json["MessageStatus"],
        numberOfResultRecords: json["NumberOfResultRecords"] == null ? null : json["NumberOfResultRecords"],
        patientBlodType: json["PatientBlodType"],
        successMsg: json["SuccessMsg"] == null ? null : json["SuccessMsg"],
        successMsgN: json["SuccessMsgN"],
        vidaUpdatedResponse: json["VidaUpdatedResponse"],
        itgRequest: json['ITGRequest'] != null ? ITGRequest.fromJson(json['ITGRequest']) : null,
        itgFormAttachmentsList: json["Itg_FormAttachmentsList"],
        message: json["Message"] == null ? null : json["Message"],
        mohemmItgDepartmentSectionsList: json["Mohemm_ITG_DepartmentSectionsList"],
        mohemmItgProjectDepartmentsList: json["Mohemm_ITG_ProjectDepartmentsList"],
        mohemmItgResponseItem: json["Mohemm_ITG_ResponseItem"],
        mohemmItgSectionTopicsList: json["Mohemm_ITG_SectionTopicsList"],
        mohemmItgTicketDetailsList: json["Mohemm_ITG_TicketDetailsList"],
        mohemmItgTicketTransactionsList: json["Mohemm_ITG_TicketTransactionsList"],
        mohemmItgTicketsByEmployeeList: json["Mohemm_ITG_TicketsByEmployeeList"],
        mohemmItgProjectsList: json["Mohemm_Itg_ProjectsList"],
        mohemmItgTicketTypesList: json["Mohemm_Itg_TicketTypesList"],
        referenceNumber: json["ReferenceNumber"] == null ? null : DateTime.parse(json["ReferenceNumber"]),
        requestType: json["RequestType"] == null ? <RequestType>[] : json['RequestType']!.map<RequestType>((v) => RequestType.fromJson(v)).toList(),
        totalCount: json["TotalCount"] == null ? null : json["TotalCount"],
        statuseCode: json["statuseCode"] == null ? null : json["statuseCode"],
      );

  Map<String, dynamic> toMap() => {
        "Date": date,
        "LanguageID": languageId == null ? null : languageId,
        "ServiceName": serviceName == null ? null : serviceName,
        "Time": time,
        "AndroidLink": androidLink,
        "AuthenticationTokenID": authenticationTokenId,
        "Data": data,
        "Dataw": dataw == null ? null : dataw,
        "DietType": dietType == null ? null : dietType,
        "DietTypeID": dietTypeId == null ? null : dietTypeId,
        "ErrorCode": errorCode,
        "ErrorEndUserMessage": errorEndUserMessage,
        "ErrorEndUserMessageN": errorEndUserMessageN,
        "ErrorMessage": errorMessage,
        "ErrorType": errorType == null ? null : errorType,
        "FoodCategory": foodCategory == null ? null : foodCategory,
        "IOSLink": iosLink,
        "IsAuthenticated": isAuthenticated == null ? null : isAuthenticated,
        "MealOrderStatus": mealOrderStatus == null ? null : mealOrderStatus,
        "MealType": mealType == null ? null : mealType,
        "MessageStatus": messageStatus == null ? null : messageStatus,
        "NumberOfResultRecords": numberOfResultRecords == null ? null : numberOfResultRecords,
        "PatientBlodType": patientBlodType,
        "SuccessMsg": successMsg == null ? null : successMsg,
        "SuccessMsgN": successMsgN,
        "VidaUpdatedResponse": vidaUpdatedResponse,
        "ITGRequest": itgRequest == null ? null : itgRequest!.toJson(),
        "Itg_FormAttachmentsList": itgFormAttachmentsList,
        "Message": message == null ? null : message,
        "Mohemm_ITG_DepartmentSectionsList": mohemmItgDepartmentSectionsList,
        "Mohemm_ITG_ProjectDepartmentsList": mohemmItgProjectDepartmentsList,
        "Mohemm_ITG_ResponseItem": mohemmItgResponseItem,
        "Mohemm_ITG_SectionTopicsList": mohemmItgSectionTopicsList,
        "Mohemm_ITG_TicketDetailsList": mohemmItgTicketDetailsList,
        "Mohemm_ITG_TicketTransactionsList": mohemmItgTicketTransactionsList,
        "Mohemm_ITG_TicketsByEmployeeList": mohemmItgTicketsByEmployeeList,
        "Mohemm_Itg_ProjectsList": mohemmItgProjectsList,
        "Mohemm_Itg_TicketTypesList": mohemmItgTicketTypesList,
        "ReferenceNumber": referenceNumber == null ? null : referenceNumber!.toIso8601String(),
        "RequestType": requestType == null ? null : requestType!.map((v) => v.toJson()).toList(),
        "TotalCount": totalCount == null ? null : totalCount,
        "statuseCode": statuseCode == null ? null : statuseCode,
      };
}
