// To parse this JSON data, do
//
//     final role = roleFromJson(jsonString);

import 'dart:convert';

Role roleFromJson(String str) => Role.fromJson(json.decode(str));

String roleToJson(Role data) => json.encode(data.toJson());

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

  int? totalItemsCount;
  List<RoleData>? data;
  int? messageStatus;
  String? message;

  factory Role.fromJson(Map<String, dynamic> json) => Role(
    totalItemsCount: json["totalItemsCount"] == null ? null : json["totalItemsCount"],
    data: json["data"] == null ? null : List<RoleData>.from(json["data"].map((x) => RoleData.fromJson(x))),
    messageStatus: json["messageStatus"] == null ? null : json["messageStatus"],
    message: json["message"] == null ? null : json["message"],
  );

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

class RoleData {
  RoleData({
    this.id,
    this.roleName,
    this.roleNameN,
    this.isActive,
  });

  int? id;
  String? roleName;
  String? roleNameN;
  bool? isActive;

  factory RoleData.fromJson(Map<String, dynamic> json) => RoleData(
    id: json["id"] == null ? null : json["id"],
    roleName: json["roleName"] == null ? null : json["roleName"],
    roleNameN: json["roleNameN"] == null ? null : json["roleNameN"],
    isActive: json["isActive"] == null ? null : json["isActive"],
  );

  Map<String, dynamic> toJson() => {
    "id": id == null ? null : id,
    "roleName": roleName == null ? null : roleName,
    "roleNameN": roleNameN == null ? null : roleNameN,
    "isActive": isActive == null ? null : isActive,
  };
}
