part of 'generated.dart';

class ListTaxFormsWhereVariablesBuilder {
  Optional<TaxFormType> _formType = Optional.optional((data) => TaxFormType.values.byName(data), enumSerializer);
  Optional<TaxFormStatus> _status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer);
  Optional<String> _staffId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;
  ListTaxFormsWhereVariablesBuilder formType(TaxFormType? t) {
   _formType.value = t;
   return this;
  }
  ListTaxFormsWhereVariablesBuilder status(TaxFormStatus? t) {
   _status.value = t;
   return this;
  }
  ListTaxFormsWhereVariablesBuilder staffId(String? t) {
   _staffId.value = t;
   return this;
  }
  ListTaxFormsWhereVariablesBuilder offset(int? t) {
   _offset.value = t;
   return this;
  }
  ListTaxFormsWhereVariablesBuilder limit(int? t) {
   _limit.value = t;
   return this;
  }

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

  QueryRef<ListTaxFormsWhereData, ListTaxFormsWhereVariables> ref() {
    ListTaxFormsWhereVariables vars= ListTaxFormsWhereVariables(formType: _formType,status: _status,staffId: _staffId,offset: _offset,limit: _limit,);
    return _dataConnect.query("listTaxFormsWhere", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListTaxFormsWhereTaxForms {
  final String id;
  final EnumValue<TaxFormType> formType;
  final String firstName;
  final String lastName;
  final String? mInitial;
  final String? oLastName;
  final Timestamp? dob;
  final int socialSN;
  final String? email;
  final String? phone;
  final String address;
  final String? city;
  final String? apt;
  final String? state;
  final String? zipCode;
  final EnumValue<MaritalStatus>? marital;
  final bool? multipleJob;
  final int? childrens;
  final int? otherDeps;
  final double? totalCredits;
  final double? otherInconme;
  final double? deductions;
  final double? extraWithholding;
  final EnumValue<CitizenshipStatus>? citizen;
  final String? uscis;
  final String? passportNumber;
  final String? countryIssue;
  final bool? prepartorOrTranslator;
  final String? signature;
  final Timestamp? date;
  final EnumValue<TaxFormStatus> status;
  final String staffId;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  ListTaxFormsWhereTaxForms.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  formType = taxFormTypeDeserializer(json['formType']),
  firstName = nativeFromJson<String>(json['firstName']),
  lastName = nativeFromJson<String>(json['lastName']),
  mInitial = json['mInitial'] == null ? null : nativeFromJson<String>(json['mInitial']),
  oLastName = json['oLastName'] == null ? null : nativeFromJson<String>(json['oLastName']),
  dob = json['dob'] == null ? null : Timestamp.fromJson(json['dob']),
  socialSN = nativeFromJson<int>(json['socialSN']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
  phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
  address = nativeFromJson<String>(json['address']),
  city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
  apt = json['apt'] == null ? null : nativeFromJson<String>(json['apt']),
  state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
  zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
  marital = json['marital'] == null ? null : maritalStatusDeserializer(json['marital']),
  multipleJob = json['multipleJob'] == null ? null : nativeFromJson<bool>(json['multipleJob']),
  childrens = json['childrens'] == null ? null : nativeFromJson<int>(json['childrens']),
  otherDeps = json['otherDeps'] == null ? null : nativeFromJson<int>(json['otherDeps']),
  totalCredits = json['totalCredits'] == null ? null : nativeFromJson<double>(json['totalCredits']),
  otherInconme = json['otherInconme'] == null ? null : nativeFromJson<double>(json['otherInconme']),
  deductions = json['deductions'] == null ? null : nativeFromJson<double>(json['deductions']),
  extraWithholding = json['extraWithholding'] == null ? null : nativeFromJson<double>(json['extraWithholding']),
  citizen = json['citizen'] == null ? null : citizenshipStatusDeserializer(json['citizen']),
  uscis = json['uscis'] == null ? null : nativeFromJson<String>(json['uscis']),
  passportNumber = json['passportNumber'] == null ? null : nativeFromJson<String>(json['passportNumber']),
  countryIssue = json['countryIssue'] == null ? null : nativeFromJson<String>(json['countryIssue']),
  prepartorOrTranslator = json['prepartorOrTranslator'] == null ? null : nativeFromJson<bool>(json['prepartorOrTranslator']),
  signature = json['signature'] == null ? null : nativeFromJson<String>(json['signature']),
  date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
  status = taxFormStatusDeserializer(json['status']),
  staffId = nativeFromJson<String>(json['staffId']),
  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 ListTaxFormsWhereTaxForms otherTyped = other as ListTaxFormsWhereTaxForms;
    return id == otherTyped.id && 
    formType == otherTyped.formType && 
    firstName == otherTyped.firstName && 
    lastName == otherTyped.lastName && 
    mInitial == otherTyped.mInitial && 
    oLastName == otherTyped.oLastName && 
    dob == otherTyped.dob && 
    socialSN == otherTyped.socialSN && 
    email == otherTyped.email && 
    phone == otherTyped.phone && 
    address == otherTyped.address && 
    city == otherTyped.city && 
    apt == otherTyped.apt && 
    state == otherTyped.state && 
    zipCode == otherTyped.zipCode && 
    marital == otherTyped.marital && 
    multipleJob == otherTyped.multipleJob && 
    childrens == otherTyped.childrens && 
    otherDeps == otherTyped.otherDeps && 
    totalCredits == otherTyped.totalCredits && 
    otherInconme == otherTyped.otherInconme && 
    deductions == otherTyped.deductions && 
    extraWithholding == otherTyped.extraWithholding && 
    citizen == otherTyped.citizen && 
    uscis == otherTyped.uscis && 
    passportNumber == otherTyped.passportNumber && 
    countryIssue == otherTyped.countryIssue && 
    prepartorOrTranslator == otherTyped.prepartorOrTranslator && 
    signature == otherTyped.signature && 
    date == otherTyped.date && 
    status == otherTyped.status && 
    staffId == otherTyped.staffId && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, firstName.hashCode, lastName.hashCode, mInitial.hashCode, oLastName.hashCode, dob.hashCode, socialSN.hashCode, email.hashCode, phone.hashCode, address.hashCode, city.hashCode, apt.hashCode, state.hashCode, zipCode.hashCode, marital.hashCode, multipleJob.hashCode, childrens.hashCode, otherDeps.hashCode, totalCredits.hashCode, otherInconme.hashCode, deductions.hashCode, extraWithholding.hashCode, citizen.hashCode, uscis.hashCode, passportNumber.hashCode, countryIssue.hashCode, prepartorOrTranslator.hashCode, signature.hashCode, date.hashCode, status.hashCode, staffId.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['firstName'] = nativeToJson<String>(firstName);
    json['lastName'] = nativeToJson<String>(lastName);
    if (mInitial != null) {
      json['mInitial'] = nativeToJson<String?>(mInitial);
    }
    if (oLastName != null) {
      json['oLastName'] = nativeToJson<String?>(oLastName);
    }
    if (dob != null) {
      json['dob'] = dob!.toJson();
    }
    json['socialSN'] = nativeToJson<int>(socialSN);
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    if (phone != null) {
      json['phone'] = nativeToJson<String?>(phone);
    }
    json['address'] = nativeToJson<String>(address);
    if (city != null) {
      json['city'] = nativeToJson<String?>(city);
    }
    if (apt != null) {
      json['apt'] = nativeToJson<String?>(apt);
    }
    if (state != null) {
      json['state'] = nativeToJson<String?>(state);
    }
    if (zipCode != null) {
      json['zipCode'] = nativeToJson<String?>(zipCode);
    }
    if (marital != null) {
      json['marital'] = 
    maritalStatusSerializer(marital!)
    ;
    }
    if (multipleJob != null) {
      json['multipleJob'] = nativeToJson<bool?>(multipleJob);
    }
    if (childrens != null) {
      json['childrens'] = nativeToJson<int?>(childrens);
    }
    if (otherDeps != null) {
      json['otherDeps'] = nativeToJson<int?>(otherDeps);
    }
    if (totalCredits != null) {
      json['totalCredits'] = nativeToJson<double?>(totalCredits);
    }
    if (otherInconme != null) {
      json['otherInconme'] = nativeToJson<double?>(otherInconme);
    }
    if (deductions != null) {
      json['deductions'] = nativeToJson<double?>(deductions);
    }
    if (extraWithholding != null) {
      json['extraWithholding'] = nativeToJson<double?>(extraWithholding);
    }
    if (citizen != null) {
      json['citizen'] = 
    citizenshipStatusSerializer(citizen!)
    ;
    }
    if (uscis != null) {
      json['uscis'] = nativeToJson<String?>(uscis);
    }
    if (passportNumber != null) {
      json['passportNumber'] = nativeToJson<String?>(passportNumber);
    }
    if (countryIssue != null) {
      json['countryIssue'] = nativeToJson<String?>(countryIssue);
    }
    if (prepartorOrTranslator != null) {
      json['prepartorOrTranslator'] = nativeToJson<bool?>(prepartorOrTranslator);
    }
    if (signature != null) {
      json['signature'] = nativeToJson<String?>(signature);
    }
    if (date != null) {
      json['date'] = date!.toJson();
    }
    json['status'] = 
    taxFormStatusSerializer(status)
    ;
    json['staffId'] = nativeToJson<String>(staffId);
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    return json;
  }

  ListTaxFormsWhereTaxForms({
    required this.id,
    required this.formType,
    required this.firstName,
    required this.lastName,
    this.mInitial,
    this.oLastName,
    this.dob,
    required this.socialSN,
    this.email,
    this.phone,
    required this.address,
    this.city,
    this.apt,
    this.state,
    this.zipCode,
    this.marital,
    this.multipleJob,
    this.childrens,
    this.otherDeps,
    this.totalCredits,
    this.otherInconme,
    this.deductions,
    this.extraWithholding,
    this.citizen,
    this.uscis,
    this.passportNumber,
    this.countryIssue,
    this.prepartorOrTranslator,
    this.signature,
    this.date,
    required this.status,
    required this.staffId,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

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

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

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

@immutable
class ListTaxFormsWhereVariables {
  late final Optional<TaxFormType>formType;
  late final Optional<TaxFormStatus>status;
  late final Optional<String>staffId;
  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.')
  ListTaxFormsWhereVariables.fromJson(Map<String, dynamic> json) {
  
  
    formType = Optional.optional((data) => TaxFormType.values.byName(data), enumSerializer);
    formType.value = json['formType'] == null ? null : TaxFormType.values.byName(json['formType']);
  
  
    status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer);
    status.value = json['status'] == null ? null : TaxFormStatus.values.byName(json['status']);
  
  
    staffId = Optional.optional(nativeFromJson, nativeToJson);
    staffId.value = json['staffId'] == null ? null : nativeFromJson<String>(json['staffId']);
  
  
    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 ListTaxFormsWhereVariables otherTyped = other as ListTaxFormsWhereVariables;
    return formType == otherTyped.formType && 
    status == otherTyped.status && 
    staffId == otherTyped.staffId && 
    offset == otherTyped.offset && 
    limit == otherTyped.limit;
    
  }
  @override
  int get hashCode => Object.hashAll([formType.hashCode, status.hashCode, staffId.hashCode, offset.hashCode, limit.hashCode]);
  

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

  ListTaxFormsWhereVariables({
    required this.formType,
    required this.status,
    required this.staffId,
    required this.offset,
    required this.limit,
  });
}

