part of 'generated.dart';

class CreateStaffVariablesBuilder {
  String userId;
  String fullName;
  Optional<String> _level = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _role = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _phone = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _email = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _photoUrl = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _totalShifts = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _averageRating = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _onTimeRate = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _noShowCount = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _cancellationCount = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _reliabilityScore = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _bio = Optional.optional(nativeFromJson, nativeToJson);
  Optional<List<String>> _skills = Optional.optional(listDeserializer(nativeFromJson), listSerializer(nativeToJson));
  Optional<List<String>> _industries = Optional.optional(listDeserializer(nativeFromJson), listSerializer(nativeToJson));
  Optional<List<String>> _preferredLocations = Optional.optional(listDeserializer(nativeFromJson), listSerializer(nativeToJson));
  Optional<int> _maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson);
  Optional<AnyValue> _languages = Optional.optional(AnyValue.fromJson, defaultSerializer);
  Optional<AnyValue> _itemsAttire = Optional.optional(AnyValue.fromJson, defaultSerializer);
  Optional<int> _xp = Optional.optional(nativeFromJson, nativeToJson);
  Optional<AnyValue> _badges = Optional.optional(AnyValue.fromJson, defaultSerializer);
  Optional<bool> _isRecommended = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _ownerId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<DepartmentType> _department = Optional.optional((data) => DepartmentType.values.byName(data), enumSerializer);
  Optional<String> _hubId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _manager = Optional.optional(nativeFromJson, nativeToJson);
  Optional<EnglishProficiency> _english = Optional.optional((data) => EnglishProficiency.values.byName(data), enumSerializer);
  Optional<BackgroundCheckStatus> _backgroundCheckStatus = Optional.optional((data) => BackgroundCheckStatus.values.byName(data), enumSerializer);
  Optional<EmploymentType> _employmentType = Optional.optional((data) => EmploymentType.values.byName(data), enumSerializer);
  Optional<String> _initial = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _englishRequired = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _addres = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  CreateStaffVariablesBuilder level(String? t) {
   _level.value = t;
   return this;
  }
  CreateStaffVariablesBuilder role(String? t) {
   _role.value = t;
   return this;
  }
  CreateStaffVariablesBuilder phone(String? t) {
   _phone.value = t;
   return this;
  }
  CreateStaffVariablesBuilder email(String? t) {
   _email.value = t;
   return this;
  }
  CreateStaffVariablesBuilder photoUrl(String? t) {
   _photoUrl.value = t;
   return this;
  }
  CreateStaffVariablesBuilder totalShifts(int? t) {
   _totalShifts.value = t;
   return this;
  }
  CreateStaffVariablesBuilder averageRating(double? t) {
   _averageRating.value = t;
   return this;
  }
  CreateStaffVariablesBuilder onTimeRate(int? t) {
   _onTimeRate.value = t;
   return this;
  }
  CreateStaffVariablesBuilder noShowCount(int? t) {
   _noShowCount.value = t;
   return this;
  }
  CreateStaffVariablesBuilder cancellationCount(int? t) {
   _cancellationCount.value = t;
   return this;
  }
  CreateStaffVariablesBuilder reliabilityScore(int? t) {
   _reliabilityScore.value = t;
   return this;
  }
  CreateStaffVariablesBuilder bio(String? t) {
   _bio.value = t;
   return this;
  }
  CreateStaffVariablesBuilder skills(List<String>? t) {
   _skills.value = t;
   return this;
  }
  CreateStaffVariablesBuilder industries(List<String>? t) {
   _industries.value = t;
   return this;
  }
  CreateStaffVariablesBuilder preferredLocations(List<String>? t) {
   _preferredLocations.value = t;
   return this;
  }
  CreateStaffVariablesBuilder maxDistanceMiles(int? t) {
   _maxDistanceMiles.value = t;
   return this;
  }
  CreateStaffVariablesBuilder languages(AnyValue? t) {
   _languages.value = t;
   return this;
  }
  CreateStaffVariablesBuilder itemsAttire(AnyValue? t) {
   _itemsAttire.value = t;
   return this;
  }
  CreateStaffVariablesBuilder xp(int? t) {
   _xp.value = t;
   return this;
  }
  CreateStaffVariablesBuilder badges(AnyValue? t) {
   _badges.value = t;
   return this;
  }
  CreateStaffVariablesBuilder isRecommended(bool? t) {
   _isRecommended.value = t;
   return this;
  }
  CreateStaffVariablesBuilder ownerId(String? t) {
   _ownerId.value = t;
   return this;
  }
  CreateStaffVariablesBuilder department(DepartmentType? t) {
   _department.value = t;
   return this;
  }
  CreateStaffVariablesBuilder hubId(String? t) {
   _hubId.value = t;
   return this;
  }
  CreateStaffVariablesBuilder manager(String? t) {
   _manager.value = t;
   return this;
  }
  CreateStaffVariablesBuilder english(EnglishProficiency? t) {
   _english.value = t;
   return this;
  }
  CreateStaffVariablesBuilder backgroundCheckStatus(BackgroundCheckStatus? t) {
   _backgroundCheckStatus.value = t;
   return this;
  }
  CreateStaffVariablesBuilder employmentType(EmploymentType? t) {
   _employmentType.value = t;
   return this;
  }
  CreateStaffVariablesBuilder initial(String? t) {
   _initial.value = t;
   return this;
  }
  CreateStaffVariablesBuilder englishRequired(bool? t) {
   _englishRequired.value = t;
   return this;
  }
  CreateStaffVariablesBuilder city(String? t) {
   _city.value = t;
   return this;
  }
  CreateStaffVariablesBuilder addres(String? t) {
   _addres.value = t;
   return this;
  }

  CreateStaffVariablesBuilder(this._dataConnect, {required  this.userId,required  this.fullName,});
  Deserializer<CreateStaffData> dataDeserializer = (dynamic json)  => CreateStaffData.fromJson(jsonDecode(json));
  Serializer<CreateStaffVariables> varsSerializer = (CreateStaffVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<CreateStaffData, CreateStaffVariables>> execute() {
    return ref().execute();
  }

  MutationRef<CreateStaffData, CreateStaffVariables> ref() {
    CreateStaffVariables vars= CreateStaffVariables(userId: userId,fullName: fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,skills: _skills,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,);
    return _dataConnect.mutation("CreateStaff", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final CreateStaffData otherTyped = other as CreateStaffData;
    return staff_insert == otherTyped.staff_insert;
    
  }
  @override
  int get hashCode => staff_insert.hashCode;
  

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

  CreateStaffData({
    required this.staff_insert,
  });
}

@immutable
class CreateStaffVariables {
  final String userId;
  final String fullName;
  late final Optional<String>level;
  late final Optional<String>role;
  late final Optional<String>phone;
  late final Optional<String>email;
  late final Optional<String>photoUrl;
  late final Optional<int>totalShifts;
  late final Optional<double>averageRating;
  late final Optional<int>onTimeRate;
  late final Optional<int>noShowCount;
  late final Optional<int>cancellationCount;
  late final Optional<int>reliabilityScore;
  late final Optional<String>bio;
  late final Optional<List<String>>skills;
  late final Optional<List<String>>industries;
  late final Optional<List<String>>preferredLocations;
  late final Optional<int>maxDistanceMiles;
  late final Optional<AnyValue>languages;
  late final Optional<AnyValue>itemsAttire;
  late final Optional<int>xp;
  late final Optional<AnyValue>badges;
  late final Optional<bool>isRecommended;
  late final Optional<String>ownerId;
  late final Optional<DepartmentType>department;
  late final Optional<String>hubId;
  late final Optional<String>manager;
  late final Optional<EnglishProficiency>english;
  late final Optional<BackgroundCheckStatus>backgroundCheckStatus;
  late final Optional<EmploymentType>employmentType;
  late final Optional<String>initial;
  late final Optional<bool>englishRequired;
  late final Optional<String>city;
  late final Optional<String>addres;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  CreateStaffVariables.fromJson(Map<String, dynamic> json):
  
  userId = nativeFromJson<String>(json['userId']),
  fullName = nativeFromJson<String>(json['fullName']) {
  
  
  
  
    level = Optional.optional(nativeFromJson, nativeToJson);
    level.value = json['level'] == null ? null : nativeFromJson<String>(json['level']);
  
  
    role = Optional.optional(nativeFromJson, nativeToJson);
    role.value = json['role'] == null ? null : nativeFromJson<String>(json['role']);
  
  
    phone = Optional.optional(nativeFromJson, nativeToJson);
    phone.value = json['phone'] == null ? null : nativeFromJson<String>(json['phone']);
  
  
    email = Optional.optional(nativeFromJson, nativeToJson);
    email.value = json['email'] == null ? null : nativeFromJson<String>(json['email']);
  
  
    photoUrl = Optional.optional(nativeFromJson, nativeToJson);
    photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']);
  
  
    totalShifts = Optional.optional(nativeFromJson, nativeToJson);
    totalShifts.value = json['totalShifts'] == null ? null : nativeFromJson<int>(json['totalShifts']);
  
  
    averageRating = Optional.optional(nativeFromJson, nativeToJson);
    averageRating.value = json['averageRating'] == null ? null : nativeFromJson<double>(json['averageRating']);
  
  
    onTimeRate = Optional.optional(nativeFromJson, nativeToJson);
    onTimeRate.value = json['onTimeRate'] == null ? null : nativeFromJson<int>(json['onTimeRate']);
  
  
    noShowCount = Optional.optional(nativeFromJson, nativeToJson);
    noShowCount.value = json['noShowCount'] == null ? null : nativeFromJson<int>(json['noShowCount']);
  
  
    cancellationCount = Optional.optional(nativeFromJson, nativeToJson);
    cancellationCount.value = json['cancellationCount'] == null ? null : nativeFromJson<int>(json['cancellationCount']);
  
  
    reliabilityScore = Optional.optional(nativeFromJson, nativeToJson);
    reliabilityScore.value = json['reliabilityScore'] == null ? null : nativeFromJson<int>(json['reliabilityScore']);
  
  
    bio = Optional.optional(nativeFromJson, nativeToJson);
    bio.value = json['bio'] == null ? null : nativeFromJson<String>(json['bio']);
  
  
    skills = Optional.optional(listDeserializer(nativeFromJson), listSerializer(nativeToJson));
    skills.value = json['skills'] == null ? null : (json['skills'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList();
  
  
    industries = Optional.optional(listDeserializer(nativeFromJson), listSerializer(nativeToJson));
    industries.value = json['industries'] == null ? null : (json['industries'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList();
  
  
    preferredLocations = Optional.optional(listDeserializer(nativeFromJson), listSerializer(nativeToJson));
    preferredLocations.value = json['preferredLocations'] == null ? null : (json['preferredLocations'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList();
  
  
    maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson);
    maxDistanceMiles.value = json['maxDistanceMiles'] == null ? null : nativeFromJson<int>(json['maxDistanceMiles']);
  
  
    languages = Optional.optional(AnyValue.fromJson, defaultSerializer);
    languages.value = json['languages'] == null ? null : AnyValue.fromJson(json['languages']);
  
  
    itemsAttire = Optional.optional(AnyValue.fromJson, defaultSerializer);
    itemsAttire.value = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']);
  
  
    xp = Optional.optional(nativeFromJson, nativeToJson);
    xp.value = json['xp'] == null ? null : nativeFromJson<int>(json['xp']);
  
  
    badges = Optional.optional(AnyValue.fromJson, defaultSerializer);
    badges.value = json['badges'] == null ? null : AnyValue.fromJson(json['badges']);
  
  
    isRecommended = Optional.optional(nativeFromJson, nativeToJson);
    isRecommended.value = json['isRecommended'] == null ? null : nativeFromJson<bool>(json['isRecommended']);
  
  
    ownerId = Optional.optional(nativeFromJson, nativeToJson);
    ownerId.value = json['ownerId'] == null ? null : nativeFromJson<String>(json['ownerId']);
  
  
    department = Optional.optional((data) => DepartmentType.values.byName(data), enumSerializer);
    department.value = json['department'] == null ? null : DepartmentType.values.byName(json['department']);
  
  
    hubId = Optional.optional(nativeFromJson, nativeToJson);
    hubId.value = json['hubId'] == null ? null : nativeFromJson<String>(json['hubId']);
  
  
    manager = Optional.optional(nativeFromJson, nativeToJson);
    manager.value = json['manager'] == null ? null : nativeFromJson<String>(json['manager']);
  
  
    english = Optional.optional((data) => EnglishProficiency.values.byName(data), enumSerializer);
    english.value = json['english'] == null ? null : EnglishProficiency.values.byName(json['english']);
  
  
    backgroundCheckStatus = Optional.optional((data) => BackgroundCheckStatus.values.byName(data), enumSerializer);
    backgroundCheckStatus.value = json['backgroundCheckStatus'] == null ? null : BackgroundCheckStatus.values.byName(json['backgroundCheckStatus']);
  
  
    employmentType = Optional.optional((data) => EmploymentType.values.byName(data), enumSerializer);
    employmentType.value = json['employmentType'] == null ? null : EmploymentType.values.byName(json['employmentType']);
  
  
    initial = Optional.optional(nativeFromJson, nativeToJson);
    initial.value = json['initial'] == null ? null : nativeFromJson<String>(json['initial']);
  
  
    englishRequired = Optional.optional(nativeFromJson, nativeToJson);
    englishRequired.value = json['englishRequired'] == null ? null : nativeFromJson<bool>(json['englishRequired']);
  
  
    city = Optional.optional(nativeFromJson, nativeToJson);
    city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
  
  
    addres = Optional.optional(nativeFromJson, nativeToJson);
    addres.value = json['addres'] == null ? null : nativeFromJson<String>(json['addres']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final CreateStaffVariables otherTyped = other as CreateStaffVariables;
    return userId == otherTyped.userId && 
    fullName == otherTyped.fullName && 
    level == otherTyped.level && 
    role == otherTyped.role && 
    phone == otherTyped.phone && 
    email == otherTyped.email && 
    photoUrl == otherTyped.photoUrl && 
    totalShifts == otherTyped.totalShifts && 
    averageRating == otherTyped.averageRating && 
    onTimeRate == otherTyped.onTimeRate && 
    noShowCount == otherTyped.noShowCount && 
    cancellationCount == otherTyped.cancellationCount && 
    reliabilityScore == otherTyped.reliabilityScore && 
    bio == otherTyped.bio && 
    skills == otherTyped.skills && 
    industries == otherTyped.industries && 
    preferredLocations == otherTyped.preferredLocations && 
    maxDistanceMiles == otherTyped.maxDistanceMiles && 
    languages == otherTyped.languages && 
    itemsAttire == otherTyped.itemsAttire && 
    xp == otherTyped.xp && 
    badges == otherTyped.badges && 
    isRecommended == otherTyped.isRecommended && 
    ownerId == otherTyped.ownerId && 
    department == otherTyped.department && 
    hubId == otherTyped.hubId && 
    manager == otherTyped.manager && 
    english == otherTyped.english && 
    backgroundCheckStatus == otherTyped.backgroundCheckStatus && 
    employmentType == otherTyped.employmentType && 
    initial == otherTyped.initial && 
    englishRequired == otherTyped.englishRequired && 
    city == otherTyped.city && 
    addres == otherTyped.addres;
    
  }
  @override
  int get hashCode => Object.hashAll([userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['userId'] = nativeToJson<String>(userId);
    json['fullName'] = nativeToJson<String>(fullName);
    if(level.state == OptionalState.set) {
      json['level'] = level.toJson();
    }
    if(role.state == OptionalState.set) {
      json['role'] = role.toJson();
    }
    if(phone.state == OptionalState.set) {
      json['phone'] = phone.toJson();
    }
    if(email.state == OptionalState.set) {
      json['email'] = email.toJson();
    }
    if(photoUrl.state == OptionalState.set) {
      json['photoUrl'] = photoUrl.toJson();
    }
    if(totalShifts.state == OptionalState.set) {
      json['totalShifts'] = totalShifts.toJson();
    }
    if(averageRating.state == OptionalState.set) {
      json['averageRating'] = averageRating.toJson();
    }
    if(onTimeRate.state == OptionalState.set) {
      json['onTimeRate'] = onTimeRate.toJson();
    }
    if(noShowCount.state == OptionalState.set) {
      json['noShowCount'] = noShowCount.toJson();
    }
    if(cancellationCount.state == OptionalState.set) {
      json['cancellationCount'] = cancellationCount.toJson();
    }
    if(reliabilityScore.state == OptionalState.set) {
      json['reliabilityScore'] = reliabilityScore.toJson();
    }
    if(bio.state == OptionalState.set) {
      json['bio'] = bio.toJson();
    }
    if(skills.state == OptionalState.set) {
      json['skills'] = skills.toJson();
    }
    if(industries.state == OptionalState.set) {
      json['industries'] = industries.toJson();
    }
    if(preferredLocations.state == OptionalState.set) {
      json['preferredLocations'] = preferredLocations.toJson();
    }
    if(maxDistanceMiles.state == OptionalState.set) {
      json['maxDistanceMiles'] = maxDistanceMiles.toJson();
    }
    if(languages.state == OptionalState.set) {
      json['languages'] = languages.toJson();
    }
    if(itemsAttire.state == OptionalState.set) {
      json['itemsAttire'] = itemsAttire.toJson();
    }
    if(xp.state == OptionalState.set) {
      json['xp'] = xp.toJson();
    }
    if(badges.state == OptionalState.set) {
      json['badges'] = badges.toJson();
    }
    if(isRecommended.state == OptionalState.set) {
      json['isRecommended'] = isRecommended.toJson();
    }
    if(ownerId.state == OptionalState.set) {
      json['ownerId'] = ownerId.toJson();
    }
    if(department.state == OptionalState.set) {
      json['department'] = department.toJson();
    }
    if(hubId.state == OptionalState.set) {
      json['hubId'] = hubId.toJson();
    }
    if(manager.state == OptionalState.set) {
      json['manager'] = manager.toJson();
    }
    if(english.state == OptionalState.set) {
      json['english'] = english.toJson();
    }
    if(backgroundCheckStatus.state == OptionalState.set) {
      json['backgroundCheckStatus'] = backgroundCheckStatus.toJson();
    }
    if(employmentType.state == OptionalState.set) {
      json['employmentType'] = employmentType.toJson();
    }
    if(initial.state == OptionalState.set) {
      json['initial'] = initial.toJson();
    }
    if(englishRequired.state == OptionalState.set) {
      json['englishRequired'] = englishRequired.toJson();
    }
    if(city.state == OptionalState.set) {
      json['city'] = city.toJson();
    }
    if(addres.state == OptionalState.set) {
      json['addres'] = addres.toJson();
    }
    return json;
  }

  CreateStaffVariables({
    required this.userId,
    required this.fullName,
    required this.level,
    required this.role,
    required this.phone,
    required this.email,
    required this.photoUrl,
    required this.totalShifts,
    required this.averageRating,
    required this.onTimeRate,
    required this.noShowCount,
    required this.cancellationCount,
    required this.reliabilityScore,
    required this.bio,
    required this.skills,
    required this.industries,
    required this.preferredLocations,
    required this.maxDistanceMiles,
    required this.languages,
    required this.itemsAttire,
    required this.xp,
    required this.badges,
    required this.isRecommended,
    required this.ownerId,
    required this.department,
    required this.hubId,
    required this.manager,
    required this.english,
    required this.backgroundCheckStatus,
    required this.employmentType,
    required this.initial,
    required this.englishRequired,
    required this.city,
    required this.addres,
  });
}

