]> git.basschouten.com Git - openhab-addons.git/blob
e560adf3db35749425e5cb087dc0be3539884c73
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.darksky.internal.config;
14
15 import java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.eclipse.jdt.annotation.Nullable;
22 import org.openhab.binding.darksky.internal.handler.DarkSkyAPIHandler;
23
24 /**
25  * The {@link DarkSkyAPIConfiguration} is the class used to match the {@link DarkSkyAPIHandler}s configuration.
26  *
27  * @author Christoph Weitkamp - Initial contribution
28  */
29 @NonNullByDefault
30 public class DarkSkyAPIConfiguration {
31
32     // supported languages (see https://darksky.net/dev/docs#forecast-request)
33     public static final Set<String> SUPPORTED_LANGUAGES = Collections.unmodifiableSet(Stream.of("ar", "az", "be", "bg",
34             "bn", "bs", "ca", "cs", "da", "de", "el", "en", "eo", "es", "et", "fi", "fr", "he", "hi", "hr", "hu", "id",
35             "is", "it", "ja", "ka", "kn", "ko", "kw", "lv", "mr", "nb", "nl", "no", "pa", "pl", "pt", "ro", "ru", "sk",
36             "sl", "sr", "sv", "ta", "te", "tet", "tr", "uk", "x-pig-latin", "zh", "zh-tw").collect(Collectors.toSet()));
37
38     public @Nullable String apikey;
39     public int refreshInterval = 60;
40     public @Nullable String language;
41 }