Exemplo n.º 1
0
 def deserialize(self, row: EntityRow) -> Enum:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         Enum(enumId=row.get('enum_id'),
              name=row.get('name'),
              description=row.get('description'),
              parentEnumId=row.get('parent_enum_id')))
Exemplo n.º 2
0
 def deserialize(self, row: EntityRow) -> ExternalWriter:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         ExternalWriter(writerId=row.get('writer_id'),
                        writerCode=row.get('writer_code'),
                        type=row.get('type'),
                        pat=row.get('pat'),
                        url=row.get('url')))
Exemplo n.º 3
0
 def deserialize(self, row: EntityRow) -> Space:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         Space(spaceId=row.get('space_id'),
               name=row.get('name'),
               description=row.get('description'),
               topicIds=row.get('topic_ids'),
               groupIds=row.get('group_ids'),
               filters=row.get('filters')))
 def deserialize(self, row: EntityRow) -> UserGroup:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         UserGroup(userGroupId=row.get('user_group_id'),
                   name=row.get('name'),
                   description=row.get('description'),
                   userIds=row.get('user_ids'),
                   spaceIds=row.get('space_ids'),
                   indicatorIds=row.get('indicator_ids')))
Exemplo n.º 5
0
 def deserialize(self, row: EntityRow) -> Topic:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         Topic(topicId=row.get('topic_id'),
               name=row.get('name'),
               description=row.get('description'),
               type=row.get('type'),
               kind=row.get('kind'),
               dataSourceId=row.get('data_source_id'),
               factors=row.get('factors')))
	def deserialize(self, row: EntityRow) -> Catalog:
		# noinspection PyTypeChecker
		return TupleShaper.deserialize_tenant_based(row, Catalog(
			catalogId=row.get('catalog_id'),
			name=row.get('name'),
			topicIds=row.get('topic_ids'),
			techOwnerId=row.get('tech_owner_id'),
			bizOwnerId=row.get('biz_owner_id'),
			tags=row.get('tags'),
			description=row.get('description')
		))
Exemplo n.º 7
0
	def deserialize(self, row: EntityRow) -> User:
		# noinspection PyTypeChecker
		return TupleShaper.deserialize_tenant_based(row, User(
			userId=row.get('user_id'),
			name=row.get('name'),
			nickName=row.get('nickname'),
			password=row.get('password'),
			isActive=row.get('is_active'),
			groupIds=row.get('group_ids'),
			role=row.get('role')
		))
 def deserialize(self, row: EntityRow) -> MonitorRule:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         MonitorRule(ruleId=row.get('rule_id'),
                     code=row.get('code'),
                     grade=row.get('grade'),
                     severity=row.get('severity'),
                     topicId=row.get('topic_id'),
                     factorId=row.get('factor_id'),
                     params=row.get('params'),
                     enabled=row.get('enabled')))
Exemplo n.º 9
0
	def deserialize(self, row: EntityRow) -> Pipeline:
		# noinspection PyTypeChecker
		return TupleShaper.deserialize_tenant_based(row, Pipeline(
			pipelineId=row.get('pipeline_id'),
			topicId=row.get('topic_id'),
			name=row.get('name'),
			type=row.get('type'),
			conditional=row.get('prerequisite_enabled'),
			on=row.get('prerequisite_on'),
			stages=row.get('stages'),
			enabled=row.get('enabled'),
			validated=row.get('validated')
		))
 def deserialize(self, row: EntityRow) -> DataSource:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         DataSource(dataSourceId=row.get('data_source_id'),
                    dataSourceCode=row.get('data_source_code'),
                    dataSourceType=row.get('data_source_type'),
                    host=row.get('host'),
                    port=row.get('port'),
                    username=row.get('username'),
                    password=row.get('password'),
                    name=row.get('name'),
                    url=row.get('url'),
                    params=row.get('params')))
Exemplo n.º 11
0
 def deserialize(self, row: EntityRow) -> Bucket:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         self.to_derived_bucket(
             Bucket(
                 bucketId=row.get('bucket_id'),
                 name=row.get('name'),
                 type=row.get('type'),
                 include=row.get('include'),
                 measure=row.get('measure'),
                 enumId=row.get('enum_id'),
                 segments=row.get('segments'),
                 description=row.get('description'),
             )))
 def deserialize(self, row: EntityRow) -> Indicator:
     # noinspection PyTypeChecker
     return TupleShaper.deserialize_tenant_based(
         row,
         Indicator(
             indicatorId=row.get('indicator_id'),
             name=row.get('name'),
             topicOrSubjectId=row.get('topic_or_subject_id'),
             factorId=row.get('factor_id'),
             baseOn=row.get('base_on'),
             category1=row.get('category_1'),
             category2=row.get('category_2'),
             category3=row.get('category_3'),
             valueBuckets=row.get('value_buckets'),
             relevants=row.get('relevants'),
             groupIds=row.get('group_ids'),
             filter=row.get('filter'),
             description=row.get('description'),
         ))