part of 'generated.dart';

class ListStaffForPerformanceVariablesBuilder {
  List<String> staffIds;

  final FirebaseDataConnect _dataConnect;
  ListStaffForPerformanceVariablesBuilder(this._dataConnect, {required  this.staffIds,});
  Deserializer<ListStaffForPerformanceData> dataDeserializer = (dynamic json)  => ListStaffForPerformanceData.fromJson(jsonDecode(json));
  Serializer<ListStaffForPerformanceVariables> varsSerializer = (ListStaffForPerformanceVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListStaffForPerformanceData, ListStaffForPerformanceVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListStaffForPerformanceData, ListStaffForPerformanceVariables> ref() {
    ListStaffForPerformanceVariables vars= ListStaffForPerformanceVariables(staffIds: staffIds,);
    return _dataConnect.query("listStaffForPerformance", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListStaffForPerformanceStaffs {
  final String id;
  final double? averageRating;
  final int? onTimeRate;
  final int? noShowCount;
  final int? reliabilityScore;
  ListStaffForPerformanceStaffs.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  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']),
  reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson<int>(json['reliabilityScore']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListStaffForPerformanceStaffs otherTyped = other as ListStaffForPerformanceStaffs;
    return id == otherTyped.id && 
    averageRating == otherTyped.averageRating && 
    onTimeRate == otherTyped.onTimeRate && 
    noShowCount == otherTyped.noShowCount && 
    reliabilityScore == otherTyped.reliabilityScore;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, reliabilityScore.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    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 (reliabilityScore != null) {
      json['reliabilityScore'] = nativeToJson<int?>(reliabilityScore);
    }
    return json;
  }

  ListStaffForPerformanceStaffs({
    required this.id,
    this.averageRating,
    this.onTimeRate,
    this.noShowCount,
    this.reliabilityScore,
  });
}

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

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

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

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

    final ListStaffForPerformanceVariables otherTyped = other as ListStaffForPerformanceVariables;
    return staffIds == otherTyped.staffIds;
    
  }
  @override
  int get hashCode => staffIds.hashCode;
  

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

  ListStaffForPerformanceVariables({
    required this.staffIds,
  });
}

