diff --git a/ci/linux/gen_protocol.sh b/ci/linux/gen_protocol.sh index d31eed3..d6aece9 100755 --- a/ci/linux/gen_protocol.sh +++ b/ci/linux/gen_protocol.sh @@ -8,7 +8,7 @@ rm -Rf python/src/omotes_sdk_protocol/ mkdir -p python/src/omotes_sdk_protocol/ protoc -I include/ -I src/ --python_out python/src/omotes_sdk_protocol/ ./src/job.proto protoc -I include/ -I src/ --mypy_out python/src/omotes_sdk_protocol/ ./src/job.proto -protoc -I include/ -I src/ --python_out python/src/omotes_sdk_protocol/ ./src/work_flow.proto -protoc -I include/ -I src/ --mypy_out python/src/omotes_sdk_protocol/ ./src/work_flow.proto +protoc -I include/ -I src/ --python_out python/src/omotes_sdk_protocol/ ./src/workflow.proto +protoc -I include/ -I src/ --mypy_out python/src/omotes_sdk_protocol/ ./src/workflow.proto touch python/src/omotes_sdk_protocol/__init__.py touch python/src/omotes_sdk_protocol/py.typed diff --git a/python/src/omotes_sdk_protocol/work_flow_pb2.py b/python/src/omotes_sdk_protocol/work_flow_pb2.py deleted file mode 100644 index c3694ac..0000000 --- a/python/src/omotes_sdk_protocol/work_flow_pb2.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: work_flow.proto -# Protobuf Python Version: 4.25.2 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fwork_flow.proto\"\xf4\x01\n\x17WorkflowParameterSchema\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x66ormat\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x0c\n\x04\x65num\x18\x06 \x03(\t\x12\x14\n\x07minimum\x18\x07 \x01(\x01H\x03\x88\x01\x01\x12\x14\n\x07maximum\x18\x08 \x01(\x01H\x04\x88\x01\x01\x42\x0e\n\x0c_descriptionB\n\n\x08_defaultB\t\n\x07_formatB\n\n\x08_minimumB\n\n\x08_maximum\"O\n\x11WorkflowParameter\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12(\n\x06schema\x18\x02 \x01(\x0b\x32\x18.WorkflowParameterSchema\"_\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') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'work_flow_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _globals['_WORKFLOWPARAMETERSCHEMA']._serialized_start=20 - _globals['_WORKFLOWPARAMETERSCHEMA']._serialized_end=264 - _globals['_WORKFLOWPARAMETER']._serialized_start=266 - _globals['_WORKFLOWPARAMETER']._serialized_end=345 - _globals['_WORKFLOW']._serialized_start=347 - _globals['_WORKFLOW']._serialized_end=442 - _globals['_AVAILABLEWORKFLOWS']._serialized_start=444 - _globals['_AVAILABLEWORKFLOWS']._serialized_end=494 - _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_start=496 - _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_end=523 -# @@protoc_insertion_point(module_scope) diff --git a/python/src/omotes_sdk_protocol/work_flow_pb2.pyi b/python/src/omotes_sdk_protocol/work_flow_pb2.pyi deleted file mode 100644 index 3da9d6f..0000000 --- a/python/src/omotes_sdk_protocol/work_flow_pb2.pyi +++ /dev/null @@ -1,134 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -import sys -import typing - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class WorkflowParameterSchema(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TYPE_FIELD_NUMBER: builtins.int - TITLE_FIELD_NUMBER: builtins.int - DESCRIPTION_FIELD_NUMBER: builtins.int - DEFAULT_FIELD_NUMBER: builtins.int - FORMAT_FIELD_NUMBER: builtins.int - ENUM_FIELD_NUMBER: builtins.int - MINIMUM_FIELD_NUMBER: builtins.int - MAXIMUM_FIELD_NUMBER: builtins.int - type: builtins.str - title: builtins.str - description: builtins.str - default: builtins.str - format: builtins.str - @property - def enum(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... - minimum: builtins.float - maximum: builtins.float - def __init__( - self, - *, - type: builtins.str = ..., - title: builtins.str = ..., - description: builtins.str | None = ..., - default: builtins.str | None = ..., - format: builtins.str | None = ..., - enum: collections.abc.Iterable[builtins.str] | None = ..., - minimum: builtins.float | None = ..., - maximum: builtins.float | None = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_default", b"_default", "_description", b"_description", "_format", b"_format", "_maximum", b"_maximum", "_minimum", b"_minimum", "default", b"default", "description", b"description", "format", b"format", "maximum", b"maximum", "minimum", b"minimum"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_default", b"_default", "_description", b"_description", "_format", b"_format", "_maximum", b"_maximum", "_minimum", b"_minimum", "default", b"default", "description", b"description", "enum", b"enum", "format", b"format", "maximum", b"maximum", "minimum", b"minimum", "title", b"title", "type", b"type"]) -> None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_default", b"_default"]) -> typing_extensions.Literal["default"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_description", b"_description"]) -> typing_extensions.Literal["description"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_format", b"_format"]) -> typing_extensions.Literal["format"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_maximum", b"_maximum"]) -> typing_extensions.Literal["maximum"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_minimum", b"_minimum"]) -> typing_extensions.Literal["minimum"] | None: ... - -global___WorkflowParameterSchema = WorkflowParameterSchema - -@typing_extensions.final -class WorkflowParameter(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - KEY_NAME_FIELD_NUMBER: builtins.int - SCHEMA_FIELD_NUMBER: builtins.int - key_name: builtins.str - @property - def schema(self) -> global___WorkflowParameterSchema: ... - def __init__( - self, - *, - key_name: builtins.str = ..., - schema: global___WorkflowParameterSchema | None = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["schema", b"schema"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key_name", b"key_name", "schema", b"schema"]) -> None: ... - -global___WorkflowParameter = WorkflowParameter - -@typing_extensions.final -class Workflow(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TYPE_NAME_FIELD_NUMBER: builtins.int - TYPE_DESCRIPTION_FIELD_NUMBER: builtins.int - PARAMETERS_FIELD_NUMBER: builtins.int - type_name: builtins.str - type_description: builtins.str - @property - def parameters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___WorkflowParameter]: ... - def __init__( - self, - *, - type_name: builtins.str = ..., - type_description: builtins.str = ..., - parameters: collections.abc.Iterable[global___WorkflowParameter] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["parameters", b"parameters", "type_description", b"type_description", "type_name", b"type_name"]) -> None: ... - -global___Workflow = Workflow - -@typing_extensions.final -class AvailableWorkflows(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - WORKFLOWS_FIELD_NUMBER: builtins.int - @property - def workflows(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Workflow]: ... - def __init__( - self, - *, - workflows: collections.abc.Iterable[global___Workflow] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["workflows", b"workflows"]) -> None: ... - -global___AvailableWorkflows = AvailableWorkflows - -@typing_extensions.final -class RequestAvailableWorkflows(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - def __init__( - self, - ) -> None: ... - -global___RequestAvailableWorkflows = RequestAvailableWorkflows diff --git a/python/src/omotes_sdk_protocol/workflow_pb2.py b/python/src/omotes_sdk_protocol/workflow_pb2.py new file mode 100644 index 0000000..70ec824 --- /dev/null +++ b/python/src/omotes_sdk_protocol/workflow_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: workflow.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eworkflow.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\"\xdc\x02\n\x11WorkflowParameter\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x01\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\x42\x10\n\x0eparameter_typeB\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') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_STRINGENUM']._serialized_start=18 + _globals['_STRINGENUM']._serialized_end=70 + _globals['_STRINGPARAMETER']._serialized_start=72 + _globals['_STRINGPARAMETER']._serialized_end=158 + _globals['_BOOLEANPARAMETER']._serialized_start=160 + _globals['_BOOLEANPARAMETER']._serialized_end=212 + _globals['_INTEGERPARAMETER']._serialized_start=214 + _globals['_INTEGERPARAMETER']._serialized_end=334 + _globals['_FLOATPARAMETER']._serialized_start=336 + _globals['_FLOATPARAMETER']._serialized_end=454 + _globals['_DATETIMEPARAMETER']._serialized_start=456 + _globals['_DATETIMEPARAMETER']._serialized_end=509 + _globals['_WORKFLOWPARAMETER']._serialized_start=512 + _globals['_WORKFLOWPARAMETER']._serialized_end=860 + _globals['_WORKFLOW']._serialized_start=862 + _globals['_WORKFLOW']._serialized_end=957 + _globals['_AVAILABLEWORKFLOWS']._serialized_start=959 + _globals['_AVAILABLEWORKFLOWS']._serialized_end=1009 + _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_start=1011 + _globals['_REQUESTAVAILABLEWORKFLOWS']._serialized_end=1038 +# @@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 new file mode 100644 index 0000000..7bd35f8 --- /dev/null +++ b/python/src/omotes_sdk_protocol/workflow_pb2.pyi @@ -0,0 +1,241 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message +import sys +import typing + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class StringEnum(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_NAME_FIELD_NUMBER: builtins.int + DISPLAY_NAME_FIELD_NUMBER: builtins.int + key_name: builtins.str + display_name: builtins.str + def __init__( + self, + *, + key_name: builtins.str = ..., + display_name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["display_name", b"display_name", "key_name", b"key_name"]) -> None: ... + +global___StringEnum = StringEnum + +@typing_extensions.final +class StringParameter(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEFAULT_FIELD_NUMBER: builtins.int + ENUM_OPTIONS_FIELD_NUMBER: builtins.int + default: builtins.str + @property + def enum_options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___StringEnum]: ... + def __init__( + self, + *, + default: builtins.str | None = ..., + enum_options: collections.abc.Iterable[global___StringEnum] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_default", b"_default", "default", b"default"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_default", b"_default", "default", b"default", "enum_options", b"enum_options"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["_default", b"_default"]) -> typing_extensions.Literal["default"] | None: ... + +global___StringParameter = StringParameter + +@typing_extensions.final +class BooleanParameter(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEFAULT_FIELD_NUMBER: builtins.int + default: builtins.bool + def __init__( + self, + *, + default: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_default", b"_default", "default", b"default"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_default", b"_default", "default", b"default"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["_default", b"_default"]) -> typing_extensions.Literal["default"] | None: ... + +global___BooleanParameter = BooleanParameter + +@typing_extensions.final +class IntegerParameter(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEFAULT_FIELD_NUMBER: builtins.int + MINIMUM_FIELD_NUMBER: builtins.int + MAXIMUM_FIELD_NUMBER: builtins.int + default: builtins.int + minimum: builtins.int + maximum: builtins.int + def __init__( + self, + *, + default: builtins.int | None = ..., + minimum: builtins.int | None = ..., + maximum: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_default", b"_default", "_maximum", b"_maximum", "_minimum", b"_minimum", "default", b"default", "maximum", b"maximum", "minimum", b"minimum"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_default", b"_default", "_maximum", b"_maximum", "_minimum", b"_minimum", "default", b"default", "maximum", b"maximum", "minimum", b"minimum"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_default", b"_default"]) -> typing_extensions.Literal["default"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_maximum", b"_maximum"]) -> typing_extensions.Literal["maximum"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_minimum", b"_minimum"]) -> typing_extensions.Literal["minimum"] | None: ... + +global___IntegerParameter = IntegerParameter + +@typing_extensions.final +class FloatParameter(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEFAULT_FIELD_NUMBER: builtins.int + MINIMUM_FIELD_NUMBER: builtins.int + MAXIMUM_FIELD_NUMBER: builtins.int + default: builtins.float + minimum: builtins.float + maximum: builtins.float + def __init__( + self, + *, + default: builtins.float | None = ..., + minimum: builtins.float | None = ..., + maximum: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_default", b"_default", "_maximum", b"_maximum", "_minimum", b"_minimum", "default", b"default", "maximum", b"maximum", "minimum", b"minimum"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_default", b"_default", "_maximum", b"_maximum", "_minimum", b"_minimum", "default", b"default", "maximum", b"maximum", "minimum", b"minimum"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_default", b"_default"]) -> typing_extensions.Literal["default"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_maximum", b"_maximum"]) -> typing_extensions.Literal["maximum"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_minimum", b"_minimum"]) -> typing_extensions.Literal["minimum"] | None: ... + +global___FloatParameter = FloatParameter + +@typing_extensions.final +class DateTimeParameter(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEFAULT_FIELD_NUMBER: builtins.int + default: builtins.str + def __init__( + self, + *, + default: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_default", b"_default", "default", b"default"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_default", b"_default", "default", b"default"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["_default", b"_default"]) -> typing_extensions.Literal["default"] | None: ... + +global___DateTimeParameter = DateTimeParameter + +@typing_extensions.final +class WorkflowParameter(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_NAME_FIELD_NUMBER: builtins.int + TITLE_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + STRING_PARAMETER_FIELD_NUMBER: builtins.int + BOOLEAN_PARAMETER_FIELD_NUMBER: builtins.int + INTEGER_PARAMETER_FIELD_NUMBER: builtins.int + FLOAT_PARAMETER_FIELD_NUMBER: builtins.int + DATETIME_PARAMETER_FIELD_NUMBER: builtins.int + key_name: builtins.str + title: builtins.str + description: builtins.str + @property + def string_parameter(self) -> global___StringParameter: ... + @property + def boolean_parameter(self) -> global___BooleanParameter: ... + @property + def integer_parameter(self) -> global___IntegerParameter: ... + @property + def float_parameter(self) -> global___FloatParameter: ... + @property + def datetime_parameter(self) -> global___DateTimeParameter: ... + def __init__( + self, + *, + key_name: builtins.str = ..., + title: builtins.str = ..., + description: builtins.str | None = ..., + string_parameter: global___StringParameter | None = ..., + boolean_parameter: global___BooleanParameter | None = ..., + integer_parameter: global___IntegerParameter | None = ..., + float_parameter: global___FloatParameter | None = ..., + datetime_parameter: global___DateTimeParameter | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_description", b"_description", "boolean_parameter", b"boolean_parameter", "datetime_parameter", b"datetime_parameter", "description", b"description", "float_parameter", b"float_parameter", "integer_parameter", b"integer_parameter", "parameter_type", b"parameter_type", "string_parameter", b"string_parameter"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_description", b"_description", "boolean_parameter", b"boolean_parameter", "datetime_parameter", b"datetime_parameter", "description", b"description", "float_parameter", b"float_parameter", "integer_parameter", b"integer_parameter", "key_name", b"key_name", "parameter_type", b"parameter_type", "string_parameter", b"string_parameter", "title", b"title"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_description", b"_description"]) -> typing_extensions.Literal["description"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["parameter_type", b"parameter_type"]) -> typing_extensions.Literal["string_parameter", "boolean_parameter", "integer_parameter", "float_parameter", "datetime_parameter"] | None: ... + +global___WorkflowParameter = WorkflowParameter + +@typing_extensions.final +class Workflow(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_NAME_FIELD_NUMBER: builtins.int + TYPE_DESCRIPTION_FIELD_NUMBER: builtins.int + PARAMETERS_FIELD_NUMBER: builtins.int + type_name: builtins.str + type_description: builtins.str + @property + def parameters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___WorkflowParameter]: ... + def __init__( + self, + *, + type_name: builtins.str = ..., + type_description: builtins.str = ..., + parameters: collections.abc.Iterable[global___WorkflowParameter] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["parameters", b"parameters", "type_description", b"type_description", "type_name", b"type_name"]) -> None: ... + +global___Workflow = Workflow + +@typing_extensions.final +class AvailableWorkflows(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WORKFLOWS_FIELD_NUMBER: builtins.int + @property + def workflows(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Workflow]: ... + def __init__( + self, + *, + workflows: collections.abc.Iterable[global___Workflow] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["workflows", b"workflows"]) -> None: ... + +global___AvailableWorkflows = AvailableWorkflows + +@typing_extensions.final +class RequestAvailableWorkflows(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestAvailableWorkflows = RequestAvailableWorkflows diff --git a/src/work_flow.proto b/src/work_flow.proto deleted file mode 100644 index 4498869..0000000 --- a/src/work_flow.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -message WorkflowParameterSchema { - string type = 1; - string title =2; - optional string description = 3; - optional string default = 4; - optional string format = 5; - repeated string enum = 6; - optional double minimum = 7; - optional double maximum = 8; -} - -message WorkflowParameter { - string key_name = 1; - WorkflowParameterSchema schema = 2; -} - -message Workflow { - string type_name = 1; - string type_description = 2; - repeated WorkflowParameter parameters = 3; -} - -message AvailableWorkflows { - repeated Workflow workflows = 1; -} - -message RequestAvailableWorkflows {} diff --git a/src/workflow.proto b/src/workflow.proto new file mode 100644 index 0000000..d11ab9e --- /dev/null +++ b/src/workflow.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +message StringEnum { + string key_name = 1; + string display_name = 2; +} + +message StringParameter { + optional string default = 1; + repeated StringEnum enum_options = 2; +} + +message BooleanParameter { + optional bool default = 1; +} + +message IntegerParameter { + optional int64 default = 1; + optional int64 minimum = 2; + optional int64 maximum = 3; +} + +message FloatParameter { + optional float default = 1; + optional float minimum = 2; + optional float maximum = 3; +} + +message DateTimeParameter { + optional string default = 1; +} + +message WorkflowParameter { + string key_name = 1; + string title = 2; + optional string description = 3; + oneof parameter_type { + StringParameter string_parameter = 4; + BooleanParameter boolean_parameter = 5; + IntegerParameter integer_parameter = 6; + FloatParameter float_parameter = 7; + DateTimeParameter datetime_parameter = 8; + } +} + +message Workflow { + string type_name = 1; + string type_description = 2; + repeated WorkflowParameter parameters = 3; +} + +message AvailableWorkflows { + repeated Workflow workflows = 1; +} + +message RequestAvailableWorkflows {}