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.tr064.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.tr064.internal.dto.config.ChannelTypeDescription;
18 import org.openhab.binding.tr064.internal.dto.scpd.root.SCPDServiceType;
19 import org.openhab.binding.tr064.internal.dto.scpd.service.SCPDActionType;
22 * The {@link Tr064ChannelConfig} class holds a channel configuration
24 * @author Jan N. Klug - Initial contribution
27 public class Tr064ChannelConfig {
28 private ChannelTypeDescription channelTypeDescription;
29 private SCPDServiceType service;
30 private @Nullable SCPDActionType getAction;
31 private String dataType = "";
32 private @Nullable String parameter;
34 public Tr064ChannelConfig(ChannelTypeDescription channelTypeDescription, SCPDServiceType service) {
35 this.channelTypeDescription = channelTypeDescription;
36 this.service = service;
39 public Tr064ChannelConfig(Tr064ChannelConfig o) {
40 this.channelTypeDescription = o.channelTypeDescription;
41 this.service = o.service;
42 this.getAction = o.getAction;
43 this.dataType = o.dataType;
44 this.parameter = o.parameter;
47 public ChannelTypeDescription getChannelTypeDescription() {
48 return channelTypeDescription;
51 public SCPDServiceType getService() {
55 public String getDataType() {
59 public void setDataType(String dataType) {
60 this.dataType = dataType;
63 public @Nullable SCPDActionType getGetAction() {
67 public void setGetAction(SCPDActionType getAction) {
68 this.getAction = getAction;
71 public @Nullable String getParameter() {
75 public void setParameter(String parameter) {
76 this.parameter = parameter;
80 public String toString() {
81 final SCPDActionType getAction = this.getAction;
82 return "Tr064ChannelConfig{" + "channelType=" + channelTypeDescription.getName() + ", getAction="
83 + ((getAction == null) ? "(null)" : getAction.getName()) + ", dataType='" + dataType + ", parameter='"