]> git.basschouten.com Git - openhab-addons.git/blob
2f144dd4a3636d744fab2f8668a016608fbb8521
[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.neeo.internal.models;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * The model representing a forward actions request (serialize/deserialize json use only).
20  *
21  * @author Tim Roberts - Initial contribution
22  */
23 @NonNullByDefault
24 public class NeeoForwardActions {
25     /** The host to forward actions to */
26     @Nullable
27     private final String host;
28
29     /** The port to use */
30     private final int port;
31
32     /** The path the actions should go to */
33     @Nullable
34     private final String path;
35
36     /**
37      * Creates the forward actions from the given parms
38      *
39      * @param host the host name
40      * @param port the port
41      * @param path the path
42      */
43     public NeeoForwardActions(String host, int port, String path) {
44         this.host = host;
45         this.port = port;
46         this.path = path;
47     }
48
49     /**
50      * Returns the host name to forward actions to
51      *
52      * @return the hostname
53      */
54     @Nullable
55     public String getHost() {
56         return host;
57     }
58
59     /**
60      * Returns the port number
61      *
62      * @return the port number
63      */
64     public int getPort() {
65         return port;
66     }
67
68     /**
69      * Returns the path to use
70      *
71      * @return the path
72      */
73     @Nullable
74     public String getPath() {
75         return path;
76     }
77
78     @Override
79     public String toString() {
80         return "NeeoForwardActions [host=" + host + ", port=" + port + ", path=" + path + "]";
81     }
82 }