]> git.basschouten.com Git - openhab-addons.git/blob
7ce4c1e6a55d2504a919f354faa340817036f285
[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.homeconnect.internal.client.model;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * AvailableProgram model
19  *
20  * @author Jonas BrĂ¼stel - Initial contribution
21  * @author Laurent Garnier - field "supported" added
22  *
23  */
24 @NonNullByDefault
25 public class AvailableProgram {
26     private final String key;
27     private final boolean supported;
28     private final boolean available;
29     private final String execution;
30
31     public AvailableProgram(String key, boolean supported, boolean available, String execution) {
32         this.key = key;
33         this.supported = supported;
34         this.available = available;
35         this.execution = execution;
36     }
37
38     public AvailableProgram(String key, boolean available, String execution) {
39         this(key, true, available, execution);
40     }
41
42     public AvailableProgram(String key, boolean supported) {
43         this(key, supported, true, "");
44     }
45
46     public String getKey() {
47         return key;
48     }
49
50     public boolean isSupported() {
51         return supported;
52     }
53
54     public boolean isAvailable() {
55         return available;
56     }
57
58     public String getExecution() {
59         return execution;
60     }
61
62     @Override
63     public String toString() {
64         return "AvailableProgram [key=" + key + ", supported=" + supported + ", available=" + available + ", execution="
65                 + execution + "]";
66     }
67 }