2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.amplipi.internal.model;
15 import com.google.gson.annotations.SerializedName;
17 import io.swagger.v3.oas.annotations.media.Schema;
20 * A command to execute on a stream
22 @Schema(description = "A command to execute on a stream ")
23 public class Command {
25 @Schema(required = true)
26 @SerializedName("stream_id")
28 * Stream to execute the command on
30 private Integer streamId;
32 @Schema(required = true)
39 * Stream to execute the command on
43 public Integer getStreamId() {
47 public void setStreamId(Integer streamId) {
48 this.streamId = streamId;
51 public Command streamId(Integer streamId) {
52 this.streamId = streamId;
61 public String getCmd() {
65 public void setCmd(String cmd) {
69 public Command cmd(String cmd) {
75 public String toString() {
76 StringBuilder sb = new StringBuilder();
77 sb.append("class Command {\n");
79 sb.append(" streamId: ").append(toIndentedString(streamId)).append("\n");
80 sb.append(" cmd: ").append(toIndentedString(cmd)).append("\n");
86 * Convert the given object to string with each line indented by 4 spaces
87 * (except the first line).
89 private static String toIndentedString(Object o) {
93 return o.toString().replace("\n", "\n ");