part of 'generated.dart';

class ListShiftsForNoShowRangeByVendorVariablesBuilder {
  String vendorId;
  Timestamp startDate;
  Timestamp endDate;

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

  QueryRef<ListShiftsForNoShowRangeByVendorData, ListShiftsForNoShowRangeByVendorVariables> ref() {
    ListShiftsForNoShowRangeByVendorVariables vars= ListShiftsForNoShowRangeByVendorVariables(vendorId: vendorId,startDate: startDate,endDate: endDate,);
    return _dataConnect.query("listShiftsForNoShowRangeByVendor", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListShiftsForNoShowRangeByVendorShifts {
  final String id;
  final Timestamp? date;
  ListShiftsForNoShowRangeByVendorShifts.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 ListShiftsForNoShowRangeByVendorShifts otherTyped = other as ListShiftsForNoShowRangeByVendorShifts;
    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;
  }

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

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

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

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

@immutable
class ListShiftsForNoShowRangeByVendorVariables {
  final String vendorId;
  final Timestamp startDate;
  final Timestamp endDate;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  ListShiftsForNoShowRangeByVendorVariables.fromJson(Map<String, dynamic> json):
  
  vendorId = nativeFromJson<String>(json['vendorId']),
  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 ListShiftsForNoShowRangeByVendorVariables otherTyped = other as ListShiftsForNoShowRangeByVendorVariables;
    return vendorId == otherTyped.vendorId && 
    startDate == otherTyped.startDate && 
    endDate == otherTyped.endDate;
    
  }
  @override
  int get hashCode => Object.hashAll([vendorId.hashCode, startDate.hashCode, endDate.hashCode]);
  

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

  ListShiftsForNoShowRangeByVendorVariables({
    required this.vendorId,
    required this.startDate,
    required this.endDate,
  });
}

