part of 'generated.dart';

class GetStaffAvailabilityStatsByStaffIdVariablesBuilder {
  String staffId;

  final FirebaseDataConnect _dataConnect;
  GetStaffAvailabilityStatsByStaffIdVariablesBuilder(this._dataConnect, {required  this.staffId,});
  Deserializer<GetStaffAvailabilityStatsByStaffIdData> dataDeserializer = (dynamic json)  => GetStaffAvailabilityStatsByStaffIdData.fromJson(jsonDecode(json));
  Serializer<GetStaffAvailabilityStatsByStaffIdVariables> varsSerializer = (GetStaffAvailabilityStatsByStaffIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables> ref() {
    GetStaffAvailabilityStatsByStaffIdVariables vars= GetStaffAvailabilityStatsByStaffIdVariables(staffId: staffId,);
    return _dataConnect.query("getStaffAvailabilityStatsByStaffId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats {
  final String id;
  final String staffId;
  final int? needWorkIndex;
  final int? utilizationPercentage;
  final int? predictedAvailabilityScore;
  final int? scheduledHoursThisPeriod;
  final int? desiredHoursThisPeriod;
  final Timestamp? lastShiftDate;
  final int? acceptanceRate;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff staff;
  GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  staffId = nativeFromJson<String>(json['staffId']),
  needWorkIndex = json['needWorkIndex'] == null ? null : nativeFromJson<int>(json['needWorkIndex']),
  utilizationPercentage = json['utilizationPercentage'] == null ? null : nativeFromJson<int>(json['utilizationPercentage']),
  predictedAvailabilityScore = json['predictedAvailabilityScore'] == null ? null : nativeFromJson<int>(json['predictedAvailabilityScore']),
  scheduledHoursThisPeriod = json['scheduledHoursThisPeriod'] == null ? null : nativeFromJson<int>(json['scheduledHoursThisPeriod']),
  desiredHoursThisPeriod = json['desiredHoursThisPeriod'] == null ? null : nativeFromJson<int>(json['desiredHoursThisPeriod']),
  lastShiftDate = json['lastShiftDate'] == null ? null : Timestamp.fromJson(json['lastShiftDate']),
  acceptanceRate = json['acceptanceRate'] == null ? null : nativeFromJson<int>(json['acceptanceRate']),
  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']),
  staff = GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff.fromJson(json['staff']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats otherTyped = other as GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats;
    return id == otherTyped.id && 
    staffId == otherTyped.staffId && 
    needWorkIndex == otherTyped.needWorkIndex && 
    utilizationPercentage == otherTyped.utilizationPercentage && 
    predictedAvailabilityScore == otherTyped.predictedAvailabilityScore && 
    scheduledHoursThisPeriod == otherTyped.scheduledHoursThisPeriod && 
    desiredHoursThisPeriod == otherTyped.desiredHoursThisPeriod && 
    lastShiftDate == otherTyped.lastShiftDate && 
    acceptanceRate == otherTyped.acceptanceRate && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy && 
    staff == otherTyped.staff;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, needWorkIndex.hashCode, utilizationPercentage.hashCode, predictedAvailabilityScore.hashCode, scheduledHoursThisPeriod.hashCode, desiredHoursThisPeriod.hashCode, lastShiftDate.hashCode, acceptanceRate.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['staffId'] = nativeToJson<String>(staffId);
    if (needWorkIndex != null) {
      json['needWorkIndex'] = nativeToJson<int?>(needWorkIndex);
    }
    if (utilizationPercentage != null) {
      json['utilizationPercentage'] = nativeToJson<int?>(utilizationPercentage);
    }
    if (predictedAvailabilityScore != null) {
      json['predictedAvailabilityScore'] = nativeToJson<int?>(predictedAvailabilityScore);
    }
    if (scheduledHoursThisPeriod != null) {
      json['scheduledHoursThisPeriod'] = nativeToJson<int?>(scheduledHoursThisPeriod);
    }
    if (desiredHoursThisPeriod != null) {
      json['desiredHoursThisPeriod'] = nativeToJson<int?>(desiredHoursThisPeriod);
    }
    if (lastShiftDate != null) {
      json['lastShiftDate'] = lastShiftDate!.toJson();
    }
    if (acceptanceRate != null) {
      json['acceptanceRate'] = nativeToJson<int?>(acceptanceRate);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    json['staff'] = staff.toJson();
    return json;
  }

  GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats({
    required this.id,
    required this.staffId,
    this.needWorkIndex,
    this.utilizationPercentage,
    this.predictedAvailabilityScore,
    this.scheduledHoursThisPeriod,
    this.desiredHoursThisPeriod,
    this.lastShiftDate,
    this.acceptanceRate,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
    required this.staff,
  });
}

@immutable
class GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff {
  final String id;
  final String fullName;
  GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  fullName = nativeFromJson<String>(json['fullName']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff otherTyped = other as GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff;
    return id == otherTyped.id && 
    fullName == otherTyped.fullName;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]);
  

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

  GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff({
    required this.id,
    required this.fullName,
  });
}

@immutable
class GetStaffAvailabilityStatsByStaffIdData {
  final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats? staffAvailabilityStats;
  GetStaffAvailabilityStatsByStaffIdData.fromJson(dynamic json):
  
  staffAvailabilityStats = json['staffAvailabilityStats'] == null ? null : GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats.fromJson(json['staffAvailabilityStats']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetStaffAvailabilityStatsByStaffIdData otherTyped = other as GetStaffAvailabilityStatsByStaffIdData;
    return staffAvailabilityStats == otherTyped.staffAvailabilityStats;
    
  }
  @override
  int get hashCode => staffAvailabilityStats.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (staffAvailabilityStats != null) {
      json['staffAvailabilityStats'] = staffAvailabilityStats!.toJson();
    }
    return json;
  }

  GetStaffAvailabilityStatsByStaffIdData({
    this.staffAvailabilityStats,
  });
}

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

    final GetStaffAvailabilityStatsByStaffIdVariables otherTyped = other as GetStaffAvailabilityStatsByStaffIdVariables;
    return staffId == otherTyped.staffId;
    
  }
  @override
  int get hashCode => staffId.hashCode;
  

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

  GetStaffAvailabilityStatsByStaffIdVariables({
    required this.staffId,
  });
}

