From 19dc7efd205417f3e0c193de786c63b391d826cc Mon Sep 17 00:00:00 2001 From: esoubiran-aneo Date: Tue, 11 Jul 2023 12:10:02 +0200 Subject: [PATCH] fix: oneof --- Protos/V1/sessions_common.proto | 51 +++++++++++-------- .../armonik.api.angular/src/lib/index.ts | 4 ++ 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/Protos/V1/sessions_common.proto b/Protos/V1/sessions_common.proto index 53a77ca60..527159350 100644 --- a/Protos/V1/sessions_common.proto +++ b/Protos/V1/sessions_common.proto @@ -30,31 +30,42 @@ message SessionRaw { /** * Represents every available field in a session raw. */ -enum SessionRawField { - SESSION_RAW_FIELD_UNSPECIFIED = 0; - SESSION_RAW_FIELD_SESSION_ID = 1; - SESSION_RAW_FIELD_STATUS = 2; - SESSION_RAW_FIELD_PARTITION_IDS = 3; - SESSION_RAW_FIELD_OPTIONS = 4; - SESSION_RAW_FIELD_CREATED_AT = 5; - SESSION_RAW_FIELD_CANCELLED_AT = 6; - SESSION_RAW_FIELD_DURATION = 7; +enum SessionRawEnumField { + SESSION_RAW_ENUM_FIELD_UNSPECIFIED = 0; + SESSION_RAW_ENUM_FIELD_SESSION_ID = 1; + SESSION_RAW_ENUM_FIELD_STATUS = 2; + SESSION_RAW_ENUM_FIELD_PARTITION_IDS = 3; + SESSION_RAW_ENUM_FIELD_OPTIONS = 4; + SESSION_RAW_ENUM_FIELD_CREATED_AT = 5; + SESSION_RAW_ENUM_FIELD_CANCELLED_AT = 6; + SESSION_RAW_ENUM_FIELD_DURATION = 7; +} + +message SessionRawField { + SessionRawEnumField field = 1; } /** * Represents a field in a task option. */ -enum TaskOptionField { - TASK_OPTION_FIELD_UNSPECIFIED = 0; - TASK_OPTION_FIELD_MAX_DURATION = 1; - TASK_OPTION_FIELD_MAX_RETRIES = 2; - TASK_OPTION_FIELD_PRIORITY = 3; - TASK_OPTION_FIELD_PARTITION_ID = 4; - TASK_OPTION_FIELD_APPLICATION_NAME = 5; - TASK_OPTION_FIELD_APPLICATION_VERSION = 6; - TASK_OPTION_FIELD_APPLICATION_NAMESPACE = 7; - TASK_OPTION_FIELD_APPLICATION_SERVICE = 8; - TASK_OPTION_FIELD_ENGINE_TYPE = 9; +enum TaskOptionEnumField { + TASK_OPTION_ENUM_FIELD_UNSPECIFIED = 0; + TASK_OPTION_ENUM_FIELD_MAX_DURATION = 1; + TASK_OPTION_ENUM_FIELD_MAX_RETRIES = 2; + TASK_OPTION_ENUM_FIELD_PRIORITY = 3; + TASK_OPTION_ENUM_FIELD_PARTITION_ID = 4; + TASK_OPTION_ENUM_FIELD_APPLICATION_NAME = 5; + TASK_OPTION_ENUM_FIELD_APPLICATION_VERSION = 6; + TASK_OPTION_ENUM_FIELD_APPLICATION_NAMESPACE = 7; + TASK_OPTION_ENUM_FIELD_APPLICATION_SERVICE = 8; + TASK_OPTION_ENUM_FIELD_ENGINE_TYPE = 9; +} + +/** + * This message is used to wrap the enum in order to facilitate the 'oneOf' generation. + */ +message TaskOptionField { + TaskOptionEnumField field = 1; } /** diff --git a/packages/angular/projects/aneoconsultingfr/armonik.api.angular/src/lib/index.ts b/packages/angular/projects/aneoconsultingfr/armonik.api.angular/src/lib/index.ts index 57efb8c93..db0367929 100644 --- a/packages/angular/projects/aneoconsultingfr/armonik.api.angular/src/lib/index.ts +++ b/packages/angular/projects/aneoconsultingfr/armonik.api.angular/src/lib/index.ts @@ -41,7 +41,11 @@ export { CountTasksByStatusRequest as CountTasksByStatusSessionRequest, CountTasksByStatusResponse as CountTasksByStatusSessionResponse, SessionRaw, + SessionRawEnumField, SessionRawField, + TaskOptionEnumField as SessionTaskOptionEnumField, + TaskOptionField as SessionTaskOptionField, + TaskOptionGenericField as SessionTaskOptionGenericField, SessionField } from "./generated/sessions-common.pb"; export { SessionsClient } from "./generated/sessions-service.pbsc";