layrz-sdk 4.0.1__py3-none-any.whl → 4.0.3__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.

Potentially problematic release.


This version of layrz-sdk might be problematic. Click here for more details.

@@ -2,7 +2,7 @@
2
2
 
3
3
  from typing import Any, Self
4
4
 
5
- from pydantic import BaseModel, Field, model_validator
5
+ from pydantic import BaseModel, Field, field_validator, model_validator
6
6
 
7
7
  from .asset_contact import AssetContact
8
8
  from .asset_operation_mode import AssetOperationMode
@@ -42,6 +42,20 @@ class Asset(BaseModel):
42
42
  description='Static position of the asset',
43
43
  )
44
44
 
45
+ @field_validator('static_position', mode='before')
46
+ def _validate_static_position(cls: Self, value: Any) -> StaticPosition | None:
47
+ """Validate static position"""
48
+ if isinstance(value, dict):
49
+ try:
50
+ return StaticPosition.model_validate(value)
51
+ except Exception:
52
+ return None
53
+
54
+ if isinstance(value, StaticPosition):
55
+ return value
56
+
57
+ return None
58
+
45
59
  points: list[StaticPosition] = Field(
46
60
  default_factory=list,
47
61
  description='List of static positions for the asset. The altitude of StaticPosition is not used in this case.',
@@ -9,6 +9,6 @@ class AtsEntry(BaseModel):
9
9
  pk: int = Field(description='Defines the primary key of the Function', alias='id')
10
10
  old_tank_level: float = Field(description='Old tank level in liters', default=0.0)
11
11
  new_tank_level: float = Field(description='New tank level in liters', default=0.0)
12
- density: float = Field(description='Density of the fuel in kg/m3', default=0.0)
13
- temperature: float = Field(description='Temperature of the fuel in Celsius', default=0.0)
12
+ density: float | None = Field(description='Density of the fuel in kg/m3', default=None)
13
+ temperature: float | None = Field(description='Temperature of the fuel in Celsius', default=None)
14
14
  is_executed_by_command: bool = Field(description='Indicates if the entry is executed by command', default=False)
@@ -19,8 +19,10 @@ class AtsPossibleEntry(BaseModel):
19
19
  )
20
20
  is_recalculated: bool = Field(description='Indicates if the entry is recalculated', default=False)
21
21
  is_blackbox: bool = Field(description='Indicates if the entry is a black box', default=False)
22
- is_executed_by_command: bool = Field(description='Indicates if the entry is executed by command', default=False)
23
- is_ready_by_reception: bool = Field(description='Indicates if the entry is ready by reception', default=False)
22
+ is_executed_by_command: bool | None = Field(
23
+ description='Indicates if the entry is executed by command', default=False
24
+ )
25
+ is_ready_by_reception: bool | None = Field(description='Indicates if the entry is ready by reception', default=False)
24
26
  false_positive_count: int = Field(description='Count of false positives for the entry', default=0)
