diff --git a/python/src/omotes_sdk_protocol/workflow_pb2.py b/python/src/omotes_sdk_protocol/workflow_pb2.py index 268392f..d60a4a1 100644 --- a/python/src/omotes_sdk_protocol/workflow_pb2.py +++ b/python/src/omotes_sdk_protocol/workflow_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"omotes_sdk_protocol/workflow.proto\"4\n\nStringEnum\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"V\n\x0fStringParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x0c\x65num_options\x18\x02 \x03(\x0b\x32\x0b.StringEnumB\n\n\x08_default\"4\n\x10\x42ooleanParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_default\"x\n\x10IntegerParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x14\n\x07minimum\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x07maximum\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\n\n\x08_defaultB\n\n\x08_minimumB\n\n\x08_maximum\"v\n\x0e\x46loatParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x07minimum\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x07maximum\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\n\n\x08_defaultB\n\n\x08_minimumB\n\n\x08_maximum\"5\n\x11\x44\x61teTimeParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_default\"y\n\x11\x44urationParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x07minimum\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x07maximum\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\n\n\x08_defaultB\n\n\x08_minimumB\n\n\x08_maximum\"\x9d\x03\n\x11WorkflowParameter\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x02\x88\x01\x01\x12,\n\x10string_parameter\x18\x04 \x01(\x0b\x32\x10.StringParameterH\x00\x12.\n\x11\x62oolean_parameter\x18\x05 \x01(\x0b\x32\x11.BooleanParameterH\x00\x12.\n\x11integer_parameter\x18\x06 \x01(\x0b\x32\x11.IntegerParameterH\x00\x12*\n\x0f\x66loat_parameter\x18\x07 \x01(\x0b\x32\x0f.FloatParameterH\x00\x12\x30\n\x12\x64\x61tetime_parameter\x18\x08 \x01(\x0b\x32\x12.DateTimeParameterH\x00\x12\x30\n\x12\x64uration_parameter\x18\t \x01(\x0b\x32\x12.DurationParameterH\x00\x42\x10\n\x0eparameter_typeB\x08\n\x06_titleB\x0e\n\x0c_description\"_\n\x08Workflow\x12\x11\n\ttype_name\x18\x01 \x01(\t\x12\x18\n\x10type_description\x18\x02 \x01(\t\x12&\n\nparameters\x18\x03 \x03(\x0b\x32\x12.WorkflowParameter\"2\n\x12\x41vailableWorkflows\x12\x1c\n\tworkflows\x18\x01 \x03(\x0b\x32\t.Workflow\"\x1b\n\x19RequestAvailableWorkflowsb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"omotes_sdk_protocol/workflow.proto\"4\n\nStringEnum\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"V\n\x0fStringParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x0c\x65num_options\x18\x02 \x03(\x0b\x32\x0b.StringEnumB\n\n\x08_default\"4\n\x10\x42ooleanParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_default\"x\n\x10IntegerParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x14\n\x07minimum\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x07maximum\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\n\n\x08_defaultB\n\n\x08_minimumB\n\n\x08_maximum\"v\n\x0e\x46loatParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x07minimum\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x07maximum\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\n\n\x08_defaultB\n\n\x08_minimumB\n\n\x08_maximum\"5\n\x11\x44\x61teTimeParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_default\"y\n\x11\x44urationParameter\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x07minimum\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x07maximum\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\n\n\x08_defaultB\n\n\x08_minimumB\n\n\x08_maximum\"\x9d\x03\n\x11WorkflowParameter\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x02\x88\x01\x01\x12,\n\x10string_parameter\x18\x04 \x01(\x0b\x32\x10.StringParameterH\x00\x12.\n\x11\x62oolean_parameter\x18\x05 \x01(\x0b\x32\x11.BooleanParameterH\x00\x12.\n\x11integer_parameter\x18\x06 \x01(\x0b\x32\x11.IntegerParameterH\x00\x12*\n\x0f\x66loat_parameter\x18\x07 \x01(\x0b\x32\x0f.FloatParameterH\x00\x12\x30\n\x12\x64\x61tetime_parameter\x18\x08 \x01(\x0b\x32\x12.DateTimeParameterH\x00\x12\x30\n\x12\x64uration_parameter\x18\t \x01(\x0b\x32\x12.DurationParameterH\x00\x42\x10\n\x0eparameter_typeB\x08\n\x06_titleB\x0e\n\x0c_description\"\xbc\x01\n\x11ParameterRelation\x12\r\n\x05key_1\x18\x01 \x01(\t\x12\r\n\x05key_2\x18\x02 \x01(\t\x12\x31\n\x08relation\x18\x03 \x01(\x0e\x32\x1f.ParameterRelation.RelationType\"V\n\x0cRelationType\x12\x0b\n\x07GREATER\x10\x00\x12\x11\n\rGREATER_OR_EQ\x10\x01\x12\x0b\n\x07SMALLER\x10\x02\x12\x11\n\rSMALLER_OR_EQ\x10\x03\x12\x06\n\x02\x45Q\x10\x04\"\x86\x01\n\x08Workflow\x12\x11\n\ttype_name\x18\x01 \x01(\t\x12\x18\n\x10type_description\x18\x02 \x01(\t\x12&\n\nparameters\x18\x03 \x03(\x0b\x32\x12.WorkflowParameter\x12%\n\trelations\x18\x04 \x03(\x0b\x32\x12.ParameterRelation\"2\n\x12\x41vailableWorkflows\x12\x1c\n\tworkflows\x18\x01 \x03(\x0b\x32\t.Workflow\"\x1b\n\x19RequestAvailableWorkflowsb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,10 +37,14 @@ _globals['_DURATIONPARAMETER']._serialized_end=652 _globals['_WORKFLOWPARAMETER']._serialized_start=655 _globals['_WORKFLOWPARAMETER']._serialized_end=1068 - _globals['_WORKFLOW']._serialized_start=1070 - _globals['_WORKFLOW']._serialized_end=1165 - _globals['_AVAILABLEWORKFLOWS']._serialized_start=1167 - _globals['_AVAILABLEWORKFLOWS']._serialized_end=1217 - _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_start=1219 - _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_end=1246 + _globals['_PARAMETERRELATION']._serialized_start=1071 + _globals['_PARAMETERRELATION']._serialized_end=1259 + _globals['_PARAMETERRELATION_RELATIONTYPE']._serialized_start=1173 + _globals['_PARAMETERRELATION_RELATIONTYPE']._serialized_end=1259 + _globals['_WORKFLOW']._serialized_start=1262 + _globals['_WORKFLOW']._serialized_end=1396 + _globals['_AVAILABLEWORKFLOWS']._serialized_start=1398 + _globals['_AVAILABLEWORKFLOWS']._serialized_end=1448 + _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_start=1450 + _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_end=1477 # @@protoc_insertion_point(module_scope) diff --git a/python/src/omotes_sdk_protocol/workflow_pb2.pyi b/python/src/omotes_sdk_protocol/workflow_pb2.pyi index 912694b..420e830 100644 --- a/python/src/omotes_sdk_protocol/workflow_pb2.pyi +++ b/python/src/omotes_sdk_protocol/workflow_pb2.pyi @@ -6,11 +6,12 @@ import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper import google.protobuf.message import sys import typing -if sys.version_info >= (3, 8): +if sys.version_info >= (3, 10): import typing as typing_extensions else: import typing_extensions @@ -227,6 +228,46 @@ class WorkflowParameter(google.protobuf.message.Message): global___WorkflowParameter = WorkflowParameter +@typing_extensions.final +class ParameterRelation(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _RelationType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _RelationTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ParameterRelation._RelationType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + GREATER: ParameterRelation._RelationType.ValueType # 0 + GREATER_OR_EQ: ParameterRelation._RelationType.ValueType # 1 + SMALLER: ParameterRelation._RelationType.ValueType # 2 + SMALLER_OR_EQ: ParameterRelation._RelationType.ValueType # 3 + EQ: ParameterRelation._RelationType.ValueType # 4 + + class RelationType(_RelationType, metaclass=_RelationTypeEnumTypeWrapper): ... + GREATER: ParameterRelation.RelationType.ValueType # 0 + GREATER_OR_EQ: ParameterRelation.RelationType.ValueType # 1 + SMALLER: ParameterRelation.RelationType.ValueType # 2 + SMALLER_OR_EQ: ParameterRelation.RelationType.ValueType # 3 + EQ: ParameterRelation.RelationType.ValueType # 4 + + KEY_1_FIELD_NUMBER: builtins.int + KEY_2_FIELD_NUMBER: builtins.int + RELATION_FIELD_NUMBER: builtins.int + key_1: builtins.str + key_2: builtins.str + relation: global___ParameterRelation.RelationType.ValueType + def __init__( + self, + *, + key_1: builtins.str = ..., + key_2: builtins.str = ..., + relation: global___ParameterRelation.RelationType.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["key_1", b"key_1", "key_2", b"key_2", "relation", b"relation"]) -> None: ... + +global___ParameterRelation = ParameterRelation + @typing_extensions.final class Workflow(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -234,18 +275,22 @@ class Workflow(google.protobuf.message.Message): TYPE_NAME_FIELD_NUMBER: builtins.int TYPE_DESCRIPTION_FIELD_NUMBER: builtins.int PARAMETERS_FIELD_NUMBER: builtins.int + RELATIONS_FIELD_NUMBER: builtins.int type_name: builtins.str type_description: builtins.str @property def parameters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___WorkflowParameter]: ... + @property + def relations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ParameterRelation]: ... def __init__( self, *, type_name: builtins.str = ..., type_description: builtins.str = ..., parameters: collections.abc.Iterable[global___WorkflowParameter] | None = ..., + relations: collections.abc.Iterable[global___ParameterRelation] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["parameters", b"parameters", "type_description", b"type_description", "type_name", b"type_name"]) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["parameters", b"parameters", "relations", b"relations", "type_description", b"type_description", "type_name", b"type_name"]) -> None: ... global___Workflow = Workflow diff --git a/src/omotes_sdk_protocol/workflow.proto b/src/omotes_sdk_protocol/workflow.proto index 4bee8f3..a364a1d 100644 --- a/src/omotes_sdk_protocol/workflow.proto +++ b/src/omotes_sdk_protocol/workflow.proto @@ -51,10 +51,25 @@ message WorkflowParameter { } } +message ParameterRelation { + string key_1 = 1; + string key_2 = 2; + RelationType relation = 3; + + enum RelationType { + GREATER = 0; + GREATER_OR_EQ = 1; + SMALLER = 2; + SMALLER_OR_EQ = 3; + EQ = 4; + } +} + message Workflow { string type_name = 1; string type_description = 2; repeated WorkflowParameter parameters = 3; + repeated ParameterRelation relations = 4; } message AvailableWorkflows {