part of 'generated.dart';

class ListApplicationsForCoverageVariablesBuilder {
  List<String> shiftIds;

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

  QueryRef<ListApplicationsForCoverageData, ListApplicationsForCoverageVariables> ref() {
    ListApplicationsForCoverageVariables vars= ListApplicationsForCoverageVariables(shiftIds: shiftIds,);
    return _dataConnect.query("listApplicationsForCoverage", dataDeserializer, varsSerializer, vars);
  }
}

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

    final ListApplicationsForCoverageApplications otherTyped = other as ListApplicationsForCoverageApplications;
    return id == otherTyped.id && 
    shiftId == otherTyped.shiftId && 
    staffId == otherTyped.staffId && 
    status == otherTyped.status;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.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)
    ;
    return json;
  }

  ListApplicationsForCoverageApplications({
    required this.id,
    required this.shiftId,
    required this.staffId,
    required this.status,
  });
}

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

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

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

@immutable
class ListApplicationsForCoverageVariables {
  final List<String> shiftIds;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  ListApplicationsForCoverageVariables.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 ListApplicationsForCoverageVariables otherTyped = other as ListApplicationsForCoverageVariables;
    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;
  }

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

