part of 'generated.dart';

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

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

@immutable
class ListTaxFormsTaxForms {
  final String id;
  final EnumValue<TaxFormType> formType;
  final String title;
  final String? subtitle;
  final String? description;
  final EnumValue<TaxFormStatus> status;
  final String staffId;
  final AnyValue? formData;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  ListTaxFormsTaxForms.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  formType = taxFormTypeDeserializer(json['formType']),
  title = nativeFromJson<String>(json['title']),
  subtitle = json['subtitle'] == null ? null : nativeFromJson<String>(json['subtitle']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
  status = taxFormStatusDeserializer(json['status']),
  staffId = nativeFromJson<String>(json['staffId']),
  formData = json['formData'] == null ? null : AnyValue.fromJson(json['formData']),
  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 ListTaxFormsTaxForms otherTyped = other as ListTaxFormsTaxForms;
    return id == otherTyped.id && 
    formType == otherTyped.formType && 
    title == otherTyped.title && 
    subtitle == otherTyped.subtitle && 
    description == otherTyped.description && 
    status == otherTyped.status && 
    staffId == otherTyped.staffId && 
    formData == otherTyped.formData && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, title.hashCode, subtitle.hashCode, description.hashCode, status.hashCode, staffId.hashCode, formData.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['formType'] = 
    taxFormTypeSerializer(formType)
    ;
    json['title'] = nativeToJson<String>(title);
    if (subtitle != null) {
      json['subtitle'] = nativeToJson<String?>(subtitle);
    }
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    json['status'] = 
    taxFormStatusSerializer(status)
    ;
    json['staffId'] = nativeToJson<String>(staffId);
    if (formData != null) {
      json['formData'] = formData!.toJson();
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    return json;
  }

  ListTaxFormsTaxForms({
    required this.id,
    required this.formType,
    required this.title,
    this.subtitle,
    this.description,
    required this.status,
    required this.staffId,
    this.formData,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

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

    final ListTaxFormsData otherTyped = other as ListTaxFormsData;
    return taxForms == otherTyped.taxForms;
    
  }
  @override
  int get hashCode => taxForms.hashCode;
  

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

  ListTaxFormsData({
    required this.taxForms,
  });
}

