part of 'generated.dart';

class ListTaxFormsVariablesBuilder {
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;
  ListTaxFormsVariablesBuilder offset(int? t) {
   _offset.value = t;
   return this;
  }
  ListTaxFormsVariablesBuilder limit(int? t) {
   _limit.value = t;
   return this;
  }

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

  QueryRef<ListTaxFormsData, ListTaxFormsVariables> ref() {
    ListTaxFormsVariables vars= ListTaxFormsVariables(offset: _offset,limit: _limit,);
    return _dataConnect.query("listTaxForms", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListTaxFormsTaxForms {
  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;
  ListTaxFormsTaxForms.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 ListTaxFormsTaxForms otherTyped = other as ListTaxFormsTaxForms;
    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;
  }

  ListTaxFormsTaxForms({
    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 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,
  });
}

@immutable
class ListTaxFormsVariables {
  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.')
  ListTaxFormsVariables.fromJson(Map<String, dynamic> json) {
  
  
    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 ListTaxFormsVariables otherTyped = other as ListTaxFormsVariables;
    return offset == otherTyped.offset && 
    limit == otherTyped.limit;
    
  }
  @override
  int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]);
  

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

  ListTaxFormsVariables({
    required this.offset,
    required this.limit,
  });
}

