part of 'generated.dart';

class CreateBenefitsDataVariablesBuilder {
  String vendorBenefitPlanId;
  String staffId;
  int current;

  final FirebaseDataConnect _dataConnect;
  CreateBenefitsDataVariablesBuilder(this._dataConnect, {required  this.vendorBenefitPlanId,required  this.staffId,required  this.current,});
  Deserializer<CreateBenefitsDataData> dataDeserializer = (dynamic json)  => CreateBenefitsDataData.fromJson(jsonDecode(json));
  Serializer<CreateBenefitsDataVariables> varsSerializer = (CreateBenefitsDataVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<CreateBenefitsDataData, CreateBenefitsDataVariables>> execute() {
    return ref().execute();
  }

  MutationRef<CreateBenefitsDataData, CreateBenefitsDataVariables> ref() {
    CreateBenefitsDataVariables vars= CreateBenefitsDataVariables(vendorBenefitPlanId: vendorBenefitPlanId,staffId: staffId,current: current,);
    return _dataConnect.mutation("createBenefitsData", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final CreateBenefitsDataData otherTyped = other as CreateBenefitsDataData;
    return benefitsData_insert == otherTyped.benefitsData_insert;
    
  }
  @override
  int get hashCode => benefitsData_insert.hashCode;
  

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

  CreateBenefitsDataData({
    required this.benefitsData_insert,
  });
}

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

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

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

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

