]> git.basschouten.com Git - openhab-addons.git/blob
b18c5901c395d48d0651b519aac93b7592ebbb14
[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.amazonechocontrol.internal.jsons;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * The {@link JsonRegisterAppResponse} encapsulate the GSON data of response from the register command
22  *
23  * @author Michael Geramb - Initial contribution
24  */
25 @NonNullByDefault
26 public class JsonRegisterAppResponse {
27
28     public @Nullable Response response;
29
30     @SerializedName("request_id")
31     public @Nullable String requestId;
32
33     public static class Response {
34         public @Nullable Success success;
35     }
36
37     public static class Success {
38         public @Nullable Extensions extensions;
39
40         public @Nullable Tokens tokens;
41
42         @SerializedName("customer_id")
43         public @Nullable String customerId;
44     }
45
46     public static class Extensions {
47         @SerializedName("device_info")
48         public @Nullable DeviceInfo deviceInfo;
49
50         @SerializedName("customer_info")
51         public @Nullable CustomerInfo customerInfo;
52
53         @SerializedName("customer_id")
54         public @Nullable String customerId;
55     }
56
57     public static class DeviceInfo {
58         @SerializedName("device_name")
59         public @Nullable String deviceName;
60
61         @SerializedName("device_serial_number")
62         public @Nullable String deviceSerialNumber;
63
64         @SerializedName("device_type")
65         public @Nullable String deviceType;
66     }
67
68     public static class CustomerInfo {
69         @SerializedName("account_pool")
70         public @Nullable String accountPool;
71
72         @SerializedName("user_id")
73         public @Nullable String userId;
74
75         @SerializedName("home_region")
76         public @Nullable String homeRegion;
77
78         public @Nullable String name;
79
80         @SerializedName("given_name")
81         public @Nullable String givenName;
82     }
83
84     public static class Tokens {
85         @SerializedName("website_cookies")
86         public @Nullable Object websiteCookies;
87
88         @SerializedName("mac_dms")
89         public @Nullable MacDms macDms;
90
91         public @Nullable Bearer bearer;
92     }
93
94     public static class MacDms {
95         @SerializedName("device_private_key")
96         public @Nullable String devicePrivateKey;
97
98         @SerializedName("adp_token")
99         public @Nullable String adpToken;
100     }
101
102     public static class Bearer {
103         @SerializedName("access_token")
104         public @Nullable String accessToken;
105
106         @SerializedName("refresh_token")
107         public @Nullable String refreshToken;
108
109         @SerializedName("expires_in")
110         public @Nullable String expiresIn;
111     }
112 }