]> git.basschouten.com Git - openhab-addons.git/blob
4e30f3dc42a71e8f8902a973147eae98ff3d98d2
[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.amplipi.internal.model;
14
15 import com.fasterxml.jackson.annotation.JsonProperty;
16
17 /**
18  * Partial reconfiguration of a specific audio Source
19  **/
20 public class SourceUpdateWithId {
21
22     /**
23      * Friendly name
24      **/
25     private String name;
26
27     private String input;
28
29     private Integer id;
30
31     /**
32      * Friendly name
33      *
34      * @return name
35      **/
36     @JsonProperty("name")
37     public String getName() {
38         return name;
39     }
40
41     public void setName(String name) {
42         this.name = name;
43     }
44
45     public SourceUpdateWithId name(String name) {
46         this.name = name;
47         return this;
48     }
49
50     /**
51      * Get input
52      *
53      * @return input
54      **/
55     @JsonProperty("input")
56     public String getInput() {
57         return input;
58     }
59
60     public void setInput(String input) {
61         this.input = input;
62     }
63
64     public SourceUpdateWithId input(String input) {
65         this.input = input;
66         return this;
67     }
68
69     /**
70      * Get id
71      * minimum: 0
72      * maximum: 4
73      *
74      * @return id
75      **/
76     @JsonProperty("id")
77     public Integer getId() {
78         return id;
79     }
80
81     public void setId(Integer id) {
82         this.id = id;
83     }
84
85     public SourceUpdateWithId id(Integer id) {
86         this.id = id;
87         return this;
88     }
89
90     @Override
91     public String toString() {
92         StringBuilder sb = new StringBuilder();
93         sb.append("class SourceUpdateWithId {\n");
94
95         sb.append("    name: ").append(toIndentedString(name)).append("\n");
96         sb.append("    input: ").append(toIndentedString(input)).append("\n");
97         sb.append("    id: ").append(toIndentedString(id)).append("\n");
98         sb.append("}");
99         return sb.toString();
100     }
101
102     /**
103      * Convert the given object to string with each line indented by 4 spaces
104      * (except the first line).
105      */
106     private static String toIndentedString(Object o) {
107         if (o == null) {
108             return "null";
109         }
110         return o.toString().replace("\n", "\n    ");
111     }
112 }