]> git.basschouten.com Git - openhab-addons.git/blob
9f54c7d8c7c48f8a8d942060ae46e97077054970
[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.yamahamusiccast.internal.dto;
14
15 import com.google.gson.JsonArray;
16 import com.google.gson.annotations.SerializedName;
17
18 /**
19  * This class represents the DistributionInfo request requested from the Yamaha model/device via the API.
20  *
21  * @author Lennert Coopman - Initial contribution
22  */
23 public class DistributionInfo {
24
25     @SerializedName("response_code")
26     private String responseCode;
27
28     @SerializedName("group_id")
29     private String groupId;
30
31     @SerializedName("role")
32     private String role;
33
34     @SerializedName("server_zone")
35     private String serverZone;
36
37     @SerializedName("client_list")
38     private JsonArray clientList;
39
40     public String getResponseCode() {
41         if (responseCode == null) {
42             responseCode = "";
43         }
44         return responseCode;
45     }
46
47     public String getGroupId() {
48         if (groupId == null) {
49             groupId = "";
50         }
51         return groupId;
52     }
53
54     public String getRole() {
55         if (role == null) {
56             role = "";
57         }
58         return role;
59     }
60
61     public String getServerZone() {
62         if (serverZone == null) {
63             serverZone = "";
64         }
65         return serverZone;
66     }
67
68     public JsonArray getClientList() {
69         return clientList;
70     }
71
72     public class ClientList {
73         @SerializedName("ip_address")
74         private String ipaddress;
75
76         public String getIpaddress() {
77             if (ipaddress == null) {
78                 ipaddress = "";
79             }
80             return ipaddress;
81         }
82     }
83 }