part of 'generated.dart';

class ListFaqDatasVariablesBuilder {
  
  final FirebaseDataConnect _dataConnect;
  ListFaqDatasVariablesBuilder(this._dataConnect, );
  Deserializer<ListFaqDatasData> dataDeserializer = (dynamic json)  => ListFaqDatasData.fromJson(jsonDecode(json));
  
  Future<QueryResult<ListFaqDatasData, void>> execute() {
    return ref().execute();
  }

  QueryRef<ListFaqDatasData, void> ref() {
    
    return _dataConnect.query("listFaqDatas", dataDeserializer, emptySerializer, null);
  }
}

@immutable
class ListFaqDatasFaqDatas {
  final String id;
  final String category;
  final List<AnyValue>? questions;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  ListFaqDatasFaqDatas.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(),
  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']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

  ListFaqDatasFaqDatas({
    required this.id,
    required this.category,
    this.questions,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

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

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

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

