part of 'generated.dart';

class FilterVendorBenefitPlansVariablesBuilder {
  Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _title = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;
  FilterVendorBenefitPlansVariablesBuilder vendorId(String? t) {
   _vendorId.value = t;
   return this;
  }
  FilterVendorBenefitPlansVariablesBuilder title(String? t) {
   _title.value = t;
   return this;
  }
  FilterVendorBenefitPlansVariablesBuilder isActive(bool? t) {
   _isActive.value = t;
   return this;
  }
  FilterVendorBenefitPlansVariablesBuilder offset(int? t) {
   _offset.value = t;
   return this;
  }
  FilterVendorBenefitPlansVariablesBuilder limit(int? t) {
   _limit.value = t;
   return this;
  }

  FilterVendorBenefitPlansVariablesBuilder(this._dataConnect, );
  Deserializer<FilterVendorBenefitPlansData> dataDeserializer = (dynamic json)  => FilterVendorBenefitPlansData.fromJson(jsonDecode(json));
  Serializer<FilterVendorBenefitPlansVariables> varsSerializer = (FilterVendorBenefitPlansVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables>> execute() {
    return ref().execute();
  }

  QueryRef<FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables> ref() {
    FilterVendorBenefitPlansVariables vars= FilterVendorBenefitPlansVariables(vendorId: _vendorId,title: _title,isActive: _isActive,offset: _offset,limit: _limit,);
    return _dataConnect.query("filterVendorBenefitPlans", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class FilterVendorBenefitPlansVendorBenefitPlans {
  final String id;
  final String vendorId;
  final String title;
  final String? description;
  final String? requestLabel;
  final int? total;
  final bool? isActive;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  final FilterVendorBenefitPlansVendorBenefitPlansVendor vendor;
  FilterVendorBenefitPlansVendorBenefitPlans.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']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
  createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']),
  vendor = FilterVendorBenefitPlansVendorBenefitPlansVendor.fromJson(json['vendor']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final FilterVendorBenefitPlansVendorBenefitPlans otherTyped = other as FilterVendorBenefitPlansVendorBenefitPlans;
    return id == otherTyped.id && 
    vendorId == otherTyped.vendorId && 
    title == otherTyped.title && 
    description == otherTyped.description && 
    requestLabel == otherTyped.requestLabel && 
    total == otherTyped.total && 
    isActive == otherTyped.isActive && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.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);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    json['vendor'] = vendor.toJson();
    return json;
  }

  FilterVendorBenefitPlansVendorBenefitPlans({
    required this.id,
    required this.vendorId,
    required this.title,
    this.description,
    this.requestLabel,
    this.total,
    this.isActive,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
    required this.vendor,
  });
}

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

    final FilterVendorBenefitPlansVendorBenefitPlansVendor otherTyped = other as FilterVendorBenefitPlansVendorBenefitPlansVendor;
    return companyName == otherTyped.companyName;
    
  }
  @override
  int get hashCode => companyName.hashCode;
  

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

  FilterVendorBenefitPlansVendorBenefitPlansVendor({
    required this.companyName,
  });
}

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

    final FilterVendorBenefitPlansData otherTyped = other as FilterVendorBenefitPlansData;
    return vendorBenefitPlans == otherTyped.vendorBenefitPlans;
    
  }
  @override
  int get hashCode => vendorBenefitPlans.hashCode;
  

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

  FilterVendorBenefitPlansData({
    required this.vendorBenefitPlans,
  });
}

@immutable
class FilterVendorBenefitPlansVariables {
  late final Optional<String>vendorId;
  late final Optional<String>title;
  late final Optional<bool>isActive;
  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.')
  FilterVendorBenefitPlansVariables.fromJson(Map<String, dynamic> json) {
  
  
    vendorId = Optional.optional(nativeFromJson, nativeToJson);
    vendorId.value = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']);
  
  
    title = Optional.optional(nativeFromJson, nativeToJson);
    title.value = json['title'] == null ? null : nativeFromJson<String>(json['title']);
  
  
    isActive = Optional.optional(nativeFromJson, nativeToJson);
    isActive.value = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']);
  
  
    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 FilterVendorBenefitPlansVariables otherTyped = other as FilterVendorBenefitPlansVariables;
    return vendorId == otherTyped.vendorId && 
    title == otherTyped.title && 
    isActive == otherTyped.isActive && 
    offset == otherTyped.offset && 
    limit == otherTyped.limit;
    
  }
  @override
  int get hashCode => Object.hashAll([vendorId.hashCode, title.hashCode, isActive.hashCode, offset.hashCode, limit.hashCode]);
  

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

  FilterVendorBenefitPlansVariables({
    required this.vendorId,
    required this.title,
    required this.isActive,
    required this.offset,
    required this.limit,
  });
}

