2 * Copyright (c) 2010-2022 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.ecobee.internal.dto;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.SerializedName;
21 * The {@link SelectionType} represents the valid selection types that can be passed in
22 * a SelectionDTO object.
24 * @author Mark Hilbush - Initial contribution
27 public enum SelectionType {
30 * Select only those thermostats listed in the CSV match criteria. No spaces in the CSV string. There is a limit
31 * of 25 identifiers per request.
33 @SerializedName("thermostats")
34 THERMOSTATS("thermostats"),
37 * When this is set the thermostats registered to the current user will be returned. This is only usable with
38 * Smart thermostats registered to a user. It does not work on EMS thermostats and may not be used by a Utility
39 * who is not the owner of thermostats.
41 @SerializedName("registered")
42 REGISTERED("registered"),
45 * Selects all thermostats for a given management set defined by the Management/Utility account. This is only
46 * available to Management/Utility accounts. "/" is the root, represented by the "My Sets" set.
48 @SerializedName("managementSet")
49 MANAGEMENT_SET("managementSet");
51 private final String type;
53 private SelectionType(final String type) {
57 public static SelectionType forValue(@Nullable String v) {
59 for (SelectionType at : SelectionType.values()) {
60 if (at.type.equals(v)) {
65 throw new IllegalArgumentException("Invalid or null selection type: " + v);
69 public String toString() {