]> git.basschouten.com Git - openhab-addons.git/blob
859e78eb9bf17f0b6373396fed21bd468f262bf6
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.miio.internal.cloud;
14
15 import org.jetbrains.annotations.NotNull;
16
17 import com.google.gson.annotations.Expose;
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * This DTO class wraps the login step 2 json structure
22  *
23  * @author Marcel Verpaalen - Initial contribution
24  */
25 public class CloudLoginDTO {
26
27     @SerializedName("qs")
28     @Expose
29     private String qs;
30     @SerializedName("psecurity")
31     @Expose
32     private String psecurity;
33     @SerializedName("nonce")
34     @Expose
35     private Integer nonce;
36     @SerializedName("ssecurity")
37     @Expose
38     private String ssecurity;
39     @SerializedName("passToken")
40     @Expose
41     private String passToken;
42     @SerializedName("userId")
43     @Expose
44     private String userId;
45     @SerializedName("cUserId")
46     @Expose
47     private String cUserId;
48     @SerializedName("securityStatus")
49     @Expose
50     private Integer securityStatus;
51     @SerializedName("pwd")
52     @Expose
53     private Integer pwd;
54     @SerializedName("code")
55     @Expose
56     private String code;
57     @SerializedName("desc")
58     @Expose
59     private String desc;
60     @SerializedName("location")
61     @Expose
62     private String location;
63     @SerializedName("captchaUrl")
64     @Expose
65     private Object captchaUrl;
66
67     public @NotNull String getSsecurity() {
68         return ssecurity != null ? ssecurity : "";
69     }
70
71     public @NotNull String getUserId() {
72         return userId != null ? userId : "";
73     }
74
75     public @NotNull String getcUserId() {
76         return cUserId != null ? cUserId : "";
77     }
78
79     public @NotNull String getPassToken() {
80         return passToken != null ? passToken : "";
81     }
82
83     public @NotNull String getLocation() {
84         return location != null ? location : "";
85     }
86
87     public String getCode() {
88         return code;
89     }
90
91     public String getQs() {
92         return qs;
93     }
94
95     public String getPsecurity() {
96         return psecurity;
97     }
98
99     public Integer getNonce() {
100         return nonce;
101     }
102
103     public String getCUserId() {
104         return cUserId;
105     }
106
107     public Integer getSecurityStatus() {
108         return securityStatus;
109     }
110
111     public Integer getPwd() {
112         return pwd;
113     }
114
115     public String getDesc() {
116         return desc;
117     }
118
119     public Object getCaptchaUrl() {
120         return captchaUrl;
121     }
122
123     public void setCaptchaUrl(Object captchaUrl) {
124         this.captchaUrl = captchaUrl;
125     }
126 }