part of 'generated.dart';

class GetBenefitsDataByKeyVariablesBuilder {
  String staffId;
  String vendorBenefitPlanId;

  final FirebaseDataConnect _dataConnect;
  GetBenefitsDataByKeyVariablesBuilder(this._dataConnect, {required  this.staffId,required  this.vendorBenefitPlanId,});
  Deserializer<GetBenefitsDataByKeyData> dataDeserializer = (dynamic json)  => GetBenefitsDataByKeyData.fromJson(jsonDecode(json));
  Serializer<GetBenefitsDataByKeyVariables> varsSerializer = (GetBenefitsDataByKeyVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables> ref() {
    GetBenefitsDataByKeyVariables vars= GetBenefitsDataByKeyVariables(staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,);
    return _dataConnect.query("getBenefitsDataByKey", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetBenefitsDataByKeyBenefitsData {
  final String id;
  final String vendorBenefitPlanId;
  final int current;
  final String staffId;
  final GetBenefitsDataByKeyBenefitsDataStaff staff;
  final GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan vendorBenefitPlan;
  GetBenefitsDataByKeyBenefitsData.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  vendorBenefitPlanId = nativeFromJson<String>(json['vendorBenefitPlanId']),
  current = nativeFromJson<int>(json['current']),
  staffId = nativeFromJson<String>(json['staffId']),
  staff = GetBenefitsDataByKeyBenefitsDataStaff.fromJson(json['staff']),
  vendorBenefitPlan = GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan.fromJson(json['vendorBenefitPlan']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetBenefitsDataByKeyBenefitsData otherTyped = other as GetBenefitsDataByKeyBenefitsData;
    return id == otherTyped.id && 
    vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && 
    current == otherTyped.current && 
    staffId == otherTyped.staffId && 
    staff == otherTyped.staff && 
    vendorBenefitPlan == otherTyped.vendorBenefitPlan;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, vendorBenefitPlanId.hashCode, current.hashCode, staffId.hashCode, staff.hashCode, vendorBenefitPlan.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['vendorBenefitPlanId'] = nativeToJson<String>(vendorBenefitPlanId);
    json['current'] = nativeToJson<int>(current);
    json['staffId'] = nativeToJson<String>(staffId);
    json['staff'] = staff.toJson();
    json['vendorBenefitPlan'] = vendorBenefitPlan.toJson();
    return json;
  }

  GetBenefitsDataByKeyBenefitsData({
    required this.id,
    required this.vendorBenefitPlanId,
    required this.current,
    required this.staffId,
    required this.staff,
    required this.vendorBenefitPlan,
  });
}

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

    final GetBenefitsDataByKeyBenefitsDataStaff otherTyped = other as GetBenefitsDataByKeyBenefitsDataStaff;
    return id == otherTyped.id && 
    fullName == otherTyped.fullName;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['fullName'] = nativeToJson<String>(fullName);
    return json;
  }

  GetBenefitsDataByKeyBenefitsDataStaff({
    required this.id,
    required this.fullName,
  });
}

@immutable
class GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan {
  final String id;
  final String vendorId;
  final String title;
  final String? description;
  final String? requestLabel;
  final int? total;
  final bool? isActive;
  GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  vendorId = nativeFromJson<String>(json['vendorId']),
  title = nativeFromJson<String>(json['title']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
  requestLabel = json['requestLabel'] == null ? null : nativeFromJson<String>(json['requestLabel']),
  total = json['total'] == null ? null : nativeFromJson<int>(json['total']),
  isActive = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan otherTyped = other as GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan;
    return id == otherTyped.id && 
    vendorId == otherTyped.vendorId && 
    title == otherTyped.title && 
    description == otherTyped.description && 
    requestLabel == otherTyped.requestLabel && 
    total == otherTyped.total && 
    isActive == otherTyped.isActive;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['vendorId'] = nativeToJson<String>(vendorId);
    json['title'] = nativeToJson<String>(title);
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    if (requestLabel != null) {
      json['requestLabel'] = nativeToJson<String?>(requestLabel);
    }
    if (total != null) {
      json['total'] = nativeToJson<int?>(total);
    }
    if (isActive != null) {
      json['isActive'] = nativeToJson<bool?>(isActive);
    }
    return json;
  }

  GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan({
    required this.id,
    required this.vendorId,
    required this.title,
    this.description,
    this.requestLabel,
    this.total,
    this.isActive,
  });
}

@immutable
class GetBenefitsDataByKeyData {
  final GetBenefitsDataByKeyBenefitsData? benefitsData;
  GetBenefitsDataByKeyData.fromJson(dynamic json):
  
  benefitsData = json['benefitsData'] == null ? null : GetBenefitsDataByKeyBenefitsData.fromJson(json['benefitsData']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetBenefitsDataByKeyData otherTyped = other as GetBenefitsDataByKeyData;
    return benefitsData == otherTyped.benefitsData;
    
  }
  @override
  int get hashCode => benefitsData.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (benefitsData != null) {
      json['benefitsData'] = benefitsData!.toJson();
    }
    return json;
  }

  GetBenefitsDataByKeyData({
    this.benefitsData,
  });
}

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

    final GetBenefitsDataByKeyVariables otherTyped = other as GetBenefitsDataByKeyVariables;
    return staffId == otherTyped.staffId && 
    vendorBenefitPlanId == otherTyped.vendorBenefitPlanId;
    
  }
  @override
  int get hashCode => Object.hashAll([staffId.hashCode, vendorBenefitPlanId.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['staffId'] = nativeToJson<String>(staffId);
    json['vendorBenefitPlanId'] = nativeToJson<String>(vendorBenefitPlanId);
    return json;
  }

  GetBenefitsDataByKeyVariables({
    required this.staffId,
    required this.vendorBenefitPlanId,
  });
}

