logs-py 4.0.7__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.
- LOGS/Auxiliary/CheckClassName.py +1075 -0
- LOGS/Auxiliary/Constants.py +99 -0
- LOGS/Auxiliary/CustomEntityClassGenerator.py +254 -0
- LOGS/Auxiliary/CustomFieldClassGenerator.py +115 -0
- LOGS/Auxiliary/CustomFieldValueTypeChecker.py +168 -0
- LOGS/Auxiliary/CustomSectionClassGenerator.py +113 -0
- LOGS/Auxiliary/CustomTypeClassGenerator.py +147 -0
- LOGS/Auxiliary/DateTimeConverter.py +66 -0
- LOGS/Auxiliary/Decorators.py +109 -0
- LOGS/Auxiliary/Exceptions.py +341 -0
- LOGS/Auxiliary/LOGSErrorResponse.py +89 -0
- LOGS/Auxiliary/MinimalModelGenerator.py +236 -0
- LOGS/Auxiliary/ParameterHelper.py +56 -0
- LOGS/Auxiliary/ReplaceMessage.py +13 -0
- LOGS/Auxiliary/Tools.py +432 -0
- LOGS/Auxiliary/__init__.py +15 -0
- LOGS/Converter/Conversion.py +248 -0
- LOGS/Converter/Converter.py +96 -0
- LOGS/Converter/ConverterParameter.py +88 -0
- LOGS/Converter/DateTimeRange.py +58 -0
- LOGS/Converter/ExportParameters.py +89 -0
- LOGS/Converter/__init__.py +13 -0
- LOGS/Entities/Attachment.py +84 -0
- LOGS/Entities/AttachmentMinimal.py +8 -0
- LOGS/Entities/AttachmentRequestParameter.py +42 -0
- LOGS/Entities/Attachments.py +53 -0
- LOGS/Entities/AutoloadFileInfo.py +12 -0
- LOGS/Entities/AutoloadStatusError.py +7 -0
- LOGS/Entities/AxisNaming.py +33 -0
- LOGS/Entities/AxisZoom.py +33 -0
- LOGS/Entities/Bridge.py +165 -0
- LOGS/Entities/BridgeClientInfo.py +93 -0
- LOGS/Entities/BridgeMinimal.py +8 -0
- LOGS/Entities/BridgeRequestParameter.py +49 -0
- LOGS/Entities/BridgeType.py +7 -0
- LOGS/Entities/Bridges.py +12 -0
- LOGS/Entities/CustomField.py +243 -0
- LOGS/Entities/CustomFieldMinimal.py +8 -0
- LOGS/Entities/CustomFieldModels.py +111 -0
- LOGS/Entities/CustomFieldRequestParameter.py +69 -0
- LOGS/Entities/CustomFieldSearchQuery.py +40 -0
- LOGS/Entities/CustomFields.py +12 -0
- LOGS/Entities/CustomType.py +212 -0
- LOGS/Entities/CustomTypeMinimal.py +8 -0
- LOGS/Entities/CustomTypeRequestParameter.py +60 -0
- LOGS/Entities/CustomTypeSection.py +63 -0
- LOGS/Entities/CustomTypes.py +12 -0
- LOGS/Entities/DataFormat.py +97 -0
- LOGS/Entities/DataFormatInstrument.py +18 -0
- LOGS/Entities/DataFormatInstrumentMinimal.py +8 -0
- LOGS/Entities/DataFormatInstrumentRequestParameter.py +17 -0
- LOGS/Entities/DataFormatInstruments.py +16 -0
- LOGS/Entities/DataFormatMinimal.py +18 -0
- LOGS/Entities/DataFormatRequestParameter.py +21 -0
- LOGS/Entities/DataFormats.py +12 -0
- LOGS/Entities/DataSource.py +218 -0
- LOGS/Entities/DataSourceConnectionStatus.py +12 -0
- LOGS/Entities/DataSourceMinimal.py +8 -0
- LOGS/Entities/DataSourceRequestParameter.py +57 -0
- LOGS/Entities/DataSourceStatus.py +108 -0
- LOGS/Entities/DataSourceStatusIterator.py +16 -0
- LOGS/Entities/DataSourceStatusRequestParameter.py +31 -0
- LOGS/Entities/DataSources.py +12 -0
- LOGS/Entities/Dataset.py +439 -0
- LOGS/Entities/DatasetBase.py +196 -0
- LOGS/Entities/DatasetCreator.py +148 -0
- LOGS/Entities/DatasetInfo.py +147 -0
- LOGS/Entities/DatasetMatchTypes.py +157 -0
- LOGS/Entities/DatasetMatching.py +196 -0
- LOGS/Entities/DatasetMinimal.py +8 -0
- LOGS/Entities/DatasetModels.py +33 -0
- LOGS/Entities/DatasetRequestParameter.py +92 -0
- LOGS/Entities/DatasetTemplate.py +23 -0
- LOGS/Entities/DatasetUploadParameter.py +14 -0
- LOGS/Entities/Datasets.py +142 -0
- LOGS/Entities/Datatrack.py +179 -0
- LOGS/Entities/DatatrackFormattedTable.py +25 -0
- LOGS/Entities/DatatrackGeneric.py +34 -0
- LOGS/Entities/DatatrackImage.py +25 -0
- LOGS/Entities/DatatrackNumericArray.py +30 -0
- LOGS/Entities/DatatrackNumericMatrix.py +98 -0
- LOGS/Entities/Entities.py +71 -0
- LOGS/Entities/EntitiesRequestParameter.py +18 -0
- LOGS/Entities/EntityOriginWriteModelWithId.py +15 -0
- LOGS/Entities/FileEntry.py +138 -0
- LOGS/Entities/FileExcludePattern.py +8 -0
- LOGS/Entities/FormatMetaData.py +56 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTable.py +135 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTableCell.py +108 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTableSettings.py +11 -0
- LOGS/Entities/FormattedTable/__init__.py +9 -0
- LOGS/Entities/HierarchyLeaf.py +15 -0
- LOGS/Entities/HierarchyNode.py +40 -0
- LOGS/Entities/ILiteraryTypedEntity.py +19 -0
- LOGS/Entities/InventoryItem.py +102 -0
- LOGS/Entities/InventoryItemMinimal.py +25 -0
- LOGS/Entities/InventoryItemRequestParameter.py +58 -0
- LOGS/Entities/InventoryItems.py +12 -0
- LOGS/Entities/LabNotebook.py +33 -0
- LOGS/Entities/LabNotebookEntries.py +16 -0
- LOGS/Entities/LabNotebookEntry.py +106 -0
- LOGS/Entities/LabNotebookEntryContent/BasicAttribute.py +15 -0
- LOGS/Entities/LabNotebookEntryContent/EntityAttribute.py +85 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentBlockquote.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentBulletList.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentCallout.py +40 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentContentPlaceholderNode.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentConverter.py +207 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentDocument.py +8 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentEntity.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentEntityMention.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentHeading.py +33 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentHorizontalRule.py +12 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentItem.py +37 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentListItem.py +49 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentOrderedList.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentParagraph.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTable.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTableCell.py +40 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTableRow.py +8 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTaskList.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTaskListItem.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentText.py +33 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithAttribute.py +23 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithContent.py +38 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithTextAttribute.py +16 -0
- LOGS/Entities/LabNotebookEntryContent/TextAttribute.py +46 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarkAtributes.py +64 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarkConverter.py +45 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarks.py +71 -0
- LOGS/Entities/LabNotebookEntryContent/__init__.py +34 -0
- LOGS/Entities/LabNotebookEntryMinimal.py +8 -0
- LOGS/Entities/LabNotebookEntryRequestParameter.py +59 -0
- LOGS/Entities/LabNotebookExperiment.py +58 -0
- LOGS/Entities/LabNotebookExperimentMinimal.py +8 -0
- LOGS/Entities/LabNotebookExperimentRequestParameter.py +52 -0
- LOGS/Entities/LabNotebookExperiments.py +16 -0
- LOGS/Entities/LabNotebookMinimal.py +8 -0
- LOGS/Entities/LabNotebookModels.py +14 -0
- LOGS/Entities/LabNotebookRequestParameter.py +42 -0
- LOGS/Entities/LabNotebookTemplate.py +42 -0
- LOGS/Entities/LabNotebookTemplateMinimal.py +8 -0
- LOGS/Entities/LabNotebookTemplateRequestParameter.py +38 -0
- LOGS/Entities/LabNotebookTemplates.py +16 -0
- LOGS/Entities/LabNotebooks.py +12 -0
- LOGS/Entities/Method.py +66 -0
- LOGS/Entities/MethodMinimal.py +8 -0
- LOGS/Entities/MethodRequestParameter.py +16 -0
- LOGS/Entities/Methods.py +12 -0
- LOGS/Entities/Origin.py +53 -0
- LOGS/Entities/OriginMinimal.py +8 -0
- LOGS/Entities/OriginRequestParameter.py +28 -0
- LOGS/Entities/Origins.py +12 -0
- LOGS/Entities/ParserLog.py +49 -0
- LOGS/Entities/Permission.py +9 -0
- LOGS/Entities/Person.py +145 -0
- LOGS/Entities/PersonCategory.py +12 -0
- LOGS/Entities/PersonMinimal.py +8 -0
- LOGS/Entities/PersonRequestParameter.py +58 -0
- LOGS/Entities/Persons.py +12 -0
- LOGS/Entities/Project.py +52 -0
- LOGS/Entities/ProjectMinimal.py +8 -0
- LOGS/Entities/ProjectPersonPermission.py +102 -0
- LOGS/Entities/ProjectRequestParameter.py +58 -0
- LOGS/Entities/Projects.py +12 -0
- LOGS/Entities/Role.py +94 -0
- LOGS/Entities/RoleMinimal.py +8 -0
- LOGS/Entities/RoleRequestParameter.py +40 -0
- LOGS/Entities/Roles.py +12 -0
- LOGS/Entities/RunState.py +9 -0
- LOGS/Entities/Sample.py +53 -0
- LOGS/Entities/SampleMinimal.py +8 -0
- LOGS/Entities/SampleRequestParameter.py +54 -0
- LOGS/Entities/Samples.py +12 -0
- LOGS/Entities/SharedContent.py +87 -0
- LOGS/Entities/SharedContentMinimal.py +8 -0
- LOGS/Entities/SharedContentRequestParameter.py +38 -0
- LOGS/Entities/SharedContents.py +12 -0
- LOGS/Entities/Signature.py +60 -0
- LOGS/Entities/Track.py +93 -0
- LOGS/Entities/TrackData.py +20 -0
- LOGS/Entities/TrackImage.py +21 -0
- LOGS/Entities/TrackImageData.py +20 -0
- LOGS/Entities/TrackMatrix.py +28 -0
- LOGS/Entities/TrackMatrixData.py +22 -0
- LOGS/Entities/TrackSettings.py +55 -0
- LOGS/Entities/TrackTable.py +21 -0
- LOGS/Entities/TrackTableData.py +22 -0
- LOGS/Entities/TrackXY.py +40 -0
- LOGS/Entities/TrackXYComplex.py +51 -0
- LOGS/Entities/TrackXYComplexData.py +50 -0
- LOGS/Entities/TrackXYData.py +31 -0
- LOGS/Entities/Vendor.py +40 -0
- LOGS/Entities/VendorMinimal.py +8 -0
- LOGS/Entities/VendorRequestParameter.py +17 -0
- LOGS/Entities/Vendors.py +12 -0
- LOGS/Entities/__init__.py +118 -0
- LOGS/Entity/ConnectedEntity.py +170 -0
- LOGS/Entity/Entity.py +203 -0
- LOGS/Entity/EntityConnector.py +70 -0
- LOGS/Entity/EntityIterator.py +263 -0
- LOGS/Entity/EntityMinimal.py +141 -0
- LOGS/Entity/EntityMinimalWithIntId.py +36 -0
- LOGS/Entity/EntityMinimalWithStrId.py +36 -0
- LOGS/Entity/EntityMinimalWithType.py +47 -0
- LOGS/Entity/EntityRequestParameter.py +104 -0
- LOGS/Entity/EntitySortBy.py +69 -0
- LOGS/Entity/EntityWithIntId.py +26 -0
- LOGS/Entity/EntityWithStrId.py +26 -0
- LOGS/Entity/IGenericEntityOrderBy.py +55 -0
- LOGS/Entity/IdIterator.py +207 -0
- LOGS/Entity/SerializableContent.py +834 -0
- LOGS/Entity/__init__.py +23 -0
- LOGS/Interfaces/ICustomFieldValue.py +92 -0
- LOGS/Interfaces/ICustomSectionValue.py +161 -0
- LOGS/Interfaces/ICustomTypeValue.py +152 -0
- LOGS/Interfaces/ICustomValue.py +28 -0
- LOGS/Interfaces/IEntityInterface.py +7 -0
- LOGS/Interfaces/IEntryRecord.py +57 -0
- LOGS/Interfaces/IHierarchicalEntity.py +41 -0
- LOGS/Interfaces/IHierarchyType.py +63 -0
- LOGS/Interfaces/ILockableEntity.py +52 -0
- LOGS/Interfaces/IModificationRecord.py +56 -0
- LOGS/Interfaces/INamedEntity.py +25 -0
- LOGS/Interfaces/IOwnedEntity.py +27 -0
- LOGS/Interfaces/IPaginationRequest.py +11 -0
- LOGS/Interfaces/IPermissionedEntity.py +72 -0
- LOGS/Interfaces/IProjectBased.py +27 -0
- LOGS/Interfaces/ISessionedEntity.py +59 -0
- LOGS/Interfaces/ISignableEntity.py +49 -0
- LOGS/Interfaces/ISoftDeletable.py +28 -0
- LOGS/Interfaces/ITypedEntity.py +129 -0
- LOGS/Interfaces/IUniqueEntity.py +61 -0
- LOGS/Interfaces/IVersionedEntity.py +39 -0
- LOGS/Interfaces/__init__.py +7 -0
- LOGS/LOGS.py +1436 -0
- LOGS/LOGSConnection.py +647 -0
- LOGS/LOGSOptions.py +11 -0
- LOGS/Parameters/Color.py +92 -0
- LOGS/Parameters/ParameterBase.py +55 -0
- LOGS/Parameters/ParameterConverter.py +24 -0
- LOGS/Parameters/ParameterElement.py +99 -0
- LOGS/Parameters/ParameterList.py +52 -0
- LOGS/Parameters/ParameterTable.py +64 -0
- LOGS/Parameters/__init__.py +13 -0
- LOGS/ServerMetaData.py +120 -0
- LOGS/__init__.py +12 -0
- logs_py-4.0.7.dist-info/METADATA +51 -0
- logs_py-4.0.7.dist-info/RECORD +251 -0
- logs_py-4.0.7.dist-info/WHEEL +5 -0
- logs_py-4.0.7.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import List, Optional, Type
|
|
3
|
+
|
|
4
|
+
from LOGS.Entities.DatasetRequestParameter import ParsingStates
|
|
5
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
6
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
7
|
+
IEntryRecordSortingOptions,
|
|
8
|
+
IGenericEntitySortingOptions,
|
|
9
|
+
IModificationRecordSortingOptions,
|
|
10
|
+
)
|
|
11
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecordRequest
|
|
12
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
13
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
14
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AttachmentSortingOptions(
|
|
18
|
+
IGenericEntitySortingOptions,
|
|
19
|
+
IEntryRecordSortingOptions,
|
|
20
|
+
IModificationRecordSortingOptions,
|
|
21
|
+
):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class AttachmentRequestParameter(
|
|
27
|
+
EntityRequestParameter[AttachmentSortingOptions],
|
|
28
|
+
IUniqueEntityRequest,
|
|
29
|
+
INamedEntityRequest,
|
|
30
|
+
IEntryRecordRequest,
|
|
31
|
+
IModificationRecordRequest,
|
|
32
|
+
):
|
|
33
|
+
_orderByType: Type[AttachmentSortingOptions] = field(
|
|
34
|
+
default=AttachmentSortingOptions, init=False
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
parsingState: Optional[List[ParsingStates]] = None
|
|
38
|
+
pathContains: Optional[str] = None
|
|
39
|
+
|
|
40
|
+
# Additional fetch options
|
|
41
|
+
includeInfo: Optional[bool] = None
|
|
42
|
+
includeZipSize: Optional[bool] = None
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import dataclasses
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
5
|
+
from LOGS.Entities.Attachment import Attachment
|
|
6
|
+
from LOGS.Entities.AttachmentRequestParameter import AttachmentRequestParameter
|
|
7
|
+
from LOGS.Entities.DatasetModels import ViewableEntityTypes
|
|
8
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
9
|
+
from LOGS.LOGSConnection import LOGSConnection
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class _AttachmentRequestParameter(AttachmentRequestParameter):
|
|
13
|
+
isViewableEntity: bool = True
|
|
14
|
+
viewableEntityTypes: List[ViewableEntityTypes] = [ViewableEntityTypes.CustomField]
|
|
15
|
+
|
|
16
|
+
def __init__(self, ref: Optional[AttachmentRequestParameter] = None):
|
|
17
|
+
if ref is None:
|
|
18
|
+
super().__init__()
|
|
19
|
+
return
|
|
20
|
+
fieldValues = {f.name: getattr(ref, f.name) for f in dataclasses.fields(ref)}
|
|
21
|
+
super().__init__(**fieldValues)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@Endpoint("datasets")
|
|
25
|
+
class Attachments(EntityIterator[Attachment, AttachmentRequestParameter]):
|
|
26
|
+
"""LOGS connected class Attachments iterator"""
|
|
27
|
+
|
|
28
|
+
_generatorType = Attachment
|
|
29
|
+
_parameterType = AttachmentRequestParameter
|
|
30
|
+
|
|
31
|
+
def __init__(
|
|
32
|
+
self,
|
|
33
|
+
connection: Optional[LOGSConnection],
|
|
34
|
+
parameters: Optional[AttachmentRequestParameter] = None,
|
|
35
|
+
):
|
|
36
|
+
self._parameterType = _AttachmentRequestParameter
|
|
37
|
+
parameters = (
|
|
38
|
+
_AttachmentRequestParameter(parameters)
|
|
39
|
+
if parameters
|
|
40
|
+
else _AttachmentRequestParameter()
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
super().__init__(connection=connection, parameters=parameters)
|
|
44
|
+
|
|
45
|
+
def __next__(self):
|
|
46
|
+
attachment = super().__next__()
|
|
47
|
+
|
|
48
|
+
if self._parameters.includeInfo:
|
|
49
|
+
attachment.fetchInfo()
|
|
50
|
+
if self._parameters.includeZipSize:
|
|
51
|
+
attachment.fetchZipSize()
|
|
52
|
+
|
|
53
|
+
return attachment
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from LOGS.Entity.SerializableContent import SerializableClass
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AutoloadFileInfo(SerializableClass):
|
|
8
|
+
name: Optional[str] = None
|
|
9
|
+
fullPath: Optional[str] = None
|
|
10
|
+
size: Optional[int] = None
|
|
11
|
+
modTime: Optional[datetime] = None
|
|
12
|
+
isDir: Optional[bool] = None
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entity.SerializableContent import SerializableContent
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AxisNaming(SerializableContent):
|
|
7
|
+
_x: Optional[str] = None
|
|
8
|
+
_y: Optional[str] = None
|
|
9
|
+
_z: Optional[str] = None
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def x(self) -> Optional[str]:
|
|
13
|
+
return self._x
|
|
14
|
+
|
|
15
|
+
@x.setter
|
|
16
|
+
def x(self, value):
|
|
17
|
+
self._x = self.checkAndConvertNullable(value, str, "x")
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def y(self) -> Optional[str]:
|
|
21
|
+
return self._y
|
|
22
|
+
|
|
23
|
+
@y.setter
|
|
24
|
+
def y(self, value):
|
|
25
|
+
self._y = self.checkAndConvertNullable(value, str, "y")
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def z(self) -> Optional[str]:
|
|
29
|
+
return self._z
|
|
30
|
+
|
|
31
|
+
@z.setter
|
|
32
|
+
def z(self, value):
|
|
33
|
+
self._z = self.checkAndConvertNullable(value, str, "z")
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entity.SerializableContent import SerializableContent
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AxisZoom(SerializableContent):
|
|
7
|
+
_x: Optional[List[float]] = None
|
|
8
|
+
_y: Optional[List[float]] = None
|
|
9
|
+
_z: Optional[List[float]] = None
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def x(self) -> Optional[List[float]]:
|
|
13
|
+
return self._x
|
|
14
|
+
|
|
15
|
+
@x.setter
|
|
16
|
+
def x(self, value):
|
|
17
|
+
self._x = self.checkListAndConvertNullable(value, float, "x")
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def y(self) -> Optional[List[float]]:
|
|
21
|
+
return self._y
|
|
22
|
+
|
|
23
|
+
@y.setter
|
|
24
|
+
def y(self, value):
|
|
25
|
+
self._y = self.checkListAndConvertNullable(value, float, "y")
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def z(self) -> Optional[List[float]]:
|
|
29
|
+
return self._z
|
|
30
|
+
|
|
31
|
+
@z.setter
|
|
32
|
+
def z(self, value):
|
|
33
|
+
self._z = self.checkListAndConvertNullable(value, float, "z")
|
LOGS/Entities/Bridge.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
5
|
+
from LOGS.Auxiliary.Exceptions import LOGSMultilineException
|
|
6
|
+
from LOGS.Entities.AutoloadFileInfo import AutoloadFileInfo
|
|
7
|
+
from LOGS.Entities.BridgeClientInfo import BridgeClientInfo
|
|
8
|
+
from LOGS.Entities.BridgeType import BridgeType
|
|
9
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
10
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecord
|
|
11
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
12
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
13
|
+
from LOGS.Interfaces.IPermissionedEntity import IGenericPermissionEntity
|
|
14
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SFTPAuthenticationMethodOption(Enum):
|
|
18
|
+
PrivateKey = "PrivateKey"
|
|
19
|
+
Password = "Password"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@Endpoint("bridges")
|
|
23
|
+
class Bridge(
|
|
24
|
+
IEntityWithIntId,
|
|
25
|
+
IUniqueEntity,
|
|
26
|
+
INamedEntity,
|
|
27
|
+
IEntryRecord,
|
|
28
|
+
IModificationRecord,
|
|
29
|
+
IGenericPermissionEntity,
|
|
30
|
+
):
|
|
31
|
+
_type: Optional[BridgeType] = None
|
|
32
|
+
_hostname: Optional[str] = None
|
|
33
|
+
_ipAddress: Optional[str] = None
|
|
34
|
+
_description: Optional[str] = None
|
|
35
|
+
_username: Optional[str] = None
|
|
36
|
+
_port: Optional[int] = None
|
|
37
|
+
_connectedClients: Optional[List[BridgeClientInfo]] = None
|
|
38
|
+
_isConnected: Optional[bool] = None
|
|
39
|
+
_areMultipleClientsConnected: Optional[bool] = None
|
|
40
|
+
_sftpAuthenticationMethod: Optional[SFTPAuthenticationMethodOption] = None
|
|
41
|
+
|
|
42
|
+
_password: Optional[str] = None
|
|
43
|
+
_privateKey: Optional[str] = None
|
|
44
|
+
|
|
45
|
+
def readDirectory(self):
|
|
46
|
+
connection, endpoint, id = self._getConnectionData()
|
|
47
|
+
|
|
48
|
+
data, responseError = connection.postEndpoint(endpoint + [id, "read_directory"])
|
|
49
|
+
if responseError:
|
|
50
|
+
raise LOGSMultilineException(responseError=responseError)
|
|
51
|
+
|
|
52
|
+
return self.checkListAndConvertNullable(
|
|
53
|
+
data, AutoloadFileInfo, "directory content"
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def url(self):
|
|
58
|
+
return "{type}://{user}@{host}{port}".format(
|
|
59
|
+
type=str(self.type.name if self.type else "").lower(),
|
|
60
|
+
user=self.username,
|
|
61
|
+
host=self.hostname,
|
|
62
|
+
port=":%d" % self.port if self.port else ":22",
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def type(self) -> Optional[BridgeType]:
|
|
67
|
+
return self._type
|
|
68
|
+
|
|
69
|
+
@type.setter
|
|
70
|
+
def type(self, value):
|
|
71
|
+
self._type = self.checkAndConvertNullable(value, BridgeType, "type")
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def hostname(self) -> Optional[str]:
|
|
75
|
+
return self._hostname
|
|
76
|
+
|
|
77
|
+
@hostname.setter
|
|
78
|
+
def hostname(self, value):
|
|
79
|
+
self._hostname = self.checkAndConvertNullable(value, str, "hostname")
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def ipAddress(self) -> Optional[str]:
|
|
83
|
+
return self._ipAddress
|
|
84
|
+
|
|
85
|
+
@ipAddress.setter
|
|
86
|
+
def ipAddress(self, value):
|
|
87
|
+
self._ipAddress = self.checkAndConvertNullable(value, str, "ipAddress")
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def description(self) -> Optional[str]:
|
|
91
|
+
return self._description
|
|
92
|
+
|
|
93
|
+
@description.setter
|
|
94
|
+
def description(self, value):
|
|
95
|
+
self._description = self.checkAndConvertNullable(value, str, "description")
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def username(self) -> Optional[str]:
|
|
99
|
+
return self._username
|
|
100
|
+
|
|
101
|
+
@username.setter
|
|
102
|
+
def username(self, value):
|
|
103
|
+
self._username = self.checkAndConvertNullable(value, str, "username")
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def port(self) -> Optional[int]:
|
|
107
|
+
return self._port
|
|
108
|
+
|
|
109
|
+
@port.setter
|
|
110
|
+
def port(self, value):
|
|
111
|
+
self._port = self.checkAndConvertNullable(value, int, "port")
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def connectedClients(self) -> Optional[List[BridgeClientInfo]]:
|
|
115
|
+
return self._connectedClients
|
|
116
|
+
|
|
117
|
+
@connectedClients.setter
|
|
118
|
+
def connectedClients(self, value):
|
|
119
|
+
self._connectedClients = self.checkListAndConvertNullable(
|
|
120
|
+
value, BridgeClientInfo, "connectedClients"
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
def isConnected(self) -> Optional[bool]:
|
|
125
|
+
return self._isConnected
|
|
126
|
+
|
|
127
|
+
@isConnected.setter
|
|
128
|
+
def isConnected(self, value):
|
|
129
|
+
self._isConnected = self.checkAndConvertNullable(value, bool, "isConnected")
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def areMultipleClientsConnected(self) -> Optional[bool]:
|
|
133
|
+
return self._areMultipleClientsConnected
|
|
134
|
+
|
|
135
|
+
@areMultipleClientsConnected.setter
|
|
136
|
+
def areMultipleClientsConnected(self, value):
|
|
137
|
+
self._areMultipleClientsConnected = self.checkAndConvertNullable(
|
|
138
|
+
value, bool, "areMultipleClientsConnected"
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def sftpAuthenticationMethod(self) -> Optional[SFTPAuthenticationMethodOption]:
|
|
143
|
+
return self._sftpAuthenticationMethod
|
|
144
|
+
|
|
145
|
+
@sftpAuthenticationMethod.setter
|
|
146
|
+
def sftpAuthenticationMethod(self, value):
|
|
147
|
+
self._sftpAuthenticationMethod = self.checkAndConvertNullable(
|
|
148
|
+
value, SFTPAuthenticationMethodOption, "sftpAuthenticationMethod"
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def password(self) -> Optional[str]:
|
|
153
|
+
return self._password
|
|
154
|
+
|
|
155
|
+
@password.setter
|
|
156
|
+
def password(self, value):
|
|
157
|
+
self._password = self.checkAndConvertNullable(value, str, "password")
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def privateKey(self) -> Optional[str]:
|
|
161
|
+
return self._privateKey
|
|
162
|
+
|
|
163
|
+
@privateKey.setter
|
|
164
|
+
def privateKey(self, value):
|
|
165
|
+
self._privateKey = self.checkAndConvertNullable(value, str, "privateKey")
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from LOGS.Entity.SerializableContent import SerializableContent
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BridgeClientInfo(SerializableContent):
|
|
9
|
+
_id: Optional[UUID] = None
|
|
10
|
+
_host: Optional[str] = None
|
|
11
|
+
_clientVersion: Optional[str] = None
|
|
12
|
+
_ipAddress: Optional[str] = None
|
|
13
|
+
_executablePath: Optional[str] = None
|
|
14
|
+
_operatingSystem: Optional[str] = None
|
|
15
|
+
_firstSeen: Optional[datetime] = None
|
|
16
|
+
_isApproved: Optional[bool] = None
|
|
17
|
+
_bridgeId: Optional[int] = None
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def id(self) -> Optional[UUID]:
|
|
21
|
+
return self._id
|
|
22
|
+
|
|
23
|
+
@id.setter
|
|
24
|
+
def id(self, value):
|
|
25
|
+
self._id = self.checkAndConvertNullable(value, UUID, "id")
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def host(self) -> Optional[str]:
|
|
29
|
+
return self._host
|
|
30
|
+
|
|
31
|
+
@host.setter
|
|
32
|
+
def host(self, value):
|
|
33
|
+
self._host = self.checkAndConvertNullable(value, str, "host")
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def clientVersion(self) -> Optional[str]:
|
|
37
|
+
return self._clientVersion
|
|
38
|
+
|
|
39
|
+
@clientVersion.setter
|
|
40
|
+
def clientVersion(self, value):
|
|
41
|
+
self._clientVersion = self.checkAndConvertNullable(value, str, "clientVersion")
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def ipAddress(self) -> Optional[str]:
|
|
45
|
+
return self._ipAddress
|
|
46
|
+
|
|
47
|
+
@ipAddress.setter
|
|
48
|
+
def ipAddress(self, value):
|
|
49
|
+
self._ipAddress = self.checkAndConvertNullable(value, str, "ipAddress")
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def executablePath(self) -> Optional[str]:
|
|
53
|
+
return self._executablePath
|
|
54
|
+
|
|
55
|
+
@executablePath.setter
|
|
56
|
+
def executablePath(self, value):
|
|
57
|
+
self._executablePath = self.checkAndConvertNullable(
|
|
58
|
+
value, str, "executablePath"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def operatingSystem(self) -> Optional[str]:
|
|
63
|
+
return self._operatingSystem
|
|
64
|
+
|
|
65
|
+
@operatingSystem.setter
|
|
66
|
+
def operatingSystem(self, value):
|
|
67
|
+
self._operatingSystem = self.checkAndConvertNullable(
|
|
68
|
+
value, str, "operatingSystem"
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def firstSeen(self) -> Optional[datetime]:
|
|
73
|
+
return self._firstSeen
|
|
74
|
+
|
|
75
|
+
@firstSeen.setter
|
|
76
|
+
def firstSeen(self, value):
|
|
77
|
+
self._firstSeen = self.checkAndConvertNullable(value, datetime, "firstSeen")
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def isApproved(self) -> Optional[bool]:
|
|
81
|
+
return self._isApproved
|
|
82
|
+
|
|
83
|
+
@isApproved.setter
|
|
84
|
+
def isApproved(self, value):
|
|
85
|
+
self._isApproved = self.checkAndConvertNullable(value, bool, "isApproved")
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def bridgeId(self) -> Optional[int]:
|
|
89
|
+
return self._bridgeId
|
|
90
|
+
|
|
91
|
+
@bridgeId.setter
|
|
92
|
+
def bridgeId(self, value):
|
|
93
|
+
self._bridgeId = self.checkAndConvertNullable(value, int, "bridgeId")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import List, Optional, Type, cast
|
|
3
|
+
|
|
4
|
+
from typing_extensions import Self
|
|
5
|
+
|
|
6
|
+
from LOGS.Entities.BridgeType import BridgeType
|
|
7
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
8
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
9
|
+
IEntryRecordSortingOptions,
|
|
10
|
+
IGenericEntitySortingOptions,
|
|
11
|
+
IModificationRecordSortingOptions,
|
|
12
|
+
INamedEntitySortingOptions,
|
|
13
|
+
)
|
|
14
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecordRequest
|
|
15
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
16
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
17
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
18
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class BridgeSortingOptions(
|
|
22
|
+
IGenericEntitySortingOptions,
|
|
23
|
+
INamedEntitySortingOptions,
|
|
24
|
+
IEntryRecordSortingOptions,
|
|
25
|
+
IModificationRecordSortingOptions,
|
|
26
|
+
):
|
|
27
|
+
TYPE: Self = cast(Self, "TYPE")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass
|
|
31
|
+
class BridgeRequestParameter(
|
|
32
|
+
EntityRequestParameter[BridgeSortingOptions],
|
|
33
|
+
INamedEntityRequest,
|
|
34
|
+
IUniqueEntityRequest,
|
|
35
|
+
IEntryRecordRequest,
|
|
36
|
+
IModificationRecordRequest,
|
|
37
|
+
IPermissionedEntityRequest,
|
|
38
|
+
):
|
|
39
|
+
_orderByType: Type[BridgeSortingOptions] = field(
|
|
40
|
+
default=BridgeSortingOptions, init=False
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
hostnames: Optional[List[str]] = None
|
|
44
|
+
usernames: Optional[List[str]] = None
|
|
45
|
+
ipAddresses: Optional[List[str]] = None
|
|
46
|
+
dataSourceIds: Optional[List[int]] = None
|
|
47
|
+
types: Optional[List[BridgeType]] = None
|
|
48
|
+
datasetIds: Optional[List[int]] = None
|
|
49
|
+
isConfigured: Optional[bool] = None
|
LOGS/Entities/Bridges.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.Bridge import Bridge
|
|
3
|
+
from LOGS.Entities.BridgeRequestParameter import BridgeRequestParameter
|
|
4
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Endpoint("bridges")
|
|
8
|
+
class Bridges(EntityIterator[Bridge, BridgeRequestParameter]):
|
|
9
|
+
"""LOGS connected class Bridges iterator"""
|
|
10
|
+
|
|
11
|
+
_generatorType = Bridge
|
|
12
|
+
_parameterType = BridgeRequestParameter
|