part of 'generated.dart';

class ListShiftsForDailyOpsByVendorVariablesBuilder {
  String vendorId;
  Timestamp date;

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

  QueryRef<ListShiftsForDailyOpsByVendorData, ListShiftsForDailyOpsByVendorVariables> ref() {
    ListShiftsForDailyOpsByVendorVariables vars= ListShiftsForDailyOpsByVendorVariables(vendorId: vendorId,date: date,);
    return _dataConnect.query("listShiftsForDailyOpsByVendor", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListShiftsForDailyOpsByVendorShifts {
  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;
  ListShiftsForDailyOpsByVendorShifts.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 ListShiftsForDailyOpsByVendorShifts otherTyped = other as ListShiftsForDailyOpsByVendorShifts;
    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;
  }

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

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

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

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

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

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

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

  ListShiftsForDailyOpsByVendorVariables({
    required this.vendorId,
    required this.date,
  });
}

