wandelbots-api-client 26.3.0.dev23__py3-none-any.whl → 26.3.0.dev25__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.
Files changed (25) hide show
  1. wandelbots_api_client/__init__.py +1 -1
  2. wandelbots_api_client/api_client.py +1 -1
  3. wandelbots_api_client/configuration.py +1 -1
  4. wandelbots_api_client/v2/__init__.py +1 -1
  5. wandelbots_api_client/v2/api/bus_inputs_outputs_api.py +264 -0
  6. wandelbots_api_client/v2/api_client.py +1 -1
  7. wandelbots_api_client/v2/configuration.py +1 -1
  8. wandelbots_api_client/v2/models/__init__.py +4 -0
  9. wandelbots_api_client/v2/models/bus_io_profinet.py +21 -1
  10. wandelbots_api_client/v2/models/bus_io_profinet_slot.py +96 -0
  11. wandelbots_api_client/v2/models/jogging_details.py +1 -1
  12. wandelbots_api_client/v2/models/jogging_details_state.py +27 -8
  13. wandelbots_api_client/v2/models/jogging_paused_near_singularity.py +100 -0
  14. wandelbots_api_client/v2/models/profinet_io.py +2 -2
  15. wandelbots_api_client/v2/models/profinet_io_data.py +2 -2
  16. wandelbots_api_client/v2_pydantic/__init__.py +1 -1
  17. wandelbots_api_client/v2_pydantic/api/bus_inputs_outputs_api.py +267 -0
  18. wandelbots_api_client/v2_pydantic/api_client.py +1 -1
  19. wandelbots_api_client/v2_pydantic/configuration.py +1 -1
  20. wandelbots_api_client/v2_pydantic/models.py +60 -8
  21. {wandelbots_api_client-26.3.0.dev23.dist-info → wandelbots_api_client-26.3.0.dev25.dist-info}/METADATA +2 -2
  22. {wandelbots_api_client-26.3.0.dev23.dist-info → wandelbots_api_client-26.3.0.dev25.dist-info}/RECORD +25 -23
  23. {wandelbots_api_client-26.3.0.dev23.dist-info → wandelbots_api_client-26.3.0.dev25.dist-info}/WHEEL +0 -0
  24. {wandelbots_api_client-26.3.0.dev23.dist-info → wandelbots_api_client-26.3.0.dev25.dist-info}/licenses/LICENSE +0 -0
  25. {wandelbots_api_client-26.3.0.dev23.dist-info → wandelbots_api_client-26.3.0.dev25.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,7 @@
13
13
  Do not edit the class manually.
14
14
  """ # noqa: E501
15
15
 
16
- __version__ = "26.3.0.dev23"
16
+ __version__ = "26.3.0.dev25"
17
17
 
18
18
  from . import models
19
19
  from . import api
@@ -91,7 +91,7 @@ class ApiClient:
91
91
  self.default_headers[header_name] = header_value
92
92
  self.cookie = cookie
93
93
  # Set default User-Agent.
94
- self.user_agent = 'Wandelbots-Nova-API-Python-Client/26.3.0.dev23'
94
+ self.user_agent = 'Wandelbots-Nova-API-Python-Client/26.3.0.dev25'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  async def __aenter__(self):
@@ -511,7 +511,7 @@ class Configuration:
511
511
  "OS: {env}\n"\
512
512
  "Python Version: {pyversion}\n"\
513
513
  "Version of the API: 1.3.0\n"\
514
- "SDK Package Version: 26.3.0.dev23".\
514
+ "SDK Package Version: 26.3.0.dev25".\
515
515
  format(env=sys.platform, pyversion=sys.version)
516
516
 
517
517
  def get_host_settings(self) -> List[HostSetting]:
@@ -13,7 +13,7 @@
13
13
  Do not edit the class manually.
14
14
  """ # noqa: E501
15
15
 
16
- __version__ = "26.3.0.dev23"
16
+ __version__ = "26.3.0.dev25"
17
17
 
18
18
  from . import models
19
19
  from . import api
@@ -3437,6 +3437,270 @@ class BUSInputsOutputsApi:
3437
3437
 
3438
3438
 
3439
3439
 
3440
+ @validate_call
3441
+ async def get_profinet_gsdml(
3442
+ self,
3443
+ cell: Annotated[StrictStr, Field(description="Unique identifier addressing a cell in all API calls. ")],
3444
+ _request_timeout: Union[
3445
+ None,
3446
+ Annotated[StrictFloat, Field(gt=0)],
3447
+ Tuple[
3448
+ Annotated[StrictFloat, Field(gt=0)],
3449
+ Annotated[StrictFloat, Field(gt=0)]
3450
+ ]
3451
+ ] = None,
3452
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3453
+ _content_type: Optional[StrictStr] = None,
3454
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3455
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3456
+ ) -> str:
3457
+ """Get PROFINET GSDML File
3458
+
3459
+ Returns the Generic Station Description Markup Language (GSDML) file for the PROFINET device. The GSDML file describes the PROFINET device configuration and capabilities, and can be imported into PROFINET engineering tools, e.g., TIA Portal, or other PLC programming environments. The returned GSDML file matches the current slot configuration of the PROFINET device.
3460
+
3461
+ :param cell: Unique identifier addressing a cell in all API calls. (required)
3462
+ :type cell: str
3463
+ :param _request_timeout: timeout setting for this request. If one
3464
+ number provided, it will be total request
3465
+ timeout. It can also be a pair (tuple) of
3466
+ (connection, read) timeouts.
3467
+ :type _request_timeout: int, tuple(int, int), optional
3468
+ :param _request_auth: set to override the auth_settings for an a single
3469
+ request; this effectively ignores the
3470
+ authentication in the spec for a single request.
3471
+ :type _request_auth: dict, optional
3472
+ :param _content_type: force content-type for the request.
3473
+ :type _content_type: str, Optional
3474
+ :param _headers: set to override the headers for a single
3475
+ request; this effectively ignores the headers
3476
+ in the spec for a single request.
3477
+ :type _headers: dict, optional
3478
+ :param _host_index: set to override the host_index for a single
3479
+ request; this effectively ignores the host_index
3480
+ in the spec for a single request.
3481
+ :type _host_index: int, optional
3482
+ :return: Returns the result object.
3483
+ """ # noqa: E501
3484
+
3485
+ _param = self._get_profinet_gsdml_serialize(
3486
+ cell=cell,
3487
+ _request_auth=_request_auth,
3488
+ _content_type=_content_type,
3489
+ _headers=_headers,
3490
+ _host_index=_host_index
3491
+ )
3492
+
3493
+ _response_types_map: Dict[str, Optional[str]] = {
3494
+ '200': "str",
3495
+ '404': "Error",
3496
+ '412': "Error",
3497
+ }
3498
+ response_data = await self.api_client.call_api(
3499
+ *_param,
3500
+ _request_timeout=_request_timeout
3501
+ )
3502
+ await response_data.read()
3503
+ return self.api_client.response_deserialize(
3504
+ response_data=response_data,
3505
+ response_types_map=_response_types_map,
3506
+ ).data
3507
+
3508
+
3509
+ @validate_call
3510
+ async def get_profinet_gsdml_with_http_info(
3511
+ self,
3512
+ cell: Annotated[StrictStr, Field(description="Unique identifier addressing a cell in all API calls. ")],
3513
+ _request_timeout: Union[
3514
+ None,
3515
+ Annotated[StrictFloat, Field(gt=0)],
3516
+ Tuple[
3517
+ Annotated[StrictFloat, Field(gt=0)],
3518
+ Annotated[StrictFloat, Field(gt=0)]
3519
+ ]
3520
+ ] = None,
3521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3522
+ _content_type: Optional[StrictStr] = None,
3523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3525
+ ) -> ApiResponse[str]:
3526
+ """Get PROFINET GSDML File
3527
+
3528
+ Returns the Generic Station Description Markup Language (GSDML) file for the PROFINET device. The GSDML file describes the PROFINET device configuration and capabilities, and can be imported into PROFINET engineering tools, e.g., TIA Portal, or other PLC programming environments. The returned GSDML file matches the current slot configuration of the PROFINET device.
3529
+
3530
+ :param cell: Unique identifier addressing a cell in all API calls. (required)
3531
+ :type cell: str
3532
+ :param _request_timeout: timeout setting for this request. If one
3533
+ number provided, it will be total request
3534
+ timeout. It can also be a pair (tuple) of
3535
+ (connection, read) timeouts.
3536
+ :type _request_timeout: int, tuple(int, int), optional
3537
+ :param _request_auth: set to override the auth_settings for an a single
3538
+ request; this effectively ignores the
3539
+ authentication in the spec for a single request.
3540
+ :type _request_auth: dict, optional
3541
+ :param _content_type: force content-type for the request.
3542
+ :type _content_type: str, Optional
3543
+ :param _headers: set to override the headers for a single
3544
+ request; this effectively ignores the headers
3545
+ in the spec for a single request.
3546
+ :type _headers: dict, optional
3547
+ :param _host_index: set to override the host_index for a single
3548
+ request; this effectively ignores the host_index
3549
+ in the spec for a single request.
3550
+ :type _host_index: int, optional
3551
+ :return: Returns the result object.
3552
+ """ # noqa: E501
3553
+
3554
+ _param = self._get_profinet_gsdml_serialize(
3555
+ cell=cell,
3556
+ _request_auth=_request_auth,
3557
+ _content_type=_content_type,
3558
+ _headers=_headers,
3559
+ _host_index=_host_index
3560
+ )
3561
+
3562
+ _response_types_map: Dict[str, Optional[str]] = {
3563
+ '200': "str",
3564
+ '404': "Error",
3565
+ '412': "Error",
3566
+ }
3567
+ response_data = await self.api_client.call_api(
3568
+ *_param,
3569
+ _request_timeout=_request_timeout
3570
+ )
3571
+ await response_data.read()
3572
+ return self.api_client.response_deserialize(
3573
+ response_data=response_data,
3574
+ response_types_map=_response_types_map,
3575
+ )
3576
+
3577
+
3578
+ @validate_call
3579
+ async def get_profinet_gsdml_without_preload_content(
3580
+ self,
3581
+ cell: Annotated[StrictStr, Field(description="Unique identifier addressing a cell in all API calls. ")],
3582
+ _request_timeout: Union[
3583
+ None,
3584
+ Annotated[StrictFloat, Field(gt=0)],
3585
+ Tuple[
3586
+ Annotated[StrictFloat, Field(gt=0)],
3587
+ Annotated[StrictFloat, Field(gt=0)]
3588
+ ]
3589
+ ] = None,
3590
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3591
+ _content_type: Optional[StrictStr] = None,
3592
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3593
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3594
+ ) -> RESTResponseType:
3595
+ """Get PROFINET GSDML File
3596
+
3597
+ Returns the Generic Station Description Markup Language (GSDML) file for the PROFINET device. The GSDML file describes the PROFINET device configuration and capabilities, and can be imported into PROFINET engineering tools, e.g., TIA Portal, or other PLC programming environments. The returned GSDML file matches the current slot configuration of the PROFINET device.
3598
+
3599
+ :param cell: Unique identifier addressing a cell in all API calls. (required)
3600
+ :type cell: str
3601
+ :param _request_timeout: timeout setting for this request. If one
3602
+ number provided, it will be total request
3603
+ timeout. It can also be a pair (tuple) of
3604
+ (connection, read) timeouts.
3605
+ :type _request_timeout: int, tuple(int, int), optional
3606
+ :param _request_auth: set to override the auth_settings for an a single
3607
+ request; this effectively ignores the
3608
+ authentication in the spec for a single request.
3609
+ :type _request_auth: dict, optional
3610
+ :param _content_type: force content-type for the request.
3611
+ :type _content_type: str, Optional
3612
+ :param _headers: set to override the headers for a single
3613
+ request; this effectively ignores the headers
3614
+ in the spec for a single request.
3615
+ :type _headers: dict, optional
3616
+ :param _host_index: set to override the host_index for a single
3617
+ request; this effectively ignores the host_index
3618
+ in the spec for a single request.
3619
+ :type _host_index: int, optional
3620
+ :return: Returns the result object.
3621
+ """ # noqa: E501
3622
+
3623
+ _param = self._get_profinet_gsdml_serialize(
3624
+ cell=cell,
3625
+ _request_auth=_request_auth,
3626
+ _content_type=_content_type,
3627
+ _headers=_headers,
3628
+ _host_index=_host_index
3629
+ )
3630
+
3631
+ _response_types_map: Dict[str, Optional[str]] = {
3632
+ '200': "str",
3633
+ '404': "Error",
3634
+ '412': "Error",
3635
+ }
3636
+ response_data = await self.api_client.call_api(
3637
+ *_param,
3638
+ _request_timeout=_request_timeout
3639
+ )
3640
+ return response_data.response
3641
+
3642
+
3643
+ def _get_profinet_gsdml_serialize(
3644
+ self,
3645
+ cell,
3646
+ _request_auth,
3647
+ _content_type,
3648
+ _headers,
3649
+ _host_index,
3650
+ ) -> RequestSerialized:
3651
+
3652
+ _host = None
3653
+
3654
+ _collection_formats: Dict[str, str] = {
3655
+ }
3656
+
3657
+ _path_params: Dict[str, str] = {}
3658
+ _query_params: List[Tuple[str, str]] = []
3659
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3660
+ _form_params: List[Tuple[str, str]] = []
3661
+ _files: Dict[str, Union[str, bytes]] = {}
3662
+ _body_params: Optional[bytes] = None
3663
+
3664
+ # process the path parameters
3665
+ if cell is not None:
3666
+ _path_params['cell'] = cell
3667
+ # process the query parameters
3668
+ # process the header parameters
3669
+ # process the form parameters
3670
+ # process the body parameter
3671
+
3672
+
3673
+ # set the HTTP header `Accept`
3674
+ _header_params['Accept'] = self.api_client.select_header_accept(
3675
+ [
3676
+ 'application/xml',
3677
+ 'application/json'
3678
+ ]
3679
+ )
3680
+
3681
+
3682
+ # authentication setting
3683
+ _auth_settings: List[str] = [
3684
+ 'BearerAuth'
3685
+ ]
3686
+
3687
+ return self.api_client.param_serialize(
3688
+ method='GET',
3689
+ resource_path='/cells/{cell}/bus-ios/profinet/gsdml',
3690
+ path_params=_path_params,
3691
+ query_params=_query_params,
3692
+ header_params=_header_params,
3693
+ body=_body_params,
3694
+ post_params=_form_params,
3695
+ files=_files,
3696
+ auth_settings=_auth_settings,
3697
+ collection_formats=_collection_formats,
3698
+ _host=_host,
3699
+ _request_auth=_request_auth
3700
+ )
3701
+
3702
+
3703
+
3440
3704
  @validate_call
3441
3705
  async def get_profinet_ios_from_file(
3442
3706
  self,
@@ -91,7 +91,7 @@ class ApiClient:
91
91
  self.default_headers[header_name] = header_value
92
92
  self.cookie = cookie
93
93
  # Set default User-Agent.
94
- self.user_agent = 'Wandelbots-Nova-API-Python-Client/26.3.0.dev23'
94
+ self.user_agent = 'Wandelbots-Nova-API-Python-Client/26.3.0.dev25'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  async def __aenter__(self):
@@ -511,7 +511,7 @@ class Configuration:
511
511
  "OS: {env}\n"\
512
512
  "Python Version: {pyversion}\n"\
513
513
  "Version of the API: 2.3.0 dev\n"\
514
- "SDK Package Version: 26.3.0.dev23".\
514
+ "SDK Package Version: 26.3.0.dev25".\
515
515
  format(env=sys.platform, pyversion=sys.version)
516
516
 
517
517
  def get_host_settings(self) -> List[HostSetting]:
@@ -39,6 +39,7 @@ from .bus_io_profinet import BusIOProfinet
39
39
  from .bus_io_profinet_default_route import BusIOProfinetDefaultRoute
40
40
  from .bus_io_profinet_ip_config import BusIOProfinetIpConfig
41
41
  from .bus_io_profinet_network import BusIOProfinetNetwork
42
+ from .bus_io_profinet_slot import BusIOProfinetSlot
42
43
  from .bus_io_profinet_virtual import BusIOProfinetVirtual
43
44
  from .bus_io_type import BusIOType
44
45
  from .bus_ios_state import BusIOsState
@@ -154,6 +155,7 @@ from .jogging_details_state import JoggingDetailsState
154
155
  from .jogging_paused_by_user import JoggingPausedByUser
155
156
  from .jogging_paused_near_collision import JoggingPausedNearCollision
156
157
  from .jogging_paused_near_joint_limit import JoggingPausedNearJointLimit
158
+ from .jogging_paused_near_singularity import JoggingPausedNearSingularity
157
159
  from .jogging_paused_on_io import JoggingPausedOnIO
158
160
  from .jogging_running import JoggingRunning
159
161
  from .joint_limit_exceeded_error import JointLimitExceededError
@@ -334,6 +336,7 @@ __all__ = [
334
336
  "BusIOProfinetDefaultRoute",
335
337
  "BusIOProfinetIpConfig",
336
338
  "BusIOProfinetNetwork",
339
+ "BusIOProfinetSlot",
337
340
  "BusIOProfinetVirtual",
338
341
  "BusIOType",
339
342
  "BusIOsState",
@@ -449,6 +452,7 @@ __all__ = [
449
452
  "JoggingPausedByUser",
450
453
  "JoggingPausedNearCollision",
451
454
  "JoggingPausedNearJointLimit",
455
+ "JoggingPausedNearSingularity",
452
456
  "JoggingPausedOnIO",
453
457
  "JoggingRunning",
454
458
  "JointLimitExceededError",
@@ -19,8 +19,10 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
22
23
  from wandelbots_api_client.v2.models.bus_io_profinet_default_route import BusIOProfinetDefaultRoute
23
24
  from wandelbots_api_client.v2.models.bus_io_profinet_network import BusIOProfinetNetwork
25
+ from wandelbots_api_client.v2.models.bus_io_profinet_slot import BusIOProfinetSlot
24
26
  from typing import Optional, Set
25
27
  from typing_extensions import Self
26
28
 
@@ -32,8 +34,9 @@ class BusIOProfinet(BaseModel):
32
34
  network_config: Optional[BusIOProfinetNetwork] = Field(default=None, description="Used to enable IP communication through the same physical ethernet interface while PROFINET driver is active. ")
33
35
  plc_ip: StrictStr = Field(description="IP address of the PLC to establish PROFINET communication with. The IP address is used to configure the host machine's firewall. The firewall configuration is applied while the BUS input/output service is active. Without proper firewall configuration, PROFINET device discovery, configuration exchanges, and real-time cyclic data communication will fail. ")
34
36
  mac: StrictStr = Field(description="MAC address of the physical ethernet interface that you want to use for PROFINET communication. ")
37
+ slots: Optional[Annotated[List[BusIOProfinetSlot], Field(min_length=1)]] = Field(default=None, description="Optional PROFINET slot configuration. If not provided, the default configuration is used for backward compatibility: one slot with a size of 64 bytes. ")
35
38
  default_route: Optional[BusIOProfinetDefaultRoute] = None
36
- __properties: ClassVar[List[str]] = ["bus_type", "network_config", "plc_ip", "mac", "default_route"]
39
+ __properties: ClassVar[List[str]] = ["bus_type", "network_config", "plc_ip", "mac", "slots", "default_route"]
37
40
 
38
41
  @field_validator('bus_type')
39
42
  def bus_type_validate_enum(cls, value):
@@ -88,6 +91,16 @@ class BusIOProfinet(BaseModel):
88
91
  # override the default output from pydantic by calling `to_dict()` of network_config
89
92
  if self.network_config:
90
93
  _dict['network_config'] = self.network_config.to_dict()
94
+ # override the default output from pydantic by calling `to_dict()` of each item in slots (list)
95
+ _items = []
96
+ if self.slots:
97
+ for _item in self.slots:
98
+ # >>> Modified from https://github.com/OpenAPITools/openapi-generator/blob/v7.6.0/modules/openapi-generator/src/main/resources/python/model_generic.mustache
99
+ # to not drop empty elements in lists
100
+ if _item is not None:
101
+ _items.append(_item.to_dict())
102
+ # <<< End modification
103
+ _dict['slots'] = _items
91
104
  # override the default output from pydantic by calling `to_dict()` of default_route
92
105
  if self.default_route:
93
106
  _dict['default_route'] = self.default_route.to_dict()
@@ -107,6 +120,13 @@ class BusIOProfinet(BaseModel):
107
120
  "network_config": BusIOProfinetNetwork.from_dict(obj["network_config"]) if obj.get("network_config") is not None else None,
108
121
  "plc_ip": obj.get("plc_ip"),
109
122
  "mac": obj.get("mac"),
123
+ "slots": [
124
+ # >>> Modified from https://github.com/OpenAPITools/openapi-generator/blob/v7.6.0/modules/openapi-generator/src/main/resources/python/model_generic.mustache
125
+ # to allow dicts in lists
126
+ BusIOProfinetSlot.from_dict(_item) if hasattr(BusIOProfinetSlot, 'from_dict') else _item
127
+ # <<< End modification
128
+ for _item in obj["slots"]
129
+ ] if obj.get("slots") is not None else None,
110
130
  "default_route": BusIOProfinetDefaultRoute.from_dict(obj["default_route"]) if obj.get("default_route") is not None else None
111
131
  })
112
132
  return _obj
@@ -0,0 +1,96 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Wandelbots NOVA API
5
+
6
+ Interact with robots in an easy and intuitive way.
7
+
8
+ The version of the OpenAPI document: 2.3.0 dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class BusIOProfinetSlot(BaseModel):
27
+ """
28
+ Configuration for one PROFINET process data slot.
29
+ """ # noqa: E501
30
+ slot: Annotated[int, Field(strict=True, ge=1)] = Field(description="Slot identifier on the PROFINET device. ")
31
+ input_size_bytes: Annotated[int, Field(strict=True, ge=0)] = Field(description="Process data size in bytes for the input direction (device → controller). ")
32
+ output_size_bytes: Annotated[int, Field(strict=True, ge=0)] = Field(description="Process data size in bytes for the output direction (controller → device). ")
33
+ __properties: ClassVar[List[str]] = ["slot", "input_size_bytes", "output_size_bytes"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
45
+
46
+ def to_json(self) -> str:
47
+ """
48
+ Returns the JSON representation of the model using alias
49
+
50
+ Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
51
+ It is unable to resolve nested types generated by openapi-generator.
52
+ """
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of BusIOProfinetSlot from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of BusIOProfinetSlot from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "slot": obj.get("slot"),
91
+ "input_size_bytes": obj.get("input_size_bytes"),
92
+ "output_size_bytes": obj.get("output_size_bytes")
93
+ })
94
+ return _obj
95
+
96
+
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
 
26
26
  class JoggingDetails(BaseModel):
27
27
  """
28
- State of jogging execution. This state is sent during jogging movement, response-rate closest to the nearest multiple of controller step-rate but not exceeding the configured rate. The jogging state can be one of the following: - RUNNING: Jogging is active. - PAUSED_BY_USER: User has paused jogging. - PAUSED_NEAR_JOINT_LIMIT: Jogging was paused because a joint is is near its limit. - PAUSED_NEAR_COLLISION: Jogging was paused because the motion group neared a collision. - PAUSED_ON_IO: Jogging was paused because of an I/O event.
28
+ State of jogging execution. This state is sent during jogging movement, response-rate closest to the nearest multiple of controller step-rate but not exceeding the configured rate. The jogging state can be one of the following: - RUNNING: Jogging is active. - PAUSED_BY_USER: User has paused jogging. - PAUSED_NEAR_JOINT_LIMIT: Jogging was paused because a joint is near its limit. - PAUSED_NEAR_COLLISION: Jogging was paused because the motion group neared a collision. - PAUSED_NEAR_SINGULARITY: Jogging was paused because the motion group neared a singularity or the workspace boundary. - PAUSED_ON_IO: Jogging was paused because of an I/O event.
29
29
  """ # noqa: E501
30
30
  state: JoggingDetailsState
31
31
  kind: str = "JOGGING"
@@ -20,13 +20,14 @@ from typing import Any, List, Optional
20
20
  from wandelbots_api_client.v2.models.jogging_paused_by_user import JoggingPausedByUser
21
21
  from wandelbots_api_client.v2.models.jogging_paused_near_collision import JoggingPausedNearCollision
22
22
  from wandelbots_api_client.v2.models.jogging_paused_near_joint_limit import JoggingPausedNearJointLimit
23
+ from wandelbots_api_client.v2.models.jogging_paused_near_singularity import JoggingPausedNearSingularity
23
24
  from wandelbots_api_client.v2.models.jogging_paused_on_io import JoggingPausedOnIO
24
25
  from wandelbots_api_client.v2.models.jogging_running import JoggingRunning
25
26
  from pydantic import StrictStr, Field
26
27
  from typing import Union, List, Set, Optional, Dict
27
28
  from typing_extensions import Literal, Self
28
29
 
29
- JOGGINGDETAILSSTATE_ONE_OF_SCHEMAS = ["JoggingPausedByUser", "JoggingPausedNearCollision", "JoggingPausedNearJointLimit", "JoggingPausedOnIO", "JoggingRunning"]
30
+ JOGGINGDETAILSSTATE_ONE_OF_SCHEMAS = ["JoggingPausedByUser", "JoggingPausedNearCollision", "JoggingPausedNearJointLimit", "JoggingPausedNearSingularity", "JoggingPausedOnIO", "JoggingRunning"]
30
31
 
31
32
  class JoggingDetailsState(BaseModel):
32
33
  """
@@ -42,8 +43,10 @@ class JoggingDetailsState(BaseModel):
42
43
  oneof_schema_4_validator: Optional[JoggingPausedNearJointLimit] = None
43
44
  # data type: JoggingPausedNearCollision
44
45
  oneof_schema_5_validator: Optional[JoggingPausedNearCollision] = None
45
- actual_instance: Optional[Union[JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedOnIO, JoggingRunning]] = None
46
- one_of_schemas: Set[str] = { "JoggingPausedByUser", "JoggingPausedNearCollision", "JoggingPausedNearJointLimit", "JoggingPausedOnIO", "JoggingRunning" }
46
+ # data type: JoggingPausedNearSingularity
47
+ oneof_schema_6_validator: Optional[JoggingPausedNearSingularity] = None
48
+ actual_instance: Optional[Union[JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedNearSingularity, JoggingPausedOnIO, JoggingRunning]] = None
49
+ one_of_schemas: Set[str] = { "JoggingPausedByUser", "JoggingPausedNearCollision", "JoggingPausedNearJointLimit", "JoggingPausedNearSingularity", "JoggingPausedOnIO", "JoggingRunning" }
47
50
 
48
51
  model_config = ConfigDict(
49
52
  validate_assignment=True,
@@ -94,12 +97,17 @@ class JoggingDetailsState(BaseModel):
94
97
  error_messages.append(f"Error! Input type `{type(v)}` is not `JoggingPausedNearCollision`")
95
98
  else:
96
99
  match += 1
100
+ # validate data type: JoggingPausedNearSingularity
101
+ if not isinstance(v, JoggingPausedNearSingularity):
102
+ error_messages.append(f"Error! Input type `{type(v)}` is not `JoggingPausedNearSingularity`")
103
+ else:
104
+ match += 1
97
105
  if match > 1:
98
106
  # more than 1 match
99
- raise ValueError("Multiple matches found when setting `actual_instance` in JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
107
+ raise ValueError("Multiple matches found when setting `actual_instance` in JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedNearSingularity, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
100
108
  elif match == 0:
101
109
  # no match
102
- raise ValueError("No match found when setting `actual_instance` in JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
110
+ raise ValueError("No match found when setting `actual_instance` in JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedNearSingularity, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
103
111
  else:
104
112
  return v
105
113
 
@@ -134,6 +142,11 @@ class JoggingDetailsState(BaseModel):
134
142
  instance.actual_instance = JoggingPausedNearJointLimit.from_json(json_str)
135
143
  return instance
136
144
 
145
+ # check if data type is `JoggingPausedNearSingularity`
146
+ if _data_type == "PAUSED_NEAR_SINGULARITY":
147
+ instance.actual_instance = JoggingPausedNearSingularity.from_json(json_str)
148
+ return instance
149
+
137
150
  # check if data type is `JoggingPausedOnIO`
138
151
  if _data_type == "PAUSED_ON_IO":
139
152
  instance.actual_instance = JoggingPausedOnIO.from_json(json_str)
@@ -174,13 +187,19 @@ class JoggingDetailsState(BaseModel):
174
187
  match += 1
175
188
  except (ValidationError, ValueError) as e:
176
189
  error_messages.append(str(e))
190
+ # deserialize data into JoggingPausedNearSingularity
191
+ try:
192
+ instance.actual_instance = JoggingPausedNearSingularity.from_json(json_str)
193
+ match += 1
194
+ except (ValidationError, ValueError) as e:
195
+ error_messages.append(str(e))
177
196
 
178
197
  if match > 1:
179
198
  # more than 1 match
180
- raise ValueError("Multiple matches found when deserializing the JSON string into JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
199
+ raise ValueError("Multiple matches found when deserializing the JSON string into JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedNearSingularity, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
181
200
  elif match == 0:
182
201
  # no match
183
- raise ValueError("No match found when deserializing the JSON string into JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
202
+ raise ValueError("No match found when deserializing the JSON string into JoggingDetailsState with oneOf schemas: JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedNearSingularity, JoggingPausedOnIO, JoggingRunning. Details: " + ", ".join(error_messages))
184
203
  else:
185
204
  return instance
186
205
 
@@ -194,7 +213,7 @@ class JoggingDetailsState(BaseModel):
194
213
  else:
195
214
  return json.dumps(self.actual_instance)
196
215
 
197
- def to_dict(self) -> Optional[Union[Dict[str, Any], JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedOnIO, JoggingRunning]]:
216
+ def to_dict(self) -> Optional[Union[Dict[str, Any], JoggingPausedByUser, JoggingPausedNearCollision, JoggingPausedNearJointLimit, JoggingPausedNearSingularity, JoggingPausedOnIO, JoggingRunning]]:
198
217
  """Returns the dict representation of the actual instance"""
199
218
  if self.actual_instance is None:
200
219
  return None