part of 'generated.dart';

class ListShiftsForDailyOpsByBusinessVariablesBuilder {
  String businessId;
  Timestamp date;

  final FirebaseDataConnect _dataConnect;
  ListShiftsForDailyOpsByBusinessVariablesBuilder(this._dataConnect, {required  this.businessId,required  this.date,});
  Deserializer<ListShiftsForDailyOpsByBusinessData> dataDeserializer = (dynamic json)  => ListShiftsForDailyOpsByBusinessData.fromJson(jsonDecode(json));
  Serializer<ListShiftsForDailyOpsByBusinessVariables> varsSerializer = (ListShiftsForDailyOpsByBusinessVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables> ref() {
    ListShiftsForDailyOpsByBusinessVariables vars= ListShiftsForDailyOpsByBusinessVariables(businessId: businessId,date: date,);
    return _dataConnect.query("listShiftsForDailyOpsByBusiness", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListShiftsForDailyOpsByBusinessShifts {
  final String id;
  final String title;
  final String? location;
  final Timestamp? startTime;
  final Timestamp? endTime;
  final int? workersNeeded;
  final int? filled;
  final EnumValue<ShiftStatus>? status;
  ListShiftsForDailyOpsByBusinessShifts.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  title = nativeFromJson<String>(json['title']),
  location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
  startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
  endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
  workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
  filled = json['filled'] == null ? null : nativeFromJson<int>(json['filled']),
  status = json['status'] == null ? null : shiftStatusDeserializer(json['status']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListShiftsForDailyOpsByBusinessShifts otherTyped = other as ListShiftsForDailyOpsByBusinessShifts;
    return id == otherTyped.id && 
    title == otherTyped.title && 
    location == otherTyped.location && 
    startTime == otherTyped.startTime && 
    endTime == otherTyped.endTime && 
    workersNeeded == otherTyped.workersNeeded && 
    filled == otherTyped.filled && 
    status == otherTyped.status;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, title.hashCode, location.hashCode, startTime.hashCode, endTime.hashCode, workersNeeded.hashCode, filled.hashCode, status.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['title'] = nativeToJson<String>(title);
    if (location != null) {
      json['location'] = nativeToJson<String?>(location);
    }
    if (startTime != null) {
      json['startTime'] = startTime!.toJson();
    }
    if (endTime != null) {
      json['endTime'] = endTime!.toJson();
    }
    if (workersNeeded != null) {
      json['workersNeeded'] = nativeToJson<int?>(workersNeeded);
    }
    if (filled != null) {
      json['filled'] = nativeToJson<int?>(filled);
    }
    if (status != null) {
      json['status'] = 
    shiftStatusSerializer(status!)
    ;
    }
    return json;
  }

  ListShiftsForDailyOpsByBusinessShifts({
    required this.id,
    required this.title,
    this.location,
    this.startTime,
    this.endTime,
    this.workersNeeded,
    this.filled,
    this.status,
  });
}

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

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

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

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

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

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

  ListShiftsForDailyOpsByBusinessVariables({
    required this.businessId,
    required this.date,
  });
}

