2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.nibeheatpump.internal.models;
16 * Class for different Nibe heat pump models.
19 * @author Pauli Anttila - Initial contribution
21 public enum PumpModel {
28 private final String pumpModel;
30 PumpModel(String pumpModel) {
31 this.pumpModel = pumpModel;
35 public String toString() {
39 public static PumpModel getPumpModel(String pumpModel) throws IllegalArgumentException {
41 return PumpModel.valueOf(pumpModel.toUpperCase());
42 } catch (Exception e) {
43 String description = String.format("Illegal pump model '%s'", pumpModel);
44 throw new IllegalArgumentException(description);