-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAiModel.java
More file actions
321 lines (269 loc) · 9.02 KB
/
Copy pathAiModel.java
File metadata and controls
321 lines (269 loc) · 9.02 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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
/**
* 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 javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
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 org.thingsboard.client.model.AiModelConfig;
import org.thingsboard.client.model.AiModelId;
import org.thingsboard.client.model.TenantId;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.thingsboard.client.ApiClient;
/**
* AiModel
*/
@JsonPropertyOrder({
AiModel.JSON_PROPERTY_ID,
AiModel.JSON_PROPERTY_CREATED_TIME,
AiModel.JSON_PROPERTY_TENANT_ID,
AiModel.JSON_PROPERTY_VERSION,
AiModel.JSON_PROPERTY_NAME,
AiModel.JSON_PROPERTY_CONFIGURATION
})
@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0")
public class AiModel {
public static final String JSON_PROPERTY_ID = "id";
@Nullable
private AiModelId id;
public static final String JSON_PROPERTY_CREATED_TIME = "createdTime";
@Nullable
private Long createdTime;
public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
@Nullable
private TenantId tenantId;
public static final String JSON_PROPERTY_VERSION = "version";
@Nullable
private Long version = 1l;
public static final String JSON_PROPERTY_NAME = "name";
@Nonnull
private String name;
public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
@Nullable
private AiModelConfig _configuration;
public AiModel() {
}
@JsonCreator
public AiModel(
@JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime,
@JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId,
@JsonProperty(JSON_PROPERTY_VERSION) Long version
) {
this();
this.createdTime = createdTime;
this.tenantId = tenantId;
this.version = version;
}
public AiModel id(@Nullable AiModelId id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@Nullable
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public AiModelId getId() {
return id;
}
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(@Nullable AiModelId id) {
this.id = id;
}
/**
* Entity creation timestamp in milliseconds since Unix epoch
* @return createdTime
*/
@Nullable
@JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getCreatedTime() {
return createdTime;
}
/**
* JSON object representing the ID of the tenant associated with this AI model
* @return tenantId
*/
@Nullable
@JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TenantId getTenantId() {
return tenantId;
}
/**
* Version of the AI model record; increments automatically whenever the record is changed
* @return version
*/
@Nullable
@JsonProperty(value = JSON_PROPERTY_VERSION, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getVersion() {
return version;
}
public AiModel name(@Nonnull String name) {
this.name = name;
return this;
}
/**
* Display name for this AI model configuration; not the technical model identifier
* @return name
*/
@Nonnull
@JsonProperty(value = JSON_PROPERTY_NAME, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonProperty(value = JSON_PROPERTY_NAME, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(@Nonnull String name) {
this.name = name;
}
public AiModel _configuration(@Nullable AiModelConfig _configuration) {
this._configuration = _configuration;
return this;
}
/**
* Configuration of the AI model
* @return _configuration
*/
@Nullable
@JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public AiModelConfig getConfiguration() {
return _configuration;
}
@JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfiguration(@Nullable AiModelConfig _configuration) {
this._configuration = _configuration;
}
/**
* Return true if this AiModel object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AiModel aiModel = (AiModel) o;
return Objects.equals(this.id, aiModel.id) &&
Objects.equals(this.createdTime, aiModel.createdTime) &&
Objects.equals(this.tenantId, aiModel.tenantId) &&
Objects.equals(this.version, aiModel.version) &&
Objects.equals(this.name, aiModel.name) &&
Objects.equals(this._configuration, aiModel._configuration);
}
@Override
public int hashCode() {
return Objects.hash(id, createdTime, tenantId, version, name, _configuration);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AiModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n");
sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" _configuration: ").append(toIndentedString(_configuration)).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 `id` to the URL query string
if (getId() != null) {
joiner.add(getId().toUrlQueryString(prefix + "id" + suffix));
}
// add `createdTime` to the URL query string
if (getCreatedTime() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime()))));
}
// add `tenantId` to the URL query string
if (getTenantId() != null) {
joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix));
}
// add `version` to the URL query string
if (getVersion() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion()))));
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName()))));
}
// add `configuration` to the URL query string
if (getConfiguration() != null) {
joiner.add(getConfiguration().toUrlQueryString(prefix + "configuration" + suffix));
}
return joiner.toString();
}
}