part of 'generated.dart';

class ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder {
  List<String> vendorBenefitPlanIds;
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder offset(int? t) {
   _offset.value = t;
   return this;
  }
  ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder limit(int? t) {
   _limit.value = t;
   return this;
  }

  ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder(this._dataConnect, {required  this.vendorBenefitPlanIds,});
  Deserializer<ListBenefitsDataByVendorBenefitPlanIdsData> dataDeserializer = (dynamic json)  => ListBenefitsDataByVendorBenefitPlanIdsData.fromJson(jsonDecode(json));
  Serializer<ListBenefitsDataByVendorBenefitPlanIdsVariables> varsSerializer = (ListBenefitsDataByVendorBenefitPlanIdsVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables> ref() {
    ListBenefitsDataByVendorBenefitPlanIdsVariables vars= ListBenefitsDataByVendorBenefitPlanIdsVariables(vendorBenefitPlanIds: vendorBenefitPlanIds,offset: _offset,limit: _limit,);
    return _dataConnect.query("listBenefitsDataByVendorBenefitPlanIds", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

@immutable
class ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff {
  final String id;
  final String fullName;
  ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff.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 ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff;
    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;
  }

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

@immutable
class ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan {
  final String id;
  final String vendorId;
  final String title;
  final String? description;
  final String? requestLabel;
  final int? total;
  final bool? isActive;
  ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan.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 ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan;
    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;
  }

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

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

    final ListBenefitsDataByVendorBenefitPlanIdsData otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsData;
    return benefitsDatas == otherTyped.benefitsDatas;
    
  }
  @override
  int get hashCode => benefitsDatas.hashCode;
  

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

  ListBenefitsDataByVendorBenefitPlanIdsData({
    required this.benefitsDatas,
  });
}

@immutable
class ListBenefitsDataByVendorBenefitPlanIdsVariables {
  final List<String> vendorBenefitPlanIds;
  late final Optional<int>offset;
  late final Optional<int>limit;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  ListBenefitsDataByVendorBenefitPlanIdsVariables.fromJson(Map<String, dynamic> json):
  
  vendorBenefitPlanIds = (json['vendorBenefitPlanIds'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList() {
  
  
  
    offset = Optional.optional(nativeFromJson, nativeToJson);
    offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
  
  
    limit = Optional.optional(nativeFromJson, nativeToJson);
    limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListBenefitsDataByVendorBenefitPlanIdsVariables otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsVariables;
    return vendorBenefitPlanIds == otherTyped.vendorBenefitPlanIds && 
    offset == otherTyped.offset && 
    limit == otherTyped.limit;
    
  }
  @override
  int get hashCode => Object.hashAll([vendorBenefitPlanIds.hashCode, offset.hashCode, limit.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['vendorBenefitPlanIds'] = vendorBenefitPlanIds.map((e) => nativeToJson<String>(e)).toList();
    if(offset.state == OptionalState.set) {
      json['offset'] = offset.toJson();
    }
    if(limit.state == OptionalState.set) {
      json['limit'] = limit.toJson();
    }
    return json;
  }

  ListBenefitsDataByVendorBenefitPlanIdsVariables({
    required this.vendorBenefitPlanIds,
    required this.offset,
    required this.limit,
  });
}

