]> git.basschouten.com Git - openhab-addons.git/blob
a0f5cd87f911eee51f1962d29663d877d9cb37b9
[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.volvooncall.internal.dto;
14
15 import java.time.ZonedDateTime;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 import com.google.gson.annotations.SerializedName;
20
21 /**
22  * The {@link PostResponse} is responsible for storing
23  * elements given back after a post to VOC api
24  *
25  * @author GaĆ«l L'hopital - Initial contribution
26  */
27 @NonNullByDefault
28 public class PostResponse extends VocAnswer {
29
30     public static enum Status {
31         @SerializedName("Started")
32         STARTED,
33         @SerializedName("MessageDelivered")
34         DELIVERED,
35         @SerializedName("Failed")
36         FAILED,
37         @SerializedName("Successful")
38         SUCCESSFULL
39     }
40
41     public static enum ServiceType {
42         RHBLF, // Remote Honk and Blink Lights ?
43         RDU, // Remote door unlock
44         ERS, // Remote engine start
45         TN // Theft notification
46     }
47
48     public @NonNullByDefault({}) Status status;
49     public @NonNullByDefault({}) String vehicleId;
50     @SerializedName("service")
51     public @NonNullByDefault({}) String serviceURL;
52     public @NonNullByDefault({}) ServiceType serviceType;
53     public @NonNullByDefault({}) ZonedDateTime startTime;
54     /*
55      * Currently unused in the binding, maybe interesting in the future
56      *
57      * public static enum FailureReason {
58      *
59      * @SerializedName("TimeframePassed")
60      * TIME_FRAME_PASSED
61      * }
62      *
63      * private ZonedDateTime statusTimestamp;
64      * 
65      * private FailureReason failureReason;
66      *
67      * private Integer customerServiceId;
68      */
69 }