// To parse this JSON data, do
//
//     final loginRespon = loginResponFromJson(jsonString);

import 'dart:convert';

LoginRespon loginResponFromJson(String str) =>
    LoginRespon.fromJson(json.decode(str));

String loginResponToJson(LoginRespon data) => json.encode(data.toJson());

class LoginRespon {
  LoginRespon({
    this.success,
    this.message,
    this.dataLogin,
  });

  bool? success;
  String? message;
  DataLogin? dataLogin;

  factory LoginRespon.fromJson(Map<String, dynamic> json) => LoginRespon(
        success: json["success"] == null ? null : json["success"],
        message: json["message"] == null ? null : json["message"],
        dataLogin: json["data_login"] == null
            ? null
            : DataLogin.fromJson(json["data_login"]),
      );

  Map<String, dynamic> toJson() => {
        "success": success == null ? null : success,
        "message": message == null ? null : message,
        "data_login": dataLogin == null ? null : dataLogin!.toJson(),
      };
}

class DataLogin {
  DataLogin(
      {this.idKaryawan,
      this.username,
      this.namaUser,
      this.nik,
      this.idCabang,
      this.idDepartemen,
      this.namaJabatan,
      this.level,
      this.idCompany,
      this.namaDepartemen,
      this.noTelp,
      this.alamat,
      this.email,
      this.foto,
      this.fotoFace,
      this.faceData,
      this.isSales,
      this.lockFaceRecognition,
      this.komponenMobile,
      this.kamera,
      this.kantorPusat,
      this.cosineThreshold,
      this.l2Threshold,
      this.bahasa,
      this.adminAtasan,
      this.qrcodeFlag,
      this.idKlien,
      this.koordinator,
      this.koordinatorKlien,
      this.jumlahKlien,
      this.namaKlien,
      this.klien});

  String? idKaryawan;
  String? username;
  String? namaUser;
  String? nik;
  String? idCabang;
  String? idDepartemen;
  String? namaJabatan;
  int? level;
  String? idCompany;
  String? namaDepartemen;
  String? noTelp;
  String? alamat;
  String? kantorPusat;
  String? email;
  String? foto;
  String? faceData;
  String? fotoFace;
  String? isSales;
  bool? lockFaceRecognition;
  String? komponenMobile;
  String? kamera;
  double? cosineThreshold;
  double? l2Threshold;
  String? bahasa;
  bool? adminAtasan;
  int? qrcodeFlag;
  String? idKlien;
  String? koordinator;
  String? koordinatorKlien;
  int? jumlahKlien;
  String? namaKlien;
  bool? klien;

  factory DataLogin.fromJson(Map<String, dynamic> json) => DataLogin(
      idKaryawan: json["id_karyawan"] == null ? null : json["id_karyawan"],
      username: json["username"] == null ? null : json["username"],
      namaUser: json["nama_user"] == null ? null : json["nama_user"],
      nik: json["nik"] == null ? null : json["nik"],
      idCabang: json["id_cabang"] == null ? null : json["id_cabang"],
      idDepartemen:
          json["id_departemen"] == null ? null : json["id_departemen"],
      namaJabatan: json["nama_jabatan"] == null ? null : json["nama_jabatan"],
      level: json["level"] == null ? null : json["level"],
      idCompany: json["id_company"] == null ? null : json["id_company"],
      namaDepartemen:
          json["nama_departemen"] == null ? null : json["nama_departemen"],
      alamat: json["alamat"] == null ? null : json["alamat"],
      noTelp: json["no_telp"] == null ? null : json["no_telp"],
      email: json["email"] == null ? null : json["email"],
      foto: json["foto"] == null ? null : json["foto"],
      faceData: json["face_data"] == null ? null : json["face_data"],
      lockFaceRecognition: json["lock_facerecognition"] == null
          ? null
          : json["lock_facerecognition"],
      fotoFace: json["foto_face"] == null ? null : json["foto_face"],
      isSales: json["is_sales"] == null ? null : json["is_sales"],
      komponenMobile:
          json["komponen_mobile"] == null ? null : json["komponen_mobile"],
      kamera: json["kamera"] == null ? null : json["kamera"],
      kantorPusat: json["kantor_pusat"] == null ? null : json["kantor_pusat"],
      cosineThreshold:
          json["cosine_threshold"] == null ? null : json["cosine_threshold"],
      l2Threshold: json["l2_threshold"] == null ? null : json["l2_threshold"],
      bahasa: json["bahasa"] == null ? null : json["bahasa"],
      adminAtasan: json["admin_atasan"] == null ? null : json["admin_atasan"],
      qrcodeFlag: json["qrcode_flag"] == null ? null : json["qrcode_flag"],
      idKlien: json["id_klien"] == null ? null : json["id_klien"],
      koordinator: json["koordinator"] == null ? null : json["koordinator"],
      koordinatorKlien:
          json["koordinator_klien"] == null ? null : json["koordinator_klien"],
      jumlahKlien: json["jumlah_klien"] == null ? null : json["jumlah_klien"],
      namaKlien: json["nama_klien"] == null ? null : json["nama_klien"],
      klien: json["klien"] == null ? null : json["klien"]);

  Map<String, dynamic> toJson() => {
        "id_karyawan": idKaryawan == null ? null : idKaryawan,
        "username": username == null ? null : username,
        "nama_user": namaUser == null ? null : namaUser,
        "nik": nik == null ? null : nik,
        "id_cabang": idCabang == null ? null : idCabang,
        "id_departemen": idDepartemen == null ? null : idDepartemen,
        "nama_jabatan": namaJabatan == null ? null : namaJabatan,
        "level": level == null ? null : level,
        "id_company": idCompany == null ? null : idCompany,
        "face_data": faceData == null ? null : faceData,
        "lock_facerecognition":
            lockFaceRecognition == null ? null : lockFaceRecognition,
        "foto_face": fotoFace == null ? null : fotoFace,
        "is_sales": isSales == null ? null : isSales,
        "komponen_mobile": komponenMobile == null ? null : komponenMobile,
        "kamera": kamera == null ? null : kamera,
        "kantor_pusat": kantorPusat == null ? null : kantorPusat,
        "cosine_threshold": cosineThreshold == null ? null : cosineThreshold,
        "l2_threshold": l2Threshold == null ? null : l2Threshold,
        "bahasa": bahasa == null ? null : bahasa,
        "admin_atasan": adminAtasan == null ? null : adminAtasan,
        "qrcode_flag": qrcodeFlag == null ? null : qrcodeFlag,
        "id_klien": idKlien == null ? null : idKlien,
        "koordinator": koordinator == null ? null : koordinator,
        "koordinator_klien": koordinatorKlien == null ? null : koordinatorKlien,
        "jumlah_klien": jumlahKlien == null ? null : jumlahKlien,
        "nama_klien": namaKlien == null ? null : namaKlien,
        "klien": klien == null ? null : klien,
      };
}
