]> git.basschouten.com Git - openhab-addons.git/blob
53f43797ab14f28c2935b0ba550d87ee05aae4c3
[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.bticinosmarther.internal.api.dto;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * The {@code Subscription} class defines the dto for Smarther API notification subscription object.
19  *
20  * @author Fabio Possieri - Initial contribution
21  */
22 public class Subscription {
23
24     @SerializedName("plantId")
25     private String plantId;
26     @SerializedName("subscriptionId")
27     private String subscriptionId;
28     @SerializedName("EndPointUrl")
29     private String endpointUrl;
30
31     /**
32      * Returns the identifier of the plant this subscription relates to.
33      *
34      * @return a string containing the plant identifier
35      */
36     public String getPlantId() {
37         return plantId;
38     }
39
40     /**
41      * Returns the notification subscription identifier.
42      *
43      * @return a string containing the subscription identifier
44      */
45     public String getSubscriptionId() {
46         return subscriptionId;
47     }
48
49     /**
50      * Returns the notification endpoint url this subscription maps to.
51      *
52      * @return a string containing the notification endpoint url
53      */
54     public String getEndpointUrl() {
55         return endpointUrl;
56     }
57
58     @Override
59     public String toString() {
60         return String.format("plantId=%s, id=%s, endpoint=%s", plantId, subscriptionId, endpointUrl);
61     }
62 }