part of 'generated.dart';

class UpdateBenefitsDataVariablesBuilder {
  String staffId;
  String vendorBenefitPlanId;
  Optional<int> _current = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  UpdateBenefitsDataVariablesBuilder current(int? t) {
   _current.value = t;
   return this;
  }

  UpdateBenefitsDataVariablesBuilder(this._dataConnect, {required  this.staffId,required  this.vendorBenefitPlanId,});
  Deserializer<UpdateBenefitsDataData> dataDeserializer = (dynamic json)  => UpdateBenefitsDataData.fromJson(jsonDecode(json));
  Serializer<UpdateBenefitsDataVariables> varsSerializer = (UpdateBenefitsDataVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<UpdateBenefitsDataData, UpdateBenefitsDataVariables>> execute() {
    return ref().execute();
  }

  MutationRef<UpdateBenefitsDataData, UpdateBenefitsDataVariables> ref() {
    UpdateBenefitsDataVariables vars= UpdateBenefitsDataVariables(staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,current: _current,);
    return _dataConnect.mutation("updateBenefitsData", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class UpdateBenefitsDataBenefitsDataUpdate {
  final String vendorBenefitPlanId;
  final String staffId;
  UpdateBenefitsDataBenefitsDataUpdate.fromJson(dynamic json):
  
  vendorBenefitPlanId = nativeFromJson<String>(json['vendorBenefitPlanId']),
  staffId = nativeFromJson<String>(json['staffId']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final UpdateBenefitsDataBenefitsDataUpdate otherTyped = other as UpdateBenefitsDataBenefitsDataUpdate;
    return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && 
    staffId == otherTyped.staffId;
    
  }
  @override
  int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, staffId.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['vendorBenefitPlanId'] = nativeToJson<String>(vendorBenefitPlanId);
    json['staffId'] = nativeToJson<String>(staffId);
    return json;
  }

  UpdateBenefitsDataBenefitsDataUpdate({
    required this.vendorBenefitPlanId,
    required this.staffId,
  });
}

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

    final UpdateBenefitsDataData otherTyped = other as UpdateBenefitsDataData;
    return benefitsData_update == otherTyped.benefitsData_update;
    
  }
  @override
  int get hashCode => benefitsData_update.hashCode;
  

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

  UpdateBenefitsDataData({
    this.benefitsData_update,
  });
}

@immutable
class UpdateBenefitsDataVariables {
  final String staffId;
  final String vendorBenefitPlanId;
  late final Optional<int>current;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateBenefitsDataVariables.fromJson(Map<String, dynamic> json):
  
  staffId = nativeFromJson<String>(json['staffId']),
  vendorBenefitPlanId = nativeFromJson<String>(json['vendorBenefitPlanId']) {
  
  
  
  
    current = Optional.optional(nativeFromJson, nativeToJson);
    current.value = json['current'] == null ? null : nativeFromJson<int>(json['current']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final UpdateBenefitsDataVariables otherTyped = other as UpdateBenefitsDataVariables;
    return staffId == otherTyped.staffId && 
    vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && 
    current == otherTyped.current;
    
  }
  @override
  int get hashCode => Object.hashAll([staffId.hashCode, vendorBenefitPlanId.hashCode, current.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['staffId'] = nativeToJson<String>(staffId);
    json['vendorBenefitPlanId'] = nativeToJson<String>(vendorBenefitPlanId);
    if(current.state == OptionalState.set) {
      json['current'] = current.toJson();
    }
    return json;
  }

  UpdateBenefitsDataVariables({
    required this.staffId,
    required this.vendorBenefitPlanId,
    required this.current,
  });
}

