part of 'generated.dart';

class ListShiftsForNoShowRangeByBusinessVariablesBuilder {
  String businessId;
  Timestamp startDate;
  Timestamp endDate;

  final FirebaseDataConnect _dataConnect;
  ListShiftsForNoShowRangeByBusinessVariablesBuilder(this._dataConnect, {required  this.businessId,required  this.startDate,required  this.endDate,});
  Deserializer<ListShiftsForNoShowRangeByBusinessData> dataDeserializer = (dynamic json)  => ListShiftsForNoShowRangeByBusinessData.fromJson(jsonDecode(json));
  Serializer<ListShiftsForNoShowRangeByBusinessVariables> varsSerializer = (ListShiftsForNoShowRangeByBusinessVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables> ref() {
    ListShiftsForNoShowRangeByBusinessVariables vars= ListShiftsForNoShowRangeByBusinessVariables(businessId: businessId,startDate: startDate,endDate: endDate,);
    return _dataConnect.query("listShiftsForNoShowRangeByBusiness", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

  ListShiftsForNoShowRangeByBusinessShifts({
    required this.id,
    this.date,
  });
}

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

    final ListShiftsForNoShowRangeByBusinessData otherTyped = other as ListShiftsForNoShowRangeByBusinessData;
    return shifts == otherTyped.shifts;
    
  }
  @override
  int get hashCode => shifts.hashCode;
  

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

  ListShiftsForNoShowRangeByBusinessData({
    required this.shifts,
  });
}

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

    final ListShiftsForNoShowRangeByBusinessVariables otherTyped = other as ListShiftsForNoShowRangeByBusinessVariables;
    return businessId == otherTyped.businessId && 
    startDate == otherTyped.startDate && 
    endDate == otherTyped.endDate;
    
  }
  @override
  int get hashCode => Object.hashAll([businessId.hashCode, startDate.hashCode, endDate.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['businessId'] = nativeToJson<String>(businessId);
    json['startDate'] = startDate.toJson();
    json['endDate'] = endDate.toJson();
    return json;
  }

  ListShiftsForNoShowRangeByBusinessVariables({
    required this.businessId,
    required this.startDate,
    required this.endDate,
  });
}

