part of 'generated.dart';

class UpdateTaxFormVariablesBuilder {
  String id;
  Optional<TaxFormStatus> _status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer);
  Optional<AnyValue> _formData = Optional.optional(AnyValue.fromJson, defaultSerializer);
  Optional<String> _title = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _subtitle = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _description = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  UpdateTaxFormVariablesBuilder status(TaxFormStatus? t) {
   _status.value = t;
   return this;
  }
  UpdateTaxFormVariablesBuilder formData(AnyValue? t) {
   _formData.value = t;
   return this;
  }
  UpdateTaxFormVariablesBuilder title(String? t) {
   _title.value = t;
   return this;
  }
  UpdateTaxFormVariablesBuilder subtitle(String? t) {
   _subtitle.value = t;
   return this;
  }
  UpdateTaxFormVariablesBuilder description(String? t) {
   _description.value = t;
   return this;
  }

  UpdateTaxFormVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<UpdateTaxFormData> dataDeserializer = (dynamic json)  => UpdateTaxFormData.fromJson(jsonDecode(json));
  Serializer<UpdateTaxFormVariables> varsSerializer = (UpdateTaxFormVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<UpdateTaxFormData, UpdateTaxFormVariables>> execute() {
    return ref().execute();
  }

  MutationRef<UpdateTaxFormData, UpdateTaxFormVariables> ref() {
    UpdateTaxFormVariables vars= UpdateTaxFormVariables(id: id,status: _status,formData: _formData,title: _title,subtitle: _subtitle,description: _description,);
    return _dataConnect.mutation("updateTaxForm", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final UpdateTaxFormData otherTyped = other as UpdateTaxFormData;
    return taxForm_update == otherTyped.taxForm_update;
    
  }
  @override
  int get hashCode => taxForm_update.hashCode;
  

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

  UpdateTaxFormData({
    this.taxForm_update,
  });
}

@immutable
class UpdateTaxFormVariables {
  final String id;
  late final Optional<TaxFormStatus>status;
  late final Optional<AnyValue>formData;
  late final Optional<String>title;
  late final Optional<String>subtitle;
  late final Optional<String>description;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateTaxFormVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer);
    status.value = json['status'] == null ? null : TaxFormStatus.values.byName(json['status']);
  
  
    formData = Optional.optional(AnyValue.fromJson, defaultSerializer);
    formData.value = json['formData'] == null ? null : AnyValue.fromJson(json['formData']);
  
  
    title = Optional.optional(nativeFromJson, nativeToJson);
    title.value = json['title'] == null ? null : nativeFromJson<String>(json['title']);
  
  
    subtitle = Optional.optional(nativeFromJson, nativeToJson);
    subtitle.value = json['subtitle'] == null ? null : nativeFromJson<String>(json['subtitle']);
  
  
    description = Optional.optional(nativeFromJson, nativeToJson);
    description.value = json['description'] == null ? null : nativeFromJson<String>(json['description']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final UpdateTaxFormVariables otherTyped = other as UpdateTaxFormVariables;
    return id == otherTyped.id && 
    status == otherTyped.status && 
    formData == otherTyped.formData && 
    title == otherTyped.title && 
    subtitle == otherTyped.subtitle && 
    description == otherTyped.description;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, status.hashCode, formData.hashCode, title.hashCode, subtitle.hashCode, description.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if(status.state == OptionalState.set) {
      json['status'] = status.toJson();
    }
    if(formData.state == OptionalState.set) {
      json['formData'] = formData.toJson();
    }
    if(title.state == OptionalState.set) {
      json['title'] = title.toJson();
    }
    if(subtitle.state == OptionalState.set) {
      json['subtitle'] = subtitle.toJson();
    }
    if(description.state == OptionalState.set) {
      json['description'] = description.toJson();
    }
    return json;
  }

  UpdateTaxFormVariables({
    required this.id,
    required this.status,
    required this.formData,
    required this.title,
    required this.subtitle,
    required this.description,
  });
}

