class ChatLoginResponse {
  String? token;
  int? userId;
  String? userName;
  int? applicationId;
  int? expiresIn;
  Context? context;

  ChatLoginResponse(
      {this.token,
        this.userId,
        this.userName,
        this.applicationId,
        this.expiresIn,
        this.context});

  ChatLoginResponse.fromJson(Map<String, dynamic> json) {
    token = json['token'];
    userId = json['userId'];
    userName = json['userName'];
    applicationId = json['applicationId'];
    expiresIn = json['expiresIn'];
    context =
    json['context'] != null ? new Context.fromJson(json['context']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['token'] = this.token;
    data['userId'] = this.userId;
    data['userName'] = this.userName;
    data['applicationId'] = this.applicationId;
    data['expiresIn'] = this.expiresIn;
    if (this.context != null) {
      data['context'] = this.context!.toJson();
    }
    return data;
  }
}

class Context {
  String? conversationId;
  String? moduleCode;
  String? referenceId;
  String? title;
  List<DeepLinks>? deepLinks;

  Context(
      {this.conversationId,
        this.moduleCode,
        this.referenceId,
        this.title,
        this.deepLinks});

  Context.fromJson(Map<String, dynamic> json) {
    conversationId = json['conversationId'];
    moduleCode = json['moduleCode'];
    referenceId = json['referenceId'];
    title = json['title'];
    if (json['deepLinks'] != null) {
      deepLinks = <DeepLinks>[];
      json['deepLinks'].forEach((v) {
        deepLinks!.add(new DeepLinks.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['conversationId'] = this.conversationId;
    data['moduleCode'] = this.moduleCode;
    data['referenceId'] = this.referenceId;
    data['title'] = this.title;
    if (this.deepLinks != null) {
      data['deepLinks'] = this.deepLinks!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class DeepLinks {
  String? employeeNumber;
  int? userId;
  String? userName;

  DeepLinks({this.employeeNumber, this.userId, this.userName});

  DeepLinks.fromJson(Map<String, dynamic> json) {
    employeeNumber = json['employeeNumber'];
    userId = json['userId'];
    userName = json['userName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['employeeNumber'] = this.employeeNumber;
    data['userId'] = this.userId;
    data['userName'] = this.userName;
    return data;
  }
}
