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.bticinosmarther.internal.api.dto;
15 import com.google.gson.annotations.SerializedName;
18 * The {@code Subscription} class defines the dto for Smarther API notification subscription object.
20 * @author Fabio Possieri - Initial contribution
22 public class Subscription {
24 @SerializedName("plantId")
25 private String plantId;
26 @SerializedName("subscriptionId")
27 private String subscriptionId;
28 @SerializedName("EndPointUrl")
29 private String endpointUrl;
32 * Returns the identifier of the plant this subscription relates to.
34 * @return a string containing the plant identifier
36 public String getPlantId() {
41 * Returns the notification subscription identifier.
43 * @return a string containing the subscription identifier
45 public String getSubscriptionId() {
46 return subscriptionId;
50 * Returns the notification endpoint url this subscription maps to.
52 * @return a string containing the notification endpoint url
54 public String getEndpointUrl() {
59 public String toString() {
60 return String.format("plantId=%s, id=%s, endpoint=%s", plantId, subscriptionId, endpointUrl);