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.amazonechocontrol.internal.jsons;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.SerializedName;
21 * The {@link JsonRegisterAppResponse} encapsulate the GSON data of response from the register command
23 * @author Michael Geramb - Initial contribution
26 public class JsonRegisterAppResponse {
28 public @Nullable Response response;
30 @SerializedName("request_id")
31 public @Nullable String requestId;
33 public static class Response {
34 public @Nullable Success success;
37 public static class Success {
38 public @Nullable Extensions extensions;
40 public @Nullable Tokens tokens;
42 @SerializedName("customer_id")
43 public @Nullable String customerId;
46 public static class Extensions {
47 @SerializedName("device_info")
48 public @Nullable DeviceInfo deviceInfo;
50 @SerializedName("customer_info")
51 public @Nullable CustomerInfo customerInfo;
53 @SerializedName("customer_id")
54 public @Nullable String customerId;
57 public static class DeviceInfo {
58 @SerializedName("device_name")
59 public @Nullable String deviceName;
61 @SerializedName("device_serial_number")
62 public @Nullable String deviceSerialNumber;
64 @SerializedName("device_type")
65 public @Nullable String deviceType;
68 public static class CustomerInfo {
69 @SerializedName("account_pool")
70 public @Nullable String accountPool;
72 @SerializedName("user_id")
73 public @Nullable String userId;
75 @SerializedName("home_region")
76 public @Nullable String homeRegion;
78 public @Nullable String name;
80 @SerializedName("given_name")
81 public @Nullable String givenName;
84 public static class Tokens {
85 @SerializedName("website_cookies")
86 public @Nullable Object websiteCookies;
88 @SerializedName("mac_dms")
89 public @Nullable MacDms macDms;
91 public @Nullable Bearer bearer;
94 public static class MacDms {
95 @SerializedName("device_private_key")
96 public @Nullable String devicePrivateKey;
98 @SerializedName("adp_token")
99 public @Nullable String adpToken;
102 public static class Bearer {
103 @SerializedName("access_token")
104 public @Nullable String accessToken;
106 @SerializedName("refresh_token")
107 public @Nullable String refreshToken;
109 @SerializedName("expires_in")
110 public @Nullable String expiresIn;