Repository navigation
Expand file tree
/
Copy pathFeaturesInfo.java
More file actions
297 lines (250 loc) · 9.49 KB
/
Copy pathFeaturesInfo.java
File metadata and controls
297 lines (250 loc) · 9.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/**
* Copyright © 2026-2026 ThingsBoard, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.client.model;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.thingsboard.client.ApiClient;
/**
* FeaturesInfo
*/
@JsonPropertyOrder({
FeaturesInfo.JSON_PROPERTY_SMS_ENABLED,
FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED,
FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED,
FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED,
FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0")
public class FeaturesInfo {
public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled";
@javax.annotation.Nullable
private Boolean smsEnabled;
public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled";
@javax.annotation.Nullable
private Boolean oauthEnabled;
public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled";
@javax.annotation.Nullable
private Boolean twoFaEnabled;
public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled";
@javax.annotation.Nullable
private Boolean emailEnabled;
public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled";
@javax.annotation.Nullable
private Boolean notificationEnabled;
public FeaturesInfo() {
}
public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) {
this.smsEnabled = smsEnabled;
return this;
}
/**
* Get smsEnabled
* @return smsEnabled
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getSmsEnabled() {
return smsEnabled;
}
@JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) {
this.smsEnabled = smsEnabled;
}
public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) {
this.oauthEnabled = oauthEnabled;
return this;
}
/**
* Get oauthEnabled
* @return oauthEnabled
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getOauthEnabled() {
return oauthEnabled;
}
@JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) {
this.oauthEnabled = oauthEnabled;
}
public FeaturesInfo twoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) {
this.twoFaEnabled = twoFaEnabled;
return this;
}
/**
* Get twoFaEnabled
* @return twoFaEnabled
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_TWO_FA_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getTwoFaEnabled() {
return twoFaEnabled;
}
@JsonProperty(value = JSON_PROPERTY_TWO_FA_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTwoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) {
this.twoFaEnabled = twoFaEnabled;
}
public FeaturesInfo emailEnabled(@javax.annotation.Nullable Boolean emailEnabled) {
this.emailEnabled = emailEnabled;
return this;
}
/**
* Get emailEnabled
* @return emailEnabled
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getEmailEnabled() {
return emailEnabled;
}
@JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) {
this.emailEnabled = emailEnabled;
}
public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) {
this.notificationEnabled = notificationEnabled;
return this;
}
/**
* Get notificationEnabled
* @return notificationEnabled
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getNotificationEnabled() {
return notificationEnabled;
}
@JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) {
this.notificationEnabled = notificationEnabled;
}
/**
* Return true if this FeaturesInfo object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FeaturesInfo featuresInfo = (FeaturesInfo) o;
return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) &&
Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) &&
Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) &&
Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) &&
Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled);
}
@Override
public int hashCode() {
return Objects.hash(smsEnabled, oauthEnabled, twoFaEnabled, emailEnabled, notificationEnabled);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FeaturesInfo {\n");
sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n");
sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n");
sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n");
sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n");
sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
// add `smsEnabled` to the URL query string
if (getSmsEnabled() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%ssmsEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSmsEnabled()))));
}
// add `oauthEnabled` to the URL query string
if (getOauthEnabled() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled()))));
}
// add `twoFaEnabled` to the URL query string
if (getTwoFaEnabled() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%stwoFaEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTwoFaEnabled()))));
}
// add `emailEnabled` to the URL query string
if (getEmailEnabled() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled()))));
}
// add `notificationEnabled` to the URL query string
if (getNotificationEnabled() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled()))));
}
return joiner.toString();
}
}