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
14 * This file is based on:
19 * Copyright (c) 2014 LG Electronics.
20 * Created by Hyun Kook Khang on 19 Jan 2014
22 * Licensed under the Apache License, Version 2.0 (the "License");
23 * you may not use this file except in compliance with the License.
24 * You may obtain a copy of the License at
26 * http://www.apache.org/licenses/LICENSE-2.0
28 * Unless required by applicable law or agreed to in writing, software
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
35 package org.openhab.binding.lgwebos.internal.handler.core;
37 import com.google.gson.annotations.SerializedName;
40 * {@link AppInfo} is a value object to describe an application on WebOSTV.
41 * The id value is mandatory when starting an application. The name is a human readable friendly name, which is not
42 * further interpreted by the TV.
44 * @author Hyun Kook Khang - Connect SDK initial contribution
45 * @author Sebastian Prehn - Adoption for openHAB, made immutable
47 public class AppInfo {
49 @SerializedName(value = "id", alternate = "appId")
51 @SerializedName(value = "name", alternate = { "appName", "title" })
55 // no-argument constructor for gson
58 public AppInfo(String id, String name) {
63 public String getId() {
67 public String getName() {
72 public String toString() {
73 return "AppInfo [id=" + id + ", name=" + name + "]";
77 public int hashCode() {
80 result = prime * result + ((id == null) ? 0 : id.hashCode());
85 public boolean equals(Object obj) {
92 if (getClass() != obj.getClass()) {
95 AppInfo other = (AppInfo) obj;
97 if (other.id != null) {
100 } else if (!id.equals(other.id)) {