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.hue.internal.api.dto.clip2.enums;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * Enum for product archetypes.
21 * @see <a href="https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light_get">API v2
24 * @author Andrew Fiddian-Green - Initial contribution
27 public enum Archetype {
111 public static Archetype of(@Nullable String value) {
114 return valueOf(value.toUpperCase());
115 } catch (IllegalArgumentException e) {
119 return UNKNOWN_ARCHETYPE;
123 public String toString() {
124 String s = this.name().replace("_", " ");
125 return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();