part of 'generated.dart';

class CreateTaxFormVariablesBuilder {
  TaxFormType formType;
  String firstName;
  String lastName;
  Optional<String> _mInitial = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _oLastName = Optional.optional(nativeFromJson, nativeToJson);
  Optional<Timestamp> _dob = Optional.optional((json) => json['dob'] = Timestamp.fromJson(json['dob']), defaultSerializer);
  int socialSN;
  Optional<String> _email = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _phone = Optional.optional(nativeFromJson, nativeToJson);
  String address;
  Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _apt = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson);
  Optional<MaritalStatus> _marital = Optional.optional((data) => MaritalStatus.values.byName(data), enumSerializer);
  Optional<bool> _multipleJob = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _childrens = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _otherDeps = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _totalCredits = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _otherInconme = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _deductions = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _extraWithholding = Optional.optional(nativeFromJson, nativeToJson);
  Optional<CitizenshipStatus> _citizen = Optional.optional((data) => CitizenshipStatus.values.byName(data), enumSerializer);
  Optional<String> _uscis = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _passportNumber = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _countryIssue = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _prepartorOrTranslator = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _signature = Optional.optional(nativeFromJson, nativeToJson);
  Optional<Timestamp> _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer);
  TaxFormStatus status;
  String staffId;
  Optional<String> _createdBy = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  CreateTaxFormVariablesBuilder mInitial(String? t) {
   _mInitial.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder oLastName(String? t) {
   _oLastName.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder dob(Timestamp? t) {
   _dob.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder email(String? t) {
   _email.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder phone(String? t) {
   _phone.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder city(String? t) {
   _city.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder apt(String? t) {
   _apt.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder state(String? t) {
   _state.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder zipCode(String? t) {
   _zipCode.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder marital(MaritalStatus? t) {
   _marital.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder multipleJob(bool? t) {
   _multipleJob.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder childrens(int? t) {
   _childrens.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder otherDeps(int? t) {
   _otherDeps.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder totalCredits(double? t) {
   _totalCredits.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder otherInconme(double? t) {
   _otherInconme.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder deductions(double? t) {
   _deductions.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder extraWithholding(double? t) {
   _extraWithholding.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder citizen(CitizenshipStatus? t) {
   _citizen.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder uscis(String? t) {
   _uscis.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder passportNumber(String? t) {
   _passportNumber.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder countryIssue(String? t) {
   _countryIssue.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder prepartorOrTranslator(bool? t) {
   _prepartorOrTranslator.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder signature(String? t) {
   _signature.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder date(Timestamp? t) {
   _date.value = t;
   return this;
  }
  CreateTaxFormVariablesBuilder createdBy(String? t) {
   _createdBy.value = t;
   return this;
  }

  CreateTaxFormVariablesBuilder(this._dataConnect, {required  this.formType,required  this.firstName,required  this.lastName,required  this.socialSN,required  this.address,required  this.status,required  this.staffId,});
  Deserializer<CreateTaxFormData> dataDeserializer = (dynamic json)  => CreateTaxFormData.fromJson(jsonDecode(json));
  Serializer<CreateTaxFormVariables> varsSerializer = (CreateTaxFormVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<CreateTaxFormData, CreateTaxFormVariables>> execute() {
    return ref().execute();
  }

  MutationRef<CreateTaxFormData, CreateTaxFormVariables> ref() {
    CreateTaxFormVariables vars= CreateTaxFormVariables(formType: formType,firstName: firstName,lastName: lastName,mInitial: _mInitial,oLastName: _oLastName,dob: _dob,socialSN: socialSN,email: _email,phone: _phone,address: address,city: _city,apt: _apt,state: _state,zipCode: _zipCode,marital: _marital,multipleJob: _multipleJob,childrens: _childrens,otherDeps: _otherDeps,totalCredits: _totalCredits,otherInconme: _otherInconme,deductions: _deductions,extraWithholding: _extraWithholding,citizen: _citizen,uscis: _uscis,passportNumber: _passportNumber,countryIssue: _countryIssue,prepartorOrTranslator: _prepartorOrTranslator,signature: _signature,date: _date,status: status,staffId: staffId,createdBy: _createdBy,);
    return _dataConnect.mutation("createTaxForm", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class CreateTaxFormTaxFormInsert {
  final String id;
  CreateTaxFormTaxFormInsert.fromJson(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 CreateTaxFormTaxFormInsert otherTyped = other as CreateTaxFormTaxFormInsert;
    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;
  }

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

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

    final CreateTaxFormData otherTyped = other as CreateTaxFormData;
    return taxForm_insert == otherTyped.taxForm_insert;
    
  }
  @override
  int get hashCode => taxForm_insert.hashCode;
  

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

  CreateTaxFormData({
    required this.taxForm_insert,
  });
}

@immutable
class CreateTaxFormVariables {
  final TaxFormType formType;
  final String firstName;
  final String lastName;
  late final Optional<String>mInitial;
  late final Optional<String>oLastName;
  late final Optional<Timestamp>dob;
  final int socialSN;
  late final Optional<String>email;
  late final Optional<String>phone;
  final String address;
  late final Optional<String>city;
  late final Optional<String>apt;
  late final Optional<String>state;
  late final Optional<String>zipCode;
  late final Optional<MaritalStatus>marital;
  late final Optional<bool>multipleJob;
  late final Optional<int>childrens;
  late final Optional<int>otherDeps;
  late final Optional<double>totalCredits;
  late final Optional<double>otherInconme;
  late final Optional<double>deductions;
  late final Optional<double>extraWithholding;
  late final Optional<CitizenshipStatus>citizen;
  late final Optional<String>uscis;
  late final Optional<String>passportNumber;
  late final Optional<String>countryIssue;
  late final Optional<bool>prepartorOrTranslator;
  late final Optional<String>signature;
  late final Optional<Timestamp>date;
  final TaxFormStatus status;
  final String staffId;
  late final Optional<String>createdBy;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  CreateTaxFormVariables.fromJson(Map<String, dynamic> json):
  
  formType = TaxFormType.values.byName(json['formType']),
  firstName = nativeFromJson<String>(json['firstName']),
  lastName = nativeFromJson<String>(json['lastName']),
  socialSN = nativeFromJson<int>(json['socialSN']),
  address = nativeFromJson<String>(json['address']),
  status = TaxFormStatus.values.byName(json['status']),
  staffId = nativeFromJson<String>(json['staffId']) {
  
  
  
  
  
    mInitial = Optional.optional(nativeFromJson, nativeToJson);
    mInitial.value = json['mInitial'] == null ? null : nativeFromJson<String>(json['mInitial']);
  
  
    oLastName = Optional.optional(nativeFromJson, nativeToJson);
    oLastName.value = json['oLastName'] == null ? null : nativeFromJson<String>(json['oLastName']);
  
  
    dob = Optional.optional((json) => json['dob'] = Timestamp.fromJson(json['dob']), defaultSerializer);
    dob.value = json['dob'] == null ? null : Timestamp.fromJson(json['dob']);
  
  
  
    email = Optional.optional(nativeFromJson, nativeToJson);
    email.value = json['email'] == null ? null : nativeFromJson<String>(json['email']);
  
  
    phone = Optional.optional(nativeFromJson, nativeToJson);
    phone.value = json['phone'] == null ? null : nativeFromJson<String>(json['phone']);
  
  
  
    city = Optional.optional(nativeFromJson, nativeToJson);
    city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
  
  
    apt = Optional.optional(nativeFromJson, nativeToJson);
    apt.value = json['apt'] == null ? null : nativeFromJson<String>(json['apt']);
  
  
    state = Optional.optional(nativeFromJson, nativeToJson);
    state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
  
  
    zipCode = Optional.optional(nativeFromJson, nativeToJson);
    zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
  
  
    marital = Optional.optional((data) => MaritalStatus.values.byName(data), enumSerializer);
    marital.value = json['marital'] == null ? null : MaritalStatus.values.byName(json['marital']);
  
  
    multipleJob = Optional.optional(nativeFromJson, nativeToJson);
    multipleJob.value = json['multipleJob'] == null ? null : nativeFromJson<bool>(json['multipleJob']);
  
  
    childrens = Optional.optional(nativeFromJson, nativeToJson);
    childrens.value = json['childrens'] == null ? null : nativeFromJson<int>(json['childrens']);
  
  
    otherDeps = Optional.optional(nativeFromJson, nativeToJson);
    otherDeps.value = json['otherDeps'] == null ? null : nativeFromJson<int>(json['otherDeps']);
  
  
    totalCredits = Optional.optional(nativeFromJson, nativeToJson);
    totalCredits.value = json['totalCredits'] == null ? null : nativeFromJson<double>(json['totalCredits']);
  
  
    otherInconme = Optional.optional(nativeFromJson, nativeToJson);
    otherInconme.value = json['otherInconme'] == null ? null : nativeFromJson<double>(json['otherInconme']);
  
  
    deductions = Optional.optional(nativeFromJson, nativeToJson);
    deductions.value = json['deductions'] == null ? null : nativeFromJson<double>(json['deductions']);
  
  
    extraWithholding = Optional.optional(nativeFromJson, nativeToJson);
    extraWithholding.value = json['extraWithholding'] == null ? null : nativeFromJson<double>(json['extraWithholding']);
  
  
    citizen = Optional.optional((data) => CitizenshipStatus.values.byName(data), enumSerializer);
    citizen.value = json['citizen'] == null ? null : CitizenshipStatus.values.byName(json['citizen']);
  
  
    uscis = Optional.optional(nativeFromJson, nativeToJson);
    uscis.value = json['uscis'] == null ? null : nativeFromJson<String>(json['uscis']);
  
  
    passportNumber = Optional.optional(nativeFromJson, nativeToJson);
    passportNumber.value = json['passportNumber'] == null ? null : nativeFromJson<String>(json['passportNumber']);
  
  
    countryIssue = Optional.optional(nativeFromJson, nativeToJson);
    countryIssue.value = json['countryIssue'] == null ? null : nativeFromJson<String>(json['countryIssue']);
  
  
    prepartorOrTranslator = Optional.optional(nativeFromJson, nativeToJson);
    prepartorOrTranslator.value = json['prepartorOrTranslator'] == null ? null : nativeFromJson<bool>(json['prepartorOrTranslator']);
  
  
    signature = Optional.optional(nativeFromJson, nativeToJson);
    signature.value = json['signature'] == null ? null : nativeFromJson<String>(json['signature']);
  
  
    date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer);
    date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']);
  
  
  
  
    createdBy = Optional.optional(nativeFromJson, nativeToJson);
    createdBy.value = 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 CreateTaxFormVariables otherTyped = other as CreateTaxFormVariables;
    return 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 && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([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, createdBy.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['formType'] = 
    formType.name
    ;
    json['firstName'] = nativeToJson<String>(firstName);
    json['lastName'] = nativeToJson<String>(lastName);
    if(mInitial.state == OptionalState.set) {
      json['mInitial'] = mInitial.toJson();
    }
    if(oLastName.state == OptionalState.set) {
      json['oLastName'] = oLastName.toJson();
    }
    if(dob.state == OptionalState.set) {
      json['dob'] = dob.toJson();
    }
    json['socialSN'] = nativeToJson<int>(socialSN);
    if(email.state == OptionalState.set) {
      json['email'] = email.toJson();
    }
    if(phone.state == OptionalState.set) {
      json['phone'] = phone.toJson();
    }
    json['address'] = nativeToJson<String>(address);
    if(city.state == OptionalState.set) {
      json['city'] = city.toJson();
    }
    if(apt.state == OptionalState.set) {
      json['apt'] = apt.toJson();
    }
    if(state.state == OptionalState.set) {
      json['state'] = state.toJson();
    }
    if(zipCode.state == OptionalState.set) {
      json['zipCode'] = zipCode.toJson();
    }
    if(marital.state == OptionalState.set) {
      json['marital'] = marital.toJson();
    }
    if(multipleJob.state == OptionalState.set) {
      json['multipleJob'] = multipleJob.toJson();
    }
    if(childrens.state == OptionalState.set) {
      json['childrens'] = childrens.toJson();
    }
    if(otherDeps.state == OptionalState.set) {
      json['otherDeps'] = otherDeps.toJson();
    }
    if(totalCredits.state == OptionalState.set) {
      json['totalCredits'] = totalCredits.toJson();
    }
    if(otherInconme.state == OptionalState.set) {
      json['otherInconme'] = otherInconme.toJson();
    }
    if(deductions.state == OptionalState.set) {
      json['deductions'] = deductions.toJson();
    }
    if(extraWithholding.state == OptionalState.set) {
      json['extraWithholding'] = extraWithholding.toJson();
    }
    if(citizen.state == OptionalState.set) {
      json['citizen'] = citizen.toJson();
    }
    if(uscis.state == OptionalState.set) {
      json['uscis'] = uscis.toJson();
    }
    if(passportNumber.state == OptionalState.set) {
      json['passportNumber'] = passportNumber.toJson();
    }
    if(countryIssue.state == OptionalState.set) {
      json['countryIssue'] = countryIssue.toJson();
    }
    if(prepartorOrTranslator.state == OptionalState.set) {
      json['prepartorOrTranslator'] = prepartorOrTranslator.toJson();
    }
    if(signature.state == OptionalState.set) {
      json['signature'] = signature.toJson();
    }
    if(date.state == OptionalState.set) {
      json['date'] = date.toJson();
    }
    json['status'] = 
    status.name
    ;
    json['staffId'] = nativeToJson<String>(staffId);
    if(createdBy.state == OptionalState.set) {
      json['createdBy'] = createdBy.toJson();
    }
    return json;
  }

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

