Skip to content

Commit cf05302

Browse files
Move Dimension back into Variant.
1 parent 3feae83 commit cf05302

File tree

11 files changed

+135
-4
lines changed

11 files changed

+135
-4
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ docs/JsonDataSetMessageContentMaskBits.md
109109
docs/JsonDataSetMetaDataMessage.md
110110
docs/JsonDataSetReaderMessageDataType.md
111111
docs/JsonDataSetWriterMessageDataType.md
112+
docs/JsonMessageType.md
112113
docs/JsonNetworkMessage.md
113114
docs/JsonNetworkMessageContentMaskBits.md
114115
docs/JsonPubSubConnectionMessage.md
@@ -322,6 +323,7 @@ opcua_webapi/models/json_data_set_message_content_mask_bits.py
322323
opcua_webapi/models/json_data_set_meta_data_message.py
323324
opcua_webapi/models/json_data_set_reader_message_data_type.py
324325
opcua_webapi/models/json_data_set_writer_message_data_type.py
326+
opcua_webapi/models/json_message_type.py
325327
opcua_webapi/models/json_network_message.py
326328
opcua_webapi/models/json_network_message_content_mask_bits.py
327329
opcua_webapi/models/json_pub_sub_connection_message.py
@@ -429,5 +431,5 @@ setup.cfg
429431
setup.py
430432
test-requirements.txt
431433
test/__init__.py
432-
test/test_matrix.py
434+
test/test_json_message_type.py
433435
tox.ini

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Class | Method | HTTP request | Description
221221
- [JsonDataSetMetaDataMessage](docs/JsonDataSetMetaDataMessage.md)
222222
- [JsonDataSetReaderMessageDataType](docs/JsonDataSetReaderMessageDataType.md)
223223
- [JsonDataSetWriterMessageDataType](docs/JsonDataSetWriterMessageDataType.md)
224+
- [JsonMessageType](docs/JsonMessageType.md)
224225
- [JsonNetworkMessage](docs/JsonNetworkMessage.md)
225226
- [JsonNetworkMessageContentMaskBits](docs/JsonNetworkMessageContentMaskBits.md)
226227
- [JsonPubSubConnectionMessage](docs/JsonPubSubConnectionMessage.md)

docs/DataValue.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**ua_type** | **int** | | [optional] [default to 0]
99
**value** | **object** | | [optional]
10+
**dimensions** | **List[int]** | | [optional]
1011
**status_code** | [**StatusCode**](StatusCode.md) | | [optional]
1112
**source_timestamp** | **datetime** | | [optional]
1213
**source_picoseconds** | **int** | | [optional]

docs/JsonMessageType.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# JsonMessageType
2+
3+
4+
## Enum
5+
6+
* `UA_MINUS_DATA` (value: `'ua-data'`)
7+
8+
* `UA_MINUS_METADATA` (value: `'ua-metadata'`)
9+
10+
* `UA_MINUS_APPLICATION` (value: `'ua-application'`)
11+
12+
* `UA_MINUS_ENDPOINTS` (value: `'ua-endpoints'`)
13+
14+
* `UA_MINUS_STATUS` (value: `'ua-status'`)
15+
16+
* `UA_MINUS_CONNECTION` (value: `'ua-connection'`)
17+
18+
* `UA_MINUS_ACTION_MINUS_REQUEST` (value: `'ua-action-request'`)
19+
20+
* `UA_MINUS_ACTION_MINUS_RESPONSE` (value: `'ua-action-response'`)
21+
22+
* `UA_MINUS_ACTION_MINUS_METADATA` (value: `'ua-action-metadata'`)
23+
24+
* `UA_MINUS_ACTION_MINUS_RESPONDER` (value: `'ua-action-responder'`)
25+
26+
* `UA_MINUS_KEYFRAME` (value: `'ua-keyframe'`)
27+
28+
* `UA_MINUS_DELTAFRAME` (value: `'ua-deltaframe'`)
29+
30+
* `UA_MINUS_EVENT` (value: `'ua-event'`)
31+
32+
* `UA_MINUS_KEEPALIVE` (value: `'ua-keepalive'`)
33+
34+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
35+
36+

docs/Variant.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**ua_type** | **int** | | [optional]
99
**value** | **object** | | [optional]
10+
**dimensions** | **List[int]** | | [optional]
1011

1112
## Example
1213

opcua_webapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
from opcua_webapi.models.json_data_set_meta_data_message import JsonDataSetMetaDataMessage
138138
from opcua_webapi.models.json_data_set_reader_message_data_type import JsonDataSetReaderMessageDataType
139139
from opcua_webapi.models.json_data_set_writer_message_data_type import JsonDataSetWriterMessageDataType
140+
from opcua_webapi.models.json_message_type import JsonMessageType
140141
from opcua_webapi.models.json_network_message import JsonNetworkMessage
141142
from opcua_webapi.models.json_network_message_content_mask_bits import JsonNetworkMessageContentMaskBits
142143
from opcua_webapi.models.json_pub_sub_connection_message import JsonPubSubConnectionMessage

