part of 'generated.dart';

class FilterFaqDatasVariablesBuilder {
  Optional<String> _category = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;
  FilterFaqDatasVariablesBuilder category(String? t) {
   _category.value = t;
   return this;
  }

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

  QueryRef<FilterFaqDatasData, FilterFaqDatasVariables> ref() {
    FilterFaqDatasVariables vars= FilterFaqDatasVariables(category: _category,);
    return _dataConnect.query("filterFaqDatas", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class FilterFaqDatasFaqDatas {
  final String id;
  final String category;
  final List<AnyValue>? questions;
  FilterFaqDatasFaqDatas.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  category = nativeFromJson<String>(json['category']),
  questions = json['questions'] == null ? null : (json['questions'] as List<dynamic>)
        .map((e) => AnyValue.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['category'] = nativeToJson<String>(category);
    if (questions != null) {
      json['questions'] = questions?.map((e) => e!.toJson()).toList();
    }
    return json;
  }

  FilterFaqDatasFaqDatas({
    required this.id,
    required this.category,
    this.questions,
  });
}

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

    final FilterFaqDatasData otherTyped = other as FilterFaqDatasData;
    return faqDatas == otherTyped.faqDatas;
    
  }
  @override
  int get hashCode => faqDatas.hashCode;
  

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

  FilterFaqDatasData({
    required this.faqDatas,
  });
}

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

    final FilterFaqDatasVariables otherTyped = other as FilterFaqDatasVariables;
    return category == otherTyped.category;
    
  }
  @override
  int get hashCode => category.hashCode;
  

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

  FilterFaqDatasVariables({
    required this.category,
  });
}

