part of 'generated.dart';

class ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder {
  String vendorBenefitPlanId;
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

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

  ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder(this._dataConnect, {required  this.vendorBenefitPlanId,});
  Deserializer<ListBenefitsDataByVendorBenefitPlanIdData> dataDeserializer = (dynamic json)  => ListBenefitsDataByVendorBenefitPlanIdData.fromJson(jsonDecode(json));
  Serializer<ListBenefitsDataByVendorBenefitPlanIdVariables> varsSerializer = (ListBenefitsDataByVendorBenefitPlanIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables> ref() {
    ListBenefitsDataByVendorBenefitPlanIdVariables vars= ListBenefitsDataByVendorBenefitPlanIdVariables(vendorBenefitPlanId: vendorBenefitPlanId,offset: _offset,limit: _limit,);
    return _dataConnect.query("listBenefitsDataByVendorBenefitPlanId", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

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

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

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

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

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

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

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

@immutable
class ListBenefitsDataByVendorBenefitPlanIdVariables {
  final String vendorBenefitPlanId;
  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.')
  ListBenefitsDataByVendorBenefitPlanIdVariables.fromJson(Map<String, dynamic> json):
  
  vendorBenefitPlanId = nativeFromJson<String>(json['vendorBenefitPlanId']) {
  
  
  
    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 ListBenefitsDataByVendorBenefitPlanIdVariables otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdVariables;
    return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && 
    offset == otherTyped.offset && 
    limit == otherTyped.limit;
    
  }
  @override
  int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, offset.hashCode, limit.hashCode]);
  

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

  ListBenefitsDataByVendorBenefitPlanIdVariables({
    required this.vendorBenefitPlanId,
    required this.offset,
    required this.limit,
  });
}