opcua_webapi/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
from opcua_webapi.models.json_data_set_meta_data_message import JsonDataSetMetaDataMessage
121121
from opcua_webapi.models.json_data_set_reader_message_data_type import JsonDataSetReaderMessageDataType
122122
from opcua_webapi.models.json_data_set_writer_message_data_type import JsonDataSetWriterMessageDataType
123+
from opcua_webapi.models.json_message_type import JsonMessageType
123124
from opcua_webapi.models.json_network_message import JsonNetworkMessage
124125
from opcua_webapi.models.json_network_message_content_mask_bits import JsonNetworkMessageContentMaskBits
125126
from opcua_webapi.models.json_pub_sub_connection_message import JsonPubSubConnectionMessage

opcua_webapi/models/data_value.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ class DataValue(BaseModel):
3232
""" # noqa: E501
3333
ua_type: Optional[Annotated[int, Field(le=255, strict=True, ge=0)]] = Field(default=0, alias="UaType")
3434
value: Optional[Any] = Field(default=None, alias="Value")
35+
dimensions: Optional[List[Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, alias="Dimensions")
3536
status_code: Optional[StatusCode] = Field(default=None, alias="StatusCode")
3637
source_timestamp: Optional[datetime] = Field(default=None, alias="SourceTimestamp")
3738
source_picoseconds: Optional[Annotated[int, Field(le=65535, strict=True, ge=0)]] = Field(default=None, alias="SourcePicoseconds")
3839
server_timestamp: Optional[datetime] = Field(default=None, alias="ServerTimestamp")
3940
server_picoseconds: Optional[Annotated[int, Field(le=65535, strict=True, ge=0)]] = Field(default=None, alias="ServerPicoseconds")
40-
__properties: ClassVar[List[str]] = ["UaType", "Value", "StatusCode", "SourceTimestamp", "SourcePicoseconds", "ServerTimestamp", "ServerPicoseconds"]
41+
__properties: ClassVar[List[str]] = ["UaType", "Value", "Dimensions", "StatusCode", "SourceTimestamp", "SourcePicoseconds", "ServerTimestamp", "ServerPicoseconds"]
4142

4243
model_config = ConfigDict(
4344
populate_by_name=True,
@@ -100,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
100101
_obj = cls.model_validate({
101102
"UaType": obj.get("UaType") if obj.get("UaType") is not None else 0,
102103
"Value": obj.get("Value"),
104+
"Dimensions": obj.get("Dimensions"),
103105
"StatusCode": StatusCode.from_dict(obj["StatusCode"]) if obj.get("StatusCode") is not None else None,
104106
"SourceTimestamp": obj.get("SourceTimestamp"),
105107
"SourcePicoseconds": obj.get("SourcePicoseconds"),
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# coding: utf-8
2+
3+
"""
4+
OPC UA Web API
5+
6+
Provides simple HTTPS based access to an OPC UA server.
7+
8+
The version of the OpenAPI document: 1.05.4
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
from __future__ import annotations
17+
import json
18+
from enum import Enum
19+
from typing_extensions import Self
20+
21+
22+
class JsonMessageType(str, Enum):
23+
"""
24+
JsonMessageType
25+
"""
26+
27+
"""
28+
allowed enum values
29+
"""
30+
UA_MINUS_DATA = 'ua-data'
31+
UA_MINUS_METADATA = 'ua-metadata'
32+
UA_MINUS_APPLICATION = 'ua-application'
33+
UA_MINUS_ENDPOINTS = 'ua-endpoints'
34+
UA_MINUS_STATUS = 'ua-status'
35+
UA_MINUS_CONNECTION = 'ua-connection'
36+
UA_MINUS_ACTION_MINUS_REQUEST = 'ua-action-request'
37+
UA_MINUS_ACTION_MINUS_RESPONSE = 'ua-action-response'
38+
UA_MINUS_ACTION_MINUS_METADATA = 'ua-action-metadata'
39+
UA_MINUS_ACTION_MINUS_RESPONDER = 'ua-action-responder'
40+
UA_MINUS_KEYFRAME = 'ua-keyframe'
41+
UA_MINUS_DELTAFRAME = 'ua-deltaframe'
42+
UA_MINUS_EVENT = 'ua-event'
43+
UA_MINUS_KEEPALIVE = 'ua-keepalive'
44+
45+
@classmethod
46+
def from_json(cls, json_str: str) -> Self:
47+
"""Create an instance of JsonMessageType from a JSON string"""
48+
return cls(json.loads(json_str))
49+
50+

opcua_webapi/models/variant.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class Variant(BaseModel):
3030
""" # noqa: E501
3131
ua_type: Optional[Annotated[int, Field(le=255, strict=True, ge=0)]] = Field(default=None, alias="UaType")
3232
value: Optional[Any] = Field(default=None, alias="Value")
33-
__properties: ClassVar[List[str]] = ["UaType", "Value"]
33+
dimensions: Optional[List[Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, alias="Dimensions")
34+
__properties: ClassVar[List[str]] = ["UaType", "Value", "Dimensions"]
3435

3536
model_config = ConfigDict(
3637
populate_by_name=True,
@@ -89,7 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8990

9091
_obj = cls.model_validate({
9192
"UaType": obj.get("UaType"),
92-
"Value": obj.get("Value")
93+
"Value": obj.get("Value"),
94+
"Dimensions": obj.get("Dimensions")
9395
})
9496
return _obj
9597

0 commit comments

Comments
 (0)