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.yamahamusiccast.internal.dto;
15 import com.google.gson.annotations.SerializedName;
18 * This class represents the UDP event received from the Yamaha model/device.
20 * @author Lennert Coopman - Initial contribution
23 public class UdpMessage {
25 @SerializedName("device_id")
26 private String deviceId;
28 public String getDeviceId() {
29 if (deviceId == null) {
35 @SerializedName("main")
37 @SerializedName("zone2")
39 @SerializedName("zone3")
41 @SerializedName("zone4")
43 @SerializedName("netusb")
44 private NetUSB netusb;
45 @SerializedName("dist")
48 public Zone getMain() {
52 public Zone getZone2() {
56 public Zone getZone3() {
60 public Zone getZone4() {
64 public NetUSB getNetUSB() {
68 public Dist getDist() {
73 @SerializedName("power")
75 @SerializedName("volume")
76 private int volume = 0;
77 @SerializedName("mute")
79 @SerializedName("input")
81 @SerializedName("status_updated")
82 private String statusUpdated;
84 public String getPower() {
91 public String getMute() {
98 public String getInput() {
105 public int getVolume() {
109 public String getstatusUpdated() {
110 if (statusUpdated == null) {
113 return statusUpdated;
117 public class NetUSB {
118 @SerializedName("preset_control")
119 private PresetControl presetControl;
120 @SerializedName("play_info_updated")
121 private String playInfoUpdated;
122 @SerializedName("play_time")
123 private int playTime;
125 public PresetControl getPresetControl() {
126 return presetControl;
129 public String getPlayInfoUpdated() {
130 if (playInfoUpdated == null) {
131 playInfoUpdated = "";
133 return playInfoUpdated;
136 public int getPlayTime() {
141 public class PresetControl {
142 @SerializedName("type")
144 @SerializedName("num")
146 @SerializedName("result")
147 private String result;
149 public String getType() {
156 public String getResult() {
157 if (result == null) {
163 public int getNum() {
169 @SerializedName("dist_info_updated")
170 private String distInfoUpdated;
172 public String getDistInfoUpdated() {
173 if (distInfoUpdated == null) {
174 distInfoUpdated = "";
176 return distInfoUpdated;