25
27
  reception_id: int | None = Field(
26
28
  description='Reception ID associated with the entry', default=None, alias='receptionId'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: layrz-sdk
3
- Version: 4.0.1
3
+ Version: 4.0.3
4
4
  Summary: Layrz SDK for Python
5
5
  Author-email: "Golden M, Inc." <software@goldenm.com>
6
6
  Maintainer-email: Kenny Mochizuki <kenny@goldenm.com>, Luis Reyes <lreyes@goldenm.com>, Kasen Li <kli@goldenm.com>, Miguel Zauzich <miguel@goldenm.com>, Angel Prieto <aprieto@goldenm.com>
@@ -6,13 +6,13 @@ layrz_sdk/entities/action.py,sha256=cbyrfeBsUpdv5ipMtIDvFNJj-FE6whPt7I22BnEZ2sU,
6
6
  layrz_sdk/entities/action_geofence_ownership.py,sha256=xP_JG2qY7ogJtbCv-jE1xWAdc2oA0icoRIOAI6acicA,590
7
7
  layrz_sdk/entities/action_kind.py,sha256=2PR4MesAyKssdWAwOGE4hYfzyhGd9pW78H9rlyXu28Q,1189
8
8
  layrz_sdk/entities/action_subkind.py,sha256=lNsX3C_YTI3aui4AIe0lD86IcjAqwfxsUSf7blRbtgA,635
9
- layrz_sdk/entities/asset.py,sha256=YuVsfIwzs5r7wq_nvyPwg_MBgLKm3gOVe7vQ3duKkdE,2951
9
+ layrz_sdk/entities/asset.py,sha256=NkYk0c1BBv8Vzmanrdc7TRLGAhZ93FEZqQ3QMwG_yEY,3356
10
10
  layrz_sdk/entities/asset_constants.py,sha256=m2pL4FKgPVVHxGKfmF80xv4W-rTh9NL7ClksfEcFkx8,600
11
11
  layrz_sdk/entities/asset_contact.py,sha256=ptxItpob4VdQeM6qMUtSZgZxBw5DfKp3kVfBVlXpujo,422
12
12
  layrz_sdk/entities/asset_operation_mode.py,sha256=umvmRb8W3kEDUd9dqyKhJ745xe3wssNjPw8gGGcKYO8,551
13
- layrz_sdk/entities/ats_entry.py,sha256=b0S9lHsxejNX43LXaUNIUUeEl6osj4rABTuElS7u8sM,653
13
+ layrz_sdk/entities/ats_entry.py,sha256=wtrw3F9Pkirn0uGIvWyxbSqf36GWu2CRfqXuc5legmQ,669
14
14
  layrz_sdk/entities/ats_exit_history.py,sha256=qfeOQcMQqoGEYk0Tp1Oe5K7M_nld7JxpX09rPUQl7hc,1457
15
- layrz_sdk/entities/ats_possible_entry.py,sha256=ElUeIRpzmA2seLMxfQlvJwutTcLf9NQusNL1kSXRf30,1439
15
+ layrz_sdk/entities/ats_possible_entry.py,sha256=M3eWsKvzE4V2YdP2udB5Kih_8hSHw923jG16YYT_gtw,1461
16
16
  layrz_sdk/entities/ats_possible_exit.py,sha256=imOw_KMMYtjUcj5uxmLaYR3i5MQ-fWPINiWmofgHHvs,1832
17
17
  layrz_sdk/entities/ats_reception.py,sha256=DuZSsH92wP3cJE-q6g2hxyd4d-tN06hruS6P1pg2FBY,946
18
18
  layrz_sdk/entities/case.py,sha256=4ufVTeVRNpLOe0cx2vUWLsraP4mePq8gNl8mt7-XFPo,1782
@@ -109,8 +109,8 @@ layrz_sdk/helpers/__init__.py,sha256=5iW3z2m3jrYhvTfxX-p-QTkR9X9oTKfEsbtVOg9jFFY
109
109
  layrz_sdk/helpers/color.py,sha256=dlpMafbM-4Wd9D9hMbbnZJf4ALkpie_ZmBR2Vz_YCmM,1203
110
110
  layrz_sdk/lcl/__init__.py,sha256=U967AWANkL3u_YVxMNAYlh8jkZ6hqHfStacz7yz6sOA,89
111
111
  layrz_sdk/lcl/core.py,sha256=T80A3hL7SeqRNSfl5SrPAgwIEf-enoAVv9ldwJNzqsA,24786
112
- layrz_sdk-4.0.1.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
113
- layrz_sdk-4.0.1.dist-info/METADATA,sha256=nl2IKqRUpX63PFsRPxJGWmcd4J2zyJXPIHsiuUQ66BU,1955
114
- layrz_sdk-4.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
115
- layrz_sdk-4.0.1.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
116
- layrz_sdk-4.0.1.dist-info/RECORD,,
112
+ layrz_sdk-4.0.3.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
113
+ layrz_sdk-4.0.3.dist-info/METADATA,sha256=JYgxlgTFdBQV3kvNqTxTg25qA1Yhpw0Klhi-vlryR3E,1955
114
+ layrz_sdk-4.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
115
+ layrz_sdk-4.0.3.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
116
+ layrz_sdk-4.0.3.dist-info/RECORD,,