part of 'generated.dart';

class GetStaffByUserIdVariablesBuilder {
  String userId;

  final FirebaseDataConnect _dataConnect;
  GetStaffByUserIdVariablesBuilder(this._dataConnect, {required  this.userId,});
  Deserializer<GetStaffByUserIdData> dataDeserializer = (dynamic json)  => GetStaffByUserIdData.fromJson(jsonDecode(json));
  Serializer<GetStaffByUserIdVariables> varsSerializer = (GetStaffByUserIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetStaffByUserIdData, GetStaffByUserIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetStaffByUserIdData, GetStaffByUserIdVariables> ref() {
    GetStaffByUserIdVariables vars= GetStaffByUserIdVariables(userId: userId,);
    return _dataConnect.query("getStaffByUserId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetStaffByUserIdStaffs {
  final String id;
  final String userId;
  final String fullName;
  final String? level;
  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 List<String>? skills;
  final List<String>? industries;
  final List<String>? preferredLocations;
  final int? maxDistanceMiles;
  final AnyValue? languages;
  final AnyValue? itemsAttire;
  final String? ownerId;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  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;
  GetStaffByUserIdStaffs.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']),
  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 : (json['skills'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList(),
  industries = json['industries'] == null ? null : (json['industries'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList(),
  preferredLocations = json['preferredLocations'] == null ? null : (json['preferredLocations'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList(),
  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']),
  updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
  createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']),
  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 GetStaffByUserIdStaffs otherTyped = other as GetStaffByUserIdStaffs;
    return id == otherTyped.id && 
    userId == otherTyped.userId && 
    fullName == otherTyped.fullName && 
    level == otherTyped.level && 
    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 && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy && 
    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, 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, updatedAt.hashCode, createdBy.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 (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?.map((e) => nativeToJson<String>(e)).toList();
    }
    if (industries != null) {
      json['industries'] = industries?.map((e) => nativeToJson<String>(e)).toList();
    }
    if (preferredLocations != null) {
      json['preferredLocations'] = preferredLocations?.map((e) => nativeToJson<String>(e)).toList();
    }
    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 (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    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;
  }

  GetStaffByUserIdStaffs({
    required this.id,
    required this.userId,
    required this.fullName,
    this.level,
    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.updatedAt,
    this.createdBy,
    this.department,
    this.hubId,
    this.manager,
    this.english,
    this.backgroundCheckStatus,
    this.employmentType,
    this.initial,
    this.englishRequired,
    this.city,
    this.addres,
  });
}

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

    final GetStaffByUserIdData otherTyped = other as GetStaffByUserIdData;
    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;
  }

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

@immutable
class GetStaffByUserIdVariables {
  final String userId;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  GetStaffByUserIdVariables.fromJson(Map<String, dynamic> json):
  
  userId = nativeFromJson<String>(json['userId']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetStaffByUserIdVariables otherTyped = other as GetStaffByUserIdVariables;
    return userId == otherTyped.userId;
    
  }
  @override
  int get hashCode => userId.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['userId'] = nativeToJson<String>(userId);
    return json;
  }

  GetStaffByUserIdVariables({
    required this.userId,
  });
}

