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
LOGS/Entities/Project.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
|
+
from LOGS.Entities.ProjectPersonPermission import ProjectPersonPermission
|
|
5
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
6
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecord
|
|
7
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntity
|
|
8
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
9
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
10
|
+
from LOGS.Interfaces.IOwnedEntity import IOwnedEntity
|
|
11
|
+
from LOGS.Interfaces.IPermissionedEntity import IGenericPermissionEntity
|
|
12
|
+
from LOGS.Interfaces.ITypedEntity import ITypedEntity
|
|
13
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
14
|
+
from LOGS.LOGSConnection import LOGSConnection
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@Endpoint("projects")
|
|
18
|
+
class Project(
|
|
19
|
+
IEntityWithIntId,
|
|
20
|
+
IUniqueEntity,
|
|
21
|
+
INamedEntity,
|
|
22
|
+
ITypedEntity,
|
|
23
|
+
IOwnedEntity,
|
|
24
|
+
IEntryRecord,
|
|
25
|
+
IModificationRecord,
|
|
26
|
+
ILockableEntity,
|
|
27
|
+
IGenericPermissionEntity,
|
|
28
|
+
):
|
|
29
|
+
|
|
30
|
+
_projectPersonPermissions: Optional[List[ProjectPersonPermission]] = None
|
|
31
|
+
|
|
32
|
+
def __init__(
|
|
33
|
+
self,
|
|
34
|
+
ref=None,
|
|
35
|
+
id: Optional[int] = None,
|
|
36
|
+
connection: Optional[LOGSConnection] = None,
|
|
37
|
+
name: Optional[str] = None,
|
|
38
|
+
):
|
|
39
|
+
"""Represents a connected LOGS entity type"""
|
|
40
|
+
|
|
41
|
+
self._name = name
|
|
42
|
+
super().__init__(ref=ref, id=id, connection=connection)
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def projectPersonPermissions(self) -> Optional[List[ProjectPersonPermission]]:
|
|
46
|
+
return self._projectPersonPermissions
|
|
47
|
+
|
|
48
|
+
@projectPersonPermissions.setter
|
|
49
|
+
def projectPersonPermissions(self, value):
|
|
50
|
+
self._projectPersonPermissions = self.checkListAndConvertNullable(
|
|
51
|
+
value, ProjectPersonPermission, "projectPersonPermissions"
|
|
52
|
+
)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Callable, Optional, Tuple, Union
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary.MinimalModelGenerator import MinimalModelGenerator
|
|
4
|
+
from LOGS.Entity.ConnectedEntity import ConnectedEntity
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from LOGS.Entities.PersonMinimal import PersonMinimal
|
|
8
|
+
from LOGS.Entities.ProjectMinimal import ProjectMinimal
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProjectPersonPermission(ConnectedEntity):
|
|
12
|
+
_person: Optional["PersonMinimal"] = None
|
|
13
|
+
_project: Optional["ProjectMinimal"] = None
|
|
14
|
+
_administer: Optional[bool] = None
|
|
15
|
+
_edit: Optional[bool] = None
|
|
16
|
+
_add: Optional[bool] = None
|
|
17
|
+
_read: Optional[bool] = None
|
|
18
|
+
|
|
19
|
+
def _fromRef(
|
|
20
|
+
self,
|
|
21
|
+
ref,
|
|
22
|
+
selfClass,
|
|
23
|
+
convertOtherType: Union[Tuple[type, Callable[[Any], Any]], None] = None,
|
|
24
|
+
):
|
|
25
|
+
if isinstance(ref, dict) and "read" in ref:
|
|
26
|
+
self._read = ref["read"]
|
|
27
|
+
del ref["read"]
|
|
28
|
+
return super()._fromRef(ref, selfClass, convertOtherType)
|
|
29
|
+
|
|
30
|
+
def __str__(self):
|
|
31
|
+
attrList = self._getAttrList()
|
|
32
|
+
|
|
33
|
+
s1 = f"'{self.person.name}'" if self.person else ""
|
|
34
|
+
s2 = ",".join(k for k in attrList if getattr(self, k, None) is True)
|
|
35
|
+
return f"<{type(self).__name__} {s1} access:{s2}>"
|
|
36
|
+
|
|
37
|
+
def contentToString(self, indentation: int = 1, hideNone: bool = False) -> str:
|
|
38
|
+
return str(self)
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def person(self) -> Optional["PersonMinimal"]:
|
|
42
|
+
return self._person
|
|
43
|
+
|
|
44
|
+
@person.setter
|
|
45
|
+
def person(self, value):
|
|
46
|
+
self._person = MinimalModelGenerator.MinimalFromSingle(
|
|
47
|
+
value, "PersonMinimal", "person", self._getConnection()
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def project(self) -> Optional["ProjectMinimal"]:
|
|
52
|
+
return self._project
|
|
53
|
+
|
|
54
|
+
@project.setter
|
|
55
|
+
def project(self, value):
|
|
56
|
+
self._project = MinimalModelGenerator.MinimalFromSingle(
|
|
57
|
+
value, "ProjectMinimal", "project", self._getConnection()
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def administer(self) -> Optional[bool]:
|
|
62
|
+
return self._administer
|
|
63
|
+
|
|
64
|
+
@administer.setter
|
|
65
|
+
def administer(self, value):
|
|
66
|
+
self._administer = self.checkAndConvertNullable(value, bool, "administer")
|
|
67
|
+
if self._administer:
|
|
68
|
+
self._edit = True
|
|
69
|
+
self._add = True
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def edit(self) -> Optional[bool]:
|
|
73
|
+
return self._edit
|
|
74
|
+
|
|
75
|
+
@edit.setter
|
|
76
|
+
def edit(self, value):
|
|
77
|
+
self._edit = self.checkAndConvertNullable(value, bool, "edit")
|
|
78
|
+
if self._edit:
|
|
79
|
+
self._add = True
|
|
80
|
+
else:
|
|
81
|
+
self._administer = False
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def add(self) -> Optional[bool]:
|
|
85
|
+
return self._add
|
|
86
|
+
|
|
87
|
+
@add.setter
|
|
88
|
+
def add(self, value):
|
|
89
|
+
self._add = self.checkAndConvertNullable(value, bool, "add")
|
|
90
|
+
if not self._add:
|
|
91
|
+
self._edit = False
|
|
92
|
+
self._administer = False
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def read(self) -> Optional[bool]:
|
|
96
|
+
return self._read
|
|
97
|
+
|
|
98
|
+
@read.setter
|
|
99
|
+
def read(self, _):
|
|
100
|
+
raise Exception(
|
|
101
|
+
"Every person added to a project has automatically read permissions."
|
|
102
|
+
)
|
|
@@ -0,0 +1,58 @@
|
|
|
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.Entity.EntityRequestParameter import EntityRequestParameter
|
|
7
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
8
|
+
IEntryRecordSortingOptions,
|
|
9
|
+
IGenericEntitySortingOptions,
|
|
10
|
+
IModificationRecordSortingOptions,
|
|
11
|
+
INamedEntitySortingOptions,
|
|
12
|
+
ITypedEntitySortingOptions,
|
|
13
|
+
)
|
|
14
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecordRequest
|
|
15
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntityRequest
|
|
16
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
17
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
18
|
+
from LOGS.Interfaces.IOwnedEntity import IOwnedEntityRequest
|
|
19
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
20
|
+
from LOGS.Interfaces.ITypedEntity import ITypedEntityRequest
|
|
21
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ProjectSortingOptions(
|
|
25
|
+
IGenericEntitySortingOptions,
|
|
26
|
+
INamedEntitySortingOptions,
|
|
27
|
+
IEntryRecordSortingOptions,
|
|
28
|
+
IModificationRecordSortingOptions,
|
|
29
|
+
ITypedEntitySortingOptions,
|
|
30
|
+
):
|
|
31
|
+
DATASET_COUNT: Self = cast(Self, "DATASET_COUNT")
|
|
32
|
+
INVENTORY_ITEM_COUNT: Self = cast(Self, "INVENTORY_ITEM_COUNT")
|
|
33
|
+
LAB_NOTEBOOK_COUNT: Self = cast(Self, "LAB_NOTEBOOK_COUNT")
|
|
34
|
+
SAMPLE_COUNT: Self = cast(Self, "SAMPLE_COUNT")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class ProjectRequestParameter(
|
|
39
|
+
EntityRequestParameter[ProjectSortingOptions],
|
|
40
|
+
IPermissionedEntityRequest,
|
|
41
|
+
IUniqueEntityRequest,
|
|
42
|
+
INamedEntityRequest,
|
|
43
|
+
IOwnedEntityRequest,
|
|
44
|
+
IEntryRecordRequest,
|
|
45
|
+
IModificationRecordRequest,
|
|
46
|
+
ILockableEntityRequest,
|
|
47
|
+
ITypedEntityRequest,
|
|
48
|
+
):
|
|
49
|
+
_orderByType: Type[ProjectSortingOptions] = field(
|
|
50
|
+
default=ProjectSortingOptions, init=False
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
inventoryItemIds: Optional[List[int]] = None
|
|
54
|
+
labNotebookIds: Optional[List[int]] = None
|
|
55
|
+
personIds: Optional[List[int]] = None
|
|
56
|
+
datasetIds: Optional[List[int]] = None
|
|
57
|
+
sampleIds: Optional[List[int]] = None
|
|
58
|
+
currentUserHasAddPermission: Optional[bool] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.Project import Project
|
|
3
|
+
from LOGS.Entities.ProjectRequestParameter import ProjectRequestParameter
|
|
4
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Endpoint("projects")
|
|
8
|
+
class Projects(EntityIterator[Project, ProjectRequestParameter]):
|
|
9
|
+
"""LOGS connected Projects iterator"""
|
|
10
|
+
|
|
11
|
+
_generatorType = Project
|
|
12
|
+
_parameterType = ProjectRequestParameter
|
LOGS/Entities/Role.py
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, List, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary import MinimalModelGenerator
|
|
4
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
5
|
+
from LOGS.Entities.Permission import Permission
|
|
6
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
7
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecord
|
|
8
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
9
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
10
|
+
from LOGS.Interfaces.IPermissionedEntity import IGenericPermissionEntity
|
|
11
|
+
from LOGS.LOGSConnection import LOGSConnection
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from LOGS.Entities.PersonMinimal import PersonMinimal
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@Endpoint("roles")
|
|
18
|
+
class Role(
|
|
19
|
+
IEntityWithIntId,
|
|
20
|
+
INamedEntity,
|
|
21
|
+
IGenericPermissionEntity,
|
|
22
|
+
IEntryRecord,
|
|
23
|
+
IModificationRecord,
|
|
24
|
+
):
|
|
25
|
+
|
|
26
|
+
_rolePermissions: Optional[List["Permission"]] = None
|
|
27
|
+
_users: Optional[List["PersonMinimal"]] = None
|
|
28
|
+
_isInternal: Optional[bool] = None
|
|
29
|
+
_roleId: Optional[str] = None
|
|
30
|
+
_description: Optional[str] = None
|
|
31
|
+
_isDefault: Optional[bool] = None
|
|
32
|
+
|
|
33
|
+
def __init__(
|
|
34
|
+
self,
|
|
35
|
+
ref=None,
|
|
36
|
+
id: Optional[int] = None,
|
|
37
|
+
connection: Optional["LOGSConnection"] = None,
|
|
38
|
+
):
|
|
39
|
+
if isinstance(ref, str):
|
|
40
|
+
ref = {"roleId": ref}
|
|
41
|
+
|
|
42
|
+
super().__init__(ref=ref, id=id, connection=connection)
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def rolePermissions(self) -> Optional[List["Permission"]]:
|
|
46
|
+
return self._rolePermissions
|
|
47
|
+
|
|
48
|
+
@rolePermissions.setter
|
|
49
|
+
def rolePermissions(self, value):
|
|
50
|
+
self._rolePermissions = self.checkListAndConvertNullable(
|
|
51
|
+
value, Permission, "rolePermissions"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def users(self) -> Optional[List["PersonMinimal"]]:
|
|
56
|
+
return self._users
|
|
57
|
+
|
|
58
|
+
@users.setter
|
|
59
|
+
def users(self, value):
|
|
60
|
+
self._users = MinimalModelGenerator.MinimalFromList(
|
|
61
|
+
value, "PersonMinimal", "users", self._getConnection()
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def isInternal(self) -> Optional[bool]:
|
|
66
|
+
return self._isInternal
|
|
67
|
+
|
|
68
|
+
@isInternal.setter
|
|
69
|
+
def isInternal(self, value):
|
|
70
|
+
self._isInternal = self.checkAndConvertNullable(value, bool, "isInternal")
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def roleId(self) -> Optional[str]:
|
|
74
|
+
return self._roleId
|
|
75
|
+
|
|
76
|
+
@roleId.setter
|
|
77
|
+
def roleId(self, value):
|
|
78
|
+
self._roleId = self.checkAndConvertNullable(value, str, "roleId")
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def description(self) -> Optional[str]:
|
|
82
|
+
return self._description
|
|
83
|
+
|
|
84
|
+
@description.setter
|
|
85
|
+
def description(self, value):
|
|
86
|
+
self._description = self.checkAndConvertNullable(value, str, "description")
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def isDefault(self) -> Optional[bool]:
|
|
90
|
+
return self._isDefault
|
|
91
|
+
|
|
92
|
+
@isDefault.setter
|
|
93
|
+
def isDefault(self, value):
|
|
94
|
+
self._isDefault = self.checkAndConvertNullable(value, bool, "isDefault")
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Optional, Type, cast
|
|
3
|
+
|
|
4
|
+
from typing_extensions import Self
|
|
5
|
+
|
|
6
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
7
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
8
|
+
IEntryRecordSortingOptions,
|
|
9
|
+
IGenericEntitySortingOptions,
|
|
10
|
+
IModificationRecordSortingOptions,
|
|
11
|
+
INamedEntitySortingOptions,
|
|
12
|
+
)
|
|
13
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecordRequest
|
|
14
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
15
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class RoleSortingOptions(
|
|
19
|
+
IGenericEntitySortingOptions,
|
|
20
|
+
INamedEntitySortingOptions,
|
|
21
|
+
IEntryRecordSortingOptions,
|
|
22
|
+
IModificationRecordSortingOptions,
|
|
23
|
+
):
|
|
24
|
+
IS_INTERNAL: Self = cast(Self, "IS_INTERNAL")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass
|
|
28
|
+
class RoleRequestParameter(
|
|
29
|
+
EntityRequestParameter[RoleSortingOptions],
|
|
30
|
+
IEntryRecordRequest,
|
|
31
|
+
IModificationRecordRequest,
|
|
32
|
+
IPermissionedEntityRequest,
|
|
33
|
+
):
|
|
34
|
+
_orderByType: Type[RoleSortingOptions] = field(
|
|
35
|
+
default=RoleSortingOptions, init=False
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
name: Optional[str] = None
|
|
39
|
+
roleId: Optional[str] = None
|
|
40
|
+
includeInternals: Optional[bool] = None
|
LOGS/Entities/Roles.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.Role import Role
|
|
3
|
+
from LOGS.Entities.RoleRequestParameter import RoleRequestParameter
|
|
4
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Endpoint("Roles")
|
|
8
|
+
class Roles(EntityIterator[Role, RoleRequestParameter]):
|
|
9
|
+
"""LOGS connected Person iterator"""
|
|
10
|
+
|
|
11
|
+
_generatorType = Role
|
|
12
|
+
_parameterType = RoleRequestParameter
|
LOGS/Entities/Sample.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, List, Optional, Union, cast
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
5
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecord
|
|
6
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntity
|
|
7
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
8
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
9
|
+
from LOGS.Interfaces.IOwnedEntity import IOwnedEntity
|
|
10
|
+
from LOGS.Interfaces.IPermissionedEntity import IGenericPermissionEntity
|
|
11
|
+
from LOGS.Interfaces.IProjectBased import IProjectBased
|
|
12
|
+
from LOGS.Interfaces.ISignableEntity import ISignableEntity
|
|
13
|
+
from LOGS.Interfaces.ISoftDeletable import ISoftDeletable
|
|
14
|
+
from LOGS.Interfaces.ITypedEntity import ITypedEntity
|
|
15
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
16
|
+
from LOGS.LOGSConnection import LOGSConnection
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from LOGS.Entities.Project import Project
|
|
20
|
+
from LOGS.Entities.ProjectMinimal import ProjectMinimal
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@Endpoint("samples")
|
|
24
|
+
class Sample(
|
|
25
|
+
IEntityWithIntId,
|
|
26
|
+
IUniqueEntity,
|
|
27
|
+
INamedEntity,
|
|
28
|
+
ITypedEntity,
|
|
29
|
+
IOwnedEntity,
|
|
30
|
+
IProjectBased,
|
|
31
|
+
IEntryRecord,
|
|
32
|
+
IModificationRecord,
|
|
33
|
+
ISoftDeletable,
|
|
34
|
+
ILockableEntity,
|
|
35
|
+
ISignableEntity,
|
|
36
|
+
IGenericPermissionEntity,
|
|
37
|
+
):
|
|
38
|
+
|
|
39
|
+
def __init__(
|
|
40
|
+
self,
|
|
41
|
+
ref=None,
|
|
42
|
+
id: Optional[int] = None,
|
|
43
|
+
connection: Optional[LOGSConnection] = None,
|
|
44
|
+
name: str = "",
|
|
45
|
+
projects: Optional[List[Union["ProjectMinimal", "Project"]]] = None,
|
|
46
|
+
):
|
|
47
|
+
self._name = name
|
|
48
|
+
self._projects = cast(Optional[List["ProjectMinimal"]], projects)
|
|
49
|
+
|
|
50
|
+
if ref != None and isinstance(ref, (str, int, float)):
|
|
51
|
+
ref = {"text": str(ref)}
|
|
52
|
+
|
|
53
|
+
super().__init__(ref=ref, id=id, connection=connection)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Type, cast
|
|
3
|
+
|
|
4
|
+
from typing_extensions import Self
|
|
5
|
+
|
|
6
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
7
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
8
|
+
IEntryRecordSortingOptions,
|
|
9
|
+
IGenericEntitySortingOptions,
|
|
10
|
+
IModificationRecordSortingOptions,
|
|
11
|
+
INamedEntitySortingOptions,
|
|
12
|
+
ITypedEntitySortingOptions,
|
|
13
|
+
)
|
|
14
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecordRequest
|
|
15
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntityRequest
|
|
16
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
17
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
18
|
+
from LOGS.Interfaces.IOwnedEntity import IOwnedEntityRequest
|
|
19
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
20
|
+
from LOGS.Interfaces.IProjectBased import IProjectBasedRequest
|
|
21
|
+
from LOGS.Interfaces.ISignableEntity import ISignableEntityRequest
|
|
22
|
+
from LOGS.Interfaces.ISoftDeletable import ISoftDeletableRequest
|
|
23
|
+
from LOGS.Interfaces.ITypedEntity import ITypedEntityRequest
|
|
24
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SampleSortingOptions(
|
|
28
|
+
IGenericEntitySortingOptions,
|
|
29
|
+
INamedEntitySortingOptions,
|
|
30
|
+
IModificationRecordSortingOptions,
|
|
31
|
+
IEntryRecordSortingOptions,
|
|
32
|
+
ITypedEntitySortingOptions,
|
|
33
|
+
):
|
|
34
|
+
OWNER: Self = cast(Self, "OWNER")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class SampleRequestParameter(
|
|
39
|
+
EntityRequestParameter[SampleSortingOptions],
|
|
40
|
+
IPermissionedEntityRequest,
|
|
41
|
+
IUniqueEntityRequest,
|
|
42
|
+
INamedEntityRequest,
|
|
43
|
+
IOwnedEntityRequest,
|
|
44
|
+
IProjectBasedRequest,
|
|
45
|
+
IEntryRecordRequest,
|
|
46
|
+
IModificationRecordRequest,
|
|
47
|
+
ISoftDeletableRequest,
|
|
48
|
+
ILockableEntityRequest,
|
|
49
|
+
ISignableEntityRequest,
|
|
50
|
+
ITypedEntityRequest,
|
|
51
|
+
):
|
|
52
|
+
_orderByType: Type[SampleSortingOptions] = field(
|
|
53
|
+
default=SampleSortingOptions, init=False
|
|
54
|
+
)
|
LOGS/Entities/Samples.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.Sample import Sample
|
|
3
|
+
from LOGS.Entities.SampleRequestParameter import SampleRequestParameter
|
|
4
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Endpoint("samples")
|
|
8
|
+
class Samples(EntityIterator[Sample, SampleRequestParameter]):
|
|
9
|
+
"""LOGS connected Samples iterator"""
|
|
10
|
+
|
|
11
|
+
_generatorType = Sample
|
|
12
|
+
_parameterType = SampleRequestParameter
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, List, Optional
|
|
2
|
+
|
|
3
|
+
from deprecation import deprecated # type: ignore
|
|
4
|
+
|
|
5
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
6
|
+
from LOGS.Auxiliary.MinimalModelGenerator import MinimalModelGenerator
|
|
7
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
8
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecord
|
|
9
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
10
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
11
|
+
from LOGS.Interfaces.IOwnedEntity import IOwnedEntity
|
|
12
|
+
from LOGS.Interfaces.IPermissionedEntity import IGenericPermissionEntity
|
|
13
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from LOGS.Entities.DatasetMinimal import DatasetMinimal
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@Endpoint("shared_content")
|
|
20
|
+
class SharedContent(
|
|
21
|
+
IEntityWithIntId,
|
|
22
|
+
IGenericPermissionEntity,
|
|
23
|
+
IUniqueEntity,
|
|
24
|
+
INamedEntity,
|
|
25
|
+
IOwnedEntity,
|
|
26
|
+
IEntryRecord,
|
|
27
|
+
IModificationRecord,
|
|
28
|
+
):
|
|
29
|
+
|
|
30
|
+
_shareId: Optional[str] = None
|
|
31
|
+
_allowContentDownload: Optional[bool] = None
|
|
32
|
+
_publicNotes: Optional[str] = None
|
|
33
|
+
_privateNotes: Optional[str] = None
|
|
34
|
+
_password: Optional[str] = None
|
|
35
|
+
_datasets: Optional[List["DatasetMinimal"]] = None
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def shareId(self) -> Optional[str]:
|
|
39
|
+
return self._shareId
|
|
40
|
+
|
|
41
|
+
@shareId.setter
|
|
42
|
+
def shareId(self, value):
|
|
43
|
+
self._shareId = self.checkAndConvertNullable(value, str, "shareId")
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def allowContentDownload(self) -> Optional[bool]:
|
|
47
|
+
return self._allowContentDownload
|
|
48
|
+
|
|
49
|
+
@allowContentDownload.setter
|
|
50
|
+
def allowContentDownload(self, value):
|
|
51
|
+
self._allowContentDownload = self.checkAndConvertNullable(
|
|
52
|
+
value, bool, "allowContentDownload"
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def publicNotes(self) -> Optional[str]:
|
|
57
|
+
return self._publicNotes
|
|
58
|
+
|
|
59
|
+
@publicNotes.setter
|
|
60
|
+
def publicNotes(self, value):
|
|
61
|
+
self._publicNotes = self.checkAndConvertNullable(value, str, "publicNotes")
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def privateNotes(self) -> Optional[str]:
|
|
65
|
+
return self._privateNotes
|
|
66
|
+
|
|
67
|
+
@privateNotes.setter
|
|
68
|
+
def privateNotes(self, value):
|
|
69
|
+
self._privateNotes = self.checkAndConvertNullable(value, str, "privateNotes")
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def password(self) -> Optional[str]:
|
|
73
|
+
return self._password
|
|
74
|
+
|
|
75
|
+
@password.setter
|
|
76
|
+
def password(self, value):
|
|
77
|
+
self._password = self.checkAndConvertNullable(value, str, "password")
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def datasets(self) -> Optional[List["DatasetMinimal"]]:
|
|
81
|
+
return self._datasets
|
|
82
|
+
|
|
83
|
+
@datasets.setter
|
|
84
|
+
def datasets(self, value):
|
|
85
|
+
self._datasets = MinimalModelGenerator.MinimalFromList(
|
|
86
|
+
value, "DatasetMinimal", "datasets", connection=self._getConnection()
|
|
87
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import FullModel
|
|
2
|
+
from LOGS.Entities.SharedContent import SharedContent
|
|
3
|
+
from LOGS.Entity.EntityMinimalWithIntId import EntityMinimalWithIntId
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@FullModel(SharedContent)
|
|
7
|
+
class SharedContentMinimal(EntityMinimalWithIntId[SharedContent]):
|
|
8
|
+
pass
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import List, Optional, Type
|
|
3
|
+
|
|
4
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
5
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
6
|
+
IEntryRecordSortingOptions,
|
|
7
|
+
IGenericEntitySortingOptions,
|
|
8
|
+
IModificationRecordSortingOptions,
|
|
9
|
+
INamedEntitySortingOptions,
|
|
10
|
+
)
|
|
11
|
+
from LOGS.Interfaces.IEntryRecord import IEntryRecordRequest
|
|
12
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
13
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
14
|
+
from LOGS.Interfaces.ISoftDeletable import ISoftDeletableRequest
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SharedContentSortingOptions(
|
|
18
|
+
IGenericEntitySortingOptions,
|
|
19
|
+
INamedEntitySortingOptions,
|
|
20
|
+
IEntryRecordSortingOptions,
|
|
21
|
+
IModificationRecordSortingOptions,
|
|
22
|
+
):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass
|
|
27
|
+
class SharedContentRequestParameter(
|
|
28
|
+
EntityRequestParameter[SharedContentSortingOptions],
|
|
29
|
+
ISoftDeletableRequest,
|
|
30
|
+
IEntryRecordRequest,
|
|
31
|
+
IModificationRecordRequest,
|
|
32
|
+
IPermissionedEntityRequest,
|
|
33
|
+
):
|
|
34
|
+
_orderByType: Type[SharedContentSortingOptions] = field(
|
|
35
|
+
default=SharedContentSortingOptions, init=False
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
datasetIds: Optional[List[int]] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.SharedContent import SharedContent
|
|
3
|
+
from LOGS.Entities.SharedContentRequestParameter import SharedContentRequestParameter
|
|
4
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Endpoint("shared_content")
|
|
8
|
+
class SharedContents(EntityIterator[SharedContent, SharedContentRequestParameter]):
|
|
9
|
+
"""LOGS connected SharedContents iterator"""
|
|
10
|
+
|
|
11
|
+
_generatorType = SharedContent
|
|
12
|
+
_parameterType = SharedContentRequestParameter
|