// To parse this JSON data, do
//
//     final basicOtp = basicOtpFromJson(jsonString);

import 'dart:convert';

BasicOtpRespModel basicOtpFromJson(String str) => BasicOtpRespModel.fromJson(json.decode(str));

String basicOtpToJson(BasicOtpRespModel data) => json.encode(data.toJson());

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

  dynamic totalItemsCount;
  Data? data;
  int? messageStatus;
  String? message;

  factory BasicOtpRespModel.fromJson(Map<String, dynamic> json) => BasicOtpRespModel(
        totalItemsCount: json["totalItemsCount"],
        data: json["data"] == null ? null : Data.fromJson(json["data"]),
        messageStatus: json["messageStatus"] == null ? null : json["messageStatus"],
        message: json["message"] == null ? null : json["message"],
      );

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

class Data {
  Data({
    this.userToken,
  });

  String? userToken;

  factory Data.fromJson(Map<String, dynamic> json) => Data(
        userToken: checkValue(json),
      );

  static String checkValue(Map<String, dynamic> json) {
    try {
      return json["userToken"] == null ? null : json["userToken"];
    } catch (e) {
      return json["token"] == null ? null : json["token"];
    }
  }

  Map<String, dynamic> toJson() => {
        "userToken": userToken == null ? null : userToken,
      };
}
