]> git.basschouten.com Git - openhab-addons.git/blob
b109cbe6f3c2d8e2ed43e42d9137a5307875cf86
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.hue.internal.discovery;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * The {@link BridgeJsonParameters} class defines JSON object, which
22  * contains bridge attributes like IP address. It is used for bridge
23  * N-UPNP Discovery.
24  *
25  * @author Awelkiyar Wehabrebi - Initial contribution and API
26  * @author Christoph Knauf - Refactorings
27  */
28 @NonNullByDefault
29 public class BridgeJsonParameters {
30
31     private @Nullable String id;
32     @SerializedName("internalipaddress")
33     private @Nullable String internalIpAddress;
34     @SerializedName("macaddress")
35     private @Nullable String macAddress;
36     private @Nullable String name;
37
38     @SuppressWarnings("unused")
39     private BridgeJsonParameters() {
40         // This no arguments constructor is required for Gson deserialization
41     }
42
43     public BridgeJsonParameters(String id, String internalIpAddress, String macAdress, String name) {
44         this.id = id;
45         this.internalIpAddress = internalIpAddress;
46         this.macAddress = macAdress;
47         this.name = name;
48     }
49
50     public @Nullable String getInternalIpAddress() {
51         return internalIpAddress;
52     }
53
54     public @Nullable String getId() {
55         return id;
56     }
57
58     public @Nullable String getMacAddress() {
59         return macAddress;
60     }
61
62     public @Nullable String getName() {
63         return name;
64     }
65 }