part of 'generated.dart';

class ListApplicationsForDailyOpsVariablesBuilder {
  List<String> shiftIds;

  final FirebaseDataConnect _dataConnect;
  ListApplicationsForDailyOpsVariablesBuilder(this._dataConnect, {required  this.shiftIds,});
  Deserializer<ListApplicationsForDailyOpsData> dataDeserializer = (dynamic json)  => ListApplicationsForDailyOpsData.fromJson(jsonDecode(json));
  Serializer<ListApplicationsForDailyOpsVariables> varsSerializer = (ListApplicationsForDailyOpsVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables> ref() {
    ListApplicationsForDailyOpsVariables vars= ListApplicationsForDailyOpsVariables(shiftIds: shiftIds,);
    return _dataConnect.query("listApplicationsForDailyOps", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListApplicationsForDailyOpsApplications {
  final String id;
  final String shiftId;
  final String staffId;
  final EnumValue<ApplicationStatus> status;
  final Timestamp? checkInTime;
  final Timestamp? checkOutTime;
  ListApplicationsForDailyOpsApplications.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  shiftId = nativeFromJson<String>(json['shiftId']),
  staffId = nativeFromJson<String>(json['staffId']),
  status = applicationStatusDeserializer(json['status']),
  checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']),
  checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListApplicationsForDailyOpsApplications otherTyped = other as ListApplicationsForDailyOpsApplications;
    return id == otherTyped.id && 
    shiftId == otherTyped.shiftId && 
    staffId == otherTyped.staffId && 
    status == otherTyped.status && 
    checkInTime == otherTyped.checkInTime && 
    checkOutTime == otherTyped.checkOutTime;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, checkInTime.hashCode, checkOutTime.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['shiftId'] = nativeToJson<String>(shiftId);
    json['staffId'] = nativeToJson<String>(staffId);
    json['status'] = 
    applicationStatusSerializer(status)
    ;
    if (checkInTime != null) {
      json['checkInTime'] = checkInTime!.toJson();
    }
    if (checkOutTime != null) {
      json['checkOutTime'] = checkOutTime!.toJson();
    }
    return json;
  }

  ListApplicationsForDailyOpsApplications({
    required this.id,
    required this.shiftId,
    required this.staffId,
    required this.status,
    this.checkInTime,
    this.checkOutTime,
  });
}

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

    final ListApplicationsForDailyOpsData otherTyped = other as ListApplicationsForDailyOpsData;
    return applications == otherTyped.applications;
    
  }
  @override
  int get hashCode => applications.hashCode;
  

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

  ListApplicationsForDailyOpsData({
    required this.applications,
  });
}

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

    final ListApplicationsForDailyOpsVariables otherTyped = other as ListApplicationsForDailyOpsVariables;
    return shiftIds == otherTyped.shiftIds;
    
  }
  @override
  int get hashCode => shiftIds.hashCode;
  

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

  ListApplicationsForDailyOpsVariables({
    required this.shiftIds,
  });
}

