part of 'generated.dart';

class ListStaffVariablesBuilder {
  
  final FirebaseDataConnect _dataConnect;
  ListStaffVariablesBuilder(this._dataConnect, );
  Deserializer<ListStaffData> dataDeserializer = (dynamic json)  => ListStaffData.fromJson(jsonDecode(json));
  
  Future<QueryResult<ListStaffData, void>> execute() {
    return ref().execute();
  }

  QueryRef<ListStaffData, void> ref() {
    
    return _dataConnect.query("listStaff", dataDeserializer, emptySerializer, null);
  }
}

@immutable
class ListStaffStaffs {
  final String id;
  final String userId;
  final String fullName;
  final String? level;
  final String? role;
  final String? phone;
  final String? email;
  final String? photoUrl;
  final int? totalShifts;
  final double? averageRating;
  final int? onTimeRate;
  final int? noShowCount;
  final int? cancellationCount;
  final int? reliabilityScore;
  final int? xp;
  final AnyValue? badges;
  final bool? isRecommended;
  final String? bio;
  final AnyValue? skills;
  final AnyValue? industries;
  final AnyValue? preferredLocations;
  final int? maxDistanceMiles;
  final AnyValue? languages;
  final AnyValue? itemsAttire;
  final String? ownerId;
  final Timestamp? createdAt;
  final EnumValue<DepartmentType>? department;
  final String? hubId;
  final String? manager;
  final EnumValue<EnglishProficiency>? english;
  final EnumValue<BackgroundCheckStatus>? backgroundCheckStatus;
  final EnumValue<EmploymentType>? employmentType;
  final String? initial;
  final bool? englishRequired;
  final String? city;
  final String? addres;
  ListStaffStaffs.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  userId = nativeFromJson<String>(json['userId']),
  fullName = nativeFromJson<String>(json['fullName']),
  level = json['level'] == null ? null : nativeFromJson<String>(json['level']),
  role = json['role'] == null ? null : nativeFromJson<String>(json['role']),
  phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
  photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']),
  totalShifts = json['totalShifts'] == null ? null : nativeFromJson<int>(json['totalShifts']),
  averageRating = json['averageRating'] == null ? null : nativeFromJson<double>(json['averageRating']),
  onTimeRate = json['onTimeRate'] == null ? null : nativeFromJson<int>(json['onTimeRate']),
  noShowCount = json['noShowCount'] == null ? null : nativeFromJson<int>(json['noShowCount']),
  cancellationCount = json['cancellationCount'] == null ? null : nativeFromJson<int>(json['cancellationCount']),
  reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson<int>(json['reliabilityScore']),
  xp = json['xp'] == null ? null : nativeFromJson<int>(json['xp']),
  badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']),
  isRecommended = json['isRecommended'] == null ? null : nativeFromJson<bool>(json['isRecommended']),
  bio = json['bio'] == null ? null : nativeFromJson<String>(json['bio']),
  skills = json['skills'] == null ? null : AnyValue.fromJson(json['skills']),
  industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']),
  preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']),
  maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson<int>(json['maxDistanceMiles']),
  languages = json['languages'] == null ? null : AnyValue.fromJson(json['languages']),
  itemsAttire = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']),
  ownerId = json['ownerId'] == null ? null : nativeFromJson<String>(json['ownerId']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  department = json['department'] == null ? null : departmentTypeDeserializer(json['department']),
  hubId = json['hubId'] == null ? null : nativeFromJson<String>(json['hubId']),
  manager = json['manager'] == null ? null : nativeFromJson<String>(json['manager']),
  english = json['english'] == null ? null : englishProficiencyDeserializer(json['english']),
  backgroundCheckStatus = json['backgroundCheckStatus'] == null ? null : backgroundCheckStatusDeserializer(json['backgroundCheckStatus']),
  employmentType = json['employmentType'] == null ? null : employmentTypeDeserializer(json['employmentType']),
  initial = json['initial'] == null ? null : nativeFromJson<String>(json['initial']),
  englishRequired = json['englishRequired'] == null ? null : nativeFromJson<bool>(json['englishRequired']),
  city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
  addres = json['addres'] == null ? null : nativeFromJson<String>(json['addres']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListStaffStaffs otherTyped = other as ListStaffStaffs;
    return id == otherTyped.id && 
    userId == otherTyped.userId && 
    fullName == otherTyped.fullName && 
    level == otherTyped.level && 
    role == otherTyped.role && 
    phone == otherTyped.phone && 
    email == otherTyped.email && 
    photoUrl == otherTyped.photoUrl && 
    totalShifts == otherTyped.totalShifts && 
    averageRating == otherTyped.averageRating && 
    onTimeRate == otherTyped.onTimeRate && 
    noShowCount == otherTyped.noShowCount && 
    cancellationCount == otherTyped.cancellationCount && 
    reliabilityScore == otherTyped.reliabilityScore && 
    xp == otherTyped.xp && 
    badges == otherTyped.badges && 
    isRecommended == otherTyped.isRecommended && 
    bio == otherTyped.bio && 
    skills == otherTyped.skills && 
    industries == otherTyped.industries && 
    preferredLocations == otherTyped.preferredLocations && 
    maxDistanceMiles == otherTyped.maxDistanceMiles && 
    languages == otherTyped.languages && 
    itemsAttire == otherTyped.itemsAttire && 
    ownerId == otherTyped.ownerId && 
    createdAt == otherTyped.createdAt && 
    department == otherTyped.department && 
    hubId == otherTyped.hubId && 
    manager == otherTyped.manager && 
    english == otherTyped.english && 
    backgroundCheckStatus == otherTyped.backgroundCheckStatus && 
    employmentType == otherTyped.employmentType && 
    initial == otherTyped.initial && 
    englishRequired == otherTyped.englishRequired && 
    city == otherTyped.city && 
    addres == otherTyped.addres;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['userId'] = nativeToJson<String>(userId);
    json['fullName'] = nativeToJson<String>(fullName);
    if (level != null) {
      json['level'] = nativeToJson<String?>(level);
    }
    if (role != null) {
      json['role'] = nativeToJson<String?>(role);
    }
    if (phone != null) {
      json['phone'] = nativeToJson<String?>(phone);
    }
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    if (photoUrl != null) {
      json['photoUrl'] = nativeToJson<String?>(photoUrl);
    }
    if (totalShifts != null) {
      json['totalShifts'] = nativeToJson<int?>(totalShifts);
    }
    if (averageRating != null) {
      json['averageRating'] = nativeToJson<double?>(averageRating);
    }
    if (onTimeRate != null) {
      json['onTimeRate'] = nativeToJson<int?>(onTimeRate);
    }
    if (noShowCount != null) {
      json['noShowCount'] = nativeToJson<int?>(noShowCount);
    }
    if (cancellationCount != null) {
      json['cancellationCount'] = nativeToJson<int?>(cancellationCount);
    }
    if (reliabilityScore != null) {
      json['reliabilityScore'] = nativeToJson<int?>(reliabilityScore);
    }
    if (xp != null) {
      json['xp'] = nativeToJson<int?>(xp);
    }
    if (badges != null) {
      json['badges'] = badges!.toJson();
    }
    if (isRecommended != null) {
      json['isRecommended'] = nativeToJson<bool?>(isRecommended);
    }
    if (bio != null) {
      json['bio'] = nativeToJson<String?>(bio);
    }
    if (skills != null) {
      json['skills'] = skills!.toJson();
    }
    if (industries != null) {
      json['industries'] = industries!.toJson();
    }
    if (preferredLocations != null) {
      json['preferredLocations'] = preferredLocations!.toJson();
    }
    if (maxDistanceMiles != null) {
      json['maxDistanceMiles'] = nativeToJson<int?>(maxDistanceMiles);
    }
    if (languages != null) {
      json['languages'] = languages!.toJson();
    }
    if (itemsAttire != null) {
      json['itemsAttire'] = itemsAttire!.toJson();
    }
    if (ownerId != null) {
      json['ownerId'] = nativeToJson<String?>(ownerId);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (department != null) {
      json['department'] = 
    departmentTypeSerializer(department!)
    ;
    }
    if (hubId != null) {
      json['hubId'] = nativeToJson<String?>(hubId);
    }
    if (manager != null) {
      json['manager'] = nativeToJson<String?>(manager);
    }
    if (english != null) {
      json['english'] = 
    englishProficiencySerializer(english!)
    ;
    }
    if (backgroundCheckStatus != null) {
      json['backgroundCheckStatus'] = 
    backgroundCheckStatusSerializer(backgroundCheckStatus!)
    ;
    }
    if (employmentType != null) {
      json['employmentType'] = 
    employmentTypeSerializer(employmentType!)
    ;
    }
    if (initial != null) {
      json['initial'] = nativeToJson<String?>(initial);
    }
    if (englishRequired != null) {
      json['englishRequired'] = nativeToJson<bool?>(englishRequired);
    }
    if (city != null) {
      json['city'] = nativeToJson<String?>(city);
    }
    if (addres != null) {
      json['addres'] = nativeToJson<String?>(addres);
    }
    return json;
  }

  ListStaffStaffs({
    required this.id,
    required this.userId,
    required this.fullName,
    this.level,
    this.role,
    this.phone,
    this.email,
    this.photoUrl,
    this.totalShifts,
    this.averageRating,
    this.onTimeRate,
    this.noShowCount,
    this.cancellationCount,
    this.reliabilityScore,
    this.xp,
    this.badges,
    this.isRecommended,
    this.bio,
    this.skills,
    this.industries,
    this.preferredLocations,
    this.maxDistanceMiles,
    this.languages,
    this.itemsAttire,
    this.ownerId,
    this.createdAt,
    this.department,
    this.hubId,
    this.manager,
    this.english,
    this.backgroundCheckStatus,
    this.employmentType,
    this.initial,
    this.englishRequired,
    this.city,
    this.addres,
  });
}

@immutable
class ListStaffData {
  final List<ListStaffStaffs> staffs;
  ListStaffData.fromJson(dynamic json):
  
  staffs = (json['staffs'] as List<dynamic>)
        .map((e) => ListStaffStaffs.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListStaffData otherTyped = other as ListStaffData;
    return staffs == otherTyped.staffs;
    
  }
  @override
  int get hashCode => staffs.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['staffs'] = staffs.map((e) => e.toJson()).toList();
    return json;
  }

  ListStaffData({
    required this.staffs,
  });
}

