@SuppressWarnings({"rawtypes", "unchecked"})
  public void switchType(CredentialsCase... cases) {
    var credentialsAndType = getCredentialsAndType();
    var type = credentialsAndType.second;
    for (var credentialsCase : cases) {
      if (credentialsCase.getType() == type) {
        credentialsCase.process(credentialsAndType.first);
        return;
      }
    }
  }
@SuppressWarnings({"rawtypes", "unchecked"})
  public void switchType(CredentialsCase... cases)