2 * Copyright (c) 2010-2022 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.netatmo.internal.webhook;
15 import java.util.ArrayList;
16 import java.util.List;
18 import com.google.gson.annotations.SerializedName;
21 * The {@link NAWebhookCameraEvent} is responsible to hold
22 * data given back by the Netatmo API when calling the webhook
24 * @author Gaƫl L'hopital - Initial contribution
27 public class NAWebhookCameraEvent {
29 public enum AppTypeEnum {
30 @SerializedName("app_camera")
35 AppTypeEnum(String value) {
40 public String toString() {
45 @SerializedName("app_type")
46 private AppTypeEnum appType = null;
48 public AppTypeEnum getAppType() {
52 public enum EventTypeEnum {
53 @SerializedName("person")
56 @SerializedName("person_away")
57 PERSON_AWAY("person_away"),
59 @SerializedName("movement")
62 @SerializedName("outdoor")
65 @SerializedName("connection")
66 CONNECTION("connection"),
68 @SerializedName("disconnection")
69 DISCONNECTION("disconnection"),
74 @SerializedName("off")
77 @SerializedName("boot")
83 @SerializedName("alim")
86 @SerializedName("daily_summary")
87 DAILY_SUMMARY("daily_summary"),
89 @SerializedName("new_module")
90 NEW_MODULE("new_module"),
92 @SerializedName("module_connect")
93 MODULE_CONNECT("module_connect"),
95 @SerializedName("module_disconnect")
96 MODULE_DISCONNECT("module_disconnect"),
98 @SerializedName("module_low_battery")
99 MODULE_LOW_BATTERY("module_low_battery"),
101 @SerializedName("module_end_update")
102 MODULE_END_UPDATE("module_end_update"),
104 @SerializedName("tag_big_move")
105 TAG_BIG_MOVE("tag_big_move"),
107 @SerializedName("tag_small_move")
108 TAG_SMALL_MOVE("tag_small_move"),
110 @SerializedName("tag_uninstalled")
111 TAG_UNINSTALLED("tag_uninstalled"),
113 @SerializedName("tag_open")
114 TAG_OPEN("tag_open");
116 private String value;
118 EventTypeEnum(String value) {
123 public String toString() {
128 @SerializedName("event_type")
129 private EventTypeEnum eventType = null;
131 public EventTypeEnum getEventType() {
135 @SerializedName("camera_id")
138 public String getCameraId() {
142 @SerializedName("home_id")
145 public String getHomeId() {
149 @SerializedName("persons")
150 private List<NAWebhookCameraEventPerson> persons = new ArrayList<>();
152 public List<NAWebhookCameraEventPerson> getPersons() {