part of 'generated.dart';

class DeleteStaffRoleVariablesBuilder {
  String staffId;
  String roleId;

  final FirebaseDataConnect _dataConnect;
  DeleteStaffRoleVariablesBuilder(this._dataConnect, {required  this.staffId,required  this.roleId,});
  Deserializer<DeleteStaffRoleData> dataDeserializer = (dynamic json)  => DeleteStaffRoleData.fromJson(jsonDecode(json));
  Serializer<DeleteStaffRoleVariables> varsSerializer = (DeleteStaffRoleVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<DeleteStaffRoleData, DeleteStaffRoleVariables>> execute() {
    return ref().execute();
  }

  MutationRef<DeleteStaffRoleData, DeleteStaffRoleVariables> ref() {
    DeleteStaffRoleVariables vars= DeleteStaffRoleVariables(staffId: staffId,roleId: roleId,);
    return _dataConnect.mutation("deleteStaffRole", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

  DeleteStaffRoleStaffRoleDelete({
    required this.staffId,
    required this.roleId,
  });
}

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

    final DeleteStaffRoleData otherTyped = other as DeleteStaffRoleData;
    return staffRole_delete == otherTyped.staffRole_delete;
    
  }
  @override
  int get hashCode => staffRole_delete.hashCode;
  

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

  DeleteStaffRoleData({
    this.staffRole_delete,
  });
}

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

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

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

  DeleteStaffRoleVariables({
    required this.staffId,
    required this.roleId,
  });
}

