part of 'generated.dart';

class DeleteStaffAvailabilityVariablesBuilder {
  String staffId;
  DayOfWeek day;
  AvailabilitySlot slot;

  final FirebaseDataConnect _dataConnect;
  DeleteStaffAvailabilityVariablesBuilder(this._dataConnect, {required  this.staffId,required  this.day,required  this.slot,});
  Deserializer<DeleteStaffAvailabilityData> dataDeserializer = (dynamic json)  => DeleteStaffAvailabilityData.fromJson(jsonDecode(json));
  Serializer<DeleteStaffAvailabilityVariables> varsSerializer = (DeleteStaffAvailabilityVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables>> execute() {
    return ref().execute();
  }

  MutationRef<DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables> ref() {
    DeleteStaffAvailabilityVariables vars= DeleteStaffAvailabilityVariables(staffId: staffId,day: day,slot: slot,);
    return _dataConnect.mutation("deleteStaffAvailability", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class DeleteStaffAvailabilityStaffAvailabilityDelete {
  final String staffId;
  final EnumValue<DayOfWeek> day;
  final EnumValue<AvailabilitySlot> slot;
  DeleteStaffAvailabilityStaffAvailabilityDelete.fromJson(dynamic json):
  
  staffId = nativeFromJson<String>(json['staffId']),
  day = dayOfWeekDeserializer(json['day']),
  slot = availabilitySlotDeserializer(json['slot']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

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

  DeleteStaffAvailabilityStaffAvailabilityDelete({
    required this.staffId,
    required this.day,
    required this.slot,
  });
}

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

    final DeleteStaffAvailabilityData otherTyped = other as DeleteStaffAvailabilityData;
    return staffAvailability_delete == otherTyped.staffAvailability_delete;
    
  }
  @override
  int get hashCode => staffAvailability_delete.hashCode;
  

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

  DeleteStaffAvailabilityData({
    this.staffAvailability_delete,
  });
}

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

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

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

  DeleteStaffAvailabilityVariables({
    required this.staffId,
    required this.day,
    required this.slot,
  });
}

