kelvin-python-api-client 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kelvin/api/client/__init__.py +15 -0
- kelvin/api/client/api/app_manager.py +646 -0
- kelvin/api/client/api/app_registry.py +342 -0
- kelvin/api/client/api/asset.py +1012 -0
- kelvin/api/client/api/asset_insights.py +67 -0
- kelvin/api/client/api/bridge.py +306 -0
- kelvin/api/client/api/control_change.py +398 -0
- kelvin/api/client/api/data_tag.py +499 -0
- kelvin/api/client/api/datastreams.py +1021 -0
- kelvin/api/client/api/filestorage.py +234 -0
- kelvin/api/client/api/instance.py +559 -0
- kelvin/api/client/api/orchestration.py +717 -0
- kelvin/api/client/api/parameters.py +417 -0
- kelvin/api/client/api/recommendation.py +804 -0
- kelvin/api/client/api/secret.py +173 -0
- kelvin/api/client/api/thread.py +435 -0
- kelvin/api/client/api/timeseries.py +273 -0
- kelvin/api/client/api/user.py +382 -0
- kelvin/api/client/api/workload.py +437 -0
- kelvin/api/client/base_client.py +924 -0
- kelvin/api/client/base_model.py +187 -0
- kelvin/api/client/client.py +181 -0
- kelvin/api/client/config.py +709 -0
- kelvin/api/client/data_model.py +523 -0
- kelvin/api/client/dataframe_conversion.py +172 -0
- kelvin/api/client/deeplist.py +285 -0
- kelvin/api/client/error.py +77 -0
- kelvin/api/client/model/__init__.py +3 -0
- kelvin/api/client/model/enum.py +82 -0
- kelvin/api/client/model/pagination.py +61 -0
- kelvin/api/client/model/requests.py +3352 -0
- kelvin/api/client/model/response.py +68 -0
- kelvin/api/client/model/responses.py +4799 -0
- kelvin/api/client/model/type.py +2025 -0
- kelvin/api/client/py.typed +0 -0
- kelvin/api/client/retry.py +88 -0
- kelvin/api/client/serialize.py +222 -0
- kelvin/api/client/utils.py +316 -0
- kelvin/api/client/version.py +16 -0
- kelvin_python_api_client-0.0.1.dist-info/METADATA +75 -0
- kelvin_python_api_client-0.0.1.dist-info/RECORD +43 -0
- kelvin_python_api_client-0.0.1.dist-info/WHEEL +5 -0
- kelvin_python_api_client-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2025 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: openapi.json
|
|
3
|
+
# timestamp: 2024-04-08T09:50:50+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from ipaddress import IPv4Address
|
|
10
|
+
from typing import Any, Dict, List, Optional, Union
|
|
11
|
+
from uuid import UUID
|
|
12
|
+
|
|
13
|
+
from pydantic import EmailStr, Field
|
|
14
|
+
|
|
15
|
+
from kelvin.api.client.base_model import BaseModelRoot
|
|
16
|
+
from kelvin.api.client.data_model import DataModelBase
|
|
17
|
+
|
|
18
|
+
from . import enum
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AppManagerAppPlannerRules(DataModelBase):
|
|
22
|
+
"""
|
|
23
|
+
AppManagerAppPlannerRules object.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
max_resources: int
|
|
28
|
+
cluster: Optional[str]
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
max_resources: int = Field(
|
|
33
|
+
..., description="Maximum number of resources that can run in a single instance of an Application.", ge=1
|
|
34
|
+
)
|
|
35
|
+
cluster: Optional[str] = Field(
|
|
36
|
+
None, description="Cluster key `name` where the App Manager deploys Applications.", max_length=64, min_length=1
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class Version(DataModelBase):
|
|
41
|
+
"""
|
|
42
|
+
Version object.
|
|
43
|
+
|
|
44
|
+
Parameters
|
|
45
|
+
----------
|
|
46
|
+
created: Optional[datetime]
|
|
47
|
+
id: Optional[str]
|
|
48
|
+
updated: Optional[datetime]
|
|
49
|
+
version: Optional[str]
|
|
50
|
+
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
created: Optional[datetime] = Field(
|
|
54
|
+
None,
|
|
55
|
+
description="UTC time when this version of the Application was first created, formatted in RFC 3339.",
|
|
56
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
57
|
+
)
|
|
58
|
+
id: Optional[str] = Field(
|
|
59
|
+
None,
|
|
60
|
+
description="Unique identifier for this version of the Application.",
|
|
61
|
+
example="58ba052085dfd66545bf24a4957f6c8fd4af3c27",
|
|
62
|
+
)
|
|
63
|
+
updated: Optional[datetime] = Field(
|
|
64
|
+
None,
|
|
65
|
+
description="UTC time when this version of the Application was last updated, formatted in RFC 3339.",
|
|
66
|
+
example="2023-11-10T09:55:09.31857Z",
|
|
67
|
+
)
|
|
68
|
+
version: Optional[str] = Field(None, description="This version number of the Application.", example="1.0.8")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class AppManagerAppDetails(DataModelBase):
|
|
72
|
+
"""
|
|
73
|
+
AppManagerAppDetails object.
|
|
74
|
+
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
created: Optional[datetime]
|
|
78
|
+
description: Optional[str]
|
|
79
|
+
latest_version: Optional[str]
|
|
80
|
+
name: Optional[str]
|
|
81
|
+
title: Optional[str]
|
|
82
|
+
updated: Optional[datetime]
|
|
83
|
+
versions: Optional[List[Version]]
|
|
84
|
+
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
created: Optional[datetime] = Field(
|
|
88
|
+
None,
|
|
89
|
+
description="UTC time when the Application was first created, formatted in RFC 3339.",
|
|
90
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
91
|
+
)
|
|
92
|
+
description: Optional[str] = Field(
|
|
93
|
+
None,
|
|
94
|
+
description="A full description of the purpose and characteristics of the Application.",
|
|
95
|
+
example="This model predicts the optimal settings for the compressor's operating parameters\n. For example monitor its temperature and speed in order to maximize its efficiency and minimize energy consumption.",
|
|
96
|
+
)
|
|
97
|
+
latest_version: Optional[str] = Field(
|
|
98
|
+
None, description="The latest version number available for the Application.", example="1.0.8"
|
|
99
|
+
)
|
|
100
|
+
name: Optional[str] = Field(
|
|
101
|
+
None,
|
|
102
|
+
description="Unique identifier `name` of the Application.",
|
|
103
|
+
example="motor-speed-control",
|
|
104
|
+
max_length=64,
|
|
105
|
+
min_length=1,
|
|
106
|
+
)
|
|
107
|
+
title: Optional[str] = Field(
|
|
108
|
+
None,
|
|
109
|
+
description="Display name (`title`) of the Application.",
|
|
110
|
+
example="Motor Speed Control",
|
|
111
|
+
max_length=64,
|
|
112
|
+
min_length=1,
|
|
113
|
+
)
|
|
114
|
+
updated: Optional[datetime] = Field(
|
|
115
|
+
None,
|
|
116
|
+
description="UTC time when the Application was last updated, formatted in RFC 3339.",
|
|
117
|
+
example="2023-11-10T09:55:09.31857Z",
|
|
118
|
+
)
|
|
119
|
+
versions: Optional[List[Version]] = Field(
|
|
120
|
+
None, description="Array of objects with information on each version of the Application."
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class AppManagerAppStatusResourceCount(DataModelBase):
|
|
125
|
+
"""
|
|
126
|
+
AppManagerAppStatusResourceCount object.
|
|
127
|
+
|
|
128
|
+
Parameters
|
|
129
|
+
----------
|
|
130
|
+
running: Optional[int]
|
|
131
|
+
total: Optional[int]
|
|
132
|
+
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
running: Optional[int] = Field(
|
|
136
|
+
None,
|
|
137
|
+
description="Total number of Applications of all versions together that have a status `running`.",
|
|
138
|
+
example=8,
|
|
139
|
+
)
|
|
140
|
+
total: Optional[int] = Field(
|
|
141
|
+
None, description="Total number of Applications of all versions together with any `status`.", example=10
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class Status(Enum):
|
|
146
|
+
running = "running"
|
|
147
|
+
stopped = "stopped"
|
|
148
|
+
updating = "updating"
|
|
149
|
+
requires_attention = "requires_attention"
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class AppManagerAppStatus(DataModelBase):
|
|
153
|
+
"""
|
|
154
|
+
AppManagerAppStatus object.
|
|
155
|
+
|
|
156
|
+
Parameters
|
|
157
|
+
----------
|
|
158
|
+
last_seen: Optional[datetime]
|
|
159
|
+
resource_count: Optional[AppManagerAppStatusResourceCount]
|
|
160
|
+
status: Optional[Status]
|
|
161
|
+
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
last_seen: Optional[datetime] = Field(
|
|
165
|
+
None,
|
|
166
|
+
description="UTC time when this version of the Application was last seen online, formatted in RFC 3339.",
|
|
167
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
168
|
+
)
|
|
169
|
+
resource_count: Optional[AppManagerAppStatusResourceCount] = Field(
|
|
170
|
+
None, description="Information on the total running and total Assets added to the Application."
|
|
171
|
+
)
|
|
172
|
+
status: Optional[Status] = Field(
|
|
173
|
+
None,
|
|
174
|
+
description="Current `status` of all versions of the Application together. If any one Asset is running, then the status is `running`. If any one Asset is updating, then the status is `updating`. If all are stopped, then the status is `stopped`.",
|
|
175
|
+
example="running",
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class AppManagerApp(DataModelBase):
|
|
180
|
+
"""
|
|
181
|
+
AppManagerApp object.
|
|
182
|
+
|
|
183
|
+
Parameters
|
|
184
|
+
----------
|
|
185
|
+
app: Optional[AppManagerAppDetails]
|
|
186
|
+
status: Optional[AppManagerAppStatus]
|
|
187
|
+
updated: Optional[datetime]
|
|
188
|
+
updated_by: Optional[str]
|
|
189
|
+
|
|
190
|
+
"""
|
|
191
|
+
|
|
192
|
+
app: Optional[AppManagerAppDetails] = Field(
|
|
193
|
+
None, description="All keys of the Application and a list of versions available."
|
|
194
|
+
)
|
|
195
|
+
status: Optional[AppManagerAppStatus] = Field(
|
|
196
|
+
None,
|
|
197
|
+
description="Group status of all Assets added to the Application, including a total count of assets currently running.",
|
|
198
|
+
)
|
|
199
|
+
updated: Optional[datetime] = Field(
|
|
200
|
+
None,
|
|
201
|
+
description="UTC time when any Application keys were last updated, formatted in RFC 3339.",
|
|
202
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
203
|
+
)
|
|
204
|
+
updated_by: Optional[str] = Field(
|
|
205
|
+
None,
|
|
206
|
+
description="User that made the last change to any Application keys. Sources are written in the krn format.",
|
|
207
|
+
example="krn:user:person@example.com",
|
|
208
|
+
max_length=256,
|
|
209
|
+
min_length=1,
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
class Resource(BaseModelRoot[str]):
|
|
214
|
+
"""
|
|
215
|
+
Resource object.
|
|
216
|
+
|
|
217
|
+
Parameters
|
|
218
|
+
----------
|
|
219
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
220
|
+
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class AppManagerAppVersion(DataModelBase):
|
|
227
|
+
"""
|
|
228
|
+
AppManagerAppVersion object.
|
|
229
|
+
|
|
230
|
+
Parameters
|
|
231
|
+
----------
|
|
232
|
+
resources: Optional[List[Resource]]
|
|
233
|
+
|
|
234
|
+
"""
|
|
235
|
+
|
|
236
|
+
resources: Optional[List[Resource]] = Field(
|
|
237
|
+
None,
|
|
238
|
+
description="A list of Assets running on the Application to perform the action requested. Partial names will be ignored. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
239
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class AppManagerAppVersionSummary(DataModelBase):
|
|
244
|
+
"""
|
|
245
|
+
AppManagerAppVersionSummary object.
|
|
246
|
+
|
|
247
|
+
Parameters
|
|
248
|
+
----------
|
|
249
|
+
description: Optional[str]
|
|
250
|
+
name: Optional[str]
|
|
251
|
+
title: Optional[str]
|
|
252
|
+
version: Optional[str]
|
|
253
|
+
|
|
254
|
+
"""
|
|
255
|
+
|
|
256
|
+
description: Optional[str] = Field(
|
|
257
|
+
None,
|
|
258
|
+
description="A full description of the purpose and characteristics of the Application.",
|
|
259
|
+
example="This model predicts the optimal settings for the compressor's operating parameters\n. For example monitor its temperature and speed in order to maximize its efficiency and minimize energy consumption.",
|
|
260
|
+
)
|
|
261
|
+
name: Optional[str] = Field(
|
|
262
|
+
None,
|
|
263
|
+
description="Unique identifier `name` of the Application used by the Asset (`resource`).",
|
|
264
|
+
example="motor-speed-control",
|
|
265
|
+
max_length=64,
|
|
266
|
+
min_length=1,
|
|
267
|
+
)
|
|
268
|
+
title: Optional[str] = Field(
|
|
269
|
+
None,
|
|
270
|
+
description="Display name (`title`) of the Application used by the Asset (`resource`).",
|
|
271
|
+
example="Motor Speed Control",
|
|
272
|
+
max_length=64,
|
|
273
|
+
min_length=1,
|
|
274
|
+
)
|
|
275
|
+
version: Optional[str] = Field(
|
|
276
|
+
None, description="The version number of the Application used by the Asset (`resource`).", example="1.0.8"
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class AppYaml(DataModelBase):
|
|
281
|
+
"""
|
|
282
|
+
AppYaml object.
|
|
283
|
+
|
|
284
|
+
Parameters
|
|
285
|
+
----------
|
|
286
|
+
|
|
287
|
+
"""
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
class AppVersion(DataModelBase):
|
|
291
|
+
"""
|
|
292
|
+
AppVersion object.
|
|
293
|
+
|
|
294
|
+
Parameters
|
|
295
|
+
----------
|
|
296
|
+
created: Optional[datetime]
|
|
297
|
+
id: Optional[str]
|
|
298
|
+
payload: Optional[AppYaml]
|
|
299
|
+
updated: Optional[datetime]
|
|
300
|
+
version: Optional[str]
|
|
301
|
+
|
|
302
|
+
"""
|
|
303
|
+
|
|
304
|
+
created: Optional[datetime] = Field(
|
|
305
|
+
None,
|
|
306
|
+
description="UTC time when this App version was first uploaded to the App Registry, formatted in RFC 3339.",
|
|
307
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
308
|
+
)
|
|
309
|
+
id: Optional[str] = Field(
|
|
310
|
+
None,
|
|
311
|
+
description="Unique identifier for this version of the App in the App Registry.",
|
|
312
|
+
example="58ba052085dfd66545bf24a4957f6c8fd4af3c27",
|
|
313
|
+
)
|
|
314
|
+
payload: Optional[AppYaml] = Field(
|
|
315
|
+
None,
|
|
316
|
+
description="Dictionary with keys for app inputs/outputs, info, spec version and system packages. Each key represents specific settings and parameters for the App.",
|
|
317
|
+
)
|
|
318
|
+
updated: Optional[datetime] = Field(
|
|
319
|
+
None,
|
|
320
|
+
description="UTC time when any App keys for this App version in the App Registry were last updated, formatted in RFC 3339.",
|
|
321
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
322
|
+
)
|
|
323
|
+
version: Optional[str] = Field(None, description="Version number of this App in the App Registry.", example="1.2.0")
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
class App(DataModelBase):
|
|
327
|
+
"""
|
|
328
|
+
App object.
|
|
329
|
+
|
|
330
|
+
Parameters
|
|
331
|
+
----------
|
|
332
|
+
created: Optional[datetime]
|
|
333
|
+
description: Optional[str]
|
|
334
|
+
latest_version: Optional[str]
|
|
335
|
+
name: Optional[str]
|
|
336
|
+
title: Optional[str]
|
|
337
|
+
type: Optional[enum.AppType]
|
|
338
|
+
updated: Optional[datetime]
|
|
339
|
+
versions: Optional[List[AppVersion]]
|
|
340
|
+
|
|
341
|
+
"""
|
|
342
|
+
|
|
343
|
+
created: Optional[datetime] = Field(
|
|
344
|
+
None,
|
|
345
|
+
description="UTC time when the App was first uploaded to the App Registry, formatted in RFC 3339.",
|
|
346
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
347
|
+
)
|
|
348
|
+
description: Optional[str] = Field(
|
|
349
|
+
None,
|
|
350
|
+
description="Description of the App in the App Registry.",
|
|
351
|
+
example="This application controls the speed of the beam pump motor in order to increase production for this type of artificial lift well. It uses values available from the control system such as Downhole Pressure, Motor Speed, Motor Torque and Choke position.\n",
|
|
352
|
+
max_length=256,
|
|
353
|
+
min_length=1,
|
|
354
|
+
)
|
|
355
|
+
latest_version: Optional[str] = Field(
|
|
356
|
+
None, description="Latest version number of the App in the App Registry.", example="1.2.0"
|
|
357
|
+
)
|
|
358
|
+
name: Optional[str] = Field(
|
|
359
|
+
None,
|
|
360
|
+
description="Unique identifier `name` of the App in the App Registry.",
|
|
361
|
+
example="motor-speed-control",
|
|
362
|
+
max_length=64,
|
|
363
|
+
min_length=1,
|
|
364
|
+
)
|
|
365
|
+
title: Optional[str] = Field(
|
|
366
|
+
None,
|
|
367
|
+
description="Display name (`title`) of the App in the App Registry.",
|
|
368
|
+
example="Motor Speed Control",
|
|
369
|
+
max_length=64,
|
|
370
|
+
min_length=1,
|
|
371
|
+
)
|
|
372
|
+
type: Optional[enum.AppType] = Field(
|
|
373
|
+
None,
|
|
374
|
+
description="Type of development used for the App. `kelvin` is Kelvin App using Python and `docker` is using the generic Dockerfile format.",
|
|
375
|
+
)
|
|
376
|
+
updated: Optional[datetime] = Field(
|
|
377
|
+
None,
|
|
378
|
+
description="UTC time when any App keys in the App Registry were last updated, formatted in RFC 3339.",
|
|
379
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
380
|
+
)
|
|
381
|
+
versions: Optional[List[AppVersion]] = Field(
|
|
382
|
+
None, description="Array of all App versions available in the App Registry."
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
class AnyModel(BaseModelRoot[Union[float, str, bool, Dict[str, Any]]]):
|
|
387
|
+
"""
|
|
388
|
+
AnyModel object.
|
|
389
|
+
|
|
390
|
+
Parameters
|
|
391
|
+
----------
|
|
392
|
+
__root__: Union[float, str, bool, Dict[str, Any]]
|
|
393
|
+
|
|
394
|
+
"""
|
|
395
|
+
|
|
396
|
+
__root__: Union[float, str, bool, Dict[str, Any]]
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class AssetProperty(DataModelBase):
|
|
400
|
+
"""
|
|
401
|
+
AssetProperty object.
|
|
402
|
+
|
|
403
|
+
Parameters
|
|
404
|
+
----------
|
|
405
|
+
name: Optional[str]
|
|
406
|
+
title: Optional[str]
|
|
407
|
+
value: Optional[AnyModel]
|
|
408
|
+
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
name: Optional[str] = Field(
|
|
412
|
+
None,
|
|
413
|
+
description="Unique identifier `name` for the Asset Property. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
414
|
+
example="water-line-pressure",
|
|
415
|
+
max_length=64,
|
|
416
|
+
min_length=1,
|
|
417
|
+
)
|
|
418
|
+
title: Optional[str] = Field(
|
|
419
|
+
None,
|
|
420
|
+
description="Display name (title) for the Asset Property. You can use any character, numeric, space and special character in this key.",
|
|
421
|
+
example="Water Line Pressure",
|
|
422
|
+
max_length=64,
|
|
423
|
+
min_length=1,
|
|
424
|
+
)
|
|
425
|
+
value: Optional[AnyModel] = Field(None, description="Value for this Asset Property.", example=87)
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
class State(Enum):
|
|
429
|
+
online = "online"
|
|
430
|
+
offline = "offline"
|
|
431
|
+
unknown = "unknown"
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
class AssetStatusItem(DataModelBase):
|
|
435
|
+
"""
|
|
436
|
+
AssetStatusItem object.
|
|
437
|
+
|
|
438
|
+
Parameters
|
|
439
|
+
----------
|
|
440
|
+
last_seen: Optional[datetime]
|
|
441
|
+
state: Optional[State]
|
|
442
|
+
|
|
443
|
+
"""
|
|
444
|
+
|
|
445
|
+
last_seen: Optional[datetime] = Field(
|
|
446
|
+
None,
|
|
447
|
+
description="UTC time when the Asset was last seen, formatted in RFC 3339.",
|
|
448
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
449
|
+
)
|
|
450
|
+
state: Optional[State] = Field(
|
|
451
|
+
None,
|
|
452
|
+
description="Current status (`state`) of the Asset`. It is `online` if at least one of the Asset / Data Stream pairs is actively receiving data.",
|
|
453
|
+
example="offline",
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
class Asset(DataModelBase):
|
|
458
|
+
"""
|
|
459
|
+
Asset object.
|
|
460
|
+
|
|
461
|
+
Parameters
|
|
462
|
+
----------
|
|
463
|
+
asset_type_name: Optional[str]
|
|
464
|
+
asset_type_title: Optional[str]
|
|
465
|
+
created: Optional[datetime]
|
|
466
|
+
name: Optional[str]
|
|
467
|
+
properties: Optional[List[AssetProperty]]
|
|
468
|
+
status: Optional[AssetStatusItem]
|
|
469
|
+
title: Optional[str]
|
|
470
|
+
updated: Optional[datetime]
|
|
471
|
+
|
|
472
|
+
"""
|
|
473
|
+
|
|
474
|
+
asset_type_name: Optional[str] = Field(
|
|
475
|
+
None,
|
|
476
|
+
description="Unique identifier `name` of the Asset Type linked to this Asset.",
|
|
477
|
+
example="beam_pump",
|
|
478
|
+
max_length=64,
|
|
479
|
+
min_length=1,
|
|
480
|
+
)
|
|
481
|
+
asset_type_title: Optional[str] = Field(
|
|
482
|
+
None,
|
|
483
|
+
description="Display name (`title`) of the Asset Type linked to this Asset.",
|
|
484
|
+
example="Beam Pump",
|
|
485
|
+
max_length=64,
|
|
486
|
+
min_length=1,
|
|
487
|
+
)
|
|
488
|
+
created: Optional[datetime] = Field(
|
|
489
|
+
None,
|
|
490
|
+
description="UTC time when the Asset was created, formatted in RFC 3339.",
|
|
491
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
492
|
+
)
|
|
493
|
+
name: Optional[str] = Field(
|
|
494
|
+
None, description="Unique identifier `name` of the Asset.", example="well_01", max_length=64, min_length=1
|
|
495
|
+
)
|
|
496
|
+
properties: Optional[List[AssetProperty]] = Field(
|
|
497
|
+
None,
|
|
498
|
+
description="Array of custom properties. These properties are not used by the Kelvin Platform and are for end-user use only.",
|
|
499
|
+
)
|
|
500
|
+
status: Optional[AssetStatusItem] = None
|
|
501
|
+
title: Optional[str] = Field(
|
|
502
|
+
None, description="Display name (`title`) of the Asset.", example="Well 01", max_length=64, min_length=1
|
|
503
|
+
)
|
|
504
|
+
updated: Optional[datetime] = Field(
|
|
505
|
+
None,
|
|
506
|
+
description="UTC time when any Asset keys were last updated, formatted in RFC 3339.",
|
|
507
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class Property(DataModelBase):
|
|
512
|
+
"""
|
|
513
|
+
Property object.
|
|
514
|
+
|
|
515
|
+
Parameters
|
|
516
|
+
----------
|
|
517
|
+
created: Optional[datetime]
|
|
518
|
+
name: Optional[str]
|
|
519
|
+
primitive_type: Optional[enum.PropertyTypeName]
|
|
520
|
+
title: Optional[str]
|
|
521
|
+
updated: Optional[datetime]
|
|
522
|
+
|
|
523
|
+
"""
|
|
524
|
+
|
|
525
|
+
created: Optional[datetime] = Field(
|
|
526
|
+
None,
|
|
527
|
+
description="UTC time when the Asset Property Definition was created, formatted in RFC 3339.",
|
|
528
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
529
|
+
)
|
|
530
|
+
name: Optional[str] = Field(
|
|
531
|
+
None,
|
|
532
|
+
description="Unique identifier `name` for the Asset Property Definition. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
533
|
+
example="production_casing_depth",
|
|
534
|
+
max_length=64,
|
|
535
|
+
min_length=1,
|
|
536
|
+
)
|
|
537
|
+
primitive_type: Optional[enum.PropertyTypeName] = Field(
|
|
538
|
+
None, description="Property data type of the Asset Property Definition."
|
|
539
|
+
)
|
|
540
|
+
title: Optional[str] = Field(
|
|
541
|
+
None,
|
|
542
|
+
description="Display name (`title`) of the Asset Property Definition.",
|
|
543
|
+
example="Production Casing Depth",
|
|
544
|
+
max_length=64,
|
|
545
|
+
min_length=1,
|
|
546
|
+
)
|
|
547
|
+
updated: Optional[datetime] = Field(
|
|
548
|
+
None,
|
|
549
|
+
description="UTC time when any Asset Property Definition keys were last updated, formatted in RFC 3339.",
|
|
550
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
class SimpleAsset(DataModelBase):
|
|
555
|
+
"""
|
|
556
|
+
SimpleAsset object.
|
|
557
|
+
|
|
558
|
+
Parameters
|
|
559
|
+
----------
|
|
560
|
+
name: Optional[str]
|
|
561
|
+
state: Optional[State]
|
|
562
|
+
|
|
563
|
+
"""
|
|
564
|
+
|
|
565
|
+
name: Optional[str] = Field(
|
|
566
|
+
None,
|
|
567
|
+
description="Unique identifier `name` for the Asset. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
568
|
+
example="beam_pump",
|
|
569
|
+
max_length=64,
|
|
570
|
+
min_length=1,
|
|
571
|
+
)
|
|
572
|
+
state: Optional[State] = Field(
|
|
573
|
+
None,
|
|
574
|
+
description="Current status (`state`) of the Asset`. It is `online` if at least one of the Asset / Data Stream pairs is actively receiving data.",
|
|
575
|
+
example="offline",
|
|
576
|
+
)
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
class AssetStatus(DataModelBase):
|
|
580
|
+
"""
|
|
581
|
+
AssetStatus object.
|
|
582
|
+
|
|
583
|
+
Parameters
|
|
584
|
+
----------
|
|
585
|
+
data: Optional[List[SimpleAsset]]
|
|
586
|
+
|
|
587
|
+
"""
|
|
588
|
+
|
|
589
|
+
data: Optional[List[SimpleAsset]] = Field(
|
|
590
|
+
None,
|
|
591
|
+
description="A dictionary with a data property that contains an array of all Assets and their corresponding current status (`state`).",
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
class AssetType(DataModelBase):
|
|
596
|
+
"""
|
|
597
|
+
AssetType object.
|
|
598
|
+
|
|
599
|
+
Parameters
|
|
600
|
+
----------
|
|
601
|
+
created: Optional[datetime]
|
|
602
|
+
name: Optional[str]
|
|
603
|
+
title: Optional[str]
|
|
604
|
+
updated: Optional[datetime]
|
|
605
|
+
|
|
606
|
+
"""
|
|
607
|
+
|
|
608
|
+
created: Optional[datetime] = Field(
|
|
609
|
+
None,
|
|
610
|
+
description="UTC time when the Asset Type was created, formatted in RFC 3339.",
|
|
611
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
612
|
+
)
|
|
613
|
+
name: Optional[str] = Field(
|
|
614
|
+
None,
|
|
615
|
+
description="Unique identifier `name` for the Asset Type. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
616
|
+
example="beam_pump",
|
|
617
|
+
max_length=64,
|
|
618
|
+
min_length=1,
|
|
619
|
+
)
|
|
620
|
+
title: Optional[str] = Field(
|
|
621
|
+
None, description="Display name (`title`) of the Asset Type.", example="Beam Pump", max_length=64, min_length=1
|
|
622
|
+
)
|
|
623
|
+
updated: Optional[datetime] = Field(
|
|
624
|
+
None,
|
|
625
|
+
description="UTC time when any Asset Type keys were last updated, formatted in RFC 3339.",
|
|
626
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
class WorkloadStatus(DataModelBase):
|
|
631
|
+
"""
|
|
632
|
+
WorkloadStatus object.
|
|
633
|
+
|
|
634
|
+
Parameters
|
|
635
|
+
----------
|
|
636
|
+
last_seen: Optional[datetime]
|
|
637
|
+
message: Optional[str]
|
|
638
|
+
state: Optional[enum.WorkloadStatus]
|
|
639
|
+
warnings: Optional[List[str]]
|
|
640
|
+
|
|
641
|
+
"""
|
|
642
|
+
|
|
643
|
+
last_seen: Optional[datetime] = Field(
|
|
644
|
+
None,
|
|
645
|
+
description="UTC time when the Workload was last seen by the Cloud, formatted in RFC 3339.",
|
|
646
|
+
example="2023-12-18T18:22:18.582724Z",
|
|
647
|
+
)
|
|
648
|
+
message: Optional[str] = Field(
|
|
649
|
+
None, description="Descriptive, human-readable string for `state`.", example="Pending for deploy"
|
|
650
|
+
)
|
|
651
|
+
state: Optional[enum.WorkloadStatus] = Field(
|
|
652
|
+
None, description="Current status of the Workload.", example="pending_deploy"
|
|
653
|
+
)
|
|
654
|
+
warnings: Optional[List[str]] = Field(
|
|
655
|
+
None,
|
|
656
|
+
description="All warnings received for any Workload operations.",
|
|
657
|
+
example=[
|
|
658
|
+
"back-off 5m0s restarting failed container=motor-speed-control-sjfhksdfhks67",
|
|
659
|
+
"back-off 5m0s restarting failed container=gateway",
|
|
660
|
+
],
|
|
661
|
+
max_length=64,
|
|
662
|
+
min_length=1,
|
|
663
|
+
)
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
class Bridge(DataModelBase):
|
|
667
|
+
"""
|
|
668
|
+
Bridge object.
|
|
669
|
+
|
|
670
|
+
Parameters
|
|
671
|
+
----------
|
|
672
|
+
cluster_name: Optional[str]
|
|
673
|
+
created: Optional[datetime]
|
|
674
|
+
enabled: Optional[bool]
|
|
675
|
+
name: Optional[str]
|
|
676
|
+
node_name: Optional[str]
|
|
677
|
+
payload: Optional[AppYaml]
|
|
678
|
+
status: Optional[WorkloadStatus]
|
|
679
|
+
title: Optional[str]
|
|
680
|
+
updated: Optional[datetime]
|
|
681
|
+
workload_name: Optional[str]
|
|
682
|
+
app_name: Optional[str]
|
|
683
|
+
app_version: Optional[str]
|
|
684
|
+
|
|
685
|
+
"""
|
|
686
|
+
|
|
687
|
+
cluster_name: Optional[str] = Field(
|
|
688
|
+
None,
|
|
689
|
+
description="Unique identifier `name` of the Cluster.",
|
|
690
|
+
example="docs-demo-cluster-k3s",
|
|
691
|
+
max_length=64,
|
|
692
|
+
min_length=1,
|
|
693
|
+
)
|
|
694
|
+
created: Optional[datetime] = Field(
|
|
695
|
+
None,
|
|
696
|
+
description="UTC time when the Bridge (Connection) was first created, formatted in RFC 3339.",
|
|
697
|
+
example="2023-12-26T18:22:18.582724Z",
|
|
698
|
+
)
|
|
699
|
+
enabled: Optional[bool] = Field(
|
|
700
|
+
None,
|
|
701
|
+
description="If true, Bridge (Connection) `status` is set to `running` and will process I/O's. If false, Bridge (Connection) `status` is set to `stopped` but remains in Node on the Edge System.",
|
|
702
|
+
example=True,
|
|
703
|
+
)
|
|
704
|
+
name: Optional[str] = Field(
|
|
705
|
+
None,
|
|
706
|
+
description="Unique identifier `name` of the Bridge (Connection).",
|
|
707
|
+
example="motor-plc-opcua-connection",
|
|
708
|
+
max_length=32,
|
|
709
|
+
min_length=1,
|
|
710
|
+
)
|
|
711
|
+
node_name: Optional[str] = Field(
|
|
712
|
+
None,
|
|
713
|
+
description="Unique identifier `name` of the Node in the Cluster hosting the Bridge (Connection).",
|
|
714
|
+
example="docs-demo-node-01",
|
|
715
|
+
max_length=64,
|
|
716
|
+
min_length=1,
|
|
717
|
+
)
|
|
718
|
+
payload: Optional[AppYaml] = Field(
|
|
719
|
+
None,
|
|
720
|
+
description="Dictionary with keys for configuration, language, logging level, metrics mapping, protocol, and system packages. Each key represents specific settings and parameters for the Bridge (Connection).",
|
|
721
|
+
)
|
|
722
|
+
status: Optional[WorkloadStatus] = None
|
|
723
|
+
title: Optional[str] = Field(
|
|
724
|
+
None,
|
|
725
|
+
description="Display name (`title`) of the Bridge (Connection).",
|
|
726
|
+
example="Motor PLC OPCUA Connection",
|
|
727
|
+
max_length=64,
|
|
728
|
+
min_length=1,
|
|
729
|
+
)
|
|
730
|
+
updated: Optional[datetime] = Field(
|
|
731
|
+
None,
|
|
732
|
+
description="UTC time when any Bridge (Connection) keys were last updated, formatted in RFC 3339.",
|
|
733
|
+
example="2023-12-18T18:22:18.582724Z",
|
|
734
|
+
)
|
|
735
|
+
workload_name: Optional[str] = Field(
|
|
736
|
+
None,
|
|
737
|
+
description="Unique identifier `name` of the Workload that the Bridge (Connection) App is deployed as to the Cluster.",
|
|
738
|
+
example="motor-plc-opcua-connection",
|
|
739
|
+
max_length=32,
|
|
740
|
+
min_length=1,
|
|
741
|
+
)
|
|
742
|
+
app_name: Optional[str] = Field(
|
|
743
|
+
None,
|
|
744
|
+
description="Unique identifier `name` of the App. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
745
|
+
example="test-app",
|
|
746
|
+
max_length=64,
|
|
747
|
+
min_length=1,
|
|
748
|
+
)
|
|
749
|
+
app_version: Optional[str] = Field(None, description="App version", example="1.2.0")
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
class ControlChangeFrom(DataModelBase):
|
|
753
|
+
"""
|
|
754
|
+
ControlChangeFrom object.
|
|
755
|
+
|
|
756
|
+
Parameters
|
|
757
|
+
----------
|
|
758
|
+
value: AnyModel
|
|
759
|
+
timestamp: datetime
|
|
760
|
+
|
|
761
|
+
"""
|
|
762
|
+
|
|
763
|
+
value: AnyModel
|
|
764
|
+
timestamp: datetime
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
class ControlChangeReport(DataModelBase):
|
|
768
|
+
"""
|
|
769
|
+
ControlChangeReport object.
|
|
770
|
+
|
|
771
|
+
Parameters
|
|
772
|
+
----------
|
|
773
|
+
value: AnyModel
|
|
774
|
+
timestamp: datetime
|
|
775
|
+
source: enum.ControlChangeSource
|
|
776
|
+
|
|
777
|
+
"""
|
|
778
|
+
|
|
779
|
+
value: AnyModel
|
|
780
|
+
timestamp: datetime
|
|
781
|
+
source: enum.ControlChangeSource
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
class ControlChangeReported(DataModelBase):
|
|
785
|
+
"""
|
|
786
|
+
ControlChangeReported object.
|
|
787
|
+
|
|
788
|
+
Parameters
|
|
789
|
+
----------
|
|
790
|
+
before: Optional[ControlChangeReport]
|
|
791
|
+
after: Optional[ControlChangeReport]
|
|
792
|
+
|
|
793
|
+
"""
|
|
794
|
+
|
|
795
|
+
before: Optional[ControlChangeReport] = None
|
|
796
|
+
after: Optional[ControlChangeReport] = None
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
class DataStreamDataType(DataModelBase):
|
|
800
|
+
"""
|
|
801
|
+
DataStreamDataType object.
|
|
802
|
+
|
|
803
|
+
Parameters
|
|
804
|
+
----------
|
|
805
|
+
created: Optional[datetime]
|
|
806
|
+
name: Optional[str]
|
|
807
|
+
title: Optional[str]
|
|
808
|
+
updated: Optional[datetime]
|
|
809
|
+
|
|
810
|
+
"""
|
|
811
|
+
|
|
812
|
+
created: Optional[datetime] = Field(
|
|
813
|
+
None,
|
|
814
|
+
description="UTC time when the Data Type was first created, formatted in RFC 3339.",
|
|
815
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
816
|
+
)
|
|
817
|
+
name: Optional[str] = Field(
|
|
818
|
+
None, description="Unique identifier `name` of the Data Type.", example="number", max_length=64, min_length=1
|
|
819
|
+
)
|
|
820
|
+
title: Optional[str] = Field(
|
|
821
|
+
None, description="Display name (`title`) of the Data Type.", example="Number", max_length=64, min_length=1
|
|
822
|
+
)
|
|
823
|
+
updated: Optional[datetime] = Field(
|
|
824
|
+
None,
|
|
825
|
+
description="UTC time when any Data Type keys were last updated, formatted in RFC 3339.",
|
|
826
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
class DataStreamSemanticType(DataModelBase):
|
|
831
|
+
"""
|
|
832
|
+
DataStreamSemanticType object.
|
|
833
|
+
|
|
834
|
+
Parameters
|
|
835
|
+
----------
|
|
836
|
+
created: Optional[datetime]
|
|
837
|
+
name: Optional[str]
|
|
838
|
+
title: Optional[str]
|
|
839
|
+
updated: Optional[datetime]
|
|
840
|
+
|
|
841
|
+
"""
|
|
842
|
+
|
|
843
|
+
created: Optional[datetime] = Field(
|
|
844
|
+
None,
|
|
845
|
+
description="UTC time when the Semantic Type was first created, formatted in RFC 3339.",
|
|
846
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
847
|
+
)
|
|
848
|
+
name: Optional[str] = Field(
|
|
849
|
+
None, description="Unique identifier `name` of the Semantic Type.", example="mass_flow_rate"
|
|
850
|
+
)
|
|
851
|
+
title: Optional[str] = Field(
|
|
852
|
+
None,
|
|
853
|
+
description="Display name (`title`) of the Semantic Type.",
|
|
854
|
+
example="Mass Flow Rate",
|
|
855
|
+
max_length=64,
|
|
856
|
+
min_length=1,
|
|
857
|
+
)
|
|
858
|
+
updated: Optional[datetime] = Field(
|
|
859
|
+
None,
|
|
860
|
+
description="UTC time when any Semantic Type keys were last updated, formatted in RFC 3339.",
|
|
861
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
862
|
+
)
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
class Unit(DataModelBase):
|
|
866
|
+
"""
|
|
867
|
+
Unit object.
|
|
868
|
+
|
|
869
|
+
Parameters
|
|
870
|
+
----------
|
|
871
|
+
created: Optional[datetime]
|
|
872
|
+
name: Optional[str]
|
|
873
|
+
symbol: Optional[str]
|
|
874
|
+
title: Optional[str]
|
|
875
|
+
updated: Optional[datetime]
|
|
876
|
+
|
|
877
|
+
"""
|
|
878
|
+
|
|
879
|
+
created: Optional[datetime] = Field(
|
|
880
|
+
None,
|
|
881
|
+
description="UTC time when the Unit was first created, formatted in RFC 3339.",
|
|
882
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
883
|
+
)
|
|
884
|
+
name: Optional[str] = Field(
|
|
885
|
+
None,
|
|
886
|
+
description="Unique identifier `name` of the Unit.",
|
|
887
|
+
example="degree_fahrenheit",
|
|
888
|
+
max_length=64,
|
|
889
|
+
min_length=1,
|
|
890
|
+
)
|
|
891
|
+
symbol: Optional[str] = Field(
|
|
892
|
+
None,
|
|
893
|
+
description="A brief and precise character or set of characters that symbolize a specific measurement of the Unit.",
|
|
894
|
+
example="°F",
|
|
895
|
+
max_length=16,
|
|
896
|
+
min_length=1,
|
|
897
|
+
)
|
|
898
|
+
title: Optional[str] = Field(
|
|
899
|
+
None,
|
|
900
|
+
description="Display name (`title`) of the Unit.",
|
|
901
|
+
example="Degree Fahrenheit",
|
|
902
|
+
max_length=64,
|
|
903
|
+
min_length=1,
|
|
904
|
+
)
|
|
905
|
+
updated: Optional[datetime] = Field(
|
|
906
|
+
None,
|
|
907
|
+
description="UTC time when any Unit keys were last updated, formatted in RFC 3339.",
|
|
908
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
909
|
+
)
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
class Context(BaseModelRoot[str]):
|
|
913
|
+
"""
|
|
914
|
+
Context object.
|
|
915
|
+
|
|
916
|
+
Parameters
|
|
917
|
+
----------
|
|
918
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
919
|
+
|
|
920
|
+
"""
|
|
921
|
+
|
|
922
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
class DataTag(DataModelBase):
|
|
926
|
+
"""
|
|
927
|
+
DataTag object.
|
|
928
|
+
|
|
929
|
+
Parameters
|
|
930
|
+
----------
|
|
931
|
+
id: Optional[UUID]
|
|
932
|
+
start_date: Optional[datetime]
|
|
933
|
+
end_date: Optional[datetime]
|
|
934
|
+
tag_name: Optional[str]
|
|
935
|
+
resource: Optional[str]
|
|
936
|
+
source: Optional[str]
|
|
937
|
+
description: Optional[str]
|
|
938
|
+
contexts: Optional[List[Context]]
|
|
939
|
+
created: Optional[datetime]
|
|
940
|
+
updated: Optional[datetime]
|
|
941
|
+
|
|
942
|
+
"""
|
|
943
|
+
|
|
944
|
+
id: Optional[UUID] = Field(
|
|
945
|
+
None,
|
|
946
|
+
description="A unique random generated UUID as the key `id` for the Data Tag.",
|
|
947
|
+
example="0002bc79-b42f-461b-95d6-cf0a28ba87aa",
|
|
948
|
+
)
|
|
949
|
+
start_date: Optional[datetime] = Field(
|
|
950
|
+
None,
|
|
951
|
+
description="Start date for the Data Tag. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
952
|
+
example="2024-02-06T18:22:18.582724Z",
|
|
953
|
+
)
|
|
954
|
+
end_date: Optional[datetime] = Field(
|
|
955
|
+
None,
|
|
956
|
+
description="End date for the Data Tag. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
957
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
958
|
+
)
|
|
959
|
+
tag_name: Optional[str] = Field(
|
|
960
|
+
None, description="Tag name to categorize the Data Tag", example="Valve Change", max_length=64, min_length=1
|
|
961
|
+
)
|
|
962
|
+
resource: Optional[str] = Field(
|
|
963
|
+
None,
|
|
964
|
+
description="The Asset that this Data Tag is related to.",
|
|
965
|
+
example="krn:asset:well_01",
|
|
966
|
+
max_length=256,
|
|
967
|
+
min_length=1,
|
|
968
|
+
)
|
|
969
|
+
source: Optional[str] = Field(
|
|
970
|
+
None,
|
|
971
|
+
description="The process that created this Data Tag. This can be a user or an automated process like a workload, application, etc.",
|
|
972
|
+
example="krn:wlappv:cluster1/app1/1.2.0",
|
|
973
|
+
max_length=256,
|
|
974
|
+
min_length=1,
|
|
975
|
+
)
|
|
976
|
+
description: Optional[str] = Field(
|
|
977
|
+
None,
|
|
978
|
+
description="Detailed description of the Data Tag.",
|
|
979
|
+
example="A Valve was changed today.",
|
|
980
|
+
max_length=256,
|
|
981
|
+
min_length=1,
|
|
982
|
+
)
|
|
983
|
+
contexts: Optional[List[Context]] = Field(
|
|
984
|
+
None,
|
|
985
|
+
description="A list of associated resources with this Data Tag. This can be a datastream, application or any other valid resource in the Kelvin Platform.",
|
|
986
|
+
example=["krn:datastream:temperature", "krn:appversion:smart-pcp/2.0.0"],
|
|
987
|
+
)
|
|
988
|
+
created: Optional[datetime] = Field(
|
|
989
|
+
None,
|
|
990
|
+
description="UTC time when the Data Tag was created, formatted in RFC 3339.",
|
|
991
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
992
|
+
)
|
|
993
|
+
updated: Optional[datetime] = Field(
|
|
994
|
+
None,
|
|
995
|
+
description="UTC time when any Data Tag keys were last updated, formatted in RFC 3339.",
|
|
996
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
997
|
+
)
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
class Tag(DataModelBase):
|
|
1001
|
+
"""
|
|
1002
|
+
Tag object.
|
|
1003
|
+
|
|
1004
|
+
Parameters
|
|
1005
|
+
----------
|
|
1006
|
+
name: Optional[str]
|
|
1007
|
+
metadata: Optional[Dict[str, Any]]
|
|
1008
|
+
created: Optional[datetime]
|
|
1009
|
+
updated: Optional[datetime]
|
|
1010
|
+
|
|
1011
|
+
"""
|
|
1012
|
+
|
|
1013
|
+
name: Optional[str] = Field(None, description="Tag name", example="Valve Change", max_length=64, min_length=1)
|
|
1014
|
+
metadata: Optional[Dict[str, Any]] = Field(
|
|
1015
|
+
None,
|
|
1016
|
+
description="Detailed Attributes of the Tag. The structure of the `metadata` object can have any key/value structure and will depend on the required properties of the Tag.",
|
|
1017
|
+
)
|
|
1018
|
+
created: Optional[datetime] = Field(
|
|
1019
|
+
None,
|
|
1020
|
+
description="UTC time when the Data Tag was created, formatted in RFC 3339.",
|
|
1021
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
1022
|
+
)
|
|
1023
|
+
updated: Optional[datetime] = Field(
|
|
1024
|
+
None,
|
|
1025
|
+
description="UTC time when any Data Tag keys were last updated, formatted in RFC 3339.",
|
|
1026
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
1027
|
+
)
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
class FileStorage(DataModelBase):
|
|
1031
|
+
"""
|
|
1032
|
+
FileStorage object.
|
|
1033
|
+
|
|
1034
|
+
Parameters
|
|
1035
|
+
----------
|
|
1036
|
+
file_id: Optional[str]
|
|
1037
|
+
file_name: Optional[str]
|
|
1038
|
+
file_size: Optional[int]
|
|
1039
|
+
checksum: Optional[str]
|
|
1040
|
+
source: Optional[str]
|
|
1041
|
+
created: Optional[datetime]
|
|
1042
|
+
metadata: Optional[Dict[str, Any]]
|
|
1043
|
+
|
|
1044
|
+
"""
|
|
1045
|
+
|
|
1046
|
+
file_id: Optional[str] = Field(
|
|
1047
|
+
None, description="Generated UUID for a file", example="50FDD765-DBD7-4C7C-844D-E6211C9CD9E7"
|
|
1048
|
+
)
|
|
1049
|
+
file_name: Optional[str] = Field(
|
|
1050
|
+
None, description="Actual file name", example="test.csv", max_length=128, min_length=1
|
|
1051
|
+
)
|
|
1052
|
+
file_size: Optional[int] = Field(None, description="File size in bytes", example=300)
|
|
1053
|
+
checksum: Optional[str] = Field(
|
|
1054
|
+
None,
|
|
1055
|
+
description="File SHA256 checksum",
|
|
1056
|
+
example="e07de9b7a1788fe439bd1d9a114d1a3ee4eb5b29f8a9e11057f7c31d718c5614",
|
|
1057
|
+
)
|
|
1058
|
+
source: Optional[str] = Field(None, description="Resource that uploaded the file", example="krn:user:user1")
|
|
1059
|
+
created: Optional[datetime] = Field(
|
|
1060
|
+
None,
|
|
1061
|
+
description="UTC time representing when the file was uploaded, formatted in RFC 3339.",
|
|
1062
|
+
example="2024-02-20T22:22:18.582724Z",
|
|
1063
|
+
)
|
|
1064
|
+
metadata: Optional[Dict[str, Any]] = Field(
|
|
1065
|
+
None,
|
|
1066
|
+
description="A free-form JSON object representing the files metadata",
|
|
1067
|
+
example={"property1": True, "property2": 2},
|
|
1068
|
+
)
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
class InstanceSettingsAppManagerPlannerRules(DataModelBase):
|
|
1072
|
+
"""
|
|
1073
|
+
InstanceSettingsAppManagerPlannerRules object.
|
|
1074
|
+
|
|
1075
|
+
Parameters
|
|
1076
|
+
----------
|
|
1077
|
+
name: Optional[str]
|
|
1078
|
+
created: Optional[datetime]
|
|
1079
|
+
updated: Optional[datetime]
|
|
1080
|
+
payload: AppManagerAppPlannerRules
|
|
1081
|
+
|
|
1082
|
+
"""
|
|
1083
|
+
|
|
1084
|
+
name: Optional[str] = Field(
|
|
1085
|
+
None,
|
|
1086
|
+
description="The name of the instance setting. This value is always the same as this endpoint only accesses this setting.",
|
|
1087
|
+
)
|
|
1088
|
+
created: Optional[datetime] = Field(None, description="Date and time at which the planner rule was created.")
|
|
1089
|
+
updated: Optional[datetime] = Field(None, description="Date and time at which the planner rule was last updated.")
|
|
1090
|
+
payload: AppManagerAppPlannerRules
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
class InstanceSettings(DataModelBase):
|
|
1094
|
+
"""
|
|
1095
|
+
InstanceSettings object.
|
|
1096
|
+
|
|
1097
|
+
Parameters
|
|
1098
|
+
----------
|
|
1099
|
+
created: Optional[datetime]
|
|
1100
|
+
name: Optional[str]
|
|
1101
|
+
payload: Optional[Dict[str, Any]]
|
|
1102
|
+
updated: Optional[datetime]
|
|
1103
|
+
|
|
1104
|
+
"""
|
|
1105
|
+
|
|
1106
|
+
created: Optional[datetime] = Field(
|
|
1107
|
+
None,
|
|
1108
|
+
description="UTC time when the Instance Setting was first created, formatted in RFC 3339.",
|
|
1109
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
1110
|
+
)
|
|
1111
|
+
name: Optional[str] = Field(
|
|
1112
|
+
None,
|
|
1113
|
+
description="Unique identifier `name` of the Instance Setting.",
|
|
1114
|
+
example="core.ui.datastreams.asset-type.groups",
|
|
1115
|
+
max_length=64,
|
|
1116
|
+
min_length=1,
|
|
1117
|
+
)
|
|
1118
|
+
payload: Optional[Dict[str, Any]] = Field(
|
|
1119
|
+
None,
|
|
1120
|
+
description="The Instance Settings. The structure of this `payload` object depends on the type of Instance Setting being defined.",
|
|
1121
|
+
)
|
|
1122
|
+
updated: Optional[datetime] = Field(
|
|
1123
|
+
None,
|
|
1124
|
+
description="UTC time when any Instance Settings keys were last updated, formatted in RFC 3339.",
|
|
1125
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1126
|
+
)
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
class StateModel(Enum):
|
|
1130
|
+
downloading = "downloading"
|
|
1131
|
+
ready = "ready"
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
class UpgradeStatus(DataModelBase):
|
|
1135
|
+
"""
|
|
1136
|
+
UpgradeStatus object.
|
|
1137
|
+
|
|
1138
|
+
Parameters
|
|
1139
|
+
----------
|
|
1140
|
+
message: Optional[str]
|
|
1141
|
+
state: Optional[StateModel]
|
|
1142
|
+
|
|
1143
|
+
"""
|
|
1144
|
+
|
|
1145
|
+
message: Optional[str] = Field(
|
|
1146
|
+
None, description="Any feedback messages about the current upgrade process.", example=""
|
|
1147
|
+
)
|
|
1148
|
+
state: Optional[StateModel] = Field(
|
|
1149
|
+
None, description="Current state of the upgrade process.", example="downloading"
|
|
1150
|
+
)
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
class VersionModel(DataModelBase):
|
|
1154
|
+
"""
|
|
1155
|
+
VersionModel object.
|
|
1156
|
+
|
|
1157
|
+
Parameters
|
|
1158
|
+
----------
|
|
1159
|
+
k8s_version: Optional[str]
|
|
1160
|
+
kelvin_version: Optional[str]
|
|
1161
|
+
|
|
1162
|
+
"""
|
|
1163
|
+
|
|
1164
|
+
k8s_version: Optional[str] = Field(
|
|
1165
|
+
None,
|
|
1166
|
+
description="Current version of k8s installed on the Cluster.",
|
|
1167
|
+
example="v1.24.10+k3s1",
|
|
1168
|
+
max_length=64,
|
|
1169
|
+
min_length=1,
|
|
1170
|
+
)
|
|
1171
|
+
kelvin_version: Optional[str] = Field(
|
|
1172
|
+
None,
|
|
1173
|
+
description="Current version of Kelvin Software installed on the Cluster.",
|
|
1174
|
+
example="4.0.0-rc2024.519",
|
|
1175
|
+
max_length=64,
|
|
1176
|
+
min_length=1,
|
|
1177
|
+
)
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
class OrchestrationCluster(DataModelBase):
|
|
1181
|
+
"""
|
|
1182
|
+
OrchestrationCluster object.
|
|
1183
|
+
|
|
1184
|
+
Parameters
|
|
1185
|
+
----------
|
|
1186
|
+
created: Optional[datetime]
|
|
1187
|
+
forward_logs_buffer_size: Optional[int]
|
|
1188
|
+
forward_logs_enabled: Optional[bool]
|
|
1189
|
+
join_script: Optional[str]
|
|
1190
|
+
last_seen: Optional[datetime]
|
|
1191
|
+
manifests_scrape_enabled: Optional[bool]
|
|
1192
|
+
manifests_scrape_interval: Optional[int]
|
|
1193
|
+
name: Optional[str]
|
|
1194
|
+
provision_script: Optional[str]
|
|
1195
|
+
ready: Optional[bool]
|
|
1196
|
+
service_account_token: Optional[str]
|
|
1197
|
+
sync_scrape_interval: Optional[int]
|
|
1198
|
+
telemetry_buffer_size: Optional[int]
|
|
1199
|
+
telemetry_enabled: Optional[bool]
|
|
1200
|
+
telemetry_scrape_interval: Optional[int]
|
|
1201
|
+
title: Optional[str]
|
|
1202
|
+
type: Optional[enum.ClusterType]
|
|
1203
|
+
updated: Optional[datetime]
|
|
1204
|
+
upgrade_instantly_apply: Optional[bool]
|
|
1205
|
+
upgrade_pre_download: Optional[bool]
|
|
1206
|
+
upgrade_status: Optional[UpgradeStatus]
|
|
1207
|
+
version: Optional[VersionModel]
|
|
1208
|
+
|
|
1209
|
+
"""
|
|
1210
|
+
|
|
1211
|
+
created: Optional[datetime] = Field(
|
|
1212
|
+
None,
|
|
1213
|
+
description="UTC time when the Cluster was created, formatted in RFC 3339.",
|
|
1214
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1215
|
+
)
|
|
1216
|
+
forward_logs_buffer_size: Optional[int] = Field(
|
|
1217
|
+
5,
|
|
1218
|
+
description="Size in gigabytes of the log storage in the Cluster when Cluster is offline. Any setting changes will delete all logs not yet transferred from the Cluster to Cloud.",
|
|
1219
|
+
example=10,
|
|
1220
|
+
ge=1,
|
|
1221
|
+
le=20,
|
|
1222
|
+
)
|
|
1223
|
+
forward_logs_enabled: Optional[bool] = Field(
|
|
1224
|
+
True,
|
|
1225
|
+
description="Enable offline storage in the Cluster for log retention; transfers logs when Cluster is next online.",
|
|
1226
|
+
example=True,
|
|
1227
|
+
)
|
|
1228
|
+
join_script: Optional[str] = None
|
|
1229
|
+
last_seen: Optional[datetime] = Field(
|
|
1230
|
+
None,
|
|
1231
|
+
description="UTC time when the Cluster was last seen by the Cloud, formatted in RFC 3339.",
|
|
1232
|
+
example="2023-12-18T18:22:18.582724Z",
|
|
1233
|
+
)
|
|
1234
|
+
manifests_scrape_enabled: Optional[bool] = Field(
|
|
1235
|
+
True, description="Enable auto update Kelvin Software running on the Cluster.", example=True
|
|
1236
|
+
)
|
|
1237
|
+
manifests_scrape_interval: Optional[int] = Field(
|
|
1238
|
+
86400,
|
|
1239
|
+
description="Frequency in seconds for checking updates in the Cloud for Kelvin Software running on the Cluster.",
|
|
1240
|
+
example=3600,
|
|
1241
|
+
ge=30,
|
|
1242
|
+
le=86400,
|
|
1243
|
+
)
|
|
1244
|
+
name: Optional[str] = Field(
|
|
1245
|
+
None,
|
|
1246
|
+
description="Unique identifier key `name` of the Cluster.",
|
|
1247
|
+
example="aws-cluster",
|
|
1248
|
+
max_length=64,
|
|
1249
|
+
min_length=1,
|
|
1250
|
+
)
|
|
1251
|
+
provision_script: Optional[str] = Field(
|
|
1252
|
+
None,
|
|
1253
|
+
description="Provision script required to install the Kelvin Software at the edge.",
|
|
1254
|
+
example="bash <(curl -sfS https://{URL}/provision) --service-account bm9kZS1jbGllbnQt...",
|
|
1255
|
+
)
|
|
1256
|
+
ready: Optional[bool] = Field(
|
|
1257
|
+
None, description="Setting to inform Kelvin UI if the Cluster is ready.", example=True
|
|
1258
|
+
)
|
|
1259
|
+
service_account_token: Optional[str] = Field(
|
|
1260
|
+
None,
|
|
1261
|
+
description="Service account token for automated processes to authenticate with when performing actions in the Cluster.",
|
|
1262
|
+
example="bm9kZS1jbGll ... Uk4wWFBqbTY3Rml2ejM=",
|
|
1263
|
+
max_length=64,
|
|
1264
|
+
min_length=1,
|
|
1265
|
+
)
|
|
1266
|
+
sync_scrape_interval: Optional[int] = Field(
|
|
1267
|
+
30,
|
|
1268
|
+
description="Frequency in seconds that the Cluster checks for new changes to apply to Workloads or Applications (deploy, start, stop, etc.)",
|
|
1269
|
+
example=3600,
|
|
1270
|
+
ge=10,
|
|
1271
|
+
le=86400,
|
|
1272
|
+
)
|
|
1273
|
+
telemetry_buffer_size: Optional[int] = Field(
|
|
1274
|
+
5,
|
|
1275
|
+
description="Size in gigabytes of telemetry data storage in the Cluster when the Cluster is offline. Any setting changes will delete all logs not yet transferred from the Cluster to Cloud.",
|
|
1276
|
+
example=10,
|
|
1277
|
+
ge=1,
|
|
1278
|
+
le=20,
|
|
1279
|
+
)
|
|
1280
|
+
telemetry_enabled: Optional[bool] = Field(
|
|
1281
|
+
True,
|
|
1282
|
+
description="Enable offline storage in the Cluster for telemetry data retention; transfers data when the Cluster is next online.",
|
|
1283
|
+
)
|
|
1284
|
+
telemetry_scrape_interval: Optional[int] = Field(
|
|
1285
|
+
30,
|
|
1286
|
+
description="Time interval in seconds to save each telemetry data. Any setting changes will delete all data not yet transferred from the Cluster to Cloud.",
|
|
1287
|
+
example=60,
|
|
1288
|
+
ge=1,
|
|
1289
|
+
le=3600,
|
|
1290
|
+
)
|
|
1291
|
+
title: Optional[str] = Field(
|
|
1292
|
+
None, description="Display name (`title`) of the Cluster.", example="AWS Cluster", max_length=64, min_length=1
|
|
1293
|
+
)
|
|
1294
|
+
type: Optional[enum.ClusterType] = Field(None, description="Type of Cluster deployed.")
|
|
1295
|
+
updated: Optional[datetime] = Field(
|
|
1296
|
+
None,
|
|
1297
|
+
description="UTC time when any Cluster keys were last updated, formatted in RFC 3339.",
|
|
1298
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1299
|
+
)
|
|
1300
|
+
upgrade_instantly_apply: Optional[bool] = Field(
|
|
1301
|
+
None,
|
|
1302
|
+
description="Option if upgrades should be applied automatically and instantly as soon as they are available in the Cluster.",
|
|
1303
|
+
example=True,
|
|
1304
|
+
)
|
|
1305
|
+
upgrade_pre_download: Optional[bool] = Field(
|
|
1306
|
+
None,
|
|
1307
|
+
description="Option for pre-downloading new Workloads or Application upgrades to the Cluster. Actual upgrade initiation requires manual action or having `instantly_apply` set to true.",
|
|
1308
|
+
example=True,
|
|
1309
|
+
)
|
|
1310
|
+
upgrade_status: Optional[UpgradeStatus] = Field(
|
|
1311
|
+
None, description="Current status and messages for any ongoing updates to the Cluster."
|
|
1312
|
+
)
|
|
1313
|
+
version: Optional[VersionModel] = Field(
|
|
1314
|
+
None, description="Current versions of the different core component software installed on the Cluster."
|
|
1315
|
+
)
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
class KeyValue(BaseModelRoot[Optional[Dict[str, str]]]):
|
|
1319
|
+
"""
|
|
1320
|
+
KeyValue object.
|
|
1321
|
+
|
|
1322
|
+
Parameters
|
|
1323
|
+
----------
|
|
1324
|
+
__root__: Optional[Dict[str, str]] = None
|
|
1325
|
+
|
|
1326
|
+
"""
|
|
1327
|
+
|
|
1328
|
+
__root__: Optional[Dict[str, str]] = None
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
class ParameterValue(DataModelBase):
|
|
1332
|
+
"""
|
|
1333
|
+
ParameterValue object.
|
|
1334
|
+
|
|
1335
|
+
Parameters
|
|
1336
|
+
----------
|
|
1337
|
+
name: str
|
|
1338
|
+
comment: Optional[str]
|
|
1339
|
+
value: Union[float, str, bool]
|
|
1340
|
+
|
|
1341
|
+
"""
|
|
1342
|
+
|
|
1343
|
+
name: str = Field(..., description="Parameter name")
|
|
1344
|
+
comment: Optional[str] = Field(None, description="Comment regarding the parameter change action")
|
|
1345
|
+
value: Union[float, str, bool]
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
class ResourceParameters(DataModelBase):
|
|
1349
|
+
"""
|
|
1350
|
+
ResourceParameters object.
|
|
1351
|
+
|
|
1352
|
+
Parameters
|
|
1353
|
+
----------
|
|
1354
|
+
resource: str
|
|
1355
|
+
parameters: List[ParameterValue]
|
|
1356
|
+
|
|
1357
|
+
"""
|
|
1358
|
+
|
|
1359
|
+
resource: str = Field(
|
|
1360
|
+
..., description="The target resource to which the parameters are to be applied", max_length=256, min_length=1
|
|
1361
|
+
)
|
|
1362
|
+
parameters: List[ParameterValue]
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
class RecommendationControlChange(DataModelBase):
|
|
1366
|
+
"""
|
|
1367
|
+
RecommendationControlChange object.
|
|
1368
|
+
|
|
1369
|
+
Parameters
|
|
1370
|
+
----------
|
|
1371
|
+
control_change_id: Optional[UUID]
|
|
1372
|
+
expiration_date: Optional[datetime]
|
|
1373
|
+
payload: Dict[str, Any]
|
|
1374
|
+
resource: str
|
|
1375
|
+
retries: Optional[int]
|
|
1376
|
+
timeout: Optional[int]
|
|
1377
|
+
trace_id: Optional[UUID]
|
|
1378
|
+
from_: Optional[ControlChangeFrom]
|
|
1379
|
+
|
|
1380
|
+
"""
|
|
1381
|
+
|
|
1382
|
+
control_change_id: Optional[UUID] = Field(
|
|
1383
|
+
None,
|
|
1384
|
+
description="Unique identifier id for the Control Change request. This will only be returned when the Recommendation state is `applied` where the actions have been created and an id registered on the Server.",
|
|
1385
|
+
example="0002bc79-b42f-461b-95d6-cf0a28ba87aa",
|
|
1386
|
+
)
|
|
1387
|
+
expiration_date: Optional[datetime] = Field(
|
|
1388
|
+
None,
|
|
1389
|
+
description="UTC time when any the Control Change initiated will expire and the `status` automatically marked as `failed`, formatted in RFC 3339.",
|
|
1390
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1391
|
+
)
|
|
1392
|
+
payload: Dict[str, Any] = Field(
|
|
1393
|
+
..., description="Control Change data to write to the Asset / Data Stream pair.</p>", example={"value": 88}
|
|
1394
|
+
)
|
|
1395
|
+
resource: str = Field(
|
|
1396
|
+
...,
|
|
1397
|
+
description="The asset / data stream pair that this Control Change will be applied to.",
|
|
1398
|
+
example="krn:ad:bp_16/motor_speed_setpoint",
|
|
1399
|
+
max_length=256,
|
|
1400
|
+
min_length=1,
|
|
1401
|
+
)
|
|
1402
|
+
retries: Optional[int] = Field(
|
|
1403
|
+
0,
|
|
1404
|
+
description="Number of retry attempts to write the Control Change to the Bridge until a `processed` acknowledgment is received from the Bridge. If number of attempts exceeds `retries` then the Control Change Manager updates the Control Change key `state` with the value `failed`.",
|
|
1405
|
+
example=3,
|
|
1406
|
+
)
|
|
1407
|
+
timeout: Optional[int] = Field(
|
|
1408
|
+
300,
|
|
1409
|
+
description="Time in seconds the Control Change Manager will wait after sending the Control Change for the Bridge to send a `processed` acknowledgement reply before retry sending the Control Change.",
|
|
1410
|
+
example=600,
|
|
1411
|
+
)
|
|
1412
|
+
trace_id: Optional[UUID] = Field(
|
|
1413
|
+
None,
|
|
1414
|
+
description="Unique identifier id for the Control Change request.",
|
|
1415
|
+
example="0002bc79-b42f-461b-95d6-cf0a28ba87aa",
|
|
1416
|
+
)
|
|
1417
|
+
from_: Optional[ControlChangeFrom] = Field(None, alias="from")
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
class RecommendationActions(DataModelBase):
|
|
1421
|
+
"""
|
|
1422
|
+
RecommendationActions object.
|
|
1423
|
+
|
|
1424
|
+
Parameters
|
|
1425
|
+
----------
|
|
1426
|
+
control_changes: Optional[List[RecommendationControlChange]]
|
|
1427
|
+
|
|
1428
|
+
"""
|
|
1429
|
+
|
|
1430
|
+
control_changes: Optional[List[RecommendationControlChange]] = Field(
|
|
1431
|
+
None,
|
|
1432
|
+
description="An array of objects with Control Change information. If the Recommendation is `pending`, it will display creation information or if the Recommendation is `accepted` or `applied` it will show the Control Change status. Each Control Change does not need to be related to the `resource` of the Recommendation.",
|
|
1433
|
+
)
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
class RecommendationActionStatus(DataModelBase):
|
|
1437
|
+
"""
|
|
1438
|
+
RecommendationActionStatus object.
|
|
1439
|
+
|
|
1440
|
+
Parameters
|
|
1441
|
+
----------
|
|
1442
|
+
message: Optional[str]
|
|
1443
|
+
success: Optional[bool]
|
|
1444
|
+
|
|
1445
|
+
"""
|
|
1446
|
+
|
|
1447
|
+
message: Optional[str] = Field(
|
|
1448
|
+
None,
|
|
1449
|
+
description="If `success` is `true`, this contains a message of the action that has been performed. If `success` is `false`, this contains information why it failed.",
|
|
1450
|
+
example="Recommendation actions implemented",
|
|
1451
|
+
max_length=256,
|
|
1452
|
+
min_length=1,
|
|
1453
|
+
)
|
|
1454
|
+
success: Optional[bool] = Field(
|
|
1455
|
+
None,
|
|
1456
|
+
description="Response to signify if the actions have been initiated. `true` means the actions have been initiated and `false` means the actions failed to be initialized. This does not mean the actions have been completed successfully and you still need to followup monitoring each initiated action separately.",
|
|
1457
|
+
example=True,
|
|
1458
|
+
)
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
class RecommendationLog(DataModelBase):
|
|
1462
|
+
"""
|
|
1463
|
+
RecommendationLog object.
|
|
1464
|
+
|
|
1465
|
+
Parameters
|
|
1466
|
+
----------
|
|
1467
|
+
created_at: Optional[datetime]
|
|
1468
|
+
email_list: Optional[List[EmailStr]]
|
|
1469
|
+
message: Optional[str]
|
|
1470
|
+
source: Optional[str]
|
|
1471
|
+
state: Optional[enum.RecommendationState]
|
|
1472
|
+
|
|
1473
|
+
"""
|
|
1474
|
+
|
|
1475
|
+
created_at: Optional[datetime] = Field(
|
|
1476
|
+
None,
|
|
1477
|
+
description="UTC time when the log entry for the Recommendation was created, formatted in RFC 3339.",
|
|
1478
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1479
|
+
)
|
|
1480
|
+
email_list: Optional[List[EmailStr]] = Field(
|
|
1481
|
+
None, description="Future feature.", example=["richard.teo@kelvininc.com", "user@example.com"]
|
|
1482
|
+
)
|
|
1483
|
+
message: Optional[str] = Field(
|
|
1484
|
+
None,
|
|
1485
|
+
description="A custom message related to the Recommendation or any actions that are taken.",
|
|
1486
|
+
example=" Recommendation accepted by Operator.",
|
|
1487
|
+
)
|
|
1488
|
+
source: Optional[str] = Field(
|
|
1489
|
+
None,
|
|
1490
|
+
description="The process that created this Recommendation. This can be a user or an automated process like a workload, application, etc.",
|
|
1491
|
+
example="krn:wlappv:aws-cluster/humidity-optimizer/1.1.0",
|
|
1492
|
+
max_length=256,
|
|
1493
|
+
min_length=1,
|
|
1494
|
+
)
|
|
1495
|
+
state: Optional[enum.RecommendationState] = Field(
|
|
1496
|
+
None, description="State of the Recommendation when the log was created."
|
|
1497
|
+
)
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
class Recommendation(DataModelBase):
|
|
1501
|
+
"""
|
|
1502
|
+
Recommendation object.
|
|
1503
|
+
|
|
1504
|
+
Parameters
|
|
1505
|
+
----------
|
|
1506
|
+
actions: Optional[RecommendationActions]
|
|
1507
|
+
confidence: Optional[int]
|
|
1508
|
+
created: Optional[datetime]
|
|
1509
|
+
custom_identifier: Optional[str]
|
|
1510
|
+
description: Optional[str]
|
|
1511
|
+
expiration_date: Optional[datetime]
|
|
1512
|
+
id: Optional[UUID]
|
|
1513
|
+
logs: Optional[List[RecommendationLog]]
|
|
1514
|
+
metadata: Optional[Dict[str, Any]]
|
|
1515
|
+
resource: Optional[str]
|
|
1516
|
+
resource_parameters: Optional[Dict[str, Any]]
|
|
1517
|
+
source: Optional[str]
|
|
1518
|
+
state: Optional[enum.RecommendationState]
|
|
1519
|
+
type: Optional[str]
|
|
1520
|
+
type_title: Optional[str]
|
|
1521
|
+
updated: Optional[datetime]
|
|
1522
|
+
|
|
1523
|
+
"""
|
|
1524
|
+
|
|
1525
|
+
actions: Optional[RecommendationActions] = None
|
|
1526
|
+
confidence: Optional[int] = Field(
|
|
1527
|
+
None,
|
|
1528
|
+
description="Confidence level of the Recommendation. This is usually, but not mandatory, related to any machine learning model confidence results.",
|
|
1529
|
+
example=7,
|
|
1530
|
+
ge=-2147483648,
|
|
1531
|
+
le=2147483647,
|
|
1532
|
+
)
|
|
1533
|
+
created: Optional[datetime] = Field(
|
|
1534
|
+
None,
|
|
1535
|
+
description="UTC time when the Recommendation was created, formatted in RFC 3339.",
|
|
1536
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1537
|
+
)
|
|
1538
|
+
custom_identifier: Optional[str] = Field(
|
|
1539
|
+
None, description="An optional custom identifier for any purpose.", example="model-aws-ltsm-anomaly"
|
|
1540
|
+
)
|
|
1541
|
+
description: Optional[str] = Field(
|
|
1542
|
+
None,
|
|
1543
|
+
description="Detailed description of the Recommendation.",
|
|
1544
|
+
example="Beam pump speed AI optimizer application recommends a new value for the speed setpoint of the controller.",
|
|
1545
|
+
max_length=256,
|
|
1546
|
+
min_length=1,
|
|
1547
|
+
)
|
|
1548
|
+
expiration_date: Optional[datetime] = Field(
|
|
1549
|
+
None,
|
|
1550
|
+
description="UTC time when any the Recommendation will expire and the `status` automatically marked as `expired`, formatted in RFC 3339. The operator will not be able to take any further actions on this Recommendation. If no date is given, then the Recommendation will never expire.",
|
|
1551
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1552
|
+
)
|
|
1553
|
+
id: Optional[UUID] = Field(
|
|
1554
|
+
None,
|
|
1555
|
+
description="A unique random generated UUID as the key `id` for the Recommendation.",
|
|
1556
|
+
example="0002bc79-b42f-461b-95d6-cf0a28ba87aa",
|
|
1557
|
+
)
|
|
1558
|
+
logs: Optional[List[RecommendationLog]] = Field(
|
|
1559
|
+
None, description="A date ordered list of the updates performed on this Recommendation."
|
|
1560
|
+
)
|
|
1561
|
+
metadata: Optional[Dict[str, Any]] = Field(
|
|
1562
|
+
None,
|
|
1563
|
+
description="Custom dictionary keys/values for use by clients for anything useful and related to the Recommendation.",
|
|
1564
|
+
)
|
|
1565
|
+
resource: Optional[str] = Field(
|
|
1566
|
+
None,
|
|
1567
|
+
description="The asset that this Recommendation is related to.",
|
|
1568
|
+
example="krn:asset:bp_16",
|
|
1569
|
+
max_length=256,
|
|
1570
|
+
min_length=1,
|
|
1571
|
+
)
|
|
1572
|
+
resource_parameters: Optional[Dict[str, Any]] = Field(None, description="resource_parameters")
|
|
1573
|
+
source: Optional[str] = Field(
|
|
1574
|
+
None,
|
|
1575
|
+
description="The process that created or last updated this Recommendation. This can be a user or an automated process like a workload, application, etc.",
|
|
1576
|
+
example="krn:wlappv:cluster1/app1/1.2.0",
|
|
1577
|
+
max_length=256,
|
|
1578
|
+
min_length=1,
|
|
1579
|
+
)
|
|
1580
|
+
state: Optional[enum.RecommendationState] = Field(None, description="Current `state` of the Recommendation.")
|
|
1581
|
+
type: Optional[str] = Field(
|
|
1582
|
+
None,
|
|
1583
|
+
description="The Recommendation Type `name` associated with the Recommendation.",
|
|
1584
|
+
example="decrease_speed",
|
|
1585
|
+
max_length=64,
|
|
1586
|
+
min_length=1,
|
|
1587
|
+
)
|
|
1588
|
+
type_title: Optional[str] = Field(
|
|
1589
|
+
None,
|
|
1590
|
+
description="The Recommendation Type `title` of its `name` associated with the Recommendation.",
|
|
1591
|
+
example="Decrease Speed",
|
|
1592
|
+
max_length=64,
|
|
1593
|
+
min_length=1,
|
|
1594
|
+
)
|
|
1595
|
+
updated: Optional[datetime] = Field(
|
|
1596
|
+
None,
|
|
1597
|
+
description="UTC time when any Recommendation keys were last updated, formatted in RFC 3339.",
|
|
1598
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1599
|
+
)
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
class RecommendationType(DataModelBase):
|
|
1603
|
+
"""
|
|
1604
|
+
RecommendationType object.
|
|
1605
|
+
|
|
1606
|
+
Parameters
|
|
1607
|
+
----------
|
|
1608
|
+
created_at: Optional[datetime]
|
|
1609
|
+
description: Optional[str]
|
|
1610
|
+
name: Optional[str]
|
|
1611
|
+
title: Optional[str]
|
|
1612
|
+
updated_at: Optional[datetime]
|
|
1613
|
+
|
|
1614
|
+
"""
|
|
1615
|
+
|
|
1616
|
+
created_at: Optional[datetime] = Field(
|
|
1617
|
+
None,
|
|
1618
|
+
description="UTC time when the Recommendation Type was created, formatted in RFC 3339.",
|
|
1619
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1620
|
+
)
|
|
1621
|
+
description: Optional[str] = Field(
|
|
1622
|
+
None,
|
|
1623
|
+
description="Full description of the purpose for this Recommendation Type.",
|
|
1624
|
+
example="Recommendations that require a reduction in the speed set point.",
|
|
1625
|
+
max_length=256,
|
|
1626
|
+
min_length=1,
|
|
1627
|
+
)
|
|
1628
|
+
name: Optional[str] = Field(
|
|
1629
|
+
None,
|
|
1630
|
+
description="Unique identifier `name` for the Recommendation Type. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1631
|
+
example="decrease_speed",
|
|
1632
|
+
max_length=64,
|
|
1633
|
+
min_length=1,
|
|
1634
|
+
)
|
|
1635
|
+
title: Optional[str] = Field(
|
|
1636
|
+
None,
|
|
1637
|
+
description="Display name (`title`) of the Recommendation Type.",
|
|
1638
|
+
example="Decrease Speed",
|
|
1639
|
+
max_length=64,
|
|
1640
|
+
min_length=1,
|
|
1641
|
+
)
|
|
1642
|
+
updated_at: Optional[datetime] = Field(
|
|
1643
|
+
None,
|
|
1644
|
+
description="UTC time when any Recommendation Type keys were last updated, formatted in RFC 3339.",
|
|
1645
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1646
|
+
)
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
class ThreadAttachment(DataModelBase):
|
|
1650
|
+
"""
|
|
1651
|
+
ThreadAttachment object.
|
|
1652
|
+
|
|
1653
|
+
Parameters
|
|
1654
|
+
----------
|
|
1655
|
+
extension: Optional[str]
|
|
1656
|
+
filename: Optional[str]
|
|
1657
|
+
size: Optional[int]
|
|
1658
|
+
url: Optional[str]
|
|
1659
|
+
|
|
1660
|
+
"""
|
|
1661
|
+
|
|
1662
|
+
extension: Optional[str] = None
|
|
1663
|
+
filename: Optional[str] = None
|
|
1664
|
+
size: Optional[int] = None
|
|
1665
|
+
url: Optional[str] = None
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
class ThreadUserFollow(DataModelBase):
|
|
1669
|
+
"""
|
|
1670
|
+
ThreadUserFollow object.
|
|
1671
|
+
|
|
1672
|
+
Parameters
|
|
1673
|
+
----------
|
|
1674
|
+
mute: Optional[bool]
|
|
1675
|
+
seen: Optional[bool]
|
|
1676
|
+
|
|
1677
|
+
"""
|
|
1678
|
+
|
|
1679
|
+
mute: Optional[bool] = None
|
|
1680
|
+
seen: Optional[bool] = None
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
class KelvinMessage(DataModelBase):
|
|
1684
|
+
"""
|
|
1685
|
+
KelvinMessage object.
|
|
1686
|
+
|
|
1687
|
+
Parameters
|
|
1688
|
+
----------
|
|
1689
|
+
id: UUID
|
|
1690
|
+
type: str
|
|
1691
|
+
resource: str
|
|
1692
|
+
source: str
|
|
1693
|
+
timestamp: datetime
|
|
1694
|
+
payload: AnyModel
|
|
1695
|
+
|
|
1696
|
+
"""
|
|
1697
|
+
|
|
1698
|
+
id: UUID = Field(
|
|
1699
|
+
...,
|
|
1700
|
+
description="UUID string. It identifies the message itself, so it must be generated every time a new message is created, it can’t be copied to a new message.",
|
|
1701
|
+
)
|
|
1702
|
+
type: str = Field(..., description="Kelvin Message Type representing the message type.")
|
|
1703
|
+
resource: str = Field(
|
|
1704
|
+
..., description="Kelvin Resource Name indicating the resource this message represents (asset, metric,...)."
|
|
1705
|
+
)
|
|
1706
|
+
source: str = Field(
|
|
1707
|
+
...,
|
|
1708
|
+
description="Kelvin Resource Name representing the application that created the message, such as a KSDK app, a worker, the UI, etc.",
|
|
1709
|
+
)
|
|
1710
|
+
timestamp: datetime = Field(
|
|
1711
|
+
...,
|
|
1712
|
+
description="UTC timestamp in RFC-3339 format. This is the time stamp of the data. In most cases, that means the current time stamp.",
|
|
1713
|
+
)
|
|
1714
|
+
payload: AnyModel = Field(..., description="The value of the measurement.")
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
class TimeseriesData(DataModelBase):
|
|
1718
|
+
"""
|
|
1719
|
+
TimeseriesData object.
|
|
1720
|
+
|
|
1721
|
+
Parameters
|
|
1722
|
+
----------
|
|
1723
|
+
created: Optional[datetime]
|
|
1724
|
+
data_type: Optional[str]
|
|
1725
|
+
fields: Optional[List[str]]
|
|
1726
|
+
last_timestamp: Optional[datetime]
|
|
1727
|
+
last_value: Optional[AnyModel]
|
|
1728
|
+
resource: Optional[str]
|
|
1729
|
+
source: Optional[str]
|
|
1730
|
+
updated: Optional[datetime]
|
|
1731
|
+
|
|
1732
|
+
"""
|
|
1733
|
+
|
|
1734
|
+
created: Optional[datetime] = Field(
|
|
1735
|
+
None,
|
|
1736
|
+
description="UTC time when the `last_value` values were first created, formatted in RFC 3339.",
|
|
1737
|
+
example="2023-06-26T18:22:18.582724Z",
|
|
1738
|
+
)
|
|
1739
|
+
data_type: Optional[str] = Field(None, description="Primitive data type of the `last_value` values.")
|
|
1740
|
+
fields: Optional[List[str]] = Field(
|
|
1741
|
+
None, description="Data `field` element name of each value in `last_value`.", example=["value"]
|
|
1742
|
+
)
|
|
1743
|
+
last_timestamp: Optional[datetime] = Field(
|
|
1744
|
+
None,
|
|
1745
|
+
description="UTC time when the time series data was last accessed, formatted in RFC 3339.",
|
|
1746
|
+
example="2023-11-10T09:55:08.627924Z",
|
|
1747
|
+
)
|
|
1748
|
+
last_value: Optional[AnyModel] = Field(None, description="Most recent value received for each `field`.")
|
|
1749
|
+
resource: Optional[str] = Field(
|
|
1750
|
+
None,
|
|
1751
|
+
description="Asset / Data Stream associated with `last_value`.",
|
|
1752
|
+
example="krn:ad:asset/data_stream",
|
|
1753
|
+
max_length=256,
|
|
1754
|
+
min_length=1,
|
|
1755
|
+
)
|
|
1756
|
+
source: Optional[str] = Field(
|
|
1757
|
+
None,
|
|
1758
|
+
description="Specifies the user or workload source for `last_value`.",
|
|
1759
|
+
example="krn:wlappv:cluster1/app1/1.2.0",
|
|
1760
|
+
max_length=256,
|
|
1761
|
+
min_length=1,
|
|
1762
|
+
)
|
|
1763
|
+
updated: Optional[datetime] = Field(
|
|
1764
|
+
None,
|
|
1765
|
+
description="UTC time when the time series data was last updated, formatted in RFC 3339.",
|
|
1766
|
+
example="2023-11-10T09:55:09.31857Z",
|
|
1767
|
+
)
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
class UserSetting(DataModelBase):
|
|
1771
|
+
"""
|
|
1772
|
+
UserSetting object.
|
|
1773
|
+
|
|
1774
|
+
Parameters
|
|
1775
|
+
----------
|
|
1776
|
+
created: Optional[datetime]
|
|
1777
|
+
payload: Optional[Dict[str, Any]]
|
|
1778
|
+
setting_name: Optional[str]
|
|
1779
|
+
updated: Optional[datetime]
|
|
1780
|
+
|
|
1781
|
+
"""
|
|
1782
|
+
|
|
1783
|
+
created: Optional[datetime] = Field(
|
|
1784
|
+
None,
|
|
1785
|
+
description="UTC time when the User Setting was created, formatted in RFC 3339.",
|
|
1786
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1787
|
+
)
|
|
1788
|
+
payload: Optional[Dict[str, Any]] = Field(
|
|
1789
|
+
None,
|
|
1790
|
+
description="The User Settings. The structure of this `payload` object depends on the type of User Setting being defined.",
|
|
1791
|
+
)
|
|
1792
|
+
setting_name: Optional[str] = Field(
|
|
1793
|
+
None,
|
|
1794
|
+
description="Unique identifier User Setting key `setting_name`.",
|
|
1795
|
+
example="kelvin-notifications",
|
|
1796
|
+
max_length=64,
|
|
1797
|
+
min_length=1,
|
|
1798
|
+
)
|
|
1799
|
+
updated: Optional[datetime] = Field(
|
|
1800
|
+
None,
|
|
1801
|
+
description="UTC time when any User Setting keys were last updated, formatted in RFC 3339.",
|
|
1802
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1803
|
+
)
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
class NetworkingAddressItem(DataModelBase):
|
|
1807
|
+
"""
|
|
1808
|
+
NetworkingAddressItem object.
|
|
1809
|
+
|
|
1810
|
+
Parameters
|
|
1811
|
+
----------
|
|
1812
|
+
address: Optional[IPv4Address]
|
|
1813
|
+
interface: Optional[str]
|
|
1814
|
+
port: Optional[int]
|
|
1815
|
+
|
|
1816
|
+
"""
|
|
1817
|
+
|
|
1818
|
+
address: Optional[IPv4Address] = Field(None, description="IPV4 address to reach the Service.", example="172.0.0.2")
|
|
1819
|
+
interface: Optional[str] = Field(None, description="Interface responsible for hosting the Service.", example="eth0")
|
|
1820
|
+
port: Optional[int] = Field(
|
|
1821
|
+
None, description="Port designated for accessing the Service.", example=8080, ge=1, le=65535
|
|
1822
|
+
)
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
class Protocol(Enum):
|
|
1826
|
+
tcp = "tcp"
|
|
1827
|
+
udp = "udp"
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
class NetworkingItem(DataModelBase):
|
|
1831
|
+
"""
|
|
1832
|
+
NetworkingItem object.
|
|
1833
|
+
|
|
1834
|
+
Parameters
|
|
1835
|
+
----------
|
|
1836
|
+
addresses: Optional[List[NetworkingAddressItem]]
|
|
1837
|
+
name: Optional[str]
|
|
1838
|
+
protocol: Optional[Protocol]
|
|
1839
|
+
|
|
1840
|
+
"""
|
|
1841
|
+
|
|
1842
|
+
addresses: Optional[List[NetworkingAddressItem]] = Field(None, description="Array of ports exposed by the Service.")
|
|
1843
|
+
name: Optional[str] = Field(
|
|
1844
|
+
None,
|
|
1845
|
+
description="Unique identifier `name` of the Service.",
|
|
1846
|
+
example="http-service",
|
|
1847
|
+
max_length=64,
|
|
1848
|
+
min_length=1,
|
|
1849
|
+
)
|
|
1850
|
+
protocol: Optional[Protocol] = Field(None, description="Protocol used by the Service.", example="tcp")
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
class Workload(DataModelBase):
|
|
1854
|
+
"""
|
|
1855
|
+
Workload object.
|
|
1856
|
+
|
|
1857
|
+
Parameters
|
|
1858
|
+
----------
|
|
1859
|
+
acp_name: Optional[str]
|
|
1860
|
+
app_name: Optional[str]
|
|
1861
|
+
app_version: Optional[str]
|
|
1862
|
+
cluster_name: Optional[str]
|
|
1863
|
+
created: Optional[datetime]
|
|
1864
|
+
download_status: Optional[str]
|
|
1865
|
+
enabled: Optional[bool]
|
|
1866
|
+
instantly_apply: Optional[bool]
|
|
1867
|
+
name: Optional[str]
|
|
1868
|
+
networking: Optional[List[NetworkingItem]]
|
|
1869
|
+
node_name: Optional[str]
|
|
1870
|
+
payload: Optional[Dict[str, Any]]
|
|
1871
|
+
pre_download: Optional[bool]
|
|
1872
|
+
status: Optional[WorkloadStatus]
|
|
1873
|
+
title: Optional[str]
|
|
1874
|
+
updated: Optional[datetime]
|
|
1875
|
+
|
|
1876
|
+
"""
|
|
1877
|
+
|
|
1878
|
+
acp_name: Optional[str] = Field(
|
|
1879
|
+
None,
|
|
1880
|
+
description="[`Deprecated`] Unique identifier `name` of the Cluster.",
|
|
1881
|
+
example="docs-demo-cluster-k3s",
|
|
1882
|
+
max_length=64,
|
|
1883
|
+
min_length=1,
|
|
1884
|
+
)
|
|
1885
|
+
app_name: Optional[str] = Field(
|
|
1886
|
+
None,
|
|
1887
|
+
description="Unique identifier `name` of the Kelvin App in the App Registry.",
|
|
1888
|
+
example="motor-speed-control",
|
|
1889
|
+
max_length=64,
|
|
1890
|
+
min_length=1,
|
|
1891
|
+
)
|
|
1892
|
+
app_version: Optional[str] = Field(
|
|
1893
|
+
None, description="Version Number of the Kelvin App used for this Workload.", example="1.2.0"
|
|
1894
|
+
)
|
|
1895
|
+
cluster_name: Optional[str] = Field(
|
|
1896
|
+
None,
|
|
1897
|
+
description="Unique identifier `name` of the Cluster.",
|
|
1898
|
+
example="docs-demo-cluster-k3s",
|
|
1899
|
+
max_length=64,
|
|
1900
|
+
min_length=1,
|
|
1901
|
+
)
|
|
1902
|
+
created: Optional[datetime] = Field(
|
|
1903
|
+
None,
|
|
1904
|
+
description="UTC time when the Workload was first created, formatted in RFC 3339.",
|
|
1905
|
+
example="2023-12-26T18:22:18.582724Z",
|
|
1906
|
+
)
|
|
1907
|
+
download_status: Optional[str] = Field(
|
|
1908
|
+
None, description="Current status of downloading Workload to the Edge System.", example="pending"
|
|
1909
|
+
)
|
|
1910
|
+
enabled: Optional[bool] = Field(
|
|
1911
|
+
None,
|
|
1912
|
+
description="If true, Workload `status` is set to `running` and will process I/O's. If false, Workload `status` is set to `stopped` but remains in Node on the Edge System.",
|
|
1913
|
+
example=True,
|
|
1914
|
+
)
|
|
1915
|
+
instantly_apply: Optional[bool] = Field(
|
|
1916
|
+
None,
|
|
1917
|
+
description="If true, applies deploy/upgrade immediately. If false, user will need to send an additional API request `/workloads/{workload_name}/apply` to initate the deploy/upgrade.",
|
|
1918
|
+
example=True,
|
|
1919
|
+
)
|
|
1920
|
+
name: Optional[str] = Field(
|
|
1921
|
+
None,
|
|
1922
|
+
description="Unique identifier `name` of the Workload.",
|
|
1923
|
+
example="motor-speed-control-ubdhwnshdy67",
|
|
1924
|
+
max_length=32,
|
|
1925
|
+
min_length=1,
|
|
1926
|
+
)
|
|
1927
|
+
networking: Optional[List[NetworkingItem]] = Field(None, description="Array of services exposed by the workload.")
|
|
1928
|
+
node_name: Optional[str] = Field(
|
|
1929
|
+
None,
|
|
1930
|
+
description="Unique identifier `name` of the Node in the Cluster hosting the Workload.",
|
|
1931
|
+
example="docs-demo-node-01",
|
|
1932
|
+
max_length=64,
|
|
1933
|
+
min_length=1,
|
|
1934
|
+
)
|
|
1935
|
+
payload: Optional[Dict[str, Any]] = Field(
|
|
1936
|
+
None, description="Internal Kelvin configuration information for deployment of the Workload."
|
|
1937
|
+
)
|
|
1938
|
+
pre_download: Optional[bool] = Field(
|
|
1939
|
+
None,
|
|
1940
|
+
description="If true, deploy process is handled by Kelvin and all Workloads wil be downloaded to Edge System before deploy. If false, deploy process is handled by Kubernetes through default settings.",
|
|
1941
|
+
example=True,
|
|
1942
|
+
)
|
|
1943
|
+
status: Optional[WorkloadStatus] = None
|
|
1944
|
+
title: Optional[str] = Field(
|
|
1945
|
+
None,
|
|
1946
|
+
description="Display name (`title`) of the Workload.",
|
|
1947
|
+
example="Motor Speed Control",
|
|
1948
|
+
max_length=64,
|
|
1949
|
+
min_length=1,
|
|
1950
|
+
)
|
|
1951
|
+
updated: Optional[datetime] = Field(
|
|
1952
|
+
None,
|
|
1953
|
+
description="UTC time when any Workload keys were last updated, formatted in RFC 3339.",
|
|
1954
|
+
example="2023-12-18T18:22:18.582724Z",
|
|
1955
|
+
)
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
class ThreadContent(DataModelBase):
|
|
1959
|
+
"""
|
|
1960
|
+
ThreadContent object.
|
|
1961
|
+
|
|
1962
|
+
Parameters
|
|
1963
|
+
----------
|
|
1964
|
+
attachments: Optional[List[ThreadAttachment]]
|
|
1965
|
+
mentions: Optional[List[str]]
|
|
1966
|
+
replies: Optional[List[ThreadReply]]
|
|
1967
|
+
text: Optional[str]
|
|
1968
|
+
|
|
1969
|
+
"""
|
|
1970
|
+
|
|
1971
|
+
attachments: Optional[List[ThreadAttachment]] = None
|
|
1972
|
+
mentions: Optional[List[str]] = None
|
|
1973
|
+
replies: Optional[List[ThreadReply]] = None
|
|
1974
|
+
text: Optional[str] = None
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
class ThreadReply(DataModelBase):
|
|
1978
|
+
"""
|
|
1979
|
+
ThreadReply object.
|
|
1980
|
+
|
|
1981
|
+
Parameters
|
|
1982
|
+
----------
|
|
1983
|
+
content: Optional[ThreadContent]
|
|
1984
|
+
created: Optional[datetime]
|
|
1985
|
+
id: Optional[str]
|
|
1986
|
+
updated: Optional[datetime]
|
|
1987
|
+
user_id: Optional[str]
|
|
1988
|
+
|
|
1989
|
+
"""
|
|
1990
|
+
|
|
1991
|
+
content: Optional[ThreadContent] = None
|
|
1992
|
+
created: Optional[datetime] = None
|
|
1993
|
+
id: Optional[str] = None
|
|
1994
|
+
updated: Optional[datetime] = None
|
|
1995
|
+
user_id: Optional[str] = None
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
class Thread(DataModelBase):
|
|
1999
|
+
"""
|
|
2000
|
+
Thread object.
|
|
2001
|
+
|
|
2002
|
+
Parameters
|
|
2003
|
+
----------
|
|
2004
|
+
content: Optional[ThreadContent]
|
|
2005
|
+
created: Optional[datetime]
|
|
2006
|
+
follows: Optional[Dict[str, ThreadUserFollow]]
|
|
2007
|
+
id: Optional[str]
|
|
2008
|
+
related_to: Optional[str]
|
|
2009
|
+
type: Optional[str]
|
|
2010
|
+
updated: Optional[datetime]
|
|
2011
|
+
user_id: Optional[str]
|
|
2012
|
+
|
|
2013
|
+
"""
|
|
2014
|
+
|
|
2015
|
+
content: Optional[ThreadContent] = None
|
|
2016
|
+
created: Optional[datetime] = None
|
|
2017
|
+
follows: Optional[Dict[str, ThreadUserFollow]] = None
|
|
2018
|
+
id: Optional[str] = None
|
|
2019
|
+
related_to: Optional[str] = None
|
|
2020
|
+
type: Optional[str] = None
|
|
2021
|
+
updated: Optional[datetime] = None
|
|
2022
|
+
user_id: Optional[str] = None
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
ThreadContent.update_forward_refs()
|