part of 'generated.dart';

class GetFaqDataByIdVariablesBuilder {
  String id;

  final FirebaseDataConnect _dataConnect;
  GetFaqDataByIdVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<GetFaqDataByIdData> dataDeserializer = (dynamic json)  => GetFaqDataByIdData.fromJson(jsonDecode(json));
  Serializer<GetFaqDataByIdVariables> varsSerializer = (GetFaqDataByIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetFaqDataByIdData, GetFaqDataByIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetFaqDataByIdData, GetFaqDataByIdVariables> ref() {
    GetFaqDataByIdVariables vars= GetFaqDataByIdVariables(id: id,);
    return _dataConnect.query("getFaqDataById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetFaqDataByIdFaqData {
  final String id;
  final String category;
  final List<AnyValue>? questions;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  GetFaqDataByIdFaqData.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 GetFaqDataByIdFaqData otherTyped = other as GetFaqDataByIdFaqData;
    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;
  }

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

@immutable
class GetFaqDataByIdData {
  final GetFaqDataByIdFaqData? faqData;
  GetFaqDataByIdData.fromJson(dynamic json):
  
  faqData = json['faqData'] == null ? null : GetFaqDataByIdFaqData.fromJson(json['faqData']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetFaqDataByIdData otherTyped = other as GetFaqDataByIdData;
    return faqData == otherTyped.faqData;
    
  }
  @override
  int get hashCode => faqData.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (faqData != null) {
      json['faqData'] = faqData!.toJson();
    }
    return json;
  }

  GetFaqDataByIdData({
    this.faqData,
  });
}

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

    final GetFaqDataByIdVariables otherTyped = other as GetFaqDataByIdVariables;
    return id == otherTyped.id;
    
  }
  @override
  int get hashCode => id.hashCode;
  

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

  GetFaqDataByIdVariables({
    required this.id,
  });
}

