part of 'generated.dart';

class ListStaffForNoShowReportVariablesBuilder {
  List<String> staffIds;

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

  QueryRef<ListStaffForNoShowReportData, ListStaffForNoShowReportVariables> ref() {
    ListStaffForNoShowReportVariables vars= ListStaffForNoShowReportVariables(staffIds: staffIds,);
    return _dataConnect.query("listStaffForNoShowReport", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListStaffForNoShowReportStaffs {
  final String id;
  final String fullName;
  final int? noShowCount;
  final int? reliabilityScore;
  ListStaffForNoShowReportStaffs.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  fullName = nativeFromJson<String>(json['fullName']),
  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 ListStaffForNoShowReportStaffs otherTyped = other as ListStaffForNoShowReportStaffs;
    return id == otherTyped.id && 
    fullName == otherTyped.fullName && 
    noShowCount == otherTyped.noShowCount && 
    reliabilityScore == otherTyped.reliabilityScore;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, noShowCount.hashCode, reliabilityScore.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['fullName'] = nativeToJson<String>(fullName);
    if (noShowCount != null) {
      json['noShowCount'] = nativeToJson<int?>(noShowCount);
    }
    if (reliabilityScore != null) {
      json['reliabilityScore'] = nativeToJson<int?>(reliabilityScore);
    }
    return json;
  }

  ListStaffForNoShowReportStaffs({
    required this.id,
    required this.fullName,
    this.noShowCount,
    this.reliabilityScore,
  });
}

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

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

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

@immutable
class ListStaffForNoShowReportVariables {
  final List<String> staffIds;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  ListStaffForNoShowReportVariables.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 ListStaffForNoShowReportVariables otherTyped = other as ListStaffForNoShowReportVariables;
    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;
  }

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

