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