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,3352 @@
|
|
|
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 typing import Any, Dict, List, Optional
|
|
10
|
+
from uuid import UUID
|
|
11
|
+
|
|
12
|
+
from pydantic import Field
|
|
13
|
+
|
|
14
|
+
from kelvin.api.client.base_model import BaseModelRoot
|
|
15
|
+
from kelvin.api.client.data_model import DataModelBase
|
|
16
|
+
|
|
17
|
+
from . import enum, type
|
|
18
|
+
from .type import AppManagerAppPlannerRules, AppManagerAppVersion, InstanceSettingsAppManagerPlannerRules
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AppManagerAppPlannerRulesUpdate(AppManagerAppPlannerRules):
|
|
22
|
+
"""
|
|
23
|
+
AppManagerAppPlannerRulesUpdate object.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Resource(BaseModelRoot[str]):
|
|
32
|
+
"""
|
|
33
|
+
Resource object.
|
|
34
|
+
|
|
35
|
+
Parameters
|
|
36
|
+
----------
|
|
37
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
38
|
+
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Status(Enum):
|
|
45
|
+
running = "running"
|
|
46
|
+
stopped = "stopped"
|
|
47
|
+
updating = "updating"
|
|
48
|
+
requires_attention = "requires_attention"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AppManagerAppResourcesList(DataModelBase):
|
|
52
|
+
"""
|
|
53
|
+
AppManagerAppResourcesList object.
|
|
54
|
+
|
|
55
|
+
Parameters
|
|
56
|
+
----------
|
|
57
|
+
app_versions: Optional[List[str]]
|
|
58
|
+
enabled_states: Optional[List[bool]]
|
|
59
|
+
resources: Optional[List[Resource]]
|
|
60
|
+
statuses: Optional[List[Status]]
|
|
61
|
+
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
app_versions: Optional[List[str]] = Field(
|
|
65
|
+
None,
|
|
66
|
+
description="Search and filter on the list based on the Application versions. All strings in the array are treated as `OR`. ",
|
|
67
|
+
example=["1.0.1", "1.0.2"],
|
|
68
|
+
)
|
|
69
|
+
enabled_states: Optional[List[bool]] = Field(
|
|
70
|
+
None,
|
|
71
|
+
description="Search and filter on the list based on the Application's key `enabled` for each Asset.",
|
|
72
|
+
example=[True],
|
|
73
|
+
)
|
|
74
|
+
resources: Optional[List[Resource]] = Field(
|
|
75
|
+
None,
|
|
76
|
+
description="A filter on the list showing only Applications associated with any Assets in the array. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
77
|
+
example=["krn:asset:beam_pump_16", "krn:asset:beam_pump_21"],
|
|
78
|
+
)
|
|
79
|
+
statuses: Optional[List[Status]] = Field(
|
|
80
|
+
None,
|
|
81
|
+
description="Search and filter on the list based on the key 'status'. All strings in the array are treated as `OR`. ",
|
|
82
|
+
example=["running", "updating"],
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class AppManagerAppVersionDataMappingGet(DataModelBase):
|
|
87
|
+
"""
|
|
88
|
+
AppManagerAppVersionDataMappingGet object.
|
|
89
|
+
|
|
90
|
+
Parameters
|
|
91
|
+
----------
|
|
92
|
+
resources: Optional[List[Resource]]
|
|
93
|
+
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
resources: Optional[List[Resource]] = Field(
|
|
97
|
+
None,
|
|
98
|
+
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.",
|
|
99
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class MappingItem(DataModelBase):
|
|
104
|
+
"""
|
|
105
|
+
MappingItem object.
|
|
106
|
+
|
|
107
|
+
Parameters
|
|
108
|
+
----------
|
|
109
|
+
app: Optional[str]
|
|
110
|
+
datastream: Optional[str]
|
|
111
|
+
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
app: Optional[str] = Field(
|
|
115
|
+
None,
|
|
116
|
+
description="Name of the variable used in the Application.",
|
|
117
|
+
example="gas_flow_rate",
|
|
118
|
+
max_length=64,
|
|
119
|
+
min_length=1,
|
|
120
|
+
)
|
|
121
|
+
datastream: Optional[str] = Field(
|
|
122
|
+
None,
|
|
123
|
+
description="Name of the Data Stream linked to the variable in the Application.",
|
|
124
|
+
example="gas_flow_rate",
|
|
125
|
+
max_length=64,
|
|
126
|
+
min_length=1,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class Mappings(DataModelBase):
|
|
131
|
+
"""
|
|
132
|
+
Mappings object.
|
|
133
|
+
|
|
134
|
+
Parameters
|
|
135
|
+
----------
|
|
136
|
+
inputs: Optional[List[MappingItem]]
|
|
137
|
+
outputs: Optional[List[MappingItem]]
|
|
138
|
+
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
inputs: Optional[List[MappingItem]] = Field(
|
|
142
|
+
None, description="Data mapping inputs between Application variables and Data Streams."
|
|
143
|
+
)
|
|
144
|
+
outputs: Optional[List[MappingItem]] = Field(
|
|
145
|
+
None, description="Data mapping outputs between Application variables and Data Streams."
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class AppManagerAppVersionDeploy(DataModelBase):
|
|
150
|
+
"""
|
|
151
|
+
AppManagerAppVersionDeploy object.
|
|
152
|
+
|
|
153
|
+
Parameters
|
|
154
|
+
----------
|
|
155
|
+
mappings: Optional[Mappings]
|
|
156
|
+
resources: Optional[List[Resource]]
|
|
157
|
+
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
mappings: Optional[Mappings] = Field(None, description="Connecting Application inputs and outputs to Data Streams.")
|
|
161
|
+
resources: Optional[List[Resource]] = Field(
|
|
162
|
+
None,
|
|
163
|
+
description="List of Assets to add to the Application. These Assets are paired with Data Streams to form Asset / Data Stream pairs, serving as pointers to the data location on Kelvin in the cloud.",
|
|
164
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class AppManagerAppVersionStart(AppManagerAppVersion):
|
|
169
|
+
"""
|
|
170
|
+
AppManagerAppVersionStart object.
|
|
171
|
+
|
|
172
|
+
Parameters
|
|
173
|
+
----------
|
|
174
|
+
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class AppManagerAppVersionStop(AppManagerAppVersion):
|
|
179
|
+
"""
|
|
180
|
+
AppManagerAppVersionStop object.
|
|
181
|
+
|
|
182
|
+
Parameters
|
|
183
|
+
----------
|
|
184
|
+
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class AppManagerAppVersionUndeploy(AppManagerAppVersion):
|
|
189
|
+
"""
|
|
190
|
+
AppManagerAppVersionUndeploy object.
|
|
191
|
+
|
|
192
|
+
Parameters
|
|
193
|
+
----------
|
|
194
|
+
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class AppName(BaseModelRoot[str]):
|
|
199
|
+
"""
|
|
200
|
+
AppName object.
|
|
201
|
+
|
|
202
|
+
Parameters
|
|
203
|
+
----------
|
|
204
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
205
|
+
|
|
206
|
+
"""
|
|
207
|
+
|
|
208
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class AppManagerList(DataModelBase):
|
|
212
|
+
"""
|
|
213
|
+
AppManagerList object.
|
|
214
|
+
|
|
215
|
+
Parameters
|
|
216
|
+
----------
|
|
217
|
+
app_names: Optional[List[AppName]]
|
|
218
|
+
resources: Optional[List[Resource]]
|
|
219
|
+
search: Optional[str]
|
|
220
|
+
statuses: Optional[List[Status]]
|
|
221
|
+
|
|
222
|
+
"""
|
|
223
|
+
|
|
224
|
+
app_names: Optional[List[AppName]] = Field(
|
|
225
|
+
None,
|
|
226
|
+
description="A filter on the list based on the Application key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
227
|
+
example=["motor-speed-control", "load-control-app"],
|
|
228
|
+
)
|
|
229
|
+
resources: Optional[List[Resource]] = Field(
|
|
230
|
+
None,
|
|
231
|
+
description="A filter on the list showing only Applications associated with any Assets in the array. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
232
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
233
|
+
)
|
|
234
|
+
search: Optional[str] = Field(
|
|
235
|
+
None,
|
|
236
|
+
description="Search and filter on the list based on the Application keys `title` (Display Name) or `name`. The search is case insensitive and will find partial matches as well.",
|
|
237
|
+
example="Optimizer",
|
|
238
|
+
max_length=64,
|
|
239
|
+
min_length=1,
|
|
240
|
+
)
|
|
241
|
+
statuses: Optional[List[Status]] = Field(
|
|
242
|
+
None,
|
|
243
|
+
description="Search and filter on the list based on the key 'status'. All strings in the array are treated as `OR`.",
|
|
244
|
+
example=["running", "updating"],
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
class AppCreate(DataModelBase):
|
|
249
|
+
"""
|
|
250
|
+
AppCreate object.
|
|
251
|
+
|
|
252
|
+
Parameters
|
|
253
|
+
----------
|
|
254
|
+
manifest: Optional[Dict[str, Any]]
|
|
255
|
+
payload: Optional[Dict[str, Any]]
|
|
256
|
+
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
manifest: Optional[Dict[str, Any]] = None
|
|
260
|
+
payload: Optional[Dict[str, Any]] = None
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
class AppUpdate(DataModelBase):
|
|
264
|
+
"""
|
|
265
|
+
AppUpdate object.
|
|
266
|
+
|
|
267
|
+
Parameters
|
|
268
|
+
----------
|
|
269
|
+
description: Optional[str]
|
|
270
|
+
title: Optional[str]
|
|
271
|
+
|
|
272
|
+
"""
|
|
273
|
+
|
|
274
|
+
description: Optional[str] = Field(
|
|
275
|
+
None,
|
|
276
|
+
description="New description of the App in the App Registry.",
|
|
277
|
+
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",
|
|
278
|
+
max_length=256,
|
|
279
|
+
min_length=1,
|
|
280
|
+
)
|
|
281
|
+
title: Optional[str] = Field(
|
|
282
|
+
None,
|
|
283
|
+
description="New display name (`title`) of the App in the App Registry.",
|
|
284
|
+
example="Motor Speed Control",
|
|
285
|
+
max_length=64,
|
|
286
|
+
min_length=1,
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
class AppExtraField(DataModelBase):
|
|
291
|
+
"""
|
|
292
|
+
AppExtraField object.
|
|
293
|
+
|
|
294
|
+
Parameters
|
|
295
|
+
----------
|
|
296
|
+
app_name: Optional[str]
|
|
297
|
+
app_versions: Optional[List[str]]
|
|
298
|
+
name: Optional[str]
|
|
299
|
+
statuses: Optional[List[Status]]
|
|
300
|
+
|
|
301
|
+
"""
|
|
302
|
+
|
|
303
|
+
app_name: Optional[str] = Field(
|
|
304
|
+
None,
|
|
305
|
+
description="App Name from the App Registry. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
306
|
+
example="motor-speed-control",
|
|
307
|
+
max_length=64,
|
|
308
|
+
min_length=1,
|
|
309
|
+
)
|
|
310
|
+
app_versions: Optional[List[str]] = Field(
|
|
311
|
+
None,
|
|
312
|
+
description="Filter Apps by version number of the App. The filter is on the full version name only. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
313
|
+
example=["1.2.0", "1.2.1"],
|
|
314
|
+
)
|
|
315
|
+
name: Optional[str] = Field(
|
|
316
|
+
None,
|
|
317
|
+
description="Unique identifier name for the key in the response, all keys in extra_fields object must be unique. Must contain only lowercase alphanumeric characters. The `.`, `_`, and `-` characters are allowed to separate words but cannot be at the beginning or end of the name.",
|
|
318
|
+
example="motor-speed",
|
|
319
|
+
max_length=64,
|
|
320
|
+
min_length=1,
|
|
321
|
+
)
|
|
322
|
+
statuses: Optional[List[Status]] = Field(
|
|
323
|
+
None, description="Filter Apps by current status of the App.", example=["running", "updating"]
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
class Operator(Enum):
|
|
328
|
+
Equal = "=="
|
|
329
|
+
NotEqual = "!="
|
|
330
|
+
Lower = "<"
|
|
331
|
+
Greater = ">"
|
|
332
|
+
GreaterOrEqual = ">="
|
|
333
|
+
LowerOrEqual = "<="
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
class AssetInsightsFilter(DataModelBase):
|
|
337
|
+
"""
|
|
338
|
+
AssetInsightsFilter object.
|
|
339
|
+
|
|
340
|
+
Parameters
|
|
341
|
+
----------
|
|
342
|
+
operator: Optional[Operator]
|
|
343
|
+
value: Optional[type.AnyModel]
|
|
344
|
+
|
|
345
|
+
"""
|
|
346
|
+
|
|
347
|
+
operator: Optional[Operator] = Field(
|
|
348
|
+
None,
|
|
349
|
+
description="Type of operation for the filter, allowed operators: '==', '!=', '<', '>', '>=', '<='",
|
|
350
|
+
example="==",
|
|
351
|
+
)
|
|
352
|
+
value: Optional[type.AnyModel] = Field(
|
|
353
|
+
None, description="Value to use in association with the `operator` for the filter of the field.", example=500
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
class AssetPropertyExtraField(DataModelBase):
|
|
358
|
+
"""
|
|
359
|
+
AssetPropertyExtraField object.
|
|
360
|
+
|
|
361
|
+
Parameters
|
|
362
|
+
----------
|
|
363
|
+
filters: Optional[List[AssetInsightsFilter]]
|
|
364
|
+
name: Optional[str]
|
|
365
|
+
primitive_type: Optional[enum.PropertyTypeName]
|
|
366
|
+
property_name: Optional[str]
|
|
367
|
+
|
|
368
|
+
"""
|
|
369
|
+
|
|
370
|
+
filters: Optional[List[AssetInsightsFilter]] = Field(
|
|
371
|
+
None,
|
|
372
|
+
description="Optional to filter the returned Asset List based on an array of operator / value criteria relating to the Asset Property. Each filter is treated as `OR`. This will remove Assets from the returned Asset list that do not meet this criteria.",
|
|
373
|
+
)
|
|
374
|
+
name: Optional[str] = Field(
|
|
375
|
+
None,
|
|
376
|
+
description="Unique identifier name for the key in the response, all keys in extra_fields object must be unique. Must contain only lowercase alphanumeric characters. The `.`, `_`, and `-` characters are allowed to separate words but cannot be at the beginning or end of the name.",
|
|
377
|
+
example="motor-speed",
|
|
378
|
+
max_length=64,
|
|
379
|
+
min_length=1,
|
|
380
|
+
)
|
|
381
|
+
primitive_type: Optional[enum.PropertyTypeName] = Field(
|
|
382
|
+
None, description="Property data type of the new filtered Asset Property column."
|
|
383
|
+
)
|
|
384
|
+
property_name: Optional[str] = Field(
|
|
385
|
+
None,
|
|
386
|
+
description="Name of the Asset Property to include. This Asset Property column are custom filtered fields that can be created with the Asset listing.",
|
|
387
|
+
example="motor-speed-control",
|
|
388
|
+
max_length=64,
|
|
389
|
+
min_length=1,
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
class Datastream(BaseModelRoot[str]):
|
|
394
|
+
"""
|
|
395
|
+
Datastream object.
|
|
396
|
+
|
|
397
|
+
Parameters
|
|
398
|
+
----------
|
|
399
|
+
__root__: str = Field(..., example='motor-speed', max_length=64, min_length=1)
|
|
400
|
+
|
|
401
|
+
"""
|
|
402
|
+
|
|
403
|
+
__root__: str = Field(..., example="motor-speed", max_length=64, min_length=1)
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
class ControlChangeExtraField(DataModelBase):
|
|
407
|
+
"""
|
|
408
|
+
ControlChangeExtraField object.
|
|
409
|
+
|
|
410
|
+
Parameters
|
|
411
|
+
----------
|
|
412
|
+
datastreams: Optional[List[Datastream]]
|
|
413
|
+
name: Optional[str]
|
|
414
|
+
statuses: Optional[List[enum.ControlChangeState]]
|
|
415
|
+
|
|
416
|
+
"""
|
|
417
|
+
|
|
418
|
+
datastreams: Optional[List[Datastream]] = Field(
|
|
419
|
+
None,
|
|
420
|
+
description="Filter Control Change Field by Control Change Data Stream key `datastream_name`. The filter is on the full name only. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
421
|
+
)
|
|
422
|
+
name: Optional[str] = Field(
|
|
423
|
+
None,
|
|
424
|
+
description="Unique identifier name used for the key in the response. All keys in `extra_fields` object must be unique. Must contain only lowercase alphanumeric characters. The `.`, `_`, and `-` characters are allowed to separate words but cannot be at the beginning or end of the name.",
|
|
425
|
+
example="motor-speed",
|
|
426
|
+
max_length=64,
|
|
427
|
+
min_length=1,
|
|
428
|
+
)
|
|
429
|
+
statuses: Optional[List[enum.ControlChangeState]] = Field(
|
|
430
|
+
None,
|
|
431
|
+
description="Filter Control Change Field by the Control Change current `state`.",
|
|
432
|
+
example=["pending", "sent"],
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
class Agg(Enum):
|
|
437
|
+
count = "count"
|
|
438
|
+
mean = "mean"
|
|
439
|
+
sum = "sum"
|
|
440
|
+
max = "max"
|
|
441
|
+
min = "min"
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
class DatastreamExtraFieldComputation(DataModelBase):
|
|
445
|
+
"""
|
|
446
|
+
DatastreamExtraFieldComputation object.
|
|
447
|
+
|
|
448
|
+
Parameters
|
|
449
|
+
----------
|
|
450
|
+
agg: Optional[Agg]
|
|
451
|
+
end_time: Optional[datetime]
|
|
452
|
+
start_time: Optional[datetime]
|
|
453
|
+
|
|
454
|
+
"""
|
|
455
|
+
|
|
456
|
+
agg: Optional[Agg] = Field(
|
|
457
|
+
None,
|
|
458
|
+
description="Perform mathematical calculations on a group of data defined by the 'starttime' and 'endtime' keys. For text data, the option available is `count`.",
|
|
459
|
+
)
|
|
460
|
+
end_time: Optional[datetime] = Field(
|
|
461
|
+
None,
|
|
462
|
+
description="UTC time for the latest time in the time range used by `agg` of Data Streams related to an Asset, formatted in RFC 3339.",
|
|
463
|
+
example="2023-11-13T12:00:00Z",
|
|
464
|
+
)
|
|
465
|
+
start_time: Optional[datetime] = Field(
|
|
466
|
+
None,
|
|
467
|
+
description="UTC time for the earliest time in the time range used by `agg` of Data Streams related to an Asset, formatted in RFC 3339.",
|
|
468
|
+
example="2023-11-13T12:00:00Z",
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
class DatastreamExtraField(DataModelBase):
|
|
473
|
+
"""
|
|
474
|
+
DatastreamExtraField object.
|
|
475
|
+
|
|
476
|
+
Parameters
|
|
477
|
+
----------
|
|
478
|
+
computation: Optional[DatastreamExtraFieldComputation]
|
|
479
|
+
datastream_name: Optional[str]
|
|
480
|
+
name: Optional[str]
|
|
481
|
+
|
|
482
|
+
"""
|
|
483
|
+
|
|
484
|
+
computation: Optional[DatastreamExtraFieldComputation] = None
|
|
485
|
+
datastream_name: Optional[str] = Field(
|
|
486
|
+
None,
|
|
487
|
+
description="Data Stream key `name`. Used in connection with the Asset `name` to retrieve the Asset / Data Stream pair's data",
|
|
488
|
+
example="motor-speed",
|
|
489
|
+
max_length=64,
|
|
490
|
+
min_length=1,
|
|
491
|
+
)
|
|
492
|
+
name: Optional[str] = Field(
|
|
493
|
+
None,
|
|
494
|
+
description="Unique identifier name for the key in the response, all keys in extra_fields object must be unique. Must contain only lowercase alphanumeric characters. The `.`, `_`, and `-` characters are allowed to separate words but cannot be at the beginning or end of the name.",
|
|
495
|
+
example="motor-speed-count",
|
|
496
|
+
max_length=64,
|
|
497
|
+
min_length=1,
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
class PrimitiveType(Enum):
|
|
502
|
+
raw_boolean = "raw.boolean"
|
|
503
|
+
boolean = "boolean"
|
|
504
|
+
raw_text = "raw.text"
|
|
505
|
+
string = "string"
|
|
506
|
+
raw_float32 = "raw.float32"
|
|
507
|
+
raw_float64 = "raw.float64"
|
|
508
|
+
raw_int32 = "raw.int32"
|
|
509
|
+
raw_uint32 = "raw.uint32"
|
|
510
|
+
number = "number"
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
class ParameterExtraField(DataModelBase):
|
|
514
|
+
"""
|
|
515
|
+
ParameterExtraField object.
|
|
516
|
+
|
|
517
|
+
Parameters
|
|
518
|
+
----------
|
|
519
|
+
app_name: Optional[str]
|
|
520
|
+
filters: Optional[List[AssetInsightsFilter]]
|
|
521
|
+
name: Optional[str]
|
|
522
|
+
parameter_name: Optional[str]
|
|
523
|
+
primitive_type: Optional[PrimitiveType]
|
|
524
|
+
|
|
525
|
+
"""
|
|
526
|
+
|
|
527
|
+
app_name: Optional[str] = Field(
|
|
528
|
+
None,
|
|
529
|
+
description="App Registry App key `name` to retrieve the Parameters. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
530
|
+
example="motor-speed-control",
|
|
531
|
+
max_length=32,
|
|
532
|
+
min_length=1,
|
|
533
|
+
)
|
|
534
|
+
filters: Optional[List[AssetInsightsFilter]] = Field(
|
|
535
|
+
None,
|
|
536
|
+
description="Optional to filter the returned Asset List based on an array of operator / value criteria relating to the Parameters. Each filter is treated as `OR`. This will remove Assets from the returned Asset list that do not meet this criteria. ",
|
|
537
|
+
)
|
|
538
|
+
name: Optional[str] = Field(
|
|
539
|
+
None,
|
|
540
|
+
description="Unique identifier name for the key in the response, all keys in extra_fields object must be unique. Must contain only lowercase alphanumeric characters. The `.`, `_`, and `-` characters are allowed to separate words but cannot be at the beginning or end of the name.",
|
|
541
|
+
example="motor-speed-set-point-low",
|
|
542
|
+
max_length=64,
|
|
543
|
+
min_length=1,
|
|
544
|
+
)
|
|
545
|
+
parameter_name: Optional[str] = Field(
|
|
546
|
+
None,
|
|
547
|
+
description="Parameter key `name` to retrieve the Parameters from the App for the Assets. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
548
|
+
example="motor-speed-set-point",
|
|
549
|
+
max_length=64,
|
|
550
|
+
min_length=1,
|
|
551
|
+
)
|
|
552
|
+
primitive_type: Optional[PrimitiveType] = Field(
|
|
553
|
+
None, description="Primitive data type of the new filtered Parameter column.", example="number"
|
|
554
|
+
)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
class Type(BaseModelRoot[str]):
|
|
558
|
+
"""
|
|
559
|
+
Type object.
|
|
560
|
+
|
|
561
|
+
Parameters
|
|
562
|
+
----------
|
|
563
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
564
|
+
|
|
565
|
+
"""
|
|
566
|
+
|
|
567
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
class RecommendationExtraField(DataModelBase):
|
|
571
|
+
"""
|
|
572
|
+
RecommendationExtraField object.
|
|
573
|
+
|
|
574
|
+
Parameters
|
|
575
|
+
----------
|
|
576
|
+
name: Optional[str]
|
|
577
|
+
since: Optional[datetime]
|
|
578
|
+
source: Optional[str]
|
|
579
|
+
states: Optional[List[enum.RecommendationState]]
|
|
580
|
+
types: Optional[List[Type]]
|
|
581
|
+
|
|
582
|
+
"""
|
|
583
|
+
|
|
584
|
+
name: Optional[str] = Field(
|
|
585
|
+
None,
|
|
586
|
+
description="Unique identifier name for the key in the response, all keys in extra_fields object must be unique. Must contain only lowercase alphanumeric characters. The `.`, `_`, and `-` characters are allowed to separate words but cannot be at the beginning or end of the name.",
|
|
587
|
+
example="motor-speed-recommendations",
|
|
588
|
+
max_length=64,
|
|
589
|
+
min_length=1,
|
|
590
|
+
)
|
|
591
|
+
since: Optional[datetime] = Field(
|
|
592
|
+
None,
|
|
593
|
+
description="UTC time for the earliest creation time of Recommendations associated with an Asset, formatted in RFC 3339. Recommendations before this time regardless of `state` will be ignored.",
|
|
594
|
+
example="2023-11-13T12:00:00Z",
|
|
595
|
+
)
|
|
596
|
+
source: Optional[str] = Field(
|
|
597
|
+
None,
|
|
598
|
+
description="KRN of the User or Service that created the Recommendation.",
|
|
599
|
+
example="krn:user:richard.teo@kelvininc.com",
|
|
600
|
+
max_length=256,
|
|
601
|
+
min_length=1,
|
|
602
|
+
)
|
|
603
|
+
states: Optional[List[enum.RecommendationState]] = Field(
|
|
604
|
+
None,
|
|
605
|
+
description="Only return Recommendations associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
606
|
+
example=["pending", "auto_accepted"],
|
|
607
|
+
)
|
|
608
|
+
types: Optional[List[Type]] = Field(
|
|
609
|
+
None,
|
|
610
|
+
description="Only return Recommendations associated with one or more Recommendation Types. The filter is on the full Recommendation Type `name` only. All strings in the array are treated as `OR`. Each name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
611
|
+
example=["decrease_speed", "increase_speed"],
|
|
612
|
+
)
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
class AssetInsightsExtraFields(DataModelBase):
|
|
616
|
+
"""
|
|
617
|
+
AssetInsightsExtraFields object.
|
|
618
|
+
|
|
619
|
+
Parameters
|
|
620
|
+
----------
|
|
621
|
+
apps: Optional[List[AppExtraField]]
|
|
622
|
+
asset_properties: Optional[List[AssetPropertyExtraField]]
|
|
623
|
+
control_changes: Optional[List[ControlChangeExtraField]]
|
|
624
|
+
datastreams: Optional[List[DatastreamExtraField]]
|
|
625
|
+
parameters: Optional[List[ParameterExtraField]]
|
|
626
|
+
recommendations: Optional[List[RecommendationExtraField]]
|
|
627
|
+
|
|
628
|
+
"""
|
|
629
|
+
|
|
630
|
+
apps: Optional[List[AppExtraField]] = Field(
|
|
631
|
+
None,
|
|
632
|
+
description="Create new columns based on Apps in the App Registry related to Assets. Multiple columns can be created, each with different App filter requirements.",
|
|
633
|
+
)
|
|
634
|
+
asset_properties: Optional[List[AssetPropertyExtraField]] = Field(
|
|
635
|
+
None,
|
|
636
|
+
description="Create new columns based on the `property` field in Assets. Multiple columns can be created, each with different `property` requirements. Separately, the `filter` option will remove Assets from the returned Asset list that do not meet the operator and value criteria.",
|
|
637
|
+
)
|
|
638
|
+
control_changes: Optional[List[ControlChangeExtraField]] = Field(
|
|
639
|
+
None,
|
|
640
|
+
description="Create new columns based on the Last Control Changes associated with the Asset. Multiple columns can be created, each with different Control Change filter requirements.",
|
|
641
|
+
)
|
|
642
|
+
datastreams: Optional[List[DatastreamExtraField]] = Field(
|
|
643
|
+
None,
|
|
644
|
+
description="Create new columns based on mathematical calculations for a time range of a Data Stream associated with the Assets. Multiple columns can be created, each with its own mathematical formula and Asset / Data Stream pair.",
|
|
645
|
+
)
|
|
646
|
+
parameters: Optional[List[ParameterExtraField]] = Field(
|
|
647
|
+
None,
|
|
648
|
+
description="Create new columns based on Application Parameters associated with the Asset. Multiple columns can be created, each with different Application Parameters requirements. Separately, the `filter` option will remove Assets from the returned Asset list that do not meet the operator and value criteria.",
|
|
649
|
+
)
|
|
650
|
+
recommendations: Optional[List[RecommendationExtraField]] = Field(
|
|
651
|
+
None,
|
|
652
|
+
description="Create new columns based on Recommendations associated with the Asset. Multiple columns can be created, each with different Recommendation filter requirements.",
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
class Direction(Enum):
|
|
657
|
+
asc = "asc"
|
|
658
|
+
desc = "desc"
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
class AssetInsightsSortBy(DataModelBase):
|
|
662
|
+
"""
|
|
663
|
+
AssetInsightsSortBy object.
|
|
664
|
+
|
|
665
|
+
Parameters
|
|
666
|
+
----------
|
|
667
|
+
direction: Optional[Direction]
|
|
668
|
+
field: Optional[str]
|
|
669
|
+
sort_by_extra_field: Optional[bool]
|
|
670
|
+
|
|
671
|
+
"""
|
|
672
|
+
|
|
673
|
+
direction: Optional[Direction] = Field("asc", description="Sorting order for the results returned.", example="desc")
|
|
674
|
+
field: Optional[str] = Field(
|
|
675
|
+
"name",
|
|
676
|
+
description="Key name of the Asset or `extra_field` field `name` to sort by. Source of field will be determined by the `SortByExtraField` key. If sorting by Asset key, available options are; `name`, `title`, `asset_type_name`, `asset_type_title` and `state`.",
|
|
677
|
+
example="title",
|
|
678
|
+
)
|
|
679
|
+
sort_by_extra_field: Optional[bool] = Field(
|
|
680
|
+
None,
|
|
681
|
+
description="Choose the `sort_by` source of the `field` parameter. If `false`, the source of the `field` name is an Asset key. If `true`, the source is a `extra_field[].name` key.",
|
|
682
|
+
example=False,
|
|
683
|
+
)
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
class AssetName(BaseModelRoot[str]):
|
|
687
|
+
"""
|
|
688
|
+
AssetName object.
|
|
689
|
+
|
|
690
|
+
Parameters
|
|
691
|
+
----------
|
|
692
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
693
|
+
|
|
694
|
+
"""
|
|
695
|
+
|
|
696
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
class AssetState(Enum):
|
|
700
|
+
online = "online"
|
|
701
|
+
offline = "offline"
|
|
702
|
+
unknown = "unknown"
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
class AssetType(BaseModelRoot[str]):
|
|
706
|
+
"""
|
|
707
|
+
AssetType object.
|
|
708
|
+
|
|
709
|
+
Parameters
|
|
710
|
+
----------
|
|
711
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
712
|
+
|
|
713
|
+
"""
|
|
714
|
+
|
|
715
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
class PinnedAsset(BaseModelRoot[str]):
|
|
719
|
+
"""
|
|
720
|
+
PinnedAsset object.
|
|
721
|
+
|
|
722
|
+
Parameters
|
|
723
|
+
----------
|
|
724
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
725
|
+
|
|
726
|
+
"""
|
|
727
|
+
|
|
728
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
class SearchItem(BaseModelRoot[str]):
|
|
732
|
+
"""
|
|
733
|
+
SearchItem object.
|
|
734
|
+
|
|
735
|
+
Parameters
|
|
736
|
+
----------
|
|
737
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
738
|
+
|
|
739
|
+
"""
|
|
740
|
+
|
|
741
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
class AssetInsightsGet(DataModelBase):
|
|
745
|
+
"""
|
|
746
|
+
AssetInsightsGet object.
|
|
747
|
+
|
|
748
|
+
Parameters
|
|
749
|
+
----------
|
|
750
|
+
asset_names: Optional[List[AssetName]]
|
|
751
|
+
asset_states: Optional[List[AssetState]]
|
|
752
|
+
asset_types: Optional[List[AssetType]]
|
|
753
|
+
extra_fields: Optional[AssetInsightsExtraFields]
|
|
754
|
+
force_parameters_refresh: Optional[bool]
|
|
755
|
+
pinned_assets: Optional[List[PinnedAsset]]
|
|
756
|
+
search: Optional[List[SearchItem]]
|
|
757
|
+
sort_by: Optional[List[AssetInsightsSortBy]]
|
|
758
|
+
|
|
759
|
+
"""
|
|
760
|
+
|
|
761
|
+
asset_names: Optional[List[AssetName]] = Field(
|
|
762
|
+
None,
|
|
763
|
+
description="Filter on the Asset parameter `name`. The filter is on the full name only. All strings in the array are treated as `OR`. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
764
|
+
example=["beam", "MOTOR"],
|
|
765
|
+
)
|
|
766
|
+
asset_states: Optional[List[AssetState]] = Field(
|
|
767
|
+
None,
|
|
768
|
+
description="Filter by the asset `state`. The filter is on the full name only. All strings in the array are treated as `OR`.",
|
|
769
|
+
example=["offline", "unknown"],
|
|
770
|
+
)
|
|
771
|
+
asset_types: Optional[List[AssetType]] = Field(
|
|
772
|
+
None,
|
|
773
|
+
description="Filter on the Asset Type parameter `name`. The filter is on the full name only. All strings in the array are treated as `OR`. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
774
|
+
example=["decrease_speed", "increase_speed"],
|
|
775
|
+
)
|
|
776
|
+
extra_fields: Optional[AssetInsightsExtraFields] = None
|
|
777
|
+
force_parameters_refresh: Optional[bool] = Field(
|
|
778
|
+
None, description="Force all parameters to be refreshed.", example=True
|
|
779
|
+
)
|
|
780
|
+
pinned_assets: Optional[List[PinnedAsset]] = Field(
|
|
781
|
+
None,
|
|
782
|
+
description="List of Asset names that should always appear at the top of page 1 of any search results. The filter is on the full name only. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
783
|
+
example=["beam_pump_01", "beam_pump_32"],
|
|
784
|
+
)
|
|
785
|
+
search: Optional[List[SearchItem]] = Field(
|
|
786
|
+
None,
|
|
787
|
+
description="Search and filter on the list based on the Asset keys `title` (Display Name) or `name`. The search is case insensitive and will find partial matches as well.",
|
|
788
|
+
example=["beam", "Motor"],
|
|
789
|
+
)
|
|
790
|
+
sort_by: Optional[List[AssetInsightsSortBy]] = Field(None, description="Options for sorting the returned results.")
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
class AssetPropertyCreate(DataModelBase):
|
|
794
|
+
"""
|
|
795
|
+
AssetPropertyCreate object.
|
|
796
|
+
|
|
797
|
+
Parameters
|
|
798
|
+
----------
|
|
799
|
+
name: str
|
|
800
|
+
title: Optional[str]
|
|
801
|
+
value: type.AnyModel
|
|
802
|
+
|
|
803
|
+
"""
|
|
804
|
+
|
|
805
|
+
name: str = Field(
|
|
806
|
+
...,
|
|
807
|
+
description="Unique identifier `name` for the Asset Property. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
808
|
+
example="water-line-pressure",
|
|
809
|
+
max_length=64,
|
|
810
|
+
min_length=1,
|
|
811
|
+
)
|
|
812
|
+
title: Optional[str] = Field(
|
|
813
|
+
None,
|
|
814
|
+
description="Title for this property. This title is ignored if the property with this `name` already exists.",
|
|
815
|
+
example="Water Line Pressure",
|
|
816
|
+
max_length=64,
|
|
817
|
+
min_length=1,
|
|
818
|
+
)
|
|
819
|
+
value: type.AnyModel = Field(
|
|
820
|
+
..., description="Value for this Asset Property. This can be stored as a number, string or boolean."
|
|
821
|
+
)
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
class AssetCreate(DataModelBase):
|
|
825
|
+
"""
|
|
826
|
+
AssetCreate object.
|
|
827
|
+
|
|
828
|
+
Parameters
|
|
829
|
+
----------
|
|
830
|
+
asset_type_name: str
|
|
831
|
+
name: str
|
|
832
|
+
properties: Optional[List[AssetPropertyCreate]]
|
|
833
|
+
title: str
|
|
834
|
+
|
|
835
|
+
"""
|
|
836
|
+
|
|
837
|
+
asset_type_name: str = Field(
|
|
838
|
+
...,
|
|
839
|
+
description="Asset Type `name`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
840
|
+
example="beam_pump",
|
|
841
|
+
max_length=64,
|
|
842
|
+
min_length=1,
|
|
843
|
+
)
|
|
844
|
+
name: str = Field(
|
|
845
|
+
...,
|
|
846
|
+
description="Unique identifier `name` for the Asset. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
847
|
+
example="well_01",
|
|
848
|
+
max_length=64,
|
|
849
|
+
min_length=1,
|
|
850
|
+
)
|
|
851
|
+
properties: Optional[List[AssetPropertyCreate]] = Field(
|
|
852
|
+
None,
|
|
853
|
+
description="Array of custom properties. These properties are not used by the Kelvin Platform and are for end-user use only.",
|
|
854
|
+
)
|
|
855
|
+
title: str = Field(..., description="Asset display name (`title`).", example="Well 01", max_length=64, min_length=1)
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
class AssetBulkCreate(DataModelBase):
|
|
859
|
+
"""
|
|
860
|
+
AssetBulkCreate object.
|
|
861
|
+
|
|
862
|
+
Parameters
|
|
863
|
+
----------
|
|
864
|
+
assets: List[AssetCreate]
|
|
865
|
+
|
|
866
|
+
"""
|
|
867
|
+
|
|
868
|
+
assets: List[AssetCreate] = Field(
|
|
869
|
+
..., description="Array of objects, each object in the array represents a new Asset.", min_items=1
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
class Name(BaseModelRoot[str]):
|
|
874
|
+
"""
|
|
875
|
+
Name object.
|
|
876
|
+
|
|
877
|
+
Parameters
|
|
878
|
+
----------
|
|
879
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
880
|
+
|
|
881
|
+
"""
|
|
882
|
+
|
|
883
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
class StatusStateEnum(Enum):
|
|
887
|
+
online = "online"
|
|
888
|
+
offline = "offline"
|
|
889
|
+
unknown = "unknown"
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
class AssetsAdvancedList(DataModelBase):
|
|
893
|
+
"""
|
|
894
|
+
AssetsAdvancedList object.
|
|
895
|
+
|
|
896
|
+
Parameters
|
|
897
|
+
----------
|
|
898
|
+
asset_type_name: Optional[List[str]]
|
|
899
|
+
names: Optional[List[Name]]
|
|
900
|
+
search: Optional[List[SearchItem]]
|
|
901
|
+
status_state: Optional[List[StatusStateEnum]]
|
|
902
|
+
|
|
903
|
+
"""
|
|
904
|
+
|
|
905
|
+
asset_type_name: Optional[List[str]] = Field(
|
|
906
|
+
None,
|
|
907
|
+
description="A filter on the list based on the key `asset_type_name`. The filter is on the full name only. All strings in the array are treated as `OR`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
908
|
+
example=["beam_pump", "progressive_cavity_pump"],
|
|
909
|
+
)
|
|
910
|
+
names: Optional[List[Name]] = Field(
|
|
911
|
+
None,
|
|
912
|
+
description="A filter on the list based on the key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
913
|
+
example=["well_1", "well_5"],
|
|
914
|
+
)
|
|
915
|
+
search: Optional[List[SearchItem]] = Field(
|
|
916
|
+
None,
|
|
917
|
+
description="Search and filter on the list based on the keys `title` (Display Name) or `name`. All strings in the array are treated as `OR`. The search is case insensitive and will find partial matches as well.",
|
|
918
|
+
example=["well_1", "Well 3"],
|
|
919
|
+
)
|
|
920
|
+
status_state: Optional[List[StatusStateEnum]] = Field(
|
|
921
|
+
None,
|
|
922
|
+
description="A filter on the list based on the key ['status']['state']. Multiple statuses can be given and will be filtered as `OR`.",
|
|
923
|
+
example=["online"],
|
|
924
|
+
)
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
class AssetPropertyDefinitionsList(DataModelBase):
|
|
928
|
+
"""
|
|
929
|
+
AssetPropertyDefinitionsList object.
|
|
930
|
+
|
|
931
|
+
Parameters
|
|
932
|
+
----------
|
|
933
|
+
names: Optional[List[Name]]
|
|
934
|
+
primitive_types: Optional[List[enum.PropertyTypeName]]
|
|
935
|
+
search: Optional[List[str]]
|
|
936
|
+
|
|
937
|
+
"""
|
|
938
|
+
|
|
939
|
+
names: Optional[List[Name]] = Field(
|
|
940
|
+
None,
|
|
941
|
+
description="A filter on the list based on the key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
942
|
+
example=["production_casing_depth", "rp-property"],
|
|
943
|
+
)
|
|
944
|
+
primitive_types: Optional[List[enum.PropertyTypeName]] = Field(
|
|
945
|
+
None, description="A filter on the list based on the key `primitive_type`.", example=["number", "boolean"]
|
|
946
|
+
)
|
|
947
|
+
search: Optional[List[str]] = Field(
|
|
948
|
+
None,
|
|
949
|
+
description="Search and filter on the list based on the keys `title` (Display Name) or `name`. All strings in the array are treated as `OR`. The search is case insensitive and will find partial matches as well.",
|
|
950
|
+
)
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
class AssetPropertyValuesGet(DataModelBase):
|
|
954
|
+
"""
|
|
955
|
+
AssetPropertyValuesGet object.
|
|
956
|
+
|
|
957
|
+
Parameters
|
|
958
|
+
----------
|
|
959
|
+
primitive_types: Optional[List[enum.PropertyTypeName]]
|
|
960
|
+
property_names: Optional[List[str]]
|
|
961
|
+
|
|
962
|
+
"""
|
|
963
|
+
|
|
964
|
+
primitive_types: Optional[List[enum.PropertyTypeName]] = Field(
|
|
965
|
+
None, description="A filter on the list based on the key `primitive_type`.", example=["number", "boolean"]
|
|
966
|
+
)
|
|
967
|
+
property_names: Optional[List[str]] = Field(
|
|
968
|
+
None,
|
|
969
|
+
description="A filter on the list based on the key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
970
|
+
example=["production_casing_depth", "rp-property"],
|
|
971
|
+
)
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
class AssetTypeCreate(DataModelBase):
|
|
975
|
+
"""
|
|
976
|
+
AssetTypeCreate object.
|
|
977
|
+
|
|
978
|
+
Parameters
|
|
979
|
+
----------
|
|
980
|
+
name: str
|
|
981
|
+
title: str
|
|
982
|
+
|
|
983
|
+
"""
|
|
984
|
+
|
|
985
|
+
name: str = Field(
|
|
986
|
+
...,
|
|
987
|
+
description="Unique Asset Type name. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
988
|
+
example="beam_pump",
|
|
989
|
+
max_length=64,
|
|
990
|
+
min_length=1,
|
|
991
|
+
)
|
|
992
|
+
title: str = Field(
|
|
993
|
+
..., description="Asset Type display name (`title`).", example="Beam Pump", max_length=64, min_length=1
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
class AssetTypesAdvancedList(DataModelBase):
|
|
998
|
+
"""
|
|
999
|
+
AssetTypesAdvancedList object.
|
|
1000
|
+
|
|
1001
|
+
Parameters
|
|
1002
|
+
----------
|
|
1003
|
+
names: Optional[List[Name]]
|
|
1004
|
+
search: Optional[List[SearchItem]]
|
|
1005
|
+
|
|
1006
|
+
"""
|
|
1007
|
+
|
|
1008
|
+
names: Optional[List[Name]] = Field(
|
|
1009
|
+
None,
|
|
1010
|
+
description="A filter on the list based on the key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1011
|
+
example=["pump", "centrifugal_pump"],
|
|
1012
|
+
)
|
|
1013
|
+
search: Optional[List[SearchItem]] = Field(
|
|
1014
|
+
None,
|
|
1015
|
+
description="Search and filter the Kelvin Asset Type list. Both the Display Name and the Name will be included in the search field criteria. This is given as an array, for example `[pump,fan]`. The search is case insensitive and will find partial matches as well. For example if a Kelvin Asset Type name is `centrifugal_pump`, then a match will be made if the search string is `pum` or `FUGaL`.",
|
|
1016
|
+
example=["pump", "fan"],
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
class NameModel(BaseModelRoot[str]):
|
|
1021
|
+
"""
|
|
1022
|
+
NameModel object.
|
|
1023
|
+
|
|
1024
|
+
Parameters
|
|
1025
|
+
----------
|
|
1026
|
+
__root__: str = Field(..., example=['pump', 'fan'], max_length=64, min_length=1)
|
|
1027
|
+
|
|
1028
|
+
"""
|
|
1029
|
+
|
|
1030
|
+
__root__: str = Field(..., example=["pump", "fan"], max_length=64, min_length=1)
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
class AssetTypeBulkDelete(DataModelBase):
|
|
1034
|
+
"""
|
|
1035
|
+
AssetTypeBulkDelete object.
|
|
1036
|
+
|
|
1037
|
+
Parameters
|
|
1038
|
+
----------
|
|
1039
|
+
names: List[NameModel]
|
|
1040
|
+
|
|
1041
|
+
"""
|
|
1042
|
+
|
|
1043
|
+
names: List[NameModel] = Field(..., description="List of asset type names to be deleted.", min_items=1)
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
class AssetTypeUpdate(DataModelBase):
|
|
1047
|
+
"""
|
|
1048
|
+
AssetTypeUpdate object.
|
|
1049
|
+
|
|
1050
|
+
Parameters
|
|
1051
|
+
----------
|
|
1052
|
+
title: Optional[str]
|
|
1053
|
+
|
|
1054
|
+
"""
|
|
1055
|
+
|
|
1056
|
+
title: Optional[str] = Field(
|
|
1057
|
+
None, description="New Asset Type display name (`title`).", example="Beam Pump", max_length=64, min_length=1
|
|
1058
|
+
)
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
class NameModel1(BaseModelRoot[str]):
|
|
1062
|
+
"""
|
|
1063
|
+
NameModel1 object.
|
|
1064
|
+
|
|
1065
|
+
Parameters
|
|
1066
|
+
----------
|
|
1067
|
+
__root__: str = Field(..., example=['well_1', 'well_62'], max_length=64, min_length=1)
|
|
1068
|
+
|
|
1069
|
+
"""
|
|
1070
|
+
|
|
1071
|
+
__root__: str = Field(..., example=["well_1", "well_62"], max_length=64, min_length=1)
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
class AssetBulkDelete(DataModelBase):
|
|
1075
|
+
"""
|
|
1076
|
+
AssetBulkDelete object.
|
|
1077
|
+
|
|
1078
|
+
Parameters
|
|
1079
|
+
----------
|
|
1080
|
+
names: List[NameModel1]
|
|
1081
|
+
|
|
1082
|
+
"""
|
|
1083
|
+
|
|
1084
|
+
names: List[NameModel1] = Field(..., description="List of asset names to be deleted.", min_items=1)
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
class AssetUpdate(DataModelBase):
|
|
1088
|
+
"""
|
|
1089
|
+
AssetUpdate object.
|
|
1090
|
+
|
|
1091
|
+
Parameters
|
|
1092
|
+
----------
|
|
1093
|
+
asset_type_name: Optional[str]
|
|
1094
|
+
properties: Optional[List[AssetPropertyCreate]]
|
|
1095
|
+
title: str
|
|
1096
|
+
|
|
1097
|
+
"""
|
|
1098
|
+
|
|
1099
|
+
asset_type_name: Optional[str] = Field(
|
|
1100
|
+
None,
|
|
1101
|
+
description="Asset Type `name`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1102
|
+
example="beam_pump",
|
|
1103
|
+
max_length=64,
|
|
1104
|
+
min_length=1,
|
|
1105
|
+
)
|
|
1106
|
+
properties: Optional[List[AssetPropertyCreate]] = Field(
|
|
1107
|
+
None,
|
|
1108
|
+
description="Array of custom properties. These properties are not used by the Kelvin Platform and are for end-user use only.",
|
|
1109
|
+
)
|
|
1110
|
+
title: str = Field(..., description="Asset display name (`title`).", example="Well 01", max_length=64, min_length=1)
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
class BridgeDeploy(DataModelBase):
|
|
1114
|
+
"""
|
|
1115
|
+
BridgeDeploy object.
|
|
1116
|
+
|
|
1117
|
+
Parameters
|
|
1118
|
+
----------
|
|
1119
|
+
app_version: Optional[str]
|
|
1120
|
+
cluster_name: str
|
|
1121
|
+
name: str
|
|
1122
|
+
payload: type.AppYaml
|
|
1123
|
+
title: Optional[str]
|
|
1124
|
+
app_name: str
|
|
1125
|
+
|
|
1126
|
+
"""
|
|
1127
|
+
|
|
1128
|
+
app_version: Optional[str] = Field(None, max_length=64)
|
|
1129
|
+
cluster_name: str = Field(
|
|
1130
|
+
...,
|
|
1131
|
+
description="Unique identifier `name` of the Cluster. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1132
|
+
example="docs-demo-cluster-k3s",
|
|
1133
|
+
max_length=64,
|
|
1134
|
+
min_length=1,
|
|
1135
|
+
)
|
|
1136
|
+
name: str = Field(
|
|
1137
|
+
...,
|
|
1138
|
+
description="Unique identifier `name` of the Bridge (Connection). The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1139
|
+
example="motor-plc-opcua-connection",
|
|
1140
|
+
max_length=32,
|
|
1141
|
+
min_length=1,
|
|
1142
|
+
)
|
|
1143
|
+
payload: type.AppYaml = Field(
|
|
1144
|
+
...,
|
|
1145
|
+
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).",
|
|
1146
|
+
)
|
|
1147
|
+
title: Optional[str] = Field(
|
|
1148
|
+
None,
|
|
1149
|
+
description="Display name (`title`) of the Bridge (Connection).",
|
|
1150
|
+
example="Motor PLC OPCUA Connection",
|
|
1151
|
+
max_length=64,
|
|
1152
|
+
min_length=1,
|
|
1153
|
+
)
|
|
1154
|
+
app_name: str = Field(
|
|
1155
|
+
...,
|
|
1156
|
+
description="Unique identifier `name` of the App. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1157
|
+
example="test-app",
|
|
1158
|
+
max_length=64,
|
|
1159
|
+
min_length=1,
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
class Source(BaseModelRoot[str]):
|
|
1164
|
+
"""
|
|
1165
|
+
Source object.
|
|
1166
|
+
|
|
1167
|
+
Parameters
|
|
1168
|
+
----------
|
|
1169
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
1170
|
+
|
|
1171
|
+
"""
|
|
1172
|
+
|
|
1173
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
class TimeBucket(Enum):
|
|
1177
|
+
ns = "ns"
|
|
1178
|
+
ms = "ms"
|
|
1179
|
+
s = "s"
|
|
1180
|
+
m = "m"
|
|
1181
|
+
h = "h"
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
class ControlChangeClusteringGet(DataModelBase):
|
|
1185
|
+
"""
|
|
1186
|
+
ControlChangeClusteringGet object.
|
|
1187
|
+
|
|
1188
|
+
Parameters
|
|
1189
|
+
----------
|
|
1190
|
+
end_date: datetime
|
|
1191
|
+
resources: Optional[List[Resource]]
|
|
1192
|
+
sources: Optional[List[Source]]
|
|
1193
|
+
start_date: datetime
|
|
1194
|
+
states: Optional[List[enum.ControlChangeState]]
|
|
1195
|
+
time_bucket: TimeBucket
|
|
1196
|
+
|
|
1197
|
+
"""
|
|
1198
|
+
|
|
1199
|
+
end_date: datetime = Field(
|
|
1200
|
+
...,
|
|
1201
|
+
description="Most recent (end) creation time for counting the number of Control Changes. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1202
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1203
|
+
)
|
|
1204
|
+
resources: Optional[List[Resource]] = Field(
|
|
1205
|
+
None,
|
|
1206
|
+
description="Filter Assets / Data Streams (`resources`) linked to Control Changes for inclusion in the count. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset and Data Stream name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1207
|
+
example=["krn:ad:bp_01/motor_speed_set_point", "krn:ad:bp_16/motor_speed_set_point"],
|
|
1208
|
+
)
|
|
1209
|
+
sources: Optional[List[Source]] = Field(
|
|
1210
|
+
None,
|
|
1211
|
+
description="Filter to only count Control Changes from certain `sources`. The filter is on the full name only. All strings in the array are treated as `OR`. Each KRN name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1212
|
+
example=["krn:app:motor-speed-control"],
|
|
1213
|
+
)
|
|
1214
|
+
start_date: datetime = Field(
|
|
1215
|
+
...,
|
|
1216
|
+
description="Earliest (start) creation time for counting the number of Control Changes. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1217
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1218
|
+
)
|
|
1219
|
+
states: Optional[List[enum.ControlChangeState]] = Field(
|
|
1220
|
+
None,
|
|
1221
|
+
description="Filter to only count Control Changes associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
1222
|
+
example=["sent", "applied"],
|
|
1223
|
+
)
|
|
1224
|
+
time_bucket: TimeBucket = Field(
|
|
1225
|
+
..., description="Defines the time range to use to group and count the Control Changes.", example="5m"
|
|
1226
|
+
)
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
class ControlChangeCreate(DataModelBase):
|
|
1230
|
+
"""
|
|
1231
|
+
ControlChangeCreate object.
|
|
1232
|
+
|
|
1233
|
+
Parameters
|
|
1234
|
+
----------
|
|
1235
|
+
expiration_date: datetime
|
|
1236
|
+
payload: type.AnyModel
|
|
1237
|
+
resource: str
|
|
1238
|
+
retries: Optional[int]
|
|
1239
|
+
timeout: Optional[int]
|
|
1240
|
+
|
|
1241
|
+
"""
|
|
1242
|
+
|
|
1243
|
+
expiration_date: datetime = Field(
|
|
1244
|
+
...,
|
|
1245
|
+
description="UTC time when the Control Change will expire and the `status` automatically marked as `failed`, formatted in RFC 3339.",
|
|
1246
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1247
|
+
)
|
|
1248
|
+
payload: type.AnyModel = Field(
|
|
1249
|
+
...,
|
|
1250
|
+
description="The new value payload to be applied to the Asset / Data Stream pair in `resource`.",
|
|
1251
|
+
example=2000,
|
|
1252
|
+
)
|
|
1253
|
+
resource: str = Field(
|
|
1254
|
+
...,
|
|
1255
|
+
description="The asset / data stream pair that this Control Change will be applied to.",
|
|
1256
|
+
example="krn:ad:beam_pump_01/motor_speed_set_point",
|
|
1257
|
+
max_length=256,
|
|
1258
|
+
min_length=1,
|
|
1259
|
+
)
|
|
1260
|
+
retries: Optional[int] = Field(
|
|
1261
|
+
None,
|
|
1262
|
+
description="How many times the Control Change Manager will try and send the same Control Change request to the Bridge before the change is tagged `failed` and no further attempts will be made. If the Bridge sends a `processed` acknowledgment, then the Control Change Manager will stop any further retries and wait for an `applied` response.",
|
|
1263
|
+
example=3,
|
|
1264
|
+
)
|
|
1265
|
+
timeout: Optional[int] = Field(
|
|
1266
|
+
None,
|
|
1267
|
+
description="How long the Control Change Manager will wait in seconds for the Bridge to send a `processed` acknowledgement before a retry will be attempted. If the total number of retries has reach its `retries` limit, then the change is tagged `failed` and no further attempts will be made.",
|
|
1268
|
+
example=150,
|
|
1269
|
+
)
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
class ControlChangeLastGet(DataModelBase):
|
|
1273
|
+
"""
|
|
1274
|
+
ControlChangeLastGet object.
|
|
1275
|
+
|
|
1276
|
+
Parameters
|
|
1277
|
+
----------
|
|
1278
|
+
resources: List[Resource]
|
|
1279
|
+
sources: Optional[List[Source]]
|
|
1280
|
+
states: Optional[List[enum.ControlChangeState]]
|
|
1281
|
+
|
|
1282
|
+
"""
|
|
1283
|
+
|
|
1284
|
+
resources: List[Resource] = Field(
|
|
1285
|
+
...,
|
|
1286
|
+
description="Filter on the list to show Control Change for requested Asset / Data Stream pairs only. The filter is on the full KRN name only. All strings in the array are treated as `OR`. Each Asset and Data Stream name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1287
|
+
example=["krn:ad:beam_pump_02/motor_speed_set_point", "krn:ad:beam_pump_16/motor_speed_set_point"],
|
|
1288
|
+
)
|
|
1289
|
+
sources: Optional[List[Source]] = Field(
|
|
1290
|
+
None,
|
|
1291
|
+
description="Filter on the list to show Control Change for requested `sources` only. The filter is on the full KRN name only. All strings in the array are treated as `OR`. Each `source` name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1292
|
+
example=["krn:user:person@kelvin.ai", "krn:app:motor_speed_control"],
|
|
1293
|
+
)
|
|
1294
|
+
states: Optional[List[enum.ControlChangeState]] = Field(
|
|
1295
|
+
None,
|
|
1296
|
+
description="Filter on the Control Change states wanted. This will only check and filter on the `last_state` and not in the `status_log` object.",
|
|
1297
|
+
example=["sent", "applied"],
|
|
1298
|
+
)
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
class ControlChangesList(DataModelBase):
|
|
1302
|
+
"""
|
|
1303
|
+
ControlChangesList object.
|
|
1304
|
+
|
|
1305
|
+
Parameters
|
|
1306
|
+
----------
|
|
1307
|
+
ids: Optional[List[UUID]]
|
|
1308
|
+
resources: Optional[List[Resource]]
|
|
1309
|
+
sources: Optional[List[Source]]
|
|
1310
|
+
states: Optional[List[enum.ControlChangeState]]
|
|
1311
|
+
|
|
1312
|
+
"""
|
|
1313
|
+
|
|
1314
|
+
ids: Optional[List[UUID]] = Field(
|
|
1315
|
+
None,
|
|
1316
|
+
description="Filter on the list to show only specific Control Changes.",
|
|
1317
|
+
example=["0002bc79-b42f-461b-95d6-cf0a28ba87aa", "89df1fa1-72b3-4ffa-aae6-1a3e5324ee2e"],
|
|
1318
|
+
)
|
|
1319
|
+
resources: Optional[List[Resource]] = Field(
|
|
1320
|
+
None,
|
|
1321
|
+
description="Filter list to display only Control Changes for specified Asset/Data Stream pairs. The filter is on the full KRN name only. All strings in the array are treated as `OR`. Each Asset and Data Stream name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1322
|
+
example=["krn:ad:beam_pump_02/motor_speed_set_point", "krn:ad:beam_pump_16/motor_speed_set_point"],
|
|
1323
|
+
)
|
|
1324
|
+
sources: Optional[List[Source]] = Field(
|
|
1325
|
+
None,
|
|
1326
|
+
description="Filter list to display only Control Changes for specified `sources` only. The filter is on the full KRN name only. All strings in the array are treated as `OR`. Each `source` name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1327
|
+
example=["krn:user:person@kelvin.ai", "krn:app:motor_speed_control"],
|
|
1328
|
+
)
|
|
1329
|
+
states: Optional[List[enum.ControlChangeState]] = Field(
|
|
1330
|
+
None,
|
|
1331
|
+
description="Filter list to display only Control Changes for specified `states` only. This will only check and filter on the `last_state` and not in the `status_log` object.",
|
|
1332
|
+
example=["sent", "applied"],
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
class ControlChangeRangeGet(DataModelBase):
|
|
1337
|
+
"""
|
|
1338
|
+
ControlChangeRangeGet object.
|
|
1339
|
+
|
|
1340
|
+
Parameters
|
|
1341
|
+
----------
|
|
1342
|
+
end_date: datetime
|
|
1343
|
+
resources: List[Resource]
|
|
1344
|
+
sources: Optional[List[Source]]
|
|
1345
|
+
start_date: datetime
|
|
1346
|
+
states: Optional[List[enum.ControlChangeState]]
|
|
1347
|
+
|
|
1348
|
+
"""
|
|
1349
|
+
|
|
1350
|
+
end_date: datetime = Field(
|
|
1351
|
+
...,
|
|
1352
|
+
description="Most recent (end) creation time for the list of Control Changes. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1353
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1354
|
+
)
|
|
1355
|
+
resources: List[Resource] = Field(
|
|
1356
|
+
...,
|
|
1357
|
+
description="Filter Assets / Data Streams (`resources`) linked to Control Changes for inclusion in the count. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset and Data Stream name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1358
|
+
example=["krn:ad:bp_01/motor_speed_set_point", "krn:ad:bp_16/motor_speed_set_point"],
|
|
1359
|
+
)
|
|
1360
|
+
sources: Optional[List[Source]] = Field(
|
|
1361
|
+
None,
|
|
1362
|
+
description="Filter to only count Control Changes from certain `sources`. The filter is on the full name only. All strings in the array are treated as `OR`. Each KRN name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1363
|
+
example=["krn:app:motor-speed-control"],
|
|
1364
|
+
)
|
|
1365
|
+
start_date: datetime = Field(
|
|
1366
|
+
...,
|
|
1367
|
+
description="Earliest (start) creation time for counting the number of Control Changes. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1368
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
1369
|
+
)
|
|
1370
|
+
states: Optional[List[enum.ControlChangeState]] = Field(
|
|
1371
|
+
None,
|
|
1372
|
+
description="Filter to only count Control Changes associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
1373
|
+
example=["sent", "applied"],
|
|
1374
|
+
)
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
class DataStreamSemanticTypeCreate(DataModelBase):
|
|
1378
|
+
"""
|
|
1379
|
+
DataStreamSemanticTypeCreate object.
|
|
1380
|
+
|
|
1381
|
+
Parameters
|
|
1382
|
+
----------
|
|
1383
|
+
name: str
|
|
1384
|
+
title: str
|
|
1385
|
+
|
|
1386
|
+
"""
|
|
1387
|
+
|
|
1388
|
+
name: str = Field(
|
|
1389
|
+
...,
|
|
1390
|
+
description="Unique identifier `name` of the new Semantic Type.",
|
|
1391
|
+
example="mass_flow_rate",
|
|
1392
|
+
max_length=64,
|
|
1393
|
+
min_length=1,
|
|
1394
|
+
)
|
|
1395
|
+
title: str = Field(
|
|
1396
|
+
...,
|
|
1397
|
+
description="Display name (`title`) of the new Semantic Type.",
|
|
1398
|
+
example="Mass Flow Rate",
|
|
1399
|
+
max_length=64,
|
|
1400
|
+
min_length=1,
|
|
1401
|
+
)
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
class DataStreamSemanticTypeUpdate(DataModelBase):
|
|
1405
|
+
"""
|
|
1406
|
+
DataStreamSemanticTypeUpdate object.
|
|
1407
|
+
|
|
1408
|
+
Parameters
|
|
1409
|
+
----------
|
|
1410
|
+
title: Optional[str]
|
|
1411
|
+
|
|
1412
|
+
"""
|
|
1413
|
+
|
|
1414
|
+
title: Optional[str] = Field(
|
|
1415
|
+
None,
|
|
1416
|
+
description="Display name (`title`) of the Semantic Type.",
|
|
1417
|
+
example="Mass Flow Rate",
|
|
1418
|
+
max_length=64,
|
|
1419
|
+
min_length=1,
|
|
1420
|
+
)
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
class DataStreamUnitCreate(DataModelBase):
|
|
1424
|
+
"""
|
|
1425
|
+
DataStreamUnitCreate object.
|
|
1426
|
+
|
|
1427
|
+
Parameters
|
|
1428
|
+
----------
|
|
1429
|
+
name: str
|
|
1430
|
+
symbol: str
|
|
1431
|
+
title: str
|
|
1432
|
+
|
|
1433
|
+
"""
|
|
1434
|
+
|
|
1435
|
+
name: str = Field(
|
|
1436
|
+
...,
|
|
1437
|
+
description="Unique identifier `name` of the new Unit.",
|
|
1438
|
+
example="degree_fahrenheit",
|
|
1439
|
+
max_length=64,
|
|
1440
|
+
min_length=1,
|
|
1441
|
+
)
|
|
1442
|
+
symbol: str = Field(
|
|
1443
|
+
...,
|
|
1444
|
+
description="A brief and precise character or set of characters that symbolize a specific measurement of the new Unit.",
|
|
1445
|
+
example="°F",
|
|
1446
|
+
max_length=16,
|
|
1447
|
+
min_length=1,
|
|
1448
|
+
)
|
|
1449
|
+
title: str = Field(
|
|
1450
|
+
...,
|
|
1451
|
+
description="Display name (`title`) of the new Unit.",
|
|
1452
|
+
example="Degree Fahrenheit",
|
|
1453
|
+
max_length=64,
|
|
1454
|
+
min_length=1,
|
|
1455
|
+
)
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
class BulkDataStreamUnitCreate(DataModelBase):
|
|
1459
|
+
"""
|
|
1460
|
+
BulkDataStreamUnitCreate object.
|
|
1461
|
+
|
|
1462
|
+
Parameters
|
|
1463
|
+
----------
|
|
1464
|
+
units: List[DataStreamUnitCreate]
|
|
1465
|
+
|
|
1466
|
+
"""
|
|
1467
|
+
|
|
1468
|
+
units: List[DataStreamUnitCreate] = Field(
|
|
1469
|
+
..., description="Array of objects, each object in the array represents a new Unit.", min_items=1
|
|
1470
|
+
)
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
class DataStreamUnitUpdate(DataModelBase):
|
|
1474
|
+
"""
|
|
1475
|
+
DataStreamUnitUpdate object.
|
|
1476
|
+
|
|
1477
|
+
Parameters
|
|
1478
|
+
----------
|
|
1479
|
+
symbol: Optional[str]
|
|
1480
|
+
title: Optional[str]
|
|
1481
|
+
|
|
1482
|
+
"""
|
|
1483
|
+
|
|
1484
|
+
symbol: Optional[str] = Field(
|
|
1485
|
+
None,
|
|
1486
|
+
description="A brief and precise character or set of characters that symbolize a specific measurement of the Unit.",
|
|
1487
|
+
example="°F",
|
|
1488
|
+
max_length=16,
|
|
1489
|
+
min_length=1,
|
|
1490
|
+
)
|
|
1491
|
+
title: Optional[str] = Field(
|
|
1492
|
+
None,
|
|
1493
|
+
description="Display name (`title`) of the Unit.",
|
|
1494
|
+
example="Degree Fahrenheit",
|
|
1495
|
+
max_length=64,
|
|
1496
|
+
min_length=1,
|
|
1497
|
+
)
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
class TypeModel(Enum):
|
|
1501
|
+
computed = "computed"
|
|
1502
|
+
measurement = "measurement"
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
class DataStreamCreate(DataModelBase):
|
|
1506
|
+
"""
|
|
1507
|
+
DataStreamCreate object.
|
|
1508
|
+
|
|
1509
|
+
Parameters
|
|
1510
|
+
----------
|
|
1511
|
+
description: Optional[str]
|
|
1512
|
+
name: str
|
|
1513
|
+
data_type_name: enum.DataTypeName
|
|
1514
|
+
semantic_type_name: Optional[str]
|
|
1515
|
+
title: str
|
|
1516
|
+
type: TypeModel
|
|
1517
|
+
unit_name: Optional[str]
|
|
1518
|
+
|
|
1519
|
+
"""
|
|
1520
|
+
|
|
1521
|
+
description: Optional[str] = Field(
|
|
1522
|
+
None,
|
|
1523
|
+
description="Detailed description of the new Data Stream.",
|
|
1524
|
+
example="The rate at which gas flows from the reservoir to the surface.",
|
|
1525
|
+
max_length=200,
|
|
1526
|
+
min_length=1,
|
|
1527
|
+
)
|
|
1528
|
+
name: str = Field(
|
|
1529
|
+
...,
|
|
1530
|
+
description="Unique identifier `name` for the new Data Stream. Can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1531
|
+
example="gas_flow_rate",
|
|
1532
|
+
max_length=64,
|
|
1533
|
+
min_length=1,
|
|
1534
|
+
)
|
|
1535
|
+
data_type_name: enum.DataTypeName = Field(..., description="Data type of the new Data Stream.")
|
|
1536
|
+
semantic_type_name: Optional[str] = Field(
|
|
1537
|
+
None,
|
|
1538
|
+
description="Unique identifier `name` of the Semantic Type that describes the nature, purpose or origin of the data.",
|
|
1539
|
+
example="volume_flow_rate",
|
|
1540
|
+
max_length=64,
|
|
1541
|
+
min_length=1,
|
|
1542
|
+
)
|
|
1543
|
+
title: str = Field(
|
|
1544
|
+
...,
|
|
1545
|
+
description="Display name (`title`) of the Data Stream.",
|
|
1546
|
+
example="Gas Flow Rate",
|
|
1547
|
+
max_length=64,
|
|
1548
|
+
min_length=1,
|
|
1549
|
+
)
|
|
1550
|
+
type: TypeModel = Field(..., description="Specifies the technique used for generating data in the Data Stream.")
|
|
1551
|
+
unit_name: Optional[str] = Field(
|
|
1552
|
+
None,
|
|
1553
|
+
description="Unique identifier `name` of the Units that describes the type or category of data represented by each unit.",
|
|
1554
|
+
example="litre_per_second",
|
|
1555
|
+
max_length=64,
|
|
1556
|
+
min_length=1,
|
|
1557
|
+
)
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
class BulkDataStreamCreate(DataModelBase):
|
|
1561
|
+
"""
|
|
1562
|
+
BulkDataStreamCreate object.
|
|
1563
|
+
|
|
1564
|
+
Parameters
|
|
1565
|
+
----------
|
|
1566
|
+
datastreams: List[DataStreamCreate]
|
|
1567
|
+
|
|
1568
|
+
"""
|
|
1569
|
+
|
|
1570
|
+
datastreams: List[DataStreamCreate] = Field(
|
|
1571
|
+
..., description="Array of objects, each object in the array represents a new Datastream.", min_items=1
|
|
1572
|
+
)
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
class DataStreamUpdate(DataModelBase):
|
|
1576
|
+
"""
|
|
1577
|
+
DataStreamUpdate object.
|
|
1578
|
+
|
|
1579
|
+
Parameters
|
|
1580
|
+
----------
|
|
1581
|
+
description: Optional[str]
|
|
1582
|
+
title: Optional[str]
|
|
1583
|
+
|
|
1584
|
+
"""
|
|
1585
|
+
|
|
1586
|
+
description: Optional[str] = Field(
|
|
1587
|
+
None,
|
|
1588
|
+
description="Detailed description of the Data Stream.",
|
|
1589
|
+
example="The rate at which gas flows from the reservoir to the surface.",
|
|
1590
|
+
max_length=200,
|
|
1591
|
+
min_length=1,
|
|
1592
|
+
)
|
|
1593
|
+
title: Optional[str] = Field(
|
|
1594
|
+
None,
|
|
1595
|
+
description="Display name (`title`) of the Data Stream.",
|
|
1596
|
+
example="Gas Flow Rate",
|
|
1597
|
+
max_length=64,
|
|
1598
|
+
min_length=1,
|
|
1599
|
+
)
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
class DataTypeName(BaseModelRoot[str]):
|
|
1603
|
+
"""
|
|
1604
|
+
DataTypeName object.
|
|
1605
|
+
|
|
1606
|
+
Parameters
|
|
1607
|
+
----------
|
|
1608
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1609
|
+
|
|
1610
|
+
"""
|
|
1611
|
+
|
|
1612
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
class NameModel2(BaseModelRoot[str]):
|
|
1616
|
+
"""
|
|
1617
|
+
NameModel2 object.
|
|
1618
|
+
|
|
1619
|
+
Parameters
|
|
1620
|
+
----------
|
|
1621
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1622
|
+
|
|
1623
|
+
"""
|
|
1624
|
+
|
|
1625
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
class SemanticTypeName(BaseModelRoot[str]):
|
|
1629
|
+
"""
|
|
1630
|
+
SemanticTypeName object.
|
|
1631
|
+
|
|
1632
|
+
Parameters
|
|
1633
|
+
----------
|
|
1634
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1635
|
+
|
|
1636
|
+
"""
|
|
1637
|
+
|
|
1638
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
class UnitName(BaseModelRoot[str]):
|
|
1642
|
+
"""
|
|
1643
|
+
UnitName object.
|
|
1644
|
+
|
|
1645
|
+
Parameters
|
|
1646
|
+
----------
|
|
1647
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1648
|
+
|
|
1649
|
+
"""
|
|
1650
|
+
|
|
1651
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
class DataStreamsList(DataModelBase):
|
|
1655
|
+
"""
|
|
1656
|
+
DataStreamsList object.
|
|
1657
|
+
|
|
1658
|
+
Parameters
|
|
1659
|
+
----------
|
|
1660
|
+
data_type_names: Optional[List[DataTypeName]]
|
|
1661
|
+
names: Optional[List[NameModel2]]
|
|
1662
|
+
search: Optional[List[SearchItem]]
|
|
1663
|
+
semantic_type_names: Optional[List[SemanticTypeName]]
|
|
1664
|
+
unit_names: Optional[List[UnitName]]
|
|
1665
|
+
|
|
1666
|
+
"""
|
|
1667
|
+
|
|
1668
|
+
data_type_names: Optional[List[DataTypeName]] = Field(
|
|
1669
|
+
None,
|
|
1670
|
+
description="A filter on the list based on the key `data_type_name`. The filter is on the full name only. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1671
|
+
example=["number", "string"],
|
|
1672
|
+
)
|
|
1673
|
+
names: Optional[List[NameModel2]] = Field(
|
|
1674
|
+
None,
|
|
1675
|
+
description="A filter on the list based on the Data Stream key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. Each string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1676
|
+
example=["motor_temperature", "water_flow_rate"],
|
|
1677
|
+
)
|
|
1678
|
+
search: Optional[List[SearchItem]] = Field(
|
|
1679
|
+
None,
|
|
1680
|
+
description="Search and filter on the list based on the keys `title` (Display Name) or `name`. The search is case insensitive and will find partial matches as well. All strings in the array are treated as `OR`.",
|
|
1681
|
+
example=["motor", "water"],
|
|
1682
|
+
)
|
|
1683
|
+
semantic_type_names: Optional[List[SemanticTypeName]] = Field(
|
|
1684
|
+
None,
|
|
1685
|
+
description="A filter on the list based on the key `semantic_type_name`. The filter is on the full name only. All strings in the array are treated as `OR`. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1686
|
+
example=["sound_pressure", "volume"],
|
|
1687
|
+
)
|
|
1688
|
+
unit_names: Optional[List[UnitName]] = Field(
|
|
1689
|
+
None,
|
|
1690
|
+
description="A filter on the list based on the key `unit_name`. The filter is on the full name only. All strings in the array are treated as `OR`. Each string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1691
|
+
example=["kilogram", "litre_per_second"],
|
|
1692
|
+
)
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
class DatastreamName(BaseModelRoot[str]):
|
|
1696
|
+
"""
|
|
1697
|
+
DatastreamName object.
|
|
1698
|
+
|
|
1699
|
+
Parameters
|
|
1700
|
+
----------
|
|
1701
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1702
|
+
|
|
1703
|
+
"""
|
|
1704
|
+
|
|
1705
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
class DataStreamContextsList(DataModelBase):
|
|
1709
|
+
"""
|
|
1710
|
+
DataStreamContextsList object.
|
|
1711
|
+
|
|
1712
|
+
Parameters
|
|
1713
|
+
----------
|
|
1714
|
+
datastream_names: Optional[List[DatastreamName]]
|
|
1715
|
+
resources: Optional[List[Resource]]
|
|
1716
|
+
sources: Optional[List[Source]]
|
|
1717
|
+
|
|
1718
|
+
"""
|
|
1719
|
+
|
|
1720
|
+
datastream_names: Optional[List[DatastreamName]] = Field(
|
|
1721
|
+
None,
|
|
1722
|
+
description="A filter on the list based on the Data Stream key `name`. The filter is on the full name only. All strings in the array are treated as `OR`. Each string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1723
|
+
example=["motor_temperature", "water_flow_rate"],
|
|
1724
|
+
)
|
|
1725
|
+
resources: Optional[List[Resource]] = Field(
|
|
1726
|
+
None,
|
|
1727
|
+
description="A filter on the list showing only Data Streams associated with any Assets in the array. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1728
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
1729
|
+
)
|
|
1730
|
+
sources: Optional[List[Source]] = Field(
|
|
1731
|
+
None,
|
|
1732
|
+
description="A filter on the list showing only Data Streams associated with any workloads in the array. The filter is on the full name only. All strings in the array are treated as `OR`. Each Workload name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
1733
|
+
example=["krn:wlappv:cluster1/app1/1.2.0"],
|
|
1734
|
+
)
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
class Context(BaseModelRoot[str]):
|
|
1738
|
+
"""
|
|
1739
|
+
Context object.
|
|
1740
|
+
|
|
1741
|
+
Parameters
|
|
1742
|
+
----------
|
|
1743
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
1744
|
+
|
|
1745
|
+
"""
|
|
1746
|
+
|
|
1747
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
class DataTagCreate(DataModelBase):
|
|
1751
|
+
"""
|
|
1752
|
+
DataTagCreate object.
|
|
1753
|
+
|
|
1754
|
+
Parameters
|
|
1755
|
+
----------
|
|
1756
|
+
start_date: datetime
|
|
1757
|
+
end_date: datetime
|
|
1758
|
+
tag_name: str
|
|
1759
|
+
resource: str
|
|
1760
|
+
source: Optional[str]
|
|
1761
|
+
description: Optional[str]
|
|
1762
|
+
contexts: Optional[List[Context]]
|
|
1763
|
+
|
|
1764
|
+
"""
|
|
1765
|
+
|
|
1766
|
+
start_date: datetime = Field(
|
|
1767
|
+
...,
|
|
1768
|
+
description="Start date for the Data Tag. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1769
|
+
example="2024-02-06T18:22:18.582724Z",
|
|
1770
|
+
)
|
|
1771
|
+
end_date: datetime = Field(
|
|
1772
|
+
...,
|
|
1773
|
+
description="End date for the Data Tag. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1774
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
1775
|
+
)
|
|
1776
|
+
tag_name: str = Field(
|
|
1777
|
+
..., description="Tag name to categorize the Data Tag", example="Valve Change", max_length=64, min_length=1
|
|
1778
|
+
)
|
|
1779
|
+
resource: str = Field(
|
|
1780
|
+
...,
|
|
1781
|
+
description="The Asset that this Data Tag is related to.",
|
|
1782
|
+
example="krn:asset:well_01",
|
|
1783
|
+
max_length=256,
|
|
1784
|
+
min_length=1,
|
|
1785
|
+
)
|
|
1786
|
+
source: Optional[str] = Field(
|
|
1787
|
+
None,
|
|
1788
|
+
description="The process that created this Data Tag. This can be a user or an automated process like a workload, application, etc.",
|
|
1789
|
+
example="krn:wlappv:cluster1/app1/1.2.0",
|
|
1790
|
+
max_length=256,
|
|
1791
|
+
min_length=1,
|
|
1792
|
+
)
|
|
1793
|
+
description: Optional[str] = Field(
|
|
1794
|
+
None,
|
|
1795
|
+
description="Detailed description of the Data Tag.",
|
|
1796
|
+
example="A Valve was changed today.",
|
|
1797
|
+
max_length=256,
|
|
1798
|
+
min_length=1,
|
|
1799
|
+
)
|
|
1800
|
+
contexts: Optional[List[Context]] = Field(
|
|
1801
|
+
None,
|
|
1802
|
+
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.",
|
|
1803
|
+
example=["krn:datastream:temperature", "krn:appversion:smart-pcp/2.0.0"],
|
|
1804
|
+
)
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
class DataTagUpdate(DataModelBase):
|
|
1808
|
+
"""
|
|
1809
|
+
DataTagUpdate object.
|
|
1810
|
+
|
|
1811
|
+
Parameters
|
|
1812
|
+
----------
|
|
1813
|
+
start_date: Optional[datetime]
|
|
1814
|
+
end_date: Optional[datetime]
|
|
1815
|
+
tag_name: Optional[str]
|
|
1816
|
+
resource: Optional[str]
|
|
1817
|
+
description: Optional[str]
|
|
1818
|
+
contexts: Optional[List[Context]]
|
|
1819
|
+
|
|
1820
|
+
"""
|
|
1821
|
+
|
|
1822
|
+
start_date: Optional[datetime] = Field(
|
|
1823
|
+
None,
|
|
1824
|
+
description="Start date for the Data Tag. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1825
|
+
example="2024-02-06T18:22:18.582724Z",
|
|
1826
|
+
)
|
|
1827
|
+
end_date: Optional[datetime] = Field(
|
|
1828
|
+
None,
|
|
1829
|
+
description="End date for the Data Tag. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1830
|
+
example="2024-02-06T19:22:18.582724Z",
|
|
1831
|
+
)
|
|
1832
|
+
tag_name: Optional[str] = Field(
|
|
1833
|
+
None, description="Tag name to categorize the Data Tag", example="Valve Change", max_length=64, min_length=1
|
|
1834
|
+
)
|
|
1835
|
+
resource: Optional[str] = Field(
|
|
1836
|
+
None,
|
|
1837
|
+
description="The Asset that this Data Tag is related to.",
|
|
1838
|
+
example="krn:asset:well_01",
|
|
1839
|
+
max_length=256,
|
|
1840
|
+
min_length=1,
|
|
1841
|
+
)
|
|
1842
|
+
description: Optional[str] = Field(
|
|
1843
|
+
None,
|
|
1844
|
+
description="Detailed description of the Data Tag.",
|
|
1845
|
+
example="A Valve was changed today.",
|
|
1846
|
+
max_length=256,
|
|
1847
|
+
min_length=1,
|
|
1848
|
+
)
|
|
1849
|
+
contexts: Optional[List[Context]] = Field(
|
|
1850
|
+
None,
|
|
1851
|
+
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.",
|
|
1852
|
+
example=["krn:datastream:temperature", "krn:appversion:smart-pcp/2.0.0"],
|
|
1853
|
+
)
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
class TagName(BaseModelRoot[str]):
|
|
1857
|
+
"""
|
|
1858
|
+
TagName object.
|
|
1859
|
+
|
|
1860
|
+
Parameters
|
|
1861
|
+
----------
|
|
1862
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1863
|
+
|
|
1864
|
+
"""
|
|
1865
|
+
|
|
1866
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
class DataTagsList(DataModelBase):
|
|
1870
|
+
"""
|
|
1871
|
+
DataTagsList object.
|
|
1872
|
+
|
|
1873
|
+
Parameters
|
|
1874
|
+
----------
|
|
1875
|
+
ids: Optional[List[UUID]]
|
|
1876
|
+
search: Optional[List[SearchItem]]
|
|
1877
|
+
tag_names: Optional[List[TagName]]
|
|
1878
|
+
resources: Optional[List[Resource]]
|
|
1879
|
+
sources: Optional[List[Source]]
|
|
1880
|
+
contexts: Optional[List[Context]]
|
|
1881
|
+
start_date: Optional[datetime]
|
|
1882
|
+
end_date: Optional[datetime]
|
|
1883
|
+
|
|
1884
|
+
"""
|
|
1885
|
+
|
|
1886
|
+
ids: Optional[List[UUID]] = Field(
|
|
1887
|
+
None,
|
|
1888
|
+
description="Search and filter on the list based on the key `id`. The filter is on the full UUID `id` only. All strings in the array are treated as `OR`.",
|
|
1889
|
+
example=["0002bc79-b42f-461b-95d6-cf0a28ba87aa", "00080f9e-d086-452d-b41d-c8aa8fb27c92"],
|
|
1890
|
+
)
|
|
1891
|
+
search: Optional[List[SearchItem]] = Field(
|
|
1892
|
+
None,
|
|
1893
|
+
description="Search and filter on the list based on the key `tag_name`. The search is case insensitive and will find partial matches as well. All strings in the array are treated as `OR`.",
|
|
1894
|
+
example=["break", "change"],
|
|
1895
|
+
)
|
|
1896
|
+
tag_names: Optional[List[TagName]] = Field(
|
|
1897
|
+
None,
|
|
1898
|
+
description="A filter on the list showing only Data Tags associated with one or more tags. The filter is on the full Data Tags `tag_name` only. All strings in the array are treated as `OR`.",
|
|
1899
|
+
example=["Breakdown", "Valve Change"],
|
|
1900
|
+
)
|
|
1901
|
+
resources: Optional[List[Resource]] = Field(
|
|
1902
|
+
None,
|
|
1903
|
+
description="A filter on the list showing only Data Tags associated with any Assets in the array. The filter is on the full KRN Asset name only. All strings in the array are treated as `OR`. Each Asset name must be in the KRN format.",
|
|
1904
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
1905
|
+
)
|
|
1906
|
+
sources: Optional[List[Source]] = Field(
|
|
1907
|
+
None,
|
|
1908
|
+
description="A filter on the list showing only Data Tags created by a certain source. The filter is on the full `source` KRN name only. All strings in the array are treated as `OR`.",
|
|
1909
|
+
example=["krn:wlappv:cluster1/app1/1.2.0", "krn:user:richard.teo@kelvininc.com"],
|
|
1910
|
+
)
|
|
1911
|
+
contexts: Optional[List[Context]] = Field(
|
|
1912
|
+
None,
|
|
1913
|
+
description="A filter on the list showing only Data Tags associated with any context resource. The filter is on the full `contexts` KRN only. All strings in the array are treated as `OR`.",
|
|
1914
|
+
example=["krn:datastream:temperature", "krn:appversion:smart-pcp/2.0.0"],
|
|
1915
|
+
)
|
|
1916
|
+
start_date: Optional[datetime] = Field(
|
|
1917
|
+
None,
|
|
1918
|
+
description="Earliest `end_date` time for the list of Data Tags. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1919
|
+
example="2024-02-06T00:00:00.000000Z",
|
|
1920
|
+
)
|
|
1921
|
+
end_date: Optional[datetime] = Field(
|
|
1922
|
+
None,
|
|
1923
|
+
description="Most recent `start_date` time for the list of Data Tags. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
1924
|
+
example="2024-02-07T00:00:00.000000Z",
|
|
1925
|
+
)
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
class TagCreate(DataModelBase):
|
|
1929
|
+
"""
|
|
1930
|
+
TagCreate object.
|
|
1931
|
+
|
|
1932
|
+
Parameters
|
|
1933
|
+
----------
|
|
1934
|
+
name: str
|
|
1935
|
+
metadata: Optional[Dict[str, Any]]
|
|
1936
|
+
|
|
1937
|
+
"""
|
|
1938
|
+
|
|
1939
|
+
name: str = Field(
|
|
1940
|
+
..., description="Case insensitive Tag name.", example="Valve Change", max_length=64, min_length=1
|
|
1941
|
+
)
|
|
1942
|
+
metadata: Optional[Dict[str, Any]] = Field(
|
|
1943
|
+
None,
|
|
1944
|
+
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.",
|
|
1945
|
+
)
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
class TagUpdate(DataModelBase):
|
|
1949
|
+
"""
|
|
1950
|
+
TagUpdate object.
|
|
1951
|
+
|
|
1952
|
+
Parameters
|
|
1953
|
+
----------
|
|
1954
|
+
metadata: Optional[Dict[str, Any]]
|
|
1955
|
+
|
|
1956
|
+
"""
|
|
1957
|
+
|
|
1958
|
+
metadata: Optional[Dict[str, Any]] = Field(
|
|
1959
|
+
None,
|
|
1960
|
+
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.",
|
|
1961
|
+
)
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
class FilesList(DataModelBase):
|
|
1965
|
+
"""
|
|
1966
|
+
FilesList object.
|
|
1967
|
+
|
|
1968
|
+
Parameters
|
|
1969
|
+
----------
|
|
1970
|
+
file_names: Optional[List[str]]
|
|
1971
|
+
sources: Optional[List[str]]
|
|
1972
|
+
search: Optional[List[str]]
|
|
1973
|
+
|
|
1974
|
+
"""
|
|
1975
|
+
|
|
1976
|
+
file_names: Optional[List[str]] = Field(
|
|
1977
|
+
None,
|
|
1978
|
+
description="Array of file names to filter. This filter only returns exact matches with the passed values.",
|
|
1979
|
+
example=["test.csv", "test.tar.gz"],
|
|
1980
|
+
)
|
|
1981
|
+
sources: Optional[List[str]] = Field(
|
|
1982
|
+
None,
|
|
1983
|
+
description="Array of sources to filter. This filter only returns exact matches with the passed values. (Note that all sources are in the KRN format)",
|
|
1984
|
+
example=["krn:user:user1", "krn:user:user2"],
|
|
1985
|
+
)
|
|
1986
|
+
search: Optional[List[str]] = Field(
|
|
1987
|
+
None,
|
|
1988
|
+
description="Search and filter based of file name. All values in array will be filtered as `OR`. The search is case insensitive and will find partial matches as well.",
|
|
1989
|
+
example=["test.csv", "test.tar.gz"],
|
|
1990
|
+
)
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
class InstanceSettingsAppManagerPlannerRulesUpdate(InstanceSettingsAppManagerPlannerRules):
|
|
1994
|
+
"""
|
|
1995
|
+
InstanceSettingsAppManagerPlannerRulesUpdate object.
|
|
1996
|
+
|
|
1997
|
+
Parameters
|
|
1998
|
+
----------
|
|
1999
|
+
|
|
2000
|
+
"""
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
class ClusterSettingAutoUpdate(DataModelBase):
|
|
2004
|
+
"""
|
|
2005
|
+
ClusterSettingAutoUpdate object.
|
|
2006
|
+
|
|
2007
|
+
Parameters
|
|
2008
|
+
----------
|
|
2009
|
+
enabled: Optional[bool]
|
|
2010
|
+
interval: Optional[int]
|
|
2011
|
+
|
|
2012
|
+
"""
|
|
2013
|
+
|
|
2014
|
+
enabled: Optional[bool] = Field(None, description="If the auto update is enabled.", example=True)
|
|
2015
|
+
interval: Optional[int] = Field(None, description="If the auto update is enabled.")
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
class ClusterSettingDeployOptions(DataModelBase):
|
|
2019
|
+
"""
|
|
2020
|
+
ClusterSettingDeployOptions object.
|
|
2021
|
+
|
|
2022
|
+
Parameters
|
|
2023
|
+
----------
|
|
2024
|
+
instantly_apply: Optional[bool]
|
|
2025
|
+
pre_download: Optional[bool]
|
|
2026
|
+
|
|
2027
|
+
"""
|
|
2028
|
+
|
|
2029
|
+
instantly_apply: Optional[bool] = Field(
|
|
2030
|
+
None,
|
|
2031
|
+
description="Option if upgrades should be applied automatically and instantly as soon as they are available in the Cluster.",
|
|
2032
|
+
example=True,
|
|
2033
|
+
)
|
|
2034
|
+
pre_download: Optional[bool] = Field(
|
|
2035
|
+
None,
|
|
2036
|
+
description="Option for pre-downloading Cluster Instance. Actual upgrade initiation requires manual action or having `instantly_apply` set to true.",
|
|
2037
|
+
example=True,
|
|
2038
|
+
)
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
class ClusterSettingForwardLogs(DataModelBase):
|
|
2042
|
+
"""
|
|
2043
|
+
ClusterSettingForwardLogs object.
|
|
2044
|
+
|
|
2045
|
+
Parameters
|
|
2046
|
+
----------
|
|
2047
|
+
buffer_size: Optional[int]
|
|
2048
|
+
enabled: Optional[bool]
|
|
2049
|
+
|
|
2050
|
+
"""
|
|
2051
|
+
|
|
2052
|
+
buffer_size: Optional[int] = Field(
|
|
2053
|
+
5,
|
|
2054
|
+
description="Size in gigabytes of the log storage in the Instance Cluster when Cluster is offline. Any setting changes will delete all logs not yet transferred from the Cluster to Cloud.",
|
|
2055
|
+
example=10,
|
|
2056
|
+
)
|
|
2057
|
+
enabled: Optional[bool] = Field(
|
|
2058
|
+
True,
|
|
2059
|
+
description="Enable offline storage in the Instance Cluster for log retention; transfers logs when Cluster is next online.",
|
|
2060
|
+
example=True,
|
|
2061
|
+
)
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
class ClusterSettingSync(DataModelBase):
|
|
2065
|
+
"""
|
|
2066
|
+
ClusterSettingSync object.
|
|
2067
|
+
|
|
2068
|
+
Parameters
|
|
2069
|
+
----------
|
|
2070
|
+
interval: Optional[int]
|
|
2071
|
+
|
|
2072
|
+
"""
|
|
2073
|
+
|
|
2074
|
+
interval: Optional[int] = Field(
|
|
2075
|
+
30,
|
|
2076
|
+
description="Frequency in minutes that the Instance Cluster checks for new changes to apply to Workloads or Applications (deploy, start, stop, etc.)",
|
|
2077
|
+
example=60,
|
|
2078
|
+
ge=1,
|
|
2079
|
+
le=1440,
|
|
2080
|
+
)
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
class ClusterSettingTelemetry(DataModelBase):
|
|
2084
|
+
"""
|
|
2085
|
+
ClusterSettingTelemetry object.
|
|
2086
|
+
|
|
2087
|
+
Parameters
|
|
2088
|
+
----------
|
|
2089
|
+
buffer_size: Optional[int]
|
|
2090
|
+
enabled: Optional[bool]
|
|
2091
|
+
scrape_interval: Optional[int]
|
|
2092
|
+
|
|
2093
|
+
"""
|
|
2094
|
+
|
|
2095
|
+
buffer_size: Optional[int] = Field(
|
|
2096
|
+
5,
|
|
2097
|
+
description="Size in gigabytes of telemetry data storage in the Cluster Instance when the Cluster is offline. Any setting changes will delete all logs not yet transferred from the Cluster to Cloud.",
|
|
2098
|
+
example=10,
|
|
2099
|
+
ge=1,
|
|
2100
|
+
le=20,
|
|
2101
|
+
)
|
|
2102
|
+
enabled: Optional[bool] = Field(
|
|
2103
|
+
True,
|
|
2104
|
+
description="Enable offline storage in the Cluster Instance for telemetry data retention; transfers data when the Cluster is next online.",
|
|
2105
|
+
)
|
|
2106
|
+
scrape_interval: Optional[int] = Field(
|
|
2107
|
+
30,
|
|
2108
|
+
description="Time interval in seconds to save each telemetry data. Any setting changes will delete all data not yet transferred from the Cluster Instance to Cloud.",
|
|
2109
|
+
example=60,
|
|
2110
|
+
ge=1,
|
|
2111
|
+
le=3600,
|
|
2112
|
+
)
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
class ClusterSetting(DataModelBase):
|
|
2116
|
+
"""
|
|
2117
|
+
ClusterSetting object.
|
|
2118
|
+
|
|
2119
|
+
Parameters
|
|
2120
|
+
----------
|
|
2121
|
+
auto_update: Optional[ClusterSettingAutoUpdate]
|
|
2122
|
+
cluster_upgrade: Optional[ClusterSettingDeployOptions]
|
|
2123
|
+
forward_logs: Optional[ClusterSettingForwardLogs]
|
|
2124
|
+
sync: Optional[ClusterSettingSync]
|
|
2125
|
+
telemetry: Optional[ClusterSettingTelemetry]
|
|
2126
|
+
workload_deploy: Optional[ClusterSettingDeployOptions]
|
|
2127
|
+
|
|
2128
|
+
"""
|
|
2129
|
+
|
|
2130
|
+
auto_update: Optional[ClusterSettingAutoUpdate] = None
|
|
2131
|
+
cluster_upgrade: Optional[ClusterSettingDeployOptions] = None
|
|
2132
|
+
forward_logs: Optional[ClusterSettingForwardLogs] = None
|
|
2133
|
+
sync: Optional[ClusterSettingSync] = None
|
|
2134
|
+
telemetry: Optional[ClusterSettingTelemetry] = None
|
|
2135
|
+
workload_deploy: Optional[ClusterSettingDeployOptions] = None
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
class InstanceSettingsKelvinClusterUpdate(DataModelBase):
|
|
2139
|
+
"""
|
|
2140
|
+
InstanceSettingsKelvinClusterUpdate object.
|
|
2141
|
+
|
|
2142
|
+
Parameters
|
|
2143
|
+
----------
|
|
2144
|
+
payload: Optional[ClusterSetting]
|
|
2145
|
+
|
|
2146
|
+
"""
|
|
2147
|
+
|
|
2148
|
+
payload: Optional[ClusterSetting] = None
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
class InstanceSettingsUpdate(DataModelBase):
|
|
2152
|
+
"""
|
|
2153
|
+
InstanceSettingsUpdate object.
|
|
2154
|
+
|
|
2155
|
+
Parameters
|
|
2156
|
+
----------
|
|
2157
|
+
payload: Optional[Dict[str, Any]]
|
|
2158
|
+
|
|
2159
|
+
"""
|
|
2160
|
+
|
|
2161
|
+
payload: Optional[Dict[str, Any]] = Field(
|
|
2162
|
+
None,
|
|
2163
|
+
description="The Instance Settings. The structure of this `payload` object depends on the type of Instance Setting being defined.",
|
|
2164
|
+
)
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
class OrchestrationClustersCreate(DataModelBase):
|
|
2168
|
+
"""
|
|
2169
|
+
OrchestrationClustersCreate object.
|
|
2170
|
+
|
|
2171
|
+
Parameters
|
|
2172
|
+
----------
|
|
2173
|
+
name: Optional[str]
|
|
2174
|
+
title: Optional[str]
|
|
2175
|
+
type: Optional[enum.ClusterType]
|
|
2176
|
+
|
|
2177
|
+
"""
|
|
2178
|
+
|
|
2179
|
+
name: Optional[str] = Field(
|
|
2180
|
+
None,
|
|
2181
|
+
description="Unique identifier key `name` of the Cluster.",
|
|
2182
|
+
example="aws-cluster",
|
|
2183
|
+
max_length=64,
|
|
2184
|
+
min_length=1,
|
|
2185
|
+
)
|
|
2186
|
+
title: Optional[str] = Field(
|
|
2187
|
+
None, description="Display name (`title`) of the Cluster.", example="AWS Cluster", max_length=64, min_length=1
|
|
2188
|
+
)
|
|
2189
|
+
type: Optional[enum.ClusterType] = Field(None, description="Type of Cluster to deploy..")
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
class ClusterUpgrade(DataModelBase):
|
|
2193
|
+
"""
|
|
2194
|
+
ClusterUpgrade object.
|
|
2195
|
+
|
|
2196
|
+
Parameters
|
|
2197
|
+
----------
|
|
2198
|
+
instantly_apply: Optional[bool]
|
|
2199
|
+
pre_download: Optional[bool]
|
|
2200
|
+
|
|
2201
|
+
"""
|
|
2202
|
+
|
|
2203
|
+
instantly_apply: Optional[bool] = Field(
|
|
2204
|
+
None,
|
|
2205
|
+
description="Setting to immediately apply upgrades to Workloads or Applications as soon as they are available in the Cluster.",
|
|
2206
|
+
)
|
|
2207
|
+
pre_download: Optional[bool] = Field(
|
|
2208
|
+
None,
|
|
2209
|
+
description="Setting to immediately download new Workloads or Application upgrades to the Cluster; requires manual initiation or `instantly_apply` set to true to initiate upgrade.",
|
|
2210
|
+
)
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
class OrchestrationClustersUpdate(DataModelBase):
|
|
2214
|
+
"""
|
|
2215
|
+
OrchestrationClustersUpdate object.
|
|
2216
|
+
|
|
2217
|
+
Parameters
|
|
2218
|
+
----------
|
|
2219
|
+
forward_logs_buffer_size: Optional[int]
|
|
2220
|
+
forward_logs_enabled: Optional[bool]
|
|
2221
|
+
manifests_scrape_enabled: Optional[bool]
|
|
2222
|
+
manifests_scrape_interval: Optional[int]
|
|
2223
|
+
ready: Optional[bool]
|
|
2224
|
+
sync_scrape_interval: Optional[int]
|
|
2225
|
+
telemetry_buffer_size: Optional[int]
|
|
2226
|
+
telemetry_enabled: Optional[bool]
|
|
2227
|
+
telemetry_scrape_interval: Optional[int]
|
|
2228
|
+
title: Optional[str]
|
|
2229
|
+
upgrade: Optional[ClusterUpgrade]
|
|
2230
|
+
|
|
2231
|
+
"""
|
|
2232
|
+
|
|
2233
|
+
forward_logs_buffer_size: Optional[int] = Field(
|
|
2234
|
+
5,
|
|
2235
|
+
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.",
|
|
2236
|
+
example=10,
|
|
2237
|
+
ge=1,
|
|
2238
|
+
le=20,
|
|
2239
|
+
)
|
|
2240
|
+
forward_logs_enabled: Optional[bool] = Field(
|
|
2241
|
+
True,
|
|
2242
|
+
description="Enable offline storage in the Cluster for log retention; transfers logs when the Cluster is next online.",
|
|
2243
|
+
)
|
|
2244
|
+
manifests_scrape_enabled: Optional[bool] = Field(
|
|
2245
|
+
True, description="Enable auto update Kelvin Software running on the Cluster."
|
|
2246
|
+
)
|
|
2247
|
+
manifests_scrape_interval: Optional[int] = Field(
|
|
2248
|
+
86400,
|
|
2249
|
+
description="Frequency in seconds for checking updates in the Cloud for Kelvin Software running on the Cluster.",
|
|
2250
|
+
example=3600,
|
|
2251
|
+
ge=30,
|
|
2252
|
+
le=86400,
|
|
2253
|
+
)
|
|
2254
|
+
ready: Optional[bool] = Field(None, description="Setting to inform Kelvin UI if the Cluster is ready.")
|
|
2255
|
+
sync_scrape_interval: Optional[int] = Field(
|
|
2256
|
+
30,
|
|
2257
|
+
description="Frequency in seconds that the Cluster checks for new changes to apply in Workloads or Applications (deploy, start, stop, etc.)",
|
|
2258
|
+
example=3600,
|
|
2259
|
+
ge=10,
|
|
2260
|
+
le=86400,
|
|
2261
|
+
)
|
|
2262
|
+
telemetry_buffer_size: Optional[int] = Field(
|
|
2263
|
+
5,
|
|
2264
|
+
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.",
|
|
2265
|
+
example=10,
|
|
2266
|
+
ge=1,
|
|
2267
|
+
le=20,
|
|
2268
|
+
)
|
|
2269
|
+
telemetry_enabled: Optional[bool] = Field(
|
|
2270
|
+
True,
|
|
2271
|
+
description="Enable offline storage in the Cluster for telemetry data retention; transfers data when the Cluster is next online.",
|
|
2272
|
+
)
|
|
2273
|
+
telemetry_scrape_interval: Optional[int] = Field(
|
|
2274
|
+
30,
|
|
2275
|
+
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.",
|
|
2276
|
+
example=60,
|
|
2277
|
+
ge=1,
|
|
2278
|
+
le=3600,
|
|
2279
|
+
)
|
|
2280
|
+
title: Optional[str] = Field(
|
|
2281
|
+
None,
|
|
2282
|
+
description="New display name (`title`) for Cluster.",
|
|
2283
|
+
example="AWS Cluster 01",
|
|
2284
|
+
max_length=64,
|
|
2285
|
+
min_length=1,
|
|
2286
|
+
)
|
|
2287
|
+
upgrade: Optional[ClusterUpgrade] = None
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
class ParameterValueUpdate(DataModelBase):
|
|
2291
|
+
"""
|
|
2292
|
+
ParameterValueUpdate object.
|
|
2293
|
+
|
|
2294
|
+
Parameters
|
|
2295
|
+
----------
|
|
2296
|
+
comment: Optional[str]
|
|
2297
|
+
name: str
|
|
2298
|
+
value: type.AnyModel
|
|
2299
|
+
|
|
2300
|
+
"""
|
|
2301
|
+
|
|
2302
|
+
comment: Optional[str] = Field(
|
|
2303
|
+
None,
|
|
2304
|
+
description="Any comments about the updates to the Parameter value.",
|
|
2305
|
+
example="Updating parameter for well operational optimization.",
|
|
2306
|
+
max_length=200,
|
|
2307
|
+
min_length=1,
|
|
2308
|
+
)
|
|
2309
|
+
name: str = Field(
|
|
2310
|
+
...,
|
|
2311
|
+
description="Unique identifier name for this Parameter.",
|
|
2312
|
+
example="gas_flow_rate_max_threshold",
|
|
2313
|
+
max_length=64,
|
|
2314
|
+
min_length=1,
|
|
2315
|
+
)
|
|
2316
|
+
value: type.AnyModel = Field(
|
|
2317
|
+
...,
|
|
2318
|
+
description="New value for this parameter. The format of the value expected will depend on its Primitive Type.",
|
|
2319
|
+
example=160,
|
|
2320
|
+
)
|
|
2321
|
+
|
|
2322
|
+
|
|
2323
|
+
class ParametersUpdate(DataModelBase):
|
|
2324
|
+
"""
|
|
2325
|
+
ParametersUpdate object.
|
|
2326
|
+
|
|
2327
|
+
Parameters
|
|
2328
|
+
----------
|
|
2329
|
+
parameters: List[ParameterValueUpdate]
|
|
2330
|
+
source: Optional[str]
|
|
2331
|
+
|
|
2332
|
+
"""
|
|
2333
|
+
|
|
2334
|
+
parameters: List[ParameterValueUpdate] = Field(
|
|
2335
|
+
...,
|
|
2336
|
+
description="New values for one or more Parameters for the Asset in the App. Bulk updates of Parameters are possible.",
|
|
2337
|
+
)
|
|
2338
|
+
source: Optional[str] = Field(
|
|
2339
|
+
None,
|
|
2340
|
+
description="KRN of the User or Service that last created or updated the Parameter.",
|
|
2341
|
+
example="krn:user:richard.teo@kelvininc.com",
|
|
2342
|
+
max_length=256,
|
|
2343
|
+
min_length=1,
|
|
2344
|
+
)
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
class ParamtersAppVersionUpdate(DataModelBase):
|
|
2348
|
+
"""
|
|
2349
|
+
ParamtersAppVersionUpdate object.
|
|
2350
|
+
|
|
2351
|
+
Parameters
|
|
2352
|
+
----------
|
|
2353
|
+
source: Optional[str]
|
|
2354
|
+
resource_parameters: List[type.ResourceParameters]
|
|
2355
|
+
|
|
2356
|
+
"""
|
|
2357
|
+
|
|
2358
|
+
source: Optional[str] = Field(
|
|
2359
|
+
None,
|
|
2360
|
+
description="The source of the change request (restricted to Service Accounts)",
|
|
2361
|
+
max_length=256,
|
|
2362
|
+
min_length=1,
|
|
2363
|
+
)
|
|
2364
|
+
resource_parameters: List[type.ResourceParameters]
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
class AppNameModel(BaseModelRoot[str]):
|
|
2368
|
+
"""
|
|
2369
|
+
AppNameModel object.
|
|
2370
|
+
|
|
2371
|
+
Parameters
|
|
2372
|
+
----------
|
|
2373
|
+
__root__: str = Field(..., example='motor-speed-control', max_length=64, min_length=1)
|
|
2374
|
+
|
|
2375
|
+
"""
|
|
2376
|
+
|
|
2377
|
+
__root__: str = Field(..., example="motor-speed-control", max_length=64, min_length=1)
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
class NameModel3(BaseModelRoot[str]):
|
|
2381
|
+
"""
|
|
2382
|
+
NameModel3 object.
|
|
2383
|
+
|
|
2384
|
+
Parameters
|
|
2385
|
+
----------
|
|
2386
|
+
__root__: str = Field(..., example='gas_flow_rate_max_threshold', max_length=64, min_length=1)
|
|
2387
|
+
|
|
2388
|
+
"""
|
|
2389
|
+
|
|
2390
|
+
__root__: str = Field(..., example="gas_flow_rate_max_threshold", max_length=64, min_length=1)
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
class PrimitiveTypeModel(Enum):
|
|
2394
|
+
boolean = "boolean"
|
|
2395
|
+
number = "number"
|
|
2396
|
+
object = "object"
|
|
2397
|
+
string = "string"
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
class ParametersDefinitionsList(DataModelBase):
|
|
2401
|
+
"""
|
|
2402
|
+
ParametersDefinitionsList object.
|
|
2403
|
+
|
|
2404
|
+
Parameters
|
|
2405
|
+
----------
|
|
2406
|
+
app_names: Optional[List[AppNameModel]]
|
|
2407
|
+
names: Optional[List[NameModel3]]
|
|
2408
|
+
primitive_types: Optional[List[PrimitiveTypeModel]]
|
|
2409
|
+
search: Optional[List[SearchItem]]
|
|
2410
|
+
|
|
2411
|
+
"""
|
|
2412
|
+
|
|
2413
|
+
app_names: Optional[List[AppNameModel]] = Field(
|
|
2414
|
+
None,
|
|
2415
|
+
description="A filter on the list based on the key `app_name`. The filter is on the full name only. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2416
|
+
)
|
|
2417
|
+
names: Optional[List[NameModel3]] = Field(None, description="Unique identifier name for this Parameter.")
|
|
2418
|
+
primitive_types: Optional[List[PrimitiveTypeModel]] = Field(
|
|
2419
|
+
None,
|
|
2420
|
+
description="Filter on the list based on the Primitive data type key `primitive_type` of the Parameter.",
|
|
2421
|
+
example=["number", "boolean"],
|
|
2422
|
+
)
|
|
2423
|
+
search: Optional[List[SearchItem]] = Field(
|
|
2424
|
+
None,
|
|
2425
|
+
description="Search and filter on the list based on the keys `parameter_name`. The search is case insensitive and will find partial matches as well. All strings in the array are treated as `OR`. ",
|
|
2426
|
+
example=["motor", "water"],
|
|
2427
|
+
)
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
class ParameterAppVersion(DataModelBase):
|
|
2431
|
+
"""
|
|
2432
|
+
ParameterAppVersion object.
|
|
2433
|
+
|
|
2434
|
+
Parameters
|
|
2435
|
+
----------
|
|
2436
|
+
name: str
|
|
2437
|
+
version: str
|
|
2438
|
+
|
|
2439
|
+
"""
|
|
2440
|
+
|
|
2441
|
+
name: str = Field(
|
|
2442
|
+
...,
|
|
2443
|
+
description="A filter on the list based on the key `app_name`. The filter is on the full name only. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2444
|
+
example="motor-speed-control",
|
|
2445
|
+
max_length=64,
|
|
2446
|
+
min_length=1,
|
|
2447
|
+
)
|
|
2448
|
+
version: str = Field(
|
|
2449
|
+
...,
|
|
2450
|
+
description="A filter on the list based on the key `app_version`. The filter is on the full name only. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2451
|
+
example="1.2.0",
|
|
2452
|
+
max_length=64,
|
|
2453
|
+
)
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
class ParameterName(BaseModelRoot[str]):
|
|
2457
|
+
"""
|
|
2458
|
+
ParameterName object.
|
|
2459
|
+
|
|
2460
|
+
Parameters
|
|
2461
|
+
----------
|
|
2462
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
2463
|
+
|
|
2464
|
+
"""
|
|
2465
|
+
|
|
2466
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
class ParametersResourcesList(DataModelBase):
|
|
2470
|
+
"""
|
|
2471
|
+
ParametersResourcesList object.
|
|
2472
|
+
|
|
2473
|
+
Parameters
|
|
2474
|
+
----------
|
|
2475
|
+
apps: Optional[List[ParameterAppVersion]]
|
|
2476
|
+
resources: Optional[List[Resource]]
|
|
2477
|
+
parameter_names: Optional[List[ParameterName]]
|
|
2478
|
+
|
|
2479
|
+
"""
|
|
2480
|
+
|
|
2481
|
+
apps: Optional[List[ParameterAppVersion]] = Field(
|
|
2482
|
+
None, description="A filter on the list for Apps and its Versions. Multiple Apps and Versions can be given."
|
|
2483
|
+
)
|
|
2484
|
+
resources: Optional[List[Resource]] = Field(
|
|
2485
|
+
None,
|
|
2486
|
+
description="A filter on the list showing only current Parameter values associated with any Assets in the array. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2487
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
2488
|
+
)
|
|
2489
|
+
parameter_names: Optional[List[ParameterName]] = Field(
|
|
2490
|
+
None,
|
|
2491
|
+
description="A filter on the list for Parameters. The filter is on the full name only. All strings in the array are treated as `OR`. Each Parameter name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2492
|
+
example=["motor-speed-control", "gas_flow_rate_max_threshold"],
|
|
2493
|
+
)
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
class Parameter(BaseModelRoot[str]):
|
|
2497
|
+
"""
|
|
2498
|
+
Parameter object.
|
|
2499
|
+
|
|
2500
|
+
Parameters
|
|
2501
|
+
----------
|
|
2502
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
2503
|
+
|
|
2504
|
+
"""
|
|
2505
|
+
|
|
2506
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
2507
|
+
|
|
2508
|
+
|
|
2509
|
+
class AppParameter(DataModelBase):
|
|
2510
|
+
"""
|
|
2511
|
+
AppParameter object.
|
|
2512
|
+
|
|
2513
|
+
Parameters
|
|
2514
|
+
----------
|
|
2515
|
+
app_name: str
|
|
2516
|
+
parameters: Optional[List[Parameter]]
|
|
2517
|
+
|
|
2518
|
+
"""
|
|
2519
|
+
|
|
2520
|
+
app_name: str = Field(
|
|
2521
|
+
...,
|
|
2522
|
+
description="A filter on the list based on the key `app_name`. The filter is on the full name only. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2523
|
+
example="motor-speed-control",
|
|
2524
|
+
max_length=64,
|
|
2525
|
+
min_length=1,
|
|
2526
|
+
)
|
|
2527
|
+
parameters: Optional[List[Parameter]] = Field(
|
|
2528
|
+
None,
|
|
2529
|
+
description="Array of Parameter `names` to fetch associated values for Apps.",
|
|
2530
|
+
example=["gas_flow_rate_min_threshold", "gas_flow_rate_max_threshold"],
|
|
2531
|
+
)
|
|
2532
|
+
|
|
2533
|
+
|
|
2534
|
+
class ParametersValuesGet(DataModelBase):
|
|
2535
|
+
"""
|
|
2536
|
+
ParametersValuesGet object.
|
|
2537
|
+
|
|
2538
|
+
Parameters
|
|
2539
|
+
----------
|
|
2540
|
+
app_parameters: Optional[List[AppParameter]]
|
|
2541
|
+
primitive_types: Optional[List[enum.ParameterTypeName]]
|
|
2542
|
+
|
|
2543
|
+
"""
|
|
2544
|
+
|
|
2545
|
+
app_parameters: Optional[List[AppParameter]] = Field(
|
|
2546
|
+
None,
|
|
2547
|
+
description="Filter on the list based on the key `app_name` and wanted Parameter `name` per App. The filter is on the full name only. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2548
|
+
)
|
|
2549
|
+
primitive_types: Optional[List[enum.ParameterTypeName]] = Field(
|
|
2550
|
+
None,
|
|
2551
|
+
description="Filter on the list based on the Parameter data type key `primitive_type` of the Parameter.",
|
|
2552
|
+
example=["number", "boolean"],
|
|
2553
|
+
)
|
|
2554
|
+
|
|
2555
|
+
|
|
2556
|
+
class ResourceName(BaseModelRoot[str]):
|
|
2557
|
+
"""
|
|
2558
|
+
ResourceName object.
|
|
2559
|
+
|
|
2560
|
+
Parameters
|
|
2561
|
+
----------
|
|
2562
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
2563
|
+
|
|
2564
|
+
"""
|
|
2565
|
+
|
|
2566
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
2567
|
+
|
|
2568
|
+
|
|
2569
|
+
class TypeModel1(BaseModelRoot[str]):
|
|
2570
|
+
"""
|
|
2571
|
+
TypeModel1 object.
|
|
2572
|
+
|
|
2573
|
+
Parameters
|
|
2574
|
+
----------
|
|
2575
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
2576
|
+
|
|
2577
|
+
"""
|
|
2578
|
+
|
|
2579
|
+
__root__: str = Field(..., max_length=64, min_length=1)
|
|
2580
|
+
|
|
2581
|
+
|
|
2582
|
+
class RecommendationClusteringGet(DataModelBase):
|
|
2583
|
+
"""
|
|
2584
|
+
RecommendationClusteringGet object.
|
|
2585
|
+
|
|
2586
|
+
Parameters
|
|
2587
|
+
----------
|
|
2588
|
+
end_date: datetime
|
|
2589
|
+
resource_names: Optional[List[ResourceName]]
|
|
2590
|
+
sources: Optional[List[Source]]
|
|
2591
|
+
start_date: datetime
|
|
2592
|
+
states: Optional[List[enum.RecommendationState]]
|
|
2593
|
+
time_bucket: TimeBucket
|
|
2594
|
+
types: Optional[List[TypeModel1]]
|
|
2595
|
+
|
|
2596
|
+
"""
|
|
2597
|
+
|
|
2598
|
+
end_date: datetime = Field(
|
|
2599
|
+
...,
|
|
2600
|
+
description="Most recent (end) creation time for counting the number of Recommendations. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
2601
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
2602
|
+
)
|
|
2603
|
+
resource_names: Optional[List[ResourceName]] = Field(
|
|
2604
|
+
None,
|
|
2605
|
+
description="Filter Assets (`resources`) linked to Recommendations for inclusion in the count. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2606
|
+
example=["krn:asset:bp_02", "krn:asset:bp_16"],
|
|
2607
|
+
)
|
|
2608
|
+
sources: Optional[List[Source]] = Field(
|
|
2609
|
+
None,
|
|
2610
|
+
description="A filter to only count Recommendations from certain `sources`. The filter is on the full name only. All strings in the array are treated as `OR`. Each KRN name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2611
|
+
example=["krn:app:motor-speed-control"],
|
|
2612
|
+
)
|
|
2613
|
+
start_date: datetime = Field(
|
|
2614
|
+
...,
|
|
2615
|
+
description="Earliest (start) creation time for counting the number of Recommendations. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
2616
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
2617
|
+
)
|
|
2618
|
+
states: Optional[List[enum.RecommendationState]] = Field(
|
|
2619
|
+
None,
|
|
2620
|
+
description="A filter to only count Recommendations associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
2621
|
+
example=["accepted", "applied"],
|
|
2622
|
+
)
|
|
2623
|
+
time_bucket: TimeBucket = Field(
|
|
2624
|
+
..., description="Defines the time range to use to group and count the Recommendations.", example="5m"
|
|
2625
|
+
)
|
|
2626
|
+
types: Optional[List[TypeModel1]] = Field(
|
|
2627
|
+
None,
|
|
2628
|
+
description="A filter to only count Recommendations associated with one or more `types`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
2629
|
+
example=["decrease_speed", "increase_speed"],
|
|
2630
|
+
)
|
|
2631
|
+
|
|
2632
|
+
|
|
2633
|
+
class RecommendationCreate(DataModelBase):
|
|
2634
|
+
"""
|
|
2635
|
+
RecommendationCreate object.
|
|
2636
|
+
|
|
2637
|
+
Parameters
|
|
2638
|
+
----------
|
|
2639
|
+
actions: Optional[type.RecommendationActions]
|
|
2640
|
+
confidence: Optional[int]
|
|
2641
|
+
custom_identifier: Optional[str]
|
|
2642
|
+
description: Optional[str]
|
|
2643
|
+
expiration_date: Optional[datetime]
|
|
2644
|
+
metadata: Optional[Dict[str, Any]]
|
|
2645
|
+
resource: str
|
|
2646
|
+
resource_parameters: Optional[Dict[str, Any]]
|
|
2647
|
+
source: str
|
|
2648
|
+
state: Optional[enum.RecommendationState]
|
|
2649
|
+
type: str
|
|
2650
|
+
|
|
2651
|
+
"""
|
|
2652
|
+
|
|
2653
|
+
actions: Optional[type.RecommendationActions] = None
|
|
2654
|
+
confidence: Optional[int] = Field(
|
|
2655
|
+
None,
|
|
2656
|
+
description="Confidence level of the Recommendation. This is usually, but not mandatory, related to any machine learning model confidence results.",
|
|
2657
|
+
example=7,
|
|
2658
|
+
ge=-2147483648,
|
|
2659
|
+
le=2147483647,
|
|
2660
|
+
)
|
|
2661
|
+
custom_identifier: Optional[str] = Field(
|
|
2662
|
+
None, description="An optional custom identifier for any purpose.", example="model-aws-ltsm-anomaly"
|
|
2663
|
+
)
|
|
2664
|
+
description: Optional[str] = Field(
|
|
2665
|
+
None,
|
|
2666
|
+
description="Detailed description of the Recommendation.",
|
|
2667
|
+
example="Beam pump speed AI optimizer application recommends a new value for the speed setpoint of the controller.",
|
|
2668
|
+
max_length=256,
|
|
2669
|
+
min_length=1,
|
|
2670
|
+
)
|
|
2671
|
+
expiration_date: Optional[datetime] = Field(
|
|
2672
|
+
None,
|
|
2673
|
+
description="UTC time when 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.",
|
|
2674
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
2675
|
+
)
|
|
2676
|
+
metadata: Optional[Dict[str, Any]] = Field(
|
|
2677
|
+
None,
|
|
2678
|
+
description="Custom dictionary keys/values for use by clients for anything useful and related to the Recommendation.",
|
|
2679
|
+
)
|
|
2680
|
+
resource: str = Field(
|
|
2681
|
+
...,
|
|
2682
|
+
description="The Asset that this Recommendation is related to.",
|
|
2683
|
+
example="krn:asset:bp_16",
|
|
2684
|
+
max_length=256,
|
|
2685
|
+
min_length=1,
|
|
2686
|
+
)
|
|
2687
|
+
resource_parameters: Optional[Dict[str, Any]] = Field(None, description="resource_parameters")
|
|
2688
|
+
source: str = Field(
|
|
2689
|
+
...,
|
|
2690
|
+
description="The process that created or last updated this Recommendation. This can be a user or an automated process like a workload, application, etc.",
|
|
2691
|
+
example="krn:wlappv:cluster1/app1/1.2.0",
|
|
2692
|
+
max_length=256,
|
|
2693
|
+
min_length=1,
|
|
2694
|
+
)
|
|
2695
|
+
state: Optional[enum.RecommendationState] = Field(None, description="Current `state` of the Recommendation.")
|
|
2696
|
+
type: str = Field(
|
|
2697
|
+
...,
|
|
2698
|
+
description="The Recommendation Type `name` associated with the Recommendation.",
|
|
2699
|
+
example="decrease_speed",
|
|
2700
|
+
max_length=64,
|
|
2701
|
+
min_length=1,
|
|
2702
|
+
)
|
|
2703
|
+
|
|
2704
|
+
|
|
2705
|
+
class RecommendationLastGet(DataModelBase):
|
|
2706
|
+
"""
|
|
2707
|
+
RecommendationLastGet object.
|
|
2708
|
+
|
|
2709
|
+
Parameters
|
|
2710
|
+
----------
|
|
2711
|
+
resources: List[Resource]
|
|
2712
|
+
sources: Optional[List[Source]]
|
|
2713
|
+
states: Optional[List[enum.RecommendationState]]
|
|
2714
|
+
types: Optional[List[TypeModel1]]
|
|
2715
|
+
|
|
2716
|
+
"""
|
|
2717
|
+
|
|
2718
|
+
resources: List[Resource] = Field(
|
|
2719
|
+
...,
|
|
2720
|
+
description="A filter on the list to show Last Recommendation for requested Assets only. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2721
|
+
example=["krn:asset:bp_02", "krn:asset:bp_16"],
|
|
2722
|
+
)
|
|
2723
|
+
sources: Optional[List[Source]] = Field(
|
|
2724
|
+
None,
|
|
2725
|
+
description="A filter on the list showing only Data Streams associated with any workloads in the array. The filter is on the full name only. All strings in the array are treated as `OR`. Each Workload name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2726
|
+
example=["krn:app:motor-speed-control"],
|
|
2727
|
+
)
|
|
2728
|
+
states: Optional[List[enum.RecommendationState]] = Field(
|
|
2729
|
+
None,
|
|
2730
|
+
description="A filter on the list showing only Recommendations associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
2731
|
+
example=["accepted", "applied"],
|
|
2732
|
+
)
|
|
2733
|
+
types: Optional[List[TypeModel1]] = Field(
|
|
2734
|
+
None,
|
|
2735
|
+
description="A filter on the list showing only Recommendations associated with one or more `types`. The filter is on the full `types` name only. All strings in the array are treated as `OR`.",
|
|
2736
|
+
example=["decrease_speed", "increase_speed"],
|
|
2737
|
+
)
|
|
2738
|
+
|
|
2739
|
+
|
|
2740
|
+
class RecommendationsList(DataModelBase):
|
|
2741
|
+
"""
|
|
2742
|
+
RecommendationsList object.
|
|
2743
|
+
|
|
2744
|
+
Parameters
|
|
2745
|
+
----------
|
|
2746
|
+
ids: Optional[List[UUID]]
|
|
2747
|
+
resources: Optional[List[Resource]]
|
|
2748
|
+
sources: Optional[List[Source]]
|
|
2749
|
+
states: Optional[List[enum.RecommendationState]]
|
|
2750
|
+
types: Optional[List[TypeModel1]]
|
|
2751
|
+
|
|
2752
|
+
"""
|
|
2753
|
+
|
|
2754
|
+
ids: Optional[List[UUID]] = Field(
|
|
2755
|
+
None,
|
|
2756
|
+
description="Search and filter on the list based on the key `id`. The filter is on the full UUID `id` only. All strings in the array are treated as `OR`.",
|
|
2757
|
+
example=["0002bc79-b42f-461b-95d6-cf0a28ba87aa", "00080f9e-d086-452d-b41d-c8aa8fb27c92"],
|
|
2758
|
+
)
|
|
2759
|
+
resources: Optional[List[Resource]] = Field(
|
|
2760
|
+
None,
|
|
2761
|
+
description="A filter on the list showing only Recommendations associated with any Assets in the array. The filter is on the full KRN Asset name only. All strings in the array are treated as `OR`. Each Asset name must be in the KRN format.",
|
|
2762
|
+
example=["krn:asset:bp_16", "krn:asset:bp_21"],
|
|
2763
|
+
)
|
|
2764
|
+
sources: Optional[List[Source]] = Field(
|
|
2765
|
+
None,
|
|
2766
|
+
description="A filter on the list showing only Recommendations created by a certain source. The filter is on the full `source` KRN name only. All strings in the array are treated as `OR`. This does not include the `sources` in the logs of a Recommendation.",
|
|
2767
|
+
example=["krn:wlappv:cluster1/app1/1.2.0", "krn:user:richard.teo@kelvininc.com"],
|
|
2768
|
+
)
|
|
2769
|
+
states: Optional[List[enum.RecommendationState]] = Field(
|
|
2770
|
+
None,
|
|
2771
|
+
description="A filter on the list showing only Recommendations associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
2772
|
+
example=["accepted", "applied"],
|
|
2773
|
+
)
|
|
2774
|
+
types: Optional[List[TypeModel1]] = Field(
|
|
2775
|
+
None,
|
|
2776
|
+
description="A filter on the list showing only Recommendations associated with one or more Recommendation Types. The filter is on the full Recommendation Type `name` only. All strings in the array are treated as `OR`. Each name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2777
|
+
example=["decrease_speed", "increase_speed"],
|
|
2778
|
+
)
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
class RecommendationRangeGet(DataModelBase):
|
|
2782
|
+
"""
|
|
2783
|
+
RecommendationRangeGet object.
|
|
2784
|
+
|
|
2785
|
+
Parameters
|
|
2786
|
+
----------
|
|
2787
|
+
end_date: datetime
|
|
2788
|
+
resources: List[Resource]
|
|
2789
|
+
sources: Optional[List[Source]]
|
|
2790
|
+
start_date: datetime
|
|
2791
|
+
states: Optional[List[enum.RecommendationState]]
|
|
2792
|
+
types: Optional[List[TypeModel1]]
|
|
2793
|
+
|
|
2794
|
+
"""
|
|
2795
|
+
|
|
2796
|
+
end_date: datetime = Field(
|
|
2797
|
+
...,
|
|
2798
|
+
description="Most recent (end) creation time for the list of Recommendations. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
2799
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
2800
|
+
)
|
|
2801
|
+
resources: List[Resource] = Field(
|
|
2802
|
+
...,
|
|
2803
|
+
description="A filter on the list to show Range of Recommendations for requested Assets only. The filter is on the full name only. All strings in the array are treated as `OR`. Each Asset name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2804
|
+
example=["krn:asset:bp_02", "krn:asset:bp_16"],
|
|
2805
|
+
)
|
|
2806
|
+
sources: Optional[List[Source]] = Field(
|
|
2807
|
+
None,
|
|
2808
|
+
description="A filter on the list showing only Recommendations coming from certain `sources`. The filter is on the full name only. All strings in the array are treated as `OR`. Each Workload name can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2809
|
+
example=["krn:app:motor-speed-control"],
|
|
2810
|
+
)
|
|
2811
|
+
start_date: datetime = Field(
|
|
2812
|
+
...,
|
|
2813
|
+
description="Earliest (start) creation time for the list of Recommendations. Time is based on UTC timezone, formatted in RFC 3339.",
|
|
2814
|
+
example="2023-11-18T18:22:18.582724Z",
|
|
2815
|
+
)
|
|
2816
|
+
states: Optional[List[enum.RecommendationState]] = Field(
|
|
2817
|
+
None,
|
|
2818
|
+
description="A filter on the list showing only Range of Recommendations associated with one or more `states`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
2819
|
+
example=["accepted", "applied"],
|
|
2820
|
+
)
|
|
2821
|
+
types: Optional[List[TypeModel1]] = Field(
|
|
2822
|
+
None,
|
|
2823
|
+
description="A filter on the list showing only Recommendations associated with one or more `types`. The filter is on the full `state` name only. All strings in the array are treated as `OR`.",
|
|
2824
|
+
example=["decrease_speed", "increase_speed"],
|
|
2825
|
+
)
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
class RecommendationTypeCreate(DataModelBase):
|
|
2829
|
+
"""
|
|
2830
|
+
RecommendationTypeCreate object.
|
|
2831
|
+
|
|
2832
|
+
Parameters
|
|
2833
|
+
----------
|
|
2834
|
+
description: Optional[str]
|
|
2835
|
+
name: str
|
|
2836
|
+
title: str
|
|
2837
|
+
|
|
2838
|
+
"""
|
|
2839
|
+
|
|
2840
|
+
description: Optional[str] = Field(
|
|
2841
|
+
None,
|
|
2842
|
+
description="Full description of the purpose for this Recommendation Type.",
|
|
2843
|
+
example="Recommendations that require a reduction in the speed set point.",
|
|
2844
|
+
max_length=256,
|
|
2845
|
+
min_length=1,
|
|
2846
|
+
)
|
|
2847
|
+
name: str = Field(
|
|
2848
|
+
...,
|
|
2849
|
+
description="Recommendation Type key `name` to create. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2850
|
+
example="decrease_speed",
|
|
2851
|
+
max_length=64,
|
|
2852
|
+
min_length=1,
|
|
2853
|
+
)
|
|
2854
|
+
title: str = Field(
|
|
2855
|
+
...,
|
|
2856
|
+
description="Display name (`title`) of the Asset Type.",
|
|
2857
|
+
example="Decrease Speed",
|
|
2858
|
+
max_length=64,
|
|
2859
|
+
min_length=1,
|
|
2860
|
+
)
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
class RecommendationTypeUpdate(DataModelBase):
|
|
2864
|
+
"""
|
|
2865
|
+
RecommendationTypeUpdate object.
|
|
2866
|
+
|
|
2867
|
+
Parameters
|
|
2868
|
+
----------
|
|
2869
|
+
description: Optional[str]
|
|
2870
|
+
title: Optional[str]
|
|
2871
|
+
|
|
2872
|
+
"""
|
|
2873
|
+
|
|
2874
|
+
description: Optional[str] = Field(
|
|
2875
|
+
None,
|
|
2876
|
+
description="New fFull description of the purpose for this Recommendation Type.",
|
|
2877
|
+
example="Recommendations that require a reduction in the speed set point.",
|
|
2878
|
+
max_length=256,
|
|
2879
|
+
min_length=1,
|
|
2880
|
+
)
|
|
2881
|
+
title: Optional[str] = Field(
|
|
2882
|
+
None,
|
|
2883
|
+
description="New display name (`title`) of the Recommendation Type.",
|
|
2884
|
+
example="Decrease Speed",
|
|
2885
|
+
max_length=64,
|
|
2886
|
+
min_length=1,
|
|
2887
|
+
)
|
|
2888
|
+
|
|
2889
|
+
|
|
2890
|
+
class RecommendationAcceptUpdate(DataModelBase):
|
|
2891
|
+
"""
|
|
2892
|
+
RecommendationAcceptUpdate object.
|
|
2893
|
+
|
|
2894
|
+
Parameters
|
|
2895
|
+
----------
|
|
2896
|
+
confidence: Optional[int]
|
|
2897
|
+
message: Optional[str]
|
|
2898
|
+
|
|
2899
|
+
"""
|
|
2900
|
+
|
|
2901
|
+
confidence: Optional[int] = Field(
|
|
2902
|
+
None,
|
|
2903
|
+
description="Confidence level of the decision to accept the Recommendation. This is usually, but not mandatory, related to any machine learning model confidence results.",
|
|
2904
|
+
example=7,
|
|
2905
|
+
ge=-2147483648,
|
|
2906
|
+
le=2147483647,
|
|
2907
|
+
)
|
|
2908
|
+
message: Optional[str] = Field(
|
|
2909
|
+
None,
|
|
2910
|
+
description="Contains a message with any descriptions useful to be associated with the `accepted` state. This will be recorded in logs of the actual Recommendation.",
|
|
2911
|
+
example="Recommendation is accurate based on the current performance.",
|
|
2912
|
+
max_length=256,
|
|
2913
|
+
min_length=1,
|
|
2914
|
+
)
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
class RecommendationLogCreate(DataModelBase):
|
|
2918
|
+
"""
|
|
2919
|
+
RecommendationLogCreate object.
|
|
2920
|
+
|
|
2921
|
+
Parameters
|
|
2922
|
+
----------
|
|
2923
|
+
message: Optional[str]
|
|
2924
|
+
|
|
2925
|
+
"""
|
|
2926
|
+
|
|
2927
|
+
message: Optional[str] = Field(
|
|
2928
|
+
None,
|
|
2929
|
+
description="Contains a message with any descriptions useful to be recorded in logs of the actual Recommendation.",
|
|
2930
|
+
example="Need more time to assess Recommendation data before making a decision.",
|
|
2931
|
+
max_length=256,
|
|
2932
|
+
min_length=1,
|
|
2933
|
+
)
|
|
2934
|
+
|
|
2935
|
+
|
|
2936
|
+
class RecommendationRejectUpdate(DataModelBase):
|
|
2937
|
+
"""
|
|
2938
|
+
RecommendationRejectUpdate object.
|
|
2939
|
+
|
|
2940
|
+
Parameters
|
|
2941
|
+
----------
|
|
2942
|
+
confidence: Optional[int]
|
|
2943
|
+
message: Optional[str]
|
|
2944
|
+
|
|
2945
|
+
"""
|
|
2946
|
+
|
|
2947
|
+
confidence: Optional[int] = Field(
|
|
2948
|
+
None,
|
|
2949
|
+
description="Confidence level of the decision to reject the Recommendation. This is usually, but not mandatory, related to any machine learning model confidence results.",
|
|
2950
|
+
example=7,
|
|
2951
|
+
ge=-2147483648,
|
|
2952
|
+
le=2147483647,
|
|
2953
|
+
)
|
|
2954
|
+
message: Optional[str] = Field(
|
|
2955
|
+
None,
|
|
2956
|
+
description="Contains a message with any descriptions useful to be associated with the `reject` state. This will be recorded in logs of the actual Recommendation.",
|
|
2957
|
+
example="Recommendation is not accurate based on the current performance.",
|
|
2958
|
+
max_length=256,
|
|
2959
|
+
min_length=1,
|
|
2960
|
+
)
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
class SecretCreate(DataModelBase):
|
|
2964
|
+
"""
|
|
2965
|
+
SecretCreate object.
|
|
2966
|
+
|
|
2967
|
+
Parameters
|
|
2968
|
+
----------
|
|
2969
|
+
name: str
|
|
2970
|
+
value: str
|
|
2971
|
+
|
|
2972
|
+
"""
|
|
2973
|
+
|
|
2974
|
+
name: str = Field(
|
|
2975
|
+
...,
|
|
2976
|
+
description="Unique identifier `name` for the Secret. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
2977
|
+
example="my_secret_password",
|
|
2978
|
+
max_length=32,
|
|
2979
|
+
min_length=1,
|
|
2980
|
+
)
|
|
2981
|
+
value: str = Field(
|
|
2982
|
+
...,
|
|
2983
|
+
description="The actual secret. Once this is set you can not change or see it from Kelvin API. Retrieval of the value can only be done through an App.",
|
|
2984
|
+
example="Nh9Noq%QWNaJim%uAe9r",
|
|
2985
|
+
max_length=64000,
|
|
2986
|
+
min_length=1,
|
|
2987
|
+
)
|
|
2988
|
+
|
|
2989
|
+
|
|
2990
|
+
class ThreadCreate(DataModelBase):
|
|
2991
|
+
"""
|
|
2992
|
+
ThreadCreate object.
|
|
2993
|
+
|
|
2994
|
+
Parameters
|
|
2995
|
+
----------
|
|
2996
|
+
body: str
|
|
2997
|
+
file: Optional[bytes]
|
|
2998
|
+
|
|
2999
|
+
"""
|
|
3000
|
+
|
|
3001
|
+
body: str = Field(..., description="requests.ThreadCreate schema")
|
|
3002
|
+
file: Optional[bytes] = Field(None, description="Attachment")
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
class ThreadReplyCreate(DataModelBase):
|
|
3006
|
+
"""
|
|
3007
|
+
ThreadReplyCreate object.
|
|
3008
|
+
|
|
3009
|
+
Parameters
|
|
3010
|
+
----------
|
|
3011
|
+
body: str
|
|
3012
|
+
file: Optional[bytes]
|
|
3013
|
+
|
|
3014
|
+
"""
|
|
3015
|
+
|
|
3016
|
+
body: str = Field(..., description="requests.ThreadReplyCreate schema")
|
|
3017
|
+
file: Optional[bytes] = Field(None, description="Attachment")
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
class ThreadReplyUpdate(DataModelBase):
|
|
3021
|
+
"""
|
|
3022
|
+
ThreadReplyUpdate object.
|
|
3023
|
+
|
|
3024
|
+
Parameters
|
|
3025
|
+
----------
|
|
3026
|
+
body: str
|
|
3027
|
+
file: Optional[bytes]
|
|
3028
|
+
|
|
3029
|
+
"""
|
|
3030
|
+
|
|
3031
|
+
body: str = Field(..., description="requests.ThreadReplyUpdate schema")
|
|
3032
|
+
file: Optional[bytes] = Field(None, description="Attachment")
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
class ThreadUpdate(DataModelBase):
|
|
3036
|
+
"""
|
|
3037
|
+
ThreadUpdate object.
|
|
3038
|
+
|
|
3039
|
+
Parameters
|
|
3040
|
+
----------
|
|
3041
|
+
body: str
|
|
3042
|
+
file: Optional[bytes]
|
|
3043
|
+
|
|
3044
|
+
"""
|
|
3045
|
+
|
|
3046
|
+
body: str = Field(..., description="requests.ThreadUpdate schema")
|
|
3047
|
+
file: Optional[bytes] = Field(None, description="Attachment")
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
class TimeseriesCreate(DataModelBase):
|
|
3051
|
+
"""
|
|
3052
|
+
TimeseriesCreate object.
|
|
3053
|
+
|
|
3054
|
+
Parameters
|
|
3055
|
+
----------
|
|
3056
|
+
data: List[type.KelvinMessage]
|
|
3057
|
+
|
|
3058
|
+
"""
|
|
3059
|
+
|
|
3060
|
+
data: List[type.KelvinMessage] = Field(..., description="Array of new time series data objects to create.")
|
|
3061
|
+
|
|
3062
|
+
|
|
3063
|
+
class Selector(DataModelBase):
|
|
3064
|
+
"""
|
|
3065
|
+
Selector object.
|
|
3066
|
+
|
|
3067
|
+
Parameters
|
|
3068
|
+
----------
|
|
3069
|
+
fields: Optional[List[str]]
|
|
3070
|
+
resource: str
|
|
3071
|
+
|
|
3072
|
+
"""
|
|
3073
|
+
|
|
3074
|
+
fields: Optional[List[str]] = Field(
|
|
3075
|
+
None,
|
|
3076
|
+
description="A filter on the list based on the `field` element names. Blank array will return all data field element names and associated values.",
|
|
3077
|
+
)
|
|
3078
|
+
resource: str = Field(
|
|
3079
|
+
...,
|
|
3080
|
+
description="Specifies the resource (Asset / Data Stream pair) from which field/values are returned.",
|
|
3081
|
+
example="krn:ad:asset1/data_stream1",
|
|
3082
|
+
max_length=256,
|
|
3083
|
+
min_length=1,
|
|
3084
|
+
)
|
|
3085
|
+
|
|
3086
|
+
|
|
3087
|
+
class TimeseriesLastGet(DataModelBase):
|
|
3088
|
+
"""
|
|
3089
|
+
TimeseriesLastGet object.
|
|
3090
|
+
|
|
3091
|
+
Parameters
|
|
3092
|
+
----------
|
|
3093
|
+
selectors: Optional[List[Selector]]
|
|
3094
|
+
|
|
3095
|
+
"""
|
|
3096
|
+
|
|
3097
|
+
selectors: Optional[List[Selector]] = Field(
|
|
3098
|
+
None,
|
|
3099
|
+
description="Array specifying resources and their optional field element names to filter the returned list.",
|
|
3100
|
+
)
|
|
3101
|
+
|
|
3102
|
+
|
|
3103
|
+
class ResourceItem(BaseModelRoot[str]):
|
|
3104
|
+
"""
|
|
3105
|
+
ResourceItem object.
|
|
3106
|
+
|
|
3107
|
+
Parameters
|
|
3108
|
+
----------
|
|
3109
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
3110
|
+
|
|
3111
|
+
"""
|
|
3112
|
+
|
|
3113
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
3114
|
+
|
|
3115
|
+
|
|
3116
|
+
class SourceItem(BaseModelRoot[str]):
|
|
3117
|
+
"""
|
|
3118
|
+
SourceItem object.
|
|
3119
|
+
|
|
3120
|
+
Parameters
|
|
3121
|
+
----------
|
|
3122
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
3123
|
+
|
|
3124
|
+
"""
|
|
3125
|
+
|
|
3126
|
+
__root__: str = Field(..., max_length=256, min_length=1)
|
|
3127
|
+
|
|
3128
|
+
|
|
3129
|
+
class TimeseriesList(DataModelBase):
|
|
3130
|
+
"""
|
|
3131
|
+
TimeseriesList object.
|
|
3132
|
+
|
|
3133
|
+
Parameters
|
|
3134
|
+
----------
|
|
3135
|
+
resource: Optional[List[ResourceItem]]
|
|
3136
|
+
source: Optional[List[SourceItem]]
|
|
3137
|
+
|
|
3138
|
+
"""
|
|
3139
|
+
|
|
3140
|
+
resource: Optional[List[ResourceItem]] = Field(
|
|
3141
|
+
None,
|
|
3142
|
+
description="Only return data from the Asset / DataStream pairs specified. Blank array will return all pairs. Resources are written in the krn format.",
|
|
3143
|
+
example=["krn:ad:asset1/data_stream1", "krn:ad:asset1/data_stream2"],
|
|
3144
|
+
)
|
|
3145
|
+
source: Optional[List[SourceItem]] = Field(
|
|
3146
|
+
None,
|
|
3147
|
+
description="Only return data from the user and/or workloads specified. Blank array will return from all sources. Sources are written in the krn format.",
|
|
3148
|
+
example=[
|
|
3149
|
+
"krn:user:person@example.com",
|
|
3150
|
+
"krn:wl:my-node/temp-adjuster-1",
|
|
3151
|
+
"krn:wlappv:my-node/pvc-r312:pvc/1.0.0",
|
|
3152
|
+
],
|
|
3153
|
+
)
|
|
3154
|
+
|
|
3155
|
+
|
|
3156
|
+
class AggModel(Enum):
|
|
3157
|
+
none = "none"
|
|
3158
|
+
count = "count"
|
|
3159
|
+
distinct = "distinct"
|
|
3160
|
+
integral = "integral"
|
|
3161
|
+
mean = "mean"
|
|
3162
|
+
median = "median"
|
|
3163
|
+
mode = "mode"
|
|
3164
|
+
spread = "spread"
|
|
3165
|
+
stddev = "stddev"
|
|
3166
|
+
sum = "sum"
|
|
3167
|
+
max = "max"
|
|
3168
|
+
min = "min"
|
|
3169
|
+
first = "first"
|
|
3170
|
+
last = "last"
|
|
3171
|
+
|
|
3172
|
+
|
|
3173
|
+
class Fill(Enum):
|
|
3174
|
+
none = "none"
|
|
3175
|
+
linear = "linear"
|
|
3176
|
+
previous = "previous"
|
|
3177
|
+
fixed_integer_value = "fixed integer value"
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
|
+
class Order(Enum):
|
|
3181
|
+
ASC = "ASC"
|
|
3182
|
+
DESC = "DESC"
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
class TimeseriesRangeGet(DataModelBase):
|
|
3186
|
+
"""
|
|
3187
|
+
TimeseriesRangeGet object.
|
|
3188
|
+
|
|
3189
|
+
Parameters
|
|
3190
|
+
----------
|
|
3191
|
+
agg: Optional[AggModel]
|
|
3192
|
+
end_time: datetime
|
|
3193
|
+
fill: Optional[Fill]
|
|
3194
|
+
group_by_selector: Optional[bool]
|
|
3195
|
+
order: Optional[Order]
|
|
3196
|
+
selectors: List[Selector]
|
|
3197
|
+
start_time: datetime
|
|
3198
|
+
time_bucket: Optional[str]
|
|
3199
|
+
time_shift: Optional[str]
|
|
3200
|
+
|
|
3201
|
+
"""
|
|
3202
|
+
|
|
3203
|
+
agg: Optional[AggModel] = Field(
|
|
3204
|
+
"none",
|
|
3205
|
+
description="Performs mathematical calculations on the Time Series values and returns the calculated results only. Depending on enumerator used `time_bucket` may also be required.",
|
|
3206
|
+
example="mean",
|
|
3207
|
+
)
|
|
3208
|
+
end_time: datetime = Field(
|
|
3209
|
+
...,
|
|
3210
|
+
description="UTC time for the latest time in the Time Series, formatted in RFC 3339.",
|
|
3211
|
+
example="2023-06-01T12:00:00Z",
|
|
3212
|
+
)
|
|
3213
|
+
fill: Optional[Fill] = Field(
|
|
3214
|
+
"none",
|
|
3215
|
+
description="Fills any group of data with a calculated value when there is no data. `fixed integer value` is any integer value. `linear` will perform a linear regression to calculate value.",
|
|
3216
|
+
example="25",
|
|
3217
|
+
)
|
|
3218
|
+
group_by_selector: Optional[bool] = Field(
|
|
3219
|
+
True,
|
|
3220
|
+
description="If true, results will be separated per `selector` element `resource` (Asset / Data Stream pair).",
|
|
3221
|
+
example=True,
|
|
3222
|
+
)
|
|
3223
|
+
order: Optional[Order] = Field(
|
|
3224
|
+
"ASC",
|
|
3225
|
+
description="Sort order of the `timestamp` key for the returned data. This string is case sensitive.",
|
|
3226
|
+
example="ASC",
|
|
3227
|
+
)
|
|
3228
|
+
selectors: List[Selector] = Field(
|
|
3229
|
+
...,
|
|
3230
|
+
description="An array of `resources` and corresponding data `field` element name to filter on the list and optional `agg` calculations.",
|
|
3231
|
+
)
|
|
3232
|
+
start_time: datetime = Field(
|
|
3233
|
+
...,
|
|
3234
|
+
description="UTC time for the earliest time in the Time Series, formatted in RFC 3339.",
|
|
3235
|
+
example="2023-06-01T12:00:00Z",
|
|
3236
|
+
)
|
|
3237
|
+
time_bucket: Optional[str] = Field(
|
|
3238
|
+
None,
|
|
3239
|
+
description='Defines the time range to use to aggregate the data values when using the `agg` key. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".',
|
|
3240
|
+
example="5m",
|
|
3241
|
+
)
|
|
3242
|
+
time_shift: Optional[str] = Field(
|
|
3243
|
+
None,
|
|
3244
|
+
description='Shift initial starting point of time buckets from the standard epoch for `time_bucket`. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".',
|
|
3245
|
+
example="1h",
|
|
3246
|
+
)
|
|
3247
|
+
|
|
3248
|
+
|
|
3249
|
+
class TimeseriesRangeDownload(TimeseriesRangeGet):
|
|
3250
|
+
"""
|
|
3251
|
+
TimeseriesRangeDownload object.
|
|
3252
|
+
|
|
3253
|
+
Parameters
|
|
3254
|
+
----------
|
|
3255
|
+
|
|
3256
|
+
"""
|
|
3257
|
+
|
|
3258
|
+
|
|
3259
|
+
class UserSettingsUpdate(DataModelBase):
|
|
3260
|
+
"""
|
|
3261
|
+
UserSettingsUpdate object.
|
|
3262
|
+
|
|
3263
|
+
Parameters
|
|
3264
|
+
----------
|
|
3265
|
+
payload: Optional[Dict[str, Any]]
|
|
3266
|
+
|
|
3267
|
+
"""
|
|
3268
|
+
|
|
3269
|
+
payload: Optional[Dict[str, Any]] = Field(
|
|
3270
|
+
None,
|
|
3271
|
+
description="The new payload for the User Setting. The structure of this `payload` object depends on the type of User Setting being updated.",
|
|
3272
|
+
)
|
|
3273
|
+
|
|
3274
|
+
|
|
3275
|
+
class WorkloadDeploy(DataModelBase):
|
|
3276
|
+
"""
|
|
3277
|
+
WorkloadDeploy object.
|
|
3278
|
+
|
|
3279
|
+
Parameters
|
|
3280
|
+
----------
|
|
3281
|
+
acp_name: Optional[str]
|
|
3282
|
+
app_name: str
|
|
3283
|
+
app_version: Optional[str]
|
|
3284
|
+
cluster_name: Optional[str]
|
|
3285
|
+
instantly_apply: Optional[bool]
|
|
3286
|
+
name: Optional[str]
|
|
3287
|
+
payload: Optional[Dict[str, Any]]
|
|
3288
|
+
pre_download: Optional[bool]
|
|
3289
|
+
source: Optional[str]
|
|
3290
|
+
title: Optional[str]
|
|
3291
|
+
|
|
3292
|
+
"""
|
|
3293
|
+
|
|
3294
|
+
acp_name: Optional[str] = Field(
|
|
3295
|
+
None,
|
|
3296
|
+
description="[`Deprecated`] Target Cluster Name (`acp_name`) for Workload deployment. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
3297
|
+
example="docs-demo-cluster-k3s",
|
|
3298
|
+
max_length=64,
|
|
3299
|
+
min_length=1,
|
|
3300
|
+
)
|
|
3301
|
+
app_name: str = Field(
|
|
3302
|
+
...,
|
|
3303
|
+
description="App Name from App Registry to use for Workload deployment. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters.",
|
|
3304
|
+
example="motor-speed-control",
|
|
3305
|
+
max_length=64,
|
|
3306
|
+
min_length=1,
|
|
3307
|
+
)
|
|
3308
|
+
app_version: Optional[str] = Field(
|
|
3309
|
+
None, description="Version of the App to use.", example="1.2.0", max_length=64, min_length=1
|
|
3310
|
+
)
|
|
3311
|
+
cluster_name: Optional[str] = Field(
|
|
3312
|
+
None,
|
|
3313
|
+
description="Target Cluster Name for Workload deployment. The string can only contain lowercase alphanumeric characters and `.`, `_` or `-` characters. If set, it will override acp_name",
|
|
3314
|
+
example="docs-demo-cluster-k3s",
|
|
3315
|
+
max_length=64,
|
|
3316
|
+
min_length=1,
|
|
3317
|
+
)
|
|
3318
|
+
instantly_apply: Optional[bool] = Field(
|
|
3319
|
+
None,
|
|
3320
|
+
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.",
|
|
3321
|
+
example=True,
|
|
3322
|
+
)
|
|
3323
|
+
name: Optional[str] = Field(
|
|
3324
|
+
None,
|
|
3325
|
+
description="Unique identifier `name` of the Workload.",
|
|
3326
|
+
example="motor-speed-control-ubdhwnshdy67",
|
|
3327
|
+
max_length=32,
|
|
3328
|
+
min_length=1,
|
|
3329
|
+
)
|
|
3330
|
+
payload: Optional[Dict[str, Any]] = Field(
|
|
3331
|
+
None,
|
|
3332
|
+
description="All parameters associated with the Kelvin App like Inputs, Outputs, Info, Spec Version and System.",
|
|
3333
|
+
)
|
|
3334
|
+
pre_download: Optional[bool] = Field(
|
|
3335
|
+
None,
|
|
3336
|
+
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.",
|
|
3337
|
+
example=True,
|
|
3338
|
+
)
|
|
3339
|
+
source: Optional[str] = Field(
|
|
3340
|
+
None,
|
|
3341
|
+
description="Who or which process initiated the Workload deploy.",
|
|
3342
|
+
example="krn:user:richard.teo@kelvininc.com",
|
|
3343
|
+
max_length=256,
|
|
3344
|
+
min_length=1,
|
|
3345
|
+
)
|
|
3346
|
+
title: Optional[str] = Field(
|
|
3347
|
+
None,
|
|
3348
|
+
description="Display name (`title`) of the Workload.",
|
|
3349
|
+
example="Motor Speed Control",
|
|
3350
|
+
max_length=64,
|
|
3351
|
+
min_length=1,
|
|
3352
|
+
)
|