class ContactUsModel {
  String? status;
  int? statusCode;
  String? message;
  List<Data>? data;

  ContactUsModel({this.status, this.statusCode, this.message, this.data});

  ContactUsModel.fromJson(Map<String, dynamic> json) {
    status = json['status'];
    statusCode = json['status_code'];
    message = json['message'];
    if (json['data'] != null) {
      data = <Data>[];
      json['data'].forEach((v) {
        data!.add(new Data.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['status'] = this.status;
    data['status_code'] = this.statusCode;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Data {
  int? id;
  String? uniqueTicketId;
  int? iamPrincipalXid;
  int? ticketCategoryXid;
  String? description;
  int? status;
  int? isActive;
  String? createdAt;
  TicketCategory? ticketCategory;
  List<TicketFiles>? ticketFiles;

  Data(
      {this.id,
      this.uniqueTicketId,
      this.iamPrincipalXid,
      this.ticketCategoryXid,
      this.description,
      this.status,
      this.isActive,
      this.createdAt,
      this.ticketCategory,
      this.ticketFiles});

  Data.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    uniqueTicketId = json['unique_ticket_id'];
    iamPrincipalXid = json['iam_principal_xid'];
    ticketCategoryXid = json['ticket_category_xid'];
    description = json['description'];
    status = json['status'];
    isActive = json['is_active'];
    createdAt = json['created_at'];
    ticketCategory = json['ticket_category'] != null
        ? new TicketCategory.fromJson(json['ticket_category'])
        : null;
    if (json['ticket_files'] != null) {
      ticketFiles = <TicketFiles>[];
      json['ticket_files'].forEach((v) {
        ticketFiles!.add(new TicketFiles.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['unique_ticket_id'] = this.uniqueTicketId;
    data['iam_principal_xid'] = this.iamPrincipalXid;
    data['ticket_category_xid'] = this.ticketCategoryXid;
    data['description'] = this.description;
    data['status'] = this.status;
    data['is_active'] = this.isActive;
    data['created_at'] = this.createdAt;
    if (this.ticketCategory != null) {
      data['ticket_category'] = this.ticketCategory!.toJson();
    }
    if (this.ticketFiles != null) {
      data['ticket_files'] = this.ticketFiles!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class TicketCategory {
  int? id;
  String? name;
  int? isActive;
  String? createdAt;

  TicketCategory({this.id, this.name, this.isActive, this.createdAt});

  TicketCategory.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    isActive = json['is_active'];
    createdAt = json['created_at'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['is_active'] = this.isActive;
    data['created_at'] = this.createdAt;
    return data;
  }
}

class TicketFiles {
  int? id;
  int? iamPrincipalXid;
  int? ticketXid;
  String? file;
  int? isActive;
  String? createdAt;

  TicketFiles(
      {this.id,
      this.iamPrincipalXid,
      this.ticketXid,
      this.file,
      this.isActive,
      this.createdAt});

  TicketFiles.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    iamPrincipalXid = json['iam_principal_xid'];
    ticketXid = json['ticket_xid'];
    file = json['file'];
    isActive = json['is_active'];
    createdAt = json['created_at'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['iam_principal_xid'] = this.iamPrincipalXid;
    data['ticket_xid'] = this.ticketXid;
    data['file'] = this.file;
    data['is_active'] = this.isActive;
    data['created_at'] = this.createdAt;
    return data;
  }
}
