]> git.basschouten.com Git - openhab-addons.git/blob
462349fa43ad45817e210b7ad2039463c829ae31
[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 an audio Source
19  **/
20 @Schema(description = "Partial reconfiguration of an audio Source ")
21 public class SourceUpdate {
22
23     @Schema
24     /**
25      * Friendly name
26      **/
27     private String name;
28
29     @Schema
30     private String input;
31
32     /**
33      * Friendly name
34      *
35      * @return name
36      **/
37     public String getName() {
38         return name;
39     }
40
41     public void setName(String name) {
42         this.name = name;
43     }
44
45     public SourceUpdate name(String name) {
46         this.name = name;
47         return this;
48     }
49
50     /**
51      * Get input
52      *
53      * @return input
54      **/
55     public String getInput() {
56         return input;
57     }
58
59     public void setInput(String input) {
60         this.input = input;
61     }
62
63     public SourceUpdate input(String input) {
64         this.input = input;
65         return this;
66     }
67
68     @Override
69     public String toString() {
70         StringBuilder sb = new StringBuilder();
71         sb.append("class SourceUpdate {\n");
72
73         sb.append("    name: ").append(toIndentedString(name)).append("\n");
74         sb.append("    input: ").append(toIndentedString(input)).append("\n");
75         sb.append("}");
76         return sb.toString();
77     }
78
79     /**
80      * Convert the given object to string with each line indented by 4 spaces
81      * (except the first line).
82      */
83     private static String toIndentedString(Object o) {
84         if (o == null) {
85             return "null";
86         }
87         return o.toString().replace("\n", "\n    ");
88     }
89 }