|
1 | 1 | from datetime import datetime |
2 | | -from typing import Dict, List, Optional |
| 2 | +from typing import Dict, List |
3 | 3 |
|
4 | 4 | from nisystemlink.clients.core._uplink._json_model import JsonModel |
5 | 5 | from pydantic import Field |
|
17 | 17 | class Asset(JsonModel): |
18 | 18 | """Model for an object describing an asset with all of its properties.""" |
19 | 19 |
|
20 | | - model_name: Optional[str] = None |
| 20 | + model_name: str | None = None |
21 | 21 | """Gets or sets model name of the asset.""" |
22 | 22 |
|
23 | | - model_number: Optional[int] = None |
| 23 | + model_number: int | None = None |
24 | 24 | """Gets or sets model number of the asset.""" |
25 | 25 |
|
26 | | - serial_number: Optional[str] = None |
| 26 | + serial_number: str | None = None |
27 | 27 | """Gets or sets serial number of the asset.""" |
28 | 28 |
|
29 | | - vendor_name: Optional[str] = None |
| 29 | + vendor_name: str | None = None |
30 | 30 | """Gets or sets vendor name of the asset.""" |
31 | 31 |
|
32 | | - vendor_number: Optional[int] = None |
| 32 | + vendor_number: int | None = None |
33 | 33 | """Gets or sets vendor number of the asset.""" |
34 | 34 |
|
35 | | - bus_type: Optional[AssetBusType] = None |
| 35 | + bus_type: AssetBusType | None = None |
36 | 36 | """Gets or sets all supported bus types for an asset.""" |
37 | 37 |
|
38 | | - name: Optional[str] = None |
| 38 | + name: str | None = None |
39 | 39 | """Gets or sets name of the asset.""" |
40 | 40 |
|
41 | | - asset_type: Optional[AssetType] = None |
| 41 | + asset_type: AssetType | None = None |
42 | 42 | """Gets or sets all supported asset types.""" |
43 | 43 |
|
44 | | - discovery_type: Optional[AssetDiscoveryType] = None |
| 44 | + discovery_type: AssetDiscoveryType | None = None |
45 | 45 | """Gets or sets the discovery type.""" |
46 | 46 |
|
47 | | - firmware_version: Optional[str] = None |
| 47 | + firmware_version: str | None = None |
48 | 48 | """Gets or sets firmware version of the asset.""" |
49 | 49 |
|
50 | | - hardware_version: Optional[str] = None |
| 50 | + hardware_version: str | None = None |
51 | 51 | """Gets or sets hardware version of the asset.""" |
52 | 52 |
|
53 | | - visa_resource_name: Optional[str] = None |
| 53 | + visa_resource_name: str | None = None |
54 | 54 | """Gets or sets VISA resource name of the asset.""" |
55 | 55 |
|
56 | | - temperature_sensors: Optional[List[TemperatureSensor]] = None |
| 56 | + temperature_sensors: List[TemperatureSensor] | None = None |
57 | 57 | """Gets or sets an array of temperature sensor information.""" |
58 | 58 |
|
59 | | - supports_self_calibration: Optional[bool] = None |
| 59 | + supports_self_calibration: bool | None = None |
60 | 60 | """Gets or sets whether the asset supports self-calibration.""" |
61 | 61 |
|
62 | | - supports_external_calibration: Optional[bool] = None |
| 62 | + supports_external_calibration: bool | None = None |
63 | 63 | """Gets or sets whether the asset supports external calibration.""" |
64 | 64 |
|
65 | | - custom_calibration_interval: Optional[int] = None |
| 65 | + custom_calibration_interval: int | None = None |
66 | 66 | """Gets or sets the interval represented in months used for computing calibration due date.""" |
67 | 67 |
|
68 | | - self_calibration: Optional[SelfCalibration] = None |
| 68 | + self_calibration: SelfCalibration | None = None |
69 | 69 | """Gets or sets the last self-calibration of the asset.""" |
70 | 70 |
|
71 | | - is_NI_asset: Optional[bool] = Field(alias="isNIAsset", default=None) |
| 71 | + is_NI_asset: bool | None = Field(alias="isNIAsset", default=None) |
72 | 72 | """Gets or sets whether this asset is an NI asset (true) or a third-party asset (false).""" |
73 | 73 |
|
74 | | - id: Optional[str] = None |
| 74 | + id: str | None = None |
75 | 75 | """Gets or sets unique identifier of the asset.""" |
76 | 76 |
|
77 | | - location: Optional[AssetLocation] = None |
| 77 | + location: AssetLocation | None = None |
78 | 78 | """Model for information about the asset location, presence and the connection status of the system""" |
79 | 79 |
|
80 | | - calibration_status: Optional[CalibrationStatus] = None |
| 80 | + calibration_status: CalibrationStatus | None = None |
81 | 81 | """Gets or sets the calibration category the asset belongs to based on the next due calibration date.""" |
82 | 82 |
|
83 | | - is_system_controller: Optional[bool] = None |
| 83 | + is_system_controller: bool | None = None |
84 | 84 | """Gets or sets whether this asset represents a System Controller.""" |
85 | 85 |
|
86 | | - external_calibration: Optional[ExternalCalibration] = None |
| 86 | + external_calibration: ExternalCalibration | None = None |
87 | 87 | """Gets or sets the last external calibration of the asset.""" |
88 | 88 |
|
89 | | - workspace: Optional[str] = None |
| 89 | + workspace: str | None = None |
90 | 90 | """Gets or sets the ID of the workspace.""" |
91 | 91 |
|
92 | | - properties: Optional[Dict[str, str]] = None |
| 92 | + properties: Dict[str, str] | None = None |
93 | 93 | """ Gets or sets key-value-pair metadata associated with an asset.""" |
94 | 94 |
|
95 | | - keywords: Optional[List[str]] = None |
| 95 | + keywords: List[str] | None = None |
96 | 96 | """Gets or sets words or phrases associated with an asset.""" |
97 | 97 |
|
98 | | - last_updated_timestamp: Optional[datetime] = None |
| 98 | + last_updated_timestamp: datetime | None = None |
99 | 99 | """Gets or sets ISO-8601 formatted timestamp specifying the last date that the asset has had a property update.""" |
100 | 100 |
|
101 | | - file_ids: Optional[List[str]] = None |
| 101 | + file_ids: List[str] | None = None |
102 | 102 | """Gets or sets all files linked to the asset.""" |
103 | 103 |
|
104 | | - supports_self_test: Optional[bool] = None |
| 104 | + supports_self_test: bool | None = None |
105 | 105 | """Gets or sets whether the asset supports self-test.""" |
106 | 106 |
|
107 | | - supports_reset: Optional[bool] = None |
| 107 | + supports_reset: bool | None = None |
108 | 108 | """Gets or sets whether the asset supports reset.""" |
109 | 109 |
|
110 | | - part_number: Optional[str] = None |
| 110 | + part_number: str | None = None |
111 | 111 | """Gets or sets part number of the asset.""" |
112 | 112 |
|
113 | | - out_for_calibration: Optional[bool] = None |
| 113 | + out_for_calibration: bool | None = None |
114 | 114 | """Get or set whether the asset is out for calibration.""" |
0 commit comments