diff --git a/index.ts b/index.ts index d3913fe..5531841 100644 --- a/index.ts +++ b/index.ts @@ -150,6 +150,9 @@ export * from './restrictions' export * from './role.client' export * from './role' + export * from './ruleEngine_model' + export * from './ruleEngine_services.client' + export * from './ruleEngine_services' export * from './rules.client' export * from './rules' export * from './shared' diff --git a/package.json b/package.json index 17edabd..697e707 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.15.0-SNAPSHOT-260819082718", + "version": "1.15.0-SNAPSHOT-260819083613", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts", diff --git a/ruleEngine_model.ts b/ruleEngine_model.ts new file mode 100644 index 0000000..c4b1e9f --- /dev/null +++ b/ruleEngine_model.ts @@ -0,0 +1,3693 @@ +// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix +// @generated from protobuf file "ruleEngine_model.proto" (package "api", syntax proto3) +// tslint:disable +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { MovementStatusCode } from "./warehousingShared"; +import { StockStatusCode } from "./warehousingShared"; +import { PartnerStatusCode } from "./repositoryShared"; +import { ExecutionflowStatusCode } from "./tradeShared"; +import { ItemStatusCode } from "./repositoryShared"; +import { ActorStatusCode } from "./repositoryShared"; +import { ClaimStatus } from "./shared"; +import { AppointmentStatusCode } from "./shared"; +import { HandlingunitStatusCode } from "./warehousingShared"; +import { OrderStatusCode } from "./tradeShared"; +import { WeekDay } from "./shared"; +import { EntityType } from "./shared"; +// ─── Rule ──────────────────────────────────────────────────────────────────── + +/** + * A rule ties together a target entity, a trigger, and a set of conditions. + * Actions are evaluated when all conditions are met. + * + * @generated from protobuf message api.EngineRule + */ +export interface EngineRule { + /** + * @generated from protobuf field: string ProjectID = 10 + */ + ProjectID: string; + /** + * @generated from protobuf field: string Code = 20 + */ + Code: string; // Unique code for the rule, e.g. "ApplyFreeShipping" + /** + * @generated from protobuf field: string Label = 30 + */ + Label: string; // Human-readable label of the rule's purpose + /** + * @generated from protobuf field: api.EngineRuleValidityType ValidityType = 40 + */ + ValidityType: EngineRuleValidityType; // Whether the rule is always valid or only valid between a start and end date + /** + * @generated from protobuf field: string ValidFrom = 41 + */ + ValidFrom: string; // only meaningful when ValidityType = DATE_RANGE; ignored otherwise + /** + * @generated from protobuf field: string ValidUntil = 42 + */ + ValidUntil: string; // only meaningful when ValidityType = DATE_RANGE; ignored otherwise + /** + * @generated from protobuf field: api.EntityType Entity = 50 + */ + Entity: EntityType; // Entity type this rule applies to (Order, HandlingUnit, etc.) + /** + * @generated from protobuf field: api.EngineRuleTriggerType TriggerType = 60 + */ + TriggerType: EngineRuleTriggerType; // type of trigger that will cause the rule to be evaluated + /** + * What causes the rule to be evaluated + * + * @generated from protobuf oneof: Trigger + */ + Trigger: { + oneofKind: "ScheduledTrigger"; + /** + * @generated from protobuf field: api.EngineRuleScheduledTrigger ScheduledTrigger = 70 + */ + ScheduledTrigger: EngineRuleScheduledTrigger; // triggered on a schedule defined by a partial RRule model + } | { + oneofKind: "EventTrigger"; + /** + * @generated from protobuf field: api.EngineRuleEventTrigger EventTrigger = 71 + */ + EventTrigger: EngineRuleEventTrigger; // triggered when the entity is created, deleted, or changes status + } | { + oneofKind: "MilestoneTrigger"; + /** + * @generated from protobuf field: api.EngineRuleMilestoneTrigger MilestoneTrigger = 72 + */ + MilestoneTrigger: EngineRuleMilestoneTrigger; // triggered when a logistics milestone is reached + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: repeated api.EngineRuleCondition Conditions = 80 + */ + Conditions: EngineRuleCondition[]; // All conditions evaluated with AND semantics; no conditions = unconditional trigger + /** + * @generated from protobuf field: repeated api.EngineRuleAction Actions = 90 + */ + Actions: EngineRuleAction[]; // Actions to execute when the rule is triggered and conditions are met + /** + * @generated from protobuf field: int32 Version = 100 + */ + Version: number; // incremented on each update + /** + * @generated from protobuf field: string CreatedBy = 110 + */ + CreatedBy: string; + /** + * @generated from protobuf field: string CreatedAt = 120 + */ + CreatedAt: string; + /** + * @generated from protobuf field: string UpdatedAt = 130 + */ + UpdatedAt: string; + /** + * @generated from protobuf field: bool IsActive = 140 + */ + IsActive: boolean; // whether the rule is currently active, independent of its ValidityType and ValidFrom/ValidUntil dates +} +// ─── Trigger ────────────────────────────────────────────────────────────────── +// What causes the rule to be evaluated : a schedule, a status change, or a milestone. + +/** + * Triggered based on a partial RRule model. (recurrence rules commonly used for calendar events) + * + * @generated from protobuf message api.EngineRuleScheduledTrigger + */ +export interface EngineRuleScheduledTrigger { + /** + * @generated from protobuf field: api.RuleRecurrenceFrequency Frequency = 1 + */ + Frequency: RuleRecurrenceFrequency; + /** + * @generated from protobuf field: int32 Interval = 2 + */ + Interval: number; // e.g. Frequency = MINUTELY, Interval = 10 -> every 10 minutes; defaults to 1 at application layer + /** + * @generated from protobuf field: repeated api.WeekDay ByDay = 3 + */ + ByDay: WeekDay[]; // only meaningful when Frequency = WEEKLY; ignored otherwise + /** + * @generated from protobuf field: string StartDate = 4 + */ + StartDate: string; + /** + * @generated from protobuf field: string AtTime = 5 + */ + AtTime: string; // time of day the rule fires, e.g. "23:59:00"; only meaningful when Frequency = DAILY/WEEKLY/MONTHLY/YEARLY. Not meaningful when Frequency +} +/** + * Triggered when an entity reaches a specific status. + * The status code type is determined by the EngineRule.Entity field. + * + * @generated from protobuf message api.EngineRuleEventTrigger + */ +export interface EngineRuleEventTrigger { + /** + * @generated from protobuf oneof: Event + */ + Event: { + oneofKind: "Creation"; + /** + * @generated from protobuf field: api.EngineRuleEventTriggerCreation Creation = 1 + */ + Creation: EngineRuleEventTriggerCreation; // triggered when the entity is created + } | { + oneofKind: "Deletion"; + /** + * @generated from protobuf field: api.EngineRuleEventTriggerDeletion Deletion = 2 + */ + Deletion: EngineRuleEventTriggerDeletion; // triggered when the entity is deleted + } | { + oneofKind: "StatusChange"; + /** + * @generated from protobuf field: api.EngineRuleEventTriggerStatusChange StatusChange = 3 + */ + StatusChange: EngineRuleEventTriggerStatusChange; // triggered when the entity changes status + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message api.EngineRuleEventTriggerCreation + */ +export interface EngineRuleEventTriggerCreation { +} +/** + * @generated from protobuf message api.EngineRuleEventTriggerDeletion + */ +export interface EngineRuleEventTriggerDeletion { +} +/** + * @generated from protobuf message api.EngineRuleEventTriggerStatusChange + */ +export interface EngineRuleEventTriggerStatusChange { + /** + * The status code has to match the entity type of the rule (e.g. OrderStatusCode for an Order rule, HandlingunitStatusCode for a HandlingUnit rule, etc.) + * + * @generated from protobuf oneof: StatusCode + */ + StatusCode: { + oneofKind: "OrderStatus"; + /** + * @generated from protobuf field: api.OrderStatusCode OrderStatus = 1 + */ + OrderStatus: OrderStatusCode; + } | { + oneofKind: "HandlingunitStatus"; + /** + * @generated from protobuf field: api.HandlingunitStatusCode HandlingunitStatus = 2 + */ + HandlingunitStatus: HandlingunitStatusCode; + } | { + oneofKind: "AppointmentStatus"; + /** + * @generated from protobuf field: api.AppointmentStatusCode AppointmentStatus = 3 + */ + AppointmentStatus: AppointmentStatusCode; + } | { + oneofKind: "ClaimStatus"; + /** + * @generated from protobuf field: api.ClaimStatus ClaimStatus = 4 + */ + ClaimStatus: ClaimStatus; + } | { + oneofKind: "ActorStatus"; + /** + * @generated from protobuf field: api.ActorStatusCode ActorStatus = 5 + */ + ActorStatus: ActorStatusCode; + } | { + oneofKind: "ItemStatus"; + /** + * @generated from protobuf field: api.ItemStatusCode ItemStatus = 6 + */ + ItemStatus: ItemStatusCode; + } | { + oneofKind: "ExecutionflowStatus"; + /** + * @generated from protobuf field: api.ExecutionflowStatusCode ExecutionflowStatus = 7 + */ + ExecutionflowStatus: ExecutionflowStatusCode; + } | { + oneofKind: "PartnerStatus"; + /** + * @generated from protobuf field: api.PartnerStatusCode PartnerStatus = 8 + */ + PartnerStatus: PartnerStatusCode; + } | { + oneofKind: "StockStatus"; + /** + * @generated from protobuf field: api.StockStatusCode StockStatus = 9 + */ + StockStatus: StockStatusCode; + } | { + oneofKind: "MovementStatus"; + /** + * @generated from protobuf field: api.MovementStatusCode MovementStatus = 10 + */ + MovementStatus: MovementStatusCode; + } | { + oneofKind: undefined; + }; +} +/** + * Triggered when a logistics milestone is reached. + * Milestones are fields which are either part of the fixed model or user-defined Metadata + * known at the model level -- unlike EngineRuleEventTriggerStatusChange's + * StatusCode, which is a closed set of enums. MilestoneField therefore + * references the metadata by its field path, the same way EngineRuleCondition + * references fields, e.g. "Order.RequestedMilestones.ContractualLogisticsDate". + * + * @generated from protobuf message api.EngineRuleMilestoneTrigger + */ +export interface EngineRuleMilestoneTrigger { + /** + * @generated from protobuf field: string MilestoneField = 1 + */ + MilestoneField: string; // path to the Milestone field, e.g. "Order.RequestedMilestones.ContractualLogisticsDate" or "Order.MetaData.PickupRequested" +} +// ─── Conditions ─────────────────────────────────────────────────────────────── + +/** + * A single predicate: Criteria Value. + * All conditions on a rule are evaluated with AND semantics. + * No conditions means the rule will trigger unconditionally when the trigger + * event occurs. + * + * @generated from protobuf message api.EngineRuleCondition + */ +export interface EngineRuleCondition { + /** + * The left-hand side of a condition: a direct field, a collection with a quantifier, or an aggregate over the whole entity population. + * + * @generated from protobuf oneof: Criteria + */ + Criteria: { + oneofKind: "Field"; + /** + * @generated from protobuf field: string Field = 10 + */ + Field: string; // e.g. "Order.TotalAmount". When Trigger = ScheduledTrigger, acts as a filter over the whole population (evaluated per-instance, ANDed with sibling conditions) instead of + } | { + oneofKind: "Collection"; + /** + * a predicate on a single "current" instance. + * + * @generated from protobuf field: api.EngineRuleConditionCollectionCriteria Collection = 11 + */ + Collection: EngineRuleConditionCollectionCriteria; // quantifier (ALL/ANY/NONE) over a collection nested INSIDE one entity instance, + } | { + oneofKind: "Aggregate"; + /** + * e.g. "Order.Lines". Same population-filter semantics as Field above when Trigger = ScheduledTrigger. + * + * @generated from protobuf field: api.EngineRuleConditionAggregateCriteria Aggregate = 12 + */ + Aggregate: EngineRuleConditionAggregateCriteria; // aggregate function (SUM/COUNT/...) computed over the whole population, filtered by the sibling Field/Collection conditions of the same + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: api.EngineRuleConditionOperator Operator = 20 + */ + Operator: EngineRuleConditionOperator; + /** + * The right-hand side of a condition: a literal, a field reference, a computed value, or a mapping lookup. + * + * @generated from protobuf oneof: Value + */ + Value: { + oneofKind: "LiteralValue"; + /** + * @generated from protobuf field: api.EngineRuleLiteral LiteralValue = 31 + */ + LiteralValue: EngineRuleLiteral; + } | { + oneofKind: "LiteralListValue"; + /** + * @generated from protobuf field: api.EngineRuleLiteralList LiteralListValue = 32 + */ + LiteralListValue: EngineRuleLiteralList; // for IN operator + } | { + oneofKind: "FieldRefValue"; + /** + * FieldRefValue, ComputedValue and MappingValue below all resolve + * against a single "current" entity instance (a field path, a + * Computation.Entity, or the entity passed to a MappingTable at + * runtime, respectively). They are therefore only meaningful when + * Criteria != Aggregate (i.e. NOT for a ScheduledTrigger's HAVING-like + * condition, which has no single current instance to resolve them + * against) -- only LiteralValue/LiteralListValue make sense there. + * + * @generated from protobuf field: api.EngineRuleFieldRef FieldRefValue = 33 + */ + FieldRefValue: EngineRuleFieldRef; + } | { + oneofKind: "ComputedValue"; + /** + * @generated from protobuf field: api.EngineRuleComputedRef ComputedValue = 34 + */ + ComputedValue: EngineRuleComputedRef; + } | { + oneofKind: "MappingValue"; + /** + * @generated from protobuf field: api.EngineRuleMappingRef MappingValue = 35 + */ + MappingValue: EngineRuleMappingRef; // reference to a reusable lookup table, e.g. compare Order.TotalAmount against a threshold that depends on Order.Priority + } | { + oneofKind: undefined; + }; +} +/** + * Applies a quantifier over a collection field. + * e.g. ALL Order.Lines where Quantity == 0 + * + * @generated from protobuf message api.EngineRuleConditionCollectionCriteria + */ +export interface EngineRuleConditionCollectionCriteria { + /** + * @generated from protobuf field: string CollectionPath = 1 + */ + CollectionPath: string; // path to the collection, e.g. "Order.Lines" + /** + * @generated from protobuf field: string ElementField = 2 + */ + ElementField: string; // field on each element, e.g. "Quantity" + /** + * @generated from protobuf field: api.EngineRuleConditionQuantifier Quantifier = 3 + */ + Quantifier: EngineRuleConditionQuantifier; +} +/** + * Applies an aggregate function over ALL instances of the rule's Entity (not a + * collection nested in a single instance, see + * EngineRuleConditionCollectionCriteria for that case). Only valid when + * EngineRule.Trigger = ScheduledTrigger (a ScheduledTrigger rule is always + * evaluated "set-based", see Trigger comment). + * + * The subset to aggregate over is NOT declared here: it is defined by the + * OTHER conditions in the same EngineRule.Conditions list. In a ScheduledTrigger + * rule, any Field/Collection condition acts as a filter over the whole + * population (a "WHERE"), evaluated per-instance and ANDed together like any + * other condition; the Aggregate condition(s) are then computed over that + * common filtered subset (a "HAVING"). All Aggregate conditions in the same + * rule share that same filtered subset. + * + * Example: on Stock, every 10 minutes, IF Périmé == true (plain Field + * condition, acts as filter) AND SUM(Valeur) >= 1500 (Aggregate condition: + * Field = "Valeur", AggregateFunction = SUM, compared via + * EngineRuleCondition.Operator/Value) THEN CreateAlert. That's TWO top-level + * EngineRuleCondition entries in EngineRule.Conditions, ANDed together. + * + * The Value compared against an Aggregate condition should be a + * LiteralValue/LiteralListValue (see EngineRuleCondition.Value comment) -- + * FieldRefValue/ComputedValue/MappingValue don't make sense here since they + * resolve against a single current entity instance, which doesn't exist in + * this mode. + * + * @generated from protobuf message api.EngineRuleConditionAggregateCriteria + */ +export interface EngineRuleConditionAggregateCriteria { + /** + * @generated from protobuf field: string Field = 1 + */ + Field: string; // field to aggregate over the population (filtered by the rule's other conditions, if any), e.g. "Amount". Required for SUM/AVG/MIN/MAX; ignored (and may be left empty) for + /** + * COUNT, which just counts matching instances. + * + * @generated from protobuf field: api.EngineRuleConditionAggregateFunction AggregateFunction = 2 + */ + AggregateFunction: EngineRuleConditionAggregateFunction; +} +// ─── Shared Value Types ─────────────────────────────────────────────────────── +// Reused by both conditions (EngineRuleCondition) and actions (EngineRuleActionAttributeValue). + +/** + * A hardcoded typed value. + * + * @generated from protobuf message api.EngineRuleLiteral + */ +export interface EngineRuleLiteral { + /** + * @generated from protobuf oneof: Literal + */ + Literal: { + oneofKind: "Integer"; + /** + * @generated from protobuf field: int64 Integer = 1 + */ + Integer: bigint; + } | { + oneofKind: "Decimal"; + /** + * @generated from protobuf field: float Decimal = 2 + */ + Decimal: number; + } | { + oneofKind: "String"; + /** + * @generated from protobuf field: string String = 3 + */ + String: string; + } | { + oneofKind: "Boolean"; + /** + * @generated from protobuf field: bool Boolean = 4 + */ + Boolean: boolean; + } | { + oneofKind: undefined; + }; +} +/** + * A list of hardcoded typed values, used for IN operator conditions. + * + * @generated from protobuf message api.EngineRuleLiteralList + */ +export interface EngineRuleLiteralList { + /** + * @generated from protobuf field: repeated api.EngineRuleLiteral Items = 1 + */ + Items: EngineRuleLiteral[]; // must contain at least one value +} +/** + * A reference to another field, either from the root entity or relative to the + * current collection element. + * + * @generated from protobuf message api.EngineRuleFieldRef + */ +export interface EngineRuleFieldRef { + /** + * @generated from protobuf field: string Path = 1 + */ + Path: string; // e.g. "PreparedQuantity" or "Order.TotalAmount" + /** + * @generated from protobuf field: api.EngineRuleFieldRefScope Scope = 2 + */ + Scope: EngineRuleFieldRefScope; // Whether the path is absolute (from the root entity) or relative to the current collection element (if any). +} +/** + * A value computed by a runtime function ; definition intentionally deferred. + * + * @generated from protobuf message api.EngineRuleComputedRef + */ +export interface EngineRuleComputedRef { + /** + * @generated from protobuf field: string ComputationID = 1 + */ + ComputationID: string; // reference to a predefined computation strategy, e.g. "ComputeDaysSinceOrderCreated" +} +/** + * Reference to an externally managed lookup table, shared across rules. + * The entity in context is passed to the table at runtime; the table's InputFields define which fields are extracted. + * + * @generated from protobuf message api.EngineRuleMappingRef + */ +export interface EngineRuleMappingRef { + /** + * @generated from protobuf field: string MappingID = 1 + */ + MappingID: string; // unique code identifying the lookup table +} +// ─── Actions ────────────────────────────────────────────────────────────────── + +/** + * An action to execute when a rule is triggered and all conditions are met. + * + * @generated from protobuf message api.EngineRuleAction + */ +export interface EngineRuleAction { + /** + * @generated from protobuf oneof: Action + */ + Action: { + oneofKind: "CreateClaim"; + /** + * @generated from protobuf field: api.EngineRuleActionCreateClaim CreateClaim = 1 + */ + CreateClaim: EngineRuleActionCreateClaim; // requires a single target entity instance -- invalid for a set-based rule + } | { + oneofKind: "UpdateMetadata"; + /** + * @generated from protobuf field: api.EngineRuleActionUpdateMetadata UpdateMetadata = 2 + */ + UpdateMetadata: EngineRuleActionUpdateMetadata; // requires a single target entity instance -- invalid for a set-based rule + } | { + oneofKind: "CreateAlert"; + /** + * @generated from protobuf field: api.EngineRuleActionCreateAlert CreateAlert = 3 + */ + CreateAlert: EngineRuleActionCreateAlert; // global alert, not tied to any single entity instance -- the ONLY valid action for a set-based rule; also usable for a regular per-instance rule + } | { + oneofKind: undefined; + }; +} +/** + * Creates a claim of the specified type on the target entity. + * + * @generated from protobuf message api.EngineRuleActionCreateClaim + */ +export interface EngineRuleActionCreateClaim { + /** + * @generated from protobuf field: string ClaimTypeID = 1 + */ + ClaimTypeID: string; +} +/** + * Updates a single field on the target entity. + * + * @generated from protobuf message api.EngineRuleActionUpdateMetadata + */ +export interface EngineRuleActionUpdateMetadata { + /** + * @generated from protobuf field: string Field = 1 + */ + Field: string; // path to the field to update, e.g. "Status" or "Lines.PreparedQuantity" + /** + * @generated from protobuf field: api.EngineRuleActionAttributeValue Value = 2 + */ + Value?: EngineRuleActionAttributeValue; +} +/** + * Creates an alert, independent of any single target entity instance. + * Definition intentionally minimal for now (label only); severity, recipients, + * or templating may be added later. + * + * @generated from protobuf message api.EngineRuleActionCreateAlert + */ +export interface EngineRuleActionCreateAlert { + /** + * @generated from protobuf field: string Label = 1 + */ + Label: string; // human-readable alert message, e.g. "Stock périmé : valeur cumulée supérieure à 1500€" +} +/** + * The value to assign : either a literal, a computed function, or a mapping table. + * + * @generated from protobuf message api.EngineRuleActionAttributeValue + */ +export interface EngineRuleActionAttributeValue { + /** + * @generated from protobuf oneof: Value + */ + Value: { + oneofKind: "LiteralValue"; + /** + * @generated from protobuf field: api.EngineRuleLiteral LiteralValue = 1 + */ + LiteralValue: EngineRuleLiteral; // hardcoded typed value + } | { + oneofKind: "ComputedValue"; + /** + * @generated from protobuf field: api.EngineRuleComputedRef ComputedValue = 2 + */ + ComputedValue: EngineRuleComputedRef; // runtime function (deferred) + } | { + oneofKind: "MappingValue"; + /** + * @generated from protobuf field: api.EngineRuleMappingRef MappingValue = 3 + */ + MappingValue: EngineRuleMappingRef; // reference to a reusable lookup table + } | { + oneofKind: undefined; + }; +} +// ─── Compute ───────────────────────────────────────────────────────────────── +// Computations define reusable value-resolution strategies used in rule actions. +// They are referenced via EngineRuleComputedRef once that definition is finalized. + +/** + * @generated from protobuf message api.Computation + */ +export interface Computation { + /** + * @generated from protobuf field: string ProjectID = 10 + */ + ProjectID: string; + /** + * @generated from protobuf field: string ID = 20 + */ + ID: string; + /** + * @generated from protobuf field: string Label = 30 + */ + Label: string; // Human-readable label for the computation, e.g. "Compute Discount" + /** + * @generated from protobuf field: api.EntityType Entity = 40 + */ + Entity: EntityType; // Entity type this computation applies to (Order, HandlingUnit, etc.) + /** + * The computation strategy to apply + * + * @generated from protobuf oneof: Type + */ + Type: { + oneofKind: "DateDuration"; + /** + * @generated from protobuf field: api.ComputationDateDuration DateDuration = 50 + */ + DateDuration: ComputationDateDuration; // computes the duration between two date fields + } | { + oneofKind: "DueDate"; + /** + * @generated from protobuf field: api.ComputationDueDate DueDate = 51 + */ + DueDate: ComputationDueDate; // computes a due date from a reference date and a duration + } | { + oneofKind: "StatusDuration"; + /** + * @generated from protobuf field: api.ComputationStatusDuration StatusDuration = 52 + */ + StatusDuration: ComputationStatusDuration; // computes the cumulated duration spent in a set of statuses + } | { + oneofKind: "CustomFunction"; + /** + * @generated from protobuf field: api.ComputationCustomFunction CustomFunction = 53 + */ + CustomFunction: ComputationCustomFunction; // applies an arithmetic operator between two fields + } | { + oneofKind: undefined; + }; +} +/** + * Computes the duration between two date fields on the entity. + * Example: on Order, compute how many working days elapsed between creation + * and shipment: + * - StartDateField = "Order.CreatedAt" + * - EndDateField = "Order.ShippedAt" + * - DurationFormat = {Format: WORKING_DAYS, CalendarID:"FR_STANDARD", Rounding: UP} + * The result (a WORKING_DAYS duration) can then be referenced elsewhere + * via EngineRuleComputedRef pointing to this Computation's ID. + * + * @generated from protobuf message api.ComputationDateDuration + */ +export interface ComputationDateDuration { + /** + * @generated from protobuf field: string StartDateField = 1 + */ + StartDateField: string; // e.g. "Order.CreatedAt" + /** + * @generated from protobuf field: string EndDateField = 2 + */ + EndDateField: string; // e.g. "Order.ShippedAt" + /** + * @generated from protobuf field: api.ComputationDurationFormat DurationFormat = 3 + */ + DurationFormat?: ComputationDurationFormat; // how to express the resulting duration +} +/** + * Computes a due date by adding or subtracting a duration (fixed or looked up) to a reference date field. + * Example: on Order, compute a contractual delivery due date as "3 working days after order creation": + * - ReferenceDateField = "Order.CreatedAt" + * - ComputationType = ADD + * - Value = {Duration: 3} + * - DurationFormat = {Format: WORKING_DAYS, CalendarID: "FR_STANDARD", Rounding: UP} + * Example with a mapping-driven duration instead of a fixed one: "due date = + * order creation + N days, where N depends on Order.Priority" + * - ReferenceDateField = "Order.CreatedAt" + * - ComputationType = ADD + * - Value = {MappingValue: {MappingID: "DeliveryLeadTimeByPriority"}} (the mapping table's Entries resolve Order.Priority -> a number of days) + * - DurationFormat = {Format: DAYS, Rounding: UP}. + * + * @generated from protobuf message api.ComputationDueDate + */ +export interface ComputationDueDate { + /** + * @generated from protobuf field: string ReferenceDateField = 10 + */ + ReferenceDateField: string; // e.g. "Order.CreatedAt" + /** + * @generated from protobuf field: api.ComputationDueDateComputationType ComputationType = 20 + */ + ComputationType: ComputationDueDateComputationType; // whether to add or subtract the duration + /** + * the duration to apply: either a fixed date offset or a mapping-driven value + * + * @generated from protobuf oneof: Value + */ + Value: { + oneofKind: "Duration"; + /** + * @generated from protobuf field: uint32 Duration = 31 + */ + Duration: number; // duration which format is defined by DurationFormat, e.g. "3" with DurationFormat = DAYS means a 3-day duration + } | { + oneofKind: "MappingValue"; + /** + * @generated from protobuf field: api.EngineRuleMappingRef MappingValue = 32 + */ + MappingValue: EngineRuleMappingRef; // lookup table resolving a duration from the entity's fields, e.g. Order.Priority → days + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: api.ComputationDurationFormat DurationFormat = 40 + */ + DurationFormat?: ComputationDurationFormat; // how to express and round the resulting duration +} +/** + * Computes the cumulated duration the entity spent across a set of statuses. + * + * @generated from protobuf message api.ComputationStatusDuration + */ +export interface ComputationStatusDuration { + /** + * @generated from protobuf field: repeated string StatusCodes = 1 + */ + StatusCodes: string[]; // status codes to accumulate duration for, e.g. ["ORDER_STATUS_SHIPPED", "ORDER_STATUS_DELIVERED"] + /** + * @generated from protobuf field: api.ComputationDurationFormat DurationFormat = 2 + */ + DurationFormat?: ComputationDurationFormat; // how to express the resulting duration +} +/** + * Defines how a duration is expressed and optionally rounded. + * Example: {Format: WORKING_HOURS, CalendarID: "FR_STANDARD", Rounding: + * FIXED_HOUR, RoundingValue: "8:00:00"} expresses a duration in working hours + * (excluding non-working time per the "FR_STANDARD" calendar) and rounds it to + * the nearest 8-hour increment (e.g. a computed 10h30 duration becomes 16h). + * CalendarID is only meaningful for the WORKING_* Format values (ignored for + * plain MINUTES/HOURS/DAYS) + * RoundingValue is only meaningful when Rounding = FIXED_HOUR (ignored for UP/DOWN). + * + * @generated from protobuf message api.ComputationDurationFormat + */ +export interface ComputationDurationFormat { + /** + * @generated from protobuf field: api.DurationFormat Format = 1 + */ + Format: DurationFormat; + /** + * @generated from protobuf field: string CalendarID = 2 + */ + CalendarID: string; // calendar to use for working-time calculations; only meaningful for WORKING_* formats + /** + * @generated from protobuf field: api.DurationRounding Rounding = 3 + */ + Rounding: DurationRounding; + /** + * @generated from protobuf field: string RoundingValue = 4 + */ + RoundingValue: string; // if Rounding = FIXED_HOUR, the value to round to, e.g. "8:00:00" for an 8-hour rounding; ignored otherwise (must be in HH:MM:SS format) +} +/** + * Applies an arithmetic operator between two entity fields and formats the result. + * + * @generated from protobuf message api.ComputationCustomFunction + */ +export interface ComputationCustomFunction { + /** + * @generated from protobuf field: string LeftField = 1 + */ + LeftField: string; // left operand field path, e.g. "Order.TotalAmount" + /** + * @generated from protobuf field: api.ComputationCustomFunctionOperator Operator = 2 + */ + Operator: ComputationCustomFunctionOperator; + /** + * @generated from protobuf field: string RightField = 3 + */ + RightField: string; // right operand field path, e.g. "Order.DiscountAmount" + /** + * @generated from protobuf field: api.ComputationCustomFunctionFormat Format = 4 + */ + Format?: ComputationCustomFunctionFormat; // how to interpret and round the computed result +} +/** + * Defines how the result of a custom function is typed and rounded. + * + * @generated from protobuf message api.ComputationCustomFunctionFormat + */ +export interface ComputationCustomFunctionFormat { + /** + * @generated from protobuf field: api.CustomFunctionFormat Format = 1 + */ + Format: CustomFunctionFormat; + /** + * @generated from protobuf field: uint32 Precision = 2 + */ + Precision: number; // number of decimal places to round to + /** + * @generated from protobuf field: api.CustomFunctionRounding Rounding = 3 + */ + Rounding: CustomFunctionRounding; +} +// ─── Mapping Tables ─────────────────────────────────────────────────────────── +// Externally managed tables mapping multiple input values to an output value, referenced in conditions and actions via EngineRuleMappingRef. + +/** + * @generated from protobuf message api.MappingTable + */ +export interface MappingTable { + /** + * @generated from protobuf field: string ProjectID = 10 + */ + ProjectID: string; + /** + * @generated from protobuf field: string ID = 20 + */ + ID: string; // Unique identifier for the mapping table, used in EngineRuleMappingRef + /** + * @generated from protobuf field: string Label = 30 + */ + Label: string; // Human-readable label for the mapping table, e.g. "Shipping Cost by Priority" + /** + * @generated from protobuf field: api.EntityType Entity = 40 + */ + Entity: EntityType; // Entity type this mapping applies to (Order, HandlingUnit, etc.) + /** + * @generated from protobuf field: repeated api.MappingTableInputDescription InputFields = 50 + */ + InputFields: MappingTableInputDescription[]; // declarative schema: fields the table reads from the entity, e.g. ["Order.Priority", "Order.DestinationZone"]; application layer must ensure entries only reference fields listed here + /** + * @generated from protobuf field: api.MappingTableOutputField OutputField = 60 + */ + OutputField?: MappingTableOutputField; // field resulting from the lookup, e.g. "Shipping cost" + /** + * @generated from protobuf field: repeated api.MappingTableEntry Entries = 70 + */ + Entries: MappingTableEntry[]; // mapping entries; must contain at least one entry +} +/** + * @generated from protobuf message api.MappingTableInputDescription + */ +export interface MappingTableInputDescription { + /** + * @generated from protobuf field: string Field = 1 + */ + Field: string; // field whose value is an input to the mapping table, e.g. "Order.Priority" + /** + * @generated from protobuf field: api.MappingTableInputDescriptionGranularity Granularity = 2 + */ + Granularity: MappingTableInputDescriptionGranularity; // reserved for date fields to indicate whether the mapping table expects full timestamps or truncated values (e.g. just date or just hour) and should apply appropriate transformations at +} +/** + * @generated from protobuf message api.MappingTableEntry + */ +export interface MappingTableEntry { + /** + * @generated from protobuf field: repeated api.MappingTableInput Inputs = 1 + */ + Inputs: MappingTableInput[]; // input values driving the lookup, e.g. Order.Priority = "HIGH" + /** + * @generated from protobuf field: api.EngineRuleLiteral OutputValue = 2 + */ + OutputValue?: EngineRuleLiteral; // output value resulting from the lookup, e.g. ShippingCost = 25.00 +} +/** + * @generated from protobuf message api.MappingTableInput + */ +export interface MappingTableInput { + /** + * @generated from protobuf field: string Field = 10 + */ + Field: string; // field whose value is matched, must correspond to a field declared in MappingTable.InputFields, e.g. "Order.Priority" + /** + * @generated from protobuf oneof: Value + */ + Value: { + oneofKind: "Literal"; + /** + * @generated from protobuf field: api.EngineRuleLiteral Literal = 20 + */ + Literal: EngineRuleLiteral; // value to match on the input field, e.g. "HIGH" + } | { + oneofKind: "AllValuesMatch"; + /** + * @generated from protobuf field: bool AllValuesMatch = 21 + */ + AllValuesMatch: boolean; // if true, the entry matches any value for the input field (wildcard); mutually exclusive with EngineRuleLiteral + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: api.MappingTableInputOperator Operator = 30 + */ + Operator: MappingTableInputOperator; // operator to apply when matching the entry's input values to the entity's fields; defaults to EQUALS for exact match +} +/** + * @generated from protobuf message api.MappingTableOutputField + */ +export interface MappingTableOutputField { + /** + * @generated from protobuf field: string Label = 1 + */ + Label: string; // Human-readable label for the output field, e.g. "Shipping Cost" + /** + * @generated from protobuf field: api.MappingTableOutputFieldType Type = 2 + */ + Type: MappingTableOutputFieldType; +} +// ─── Validity ───────────────────────────────────────────────────────────────── + +/** + * @generated from protobuf enum api.EngineRuleValidityType + */ +export enum EngineRuleValidityType { + /** + * @generated from protobuf enum value: ENGINE_RULE_VALIDITY_TYPE_UNKNOWN = 0; + */ + ENGINE_RULE_VALIDITY_TYPE_UNKNOWN = 0, + /** + * rule is always valid + * + * @generated from protobuf enum value: ENGINE_RULE_VALIDITY_TYPE_INDEFINITE = 1; + */ + ENGINE_RULE_VALIDITY_TYPE_INDEFINITE = 1, + /** + * rule is valid between a start and end date + * + * @generated from protobuf enum value: ENGINE_RULE_VALIDITY_TYPE_DATE_RANGE = 2; + */ + ENGINE_RULE_VALIDITY_TYPE_DATE_RANGE = 2 +} +/** + * Note ByDay + AtTime combine to express things like "every Monday and + * Tuesday at 23:59:00": Frequency = WEEKLY, ByDay = [MONDAY, TUESDAY], + * AtTime = "23:59:00". This is already supported by the fields above. + * + * @generated from protobuf enum api.RuleRecurrenceFrequency + */ +export enum RuleRecurrenceFrequency { + /** + * @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_UNKNOWN = 0; + */ + RULE_RECURRENCE_FREQUENCY_UNKNOWN = 0, + /** + * fires every Interval minutes, all day, every day starting at StartDate; AtTime/ByDay are ignored + * + * @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_MINUTELY = 5; + */ + RULE_RECURRENCE_FREQUENCY_MINUTELY = 5, + /** + * @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_DAILY = 1; + */ + RULE_RECURRENCE_FREQUENCY_DAILY = 1, + /** + * combine with ByDay to restrict to specific weekdays, e.g. Monday and Tuesday only + * + * @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_WEEKLY = 2; + */ + RULE_RECURRENCE_FREQUENCY_WEEKLY = 2, + /** + * @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_MONTHLY = 3; + */ + RULE_RECURRENCE_FREQUENCY_MONTHLY = 3, + /** + * @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_YEARLY = 4; + */ + RULE_RECURRENCE_FREQUENCY_YEARLY = 4 +} +/** + * @generated from protobuf enum api.EngineRuleTriggerType + */ +export enum EngineRuleTriggerType { + /** + * @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_UNKNOWN = 0; + */ + ENGINE_RULE_TRIGGER_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_SCHEDULED = 1; + */ + ENGINE_RULE_TRIGGER_TYPE_SCHEDULED = 1, + /** + * @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_EVENT = 2; + */ + ENGINE_RULE_TRIGGER_TYPE_EVENT = 2, + /** + * @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_MILESTONE = 3; + */ + ENGINE_RULE_TRIGGER_TYPE_MILESTONE = 3 +} +/** + * Logical quantifiers for collection conditions. + * + * @generated from protobuf enum api.EngineRuleConditionQuantifier + */ +export enum EngineRuleConditionQuantifier { + /** + * @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_UNKNOWN = 0; + */ + RULE_CONDITION_QUANTIFIER_UNKNOWN = 0, + /** + * ∀ every element must satisfy the condition + * + * @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_ALL = 1; + */ + RULE_CONDITION_QUANTIFIER_ALL = 1, + /** + * ∃ at least one element must satisfy the condition + * + * @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_ANY = 2; + */ + RULE_CONDITION_QUANTIFIER_ANY = 2, + /** + * ∄ no element must satisfy the condition + * + * @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_NONE = 3; + */ + RULE_CONDITION_QUANTIFIER_NONE = 3 +} +/** + * @generated from protobuf enum api.EngineRuleConditionAggregateFunction + */ +export enum EngineRuleConditionAggregateFunction { + /** + * @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_UNKNOWN = 0; + */ + RULE_CONDITION_AGGREGATE_FUNCTION_UNKNOWN = 0, + /** + * Σ sum of Field across the filtered subset + * + * @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_SUM = 1; + */ + RULE_CONDITION_AGGREGATE_FUNCTION_SUM = 1, + /** + * number of instances in the filtered subset (Field is ignored) + * + * @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_COUNT = 2; + */ + RULE_CONDITION_AGGREGATE_FUNCTION_COUNT = 2, + /** + * average of Field across the filtered subset + * + * @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_AVG = 3; + */ + RULE_CONDITION_AGGREGATE_FUNCTION_AVG = 3, + /** + * minimum value of Field across the filtered subset + * + * @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_MIN = 4; + */ + RULE_CONDITION_AGGREGATE_FUNCTION_MIN = 4, + /** + * maximum value of Field across the filtered subset + * + * @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_MAX = 5; + */ + RULE_CONDITION_AGGREGATE_FUNCTION_MAX = 5 +} +/** + * @generated from protobuf enum api.EngineRuleConditionOperator + */ +export enum EngineRuleConditionOperator { + /** + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_UNKNOWN = 0; + */ + RULE_CONDITION_OPERATOR_UNKNOWN = 0, + /** + * == + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_EQUALS = 1; + */ + RULE_CONDITION_OPERATOR_EQUALS = 1, + /** + * != + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_NOT_EQUALS = 2; + */ + RULE_CONDITION_OPERATOR_NOT_EQUALS = 2, + /** + * > + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_GREATER_THAN = 3; + */ + RULE_CONDITION_OPERATOR_GREATER_THAN = 3, + /** + * < + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_LESS_THAN = 4; + */ + RULE_CONDITION_OPERATOR_LESS_THAN = 4, + /** + * >= + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_GREATER_OR_EQUALS = 5; + */ + RULE_CONDITION_OPERATOR_GREATER_OR_EQUALS = 5, + /** + * <= + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_LESS_OR_EQUALS = 6; + */ + RULE_CONDITION_OPERATOR_LESS_OR_EQUALS = 6, + /** + * value is in a list of literals + * + * @generated from protobuf enum value: RULE_CONDITION_OPERATOR_IN = 7; + */ + RULE_CONDITION_OPERATOR_IN = 7 +} +/** + * @generated from protobuf enum api.EngineRuleFieldRefScope + */ +export enum EngineRuleFieldRefScope { + /** + * @generated from protobuf enum value: ENGINE_RULE_FIELD_REF_SCOPE_UNKNOWN = 0; + */ + ENGINE_RULE_FIELD_REF_SCOPE_UNKNOWN = 0, + /** + * path from root entity + * + * @generated from protobuf enum value: ENGINE_RULE_FIELD_REF_SCOPE_ABSOLUTE = 1; + */ + ENGINE_RULE_FIELD_REF_SCOPE_ABSOLUTE = 1, + /** + * path relative to current collection element + * + * @generated from protobuf enum value: ENGINE_RULE_FIELD_REF_SCOPE_ELEMENT = 2; + */ + ENGINE_RULE_FIELD_REF_SCOPE_ELEMENT = 2 +} +/** + * @generated from protobuf enum api.ComputationDueDateComputationType + */ +export enum ComputationDueDateComputationType { + /** + * @generated from protobuf enum value: COMPUTATION_DUE_DATE_COMPUTATION_TYPE_UNKNOWN = 0; + */ + COMPUTATION_DUE_DATE_COMPUTATION_TYPE_UNKNOWN = 0, + /** + * DueDate = ReferenceDate + ComputedDuration + * + * @generated from protobuf enum value: COMPUTATION_DUE_DATE_COMPUTATION_TYPE_ADD = 1; + */ + COMPUTATION_DUE_DATE_COMPUTATION_TYPE_ADD = 1, + /** + * DueDate = ReferenceDate - ComputedDuration + * + * @generated from protobuf enum value: COMPUTATION_DUE_DATE_COMPUTATION_TYPE_SUBTRACT = 2; + */ + COMPUTATION_DUE_DATE_COMPUTATION_TYPE_SUBTRACT = 2 +} +/** + * @generated from protobuf enum api.DurationFormat + */ +export enum DurationFormat { + /** + * @generated from protobuf enum value: DURATION_FORMAT_UNKNOWN = 0; + */ + DURATION_FORMAT_UNKNOWN = 0, + /** + * @generated from protobuf enum value: DURATION_FORMAT_MINUTES = 10; + */ + DURATION_FORMAT_MINUTES = 10, + /** + * excludes non-working time based on CalendarID + * + * @generated from protobuf enum value: DURATION_FORMAT_WORKING_MINUTES = 11; + */ + DURATION_FORMAT_WORKING_MINUTES = 11, + /** + * @generated from protobuf enum value: DURATION_FORMAT_HOURS = 20; + */ + DURATION_FORMAT_HOURS = 20, + /** + * excludes non-working time based on CalendarID + * + * @generated from protobuf enum value: DURATION_FORMAT_WORKING_HOURS = 21; + */ + DURATION_FORMAT_WORKING_HOURS = 21, + /** + * @generated from protobuf enum value: DURATION_FORMAT_DAYS = 30; + */ + DURATION_FORMAT_DAYS = 30, + /** + * excludes non-working time based on CalendarID + * + * @generated from protobuf enum value: DURATION_FORMAT_WORKING_DAYS = 31; + */ + DURATION_FORMAT_WORKING_DAYS = 31 +} +/** + * @generated from protobuf enum api.DurationRounding + */ +export enum DurationRounding { + /** + * @generated from protobuf enum value: DURATION_ROUNDING_UNKNOWN = 0; + */ + DURATION_ROUNDING_UNKNOWN = 0, + /** + * round up to the next whole unit (e.g. 1h20m → 2h) + * + * @generated from protobuf enum value: DURATION_ROUNDING_UP = 1; + */ + DURATION_ROUNDING_UP = 1, + /** + * round down to the previous whole unit (e.g. 1h20m → 1h) + * + * @generated from protobuf enum value: DURATION_ROUNDING_DOWN = 2; + */ + DURATION_ROUNDING_DOWN = 2, + /** + * round to the specified value (e.g 8h: 1h20m → 8h) + * + * @generated from protobuf enum value: DURATION_ROUNDING_FIXED_HOUR = 3; + */ + DURATION_ROUNDING_FIXED_HOUR = 3 +} +/** + * @generated from protobuf enum api.ComputationCustomFunctionOperator + */ +export enum ComputationCustomFunctionOperator { + /** + * @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_UNKNOWN = 0; + */ + COMPUTATION_CUSTOM_FUNCTION_OPERATOR_UNKNOWN = 0, + /** + * + + * + * @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_ADD = 1; + */ + COMPUTATION_CUSTOM_FUNCTION_OPERATOR_ADD = 1, + /** + * - + * + * @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_SUBTRACT = 2; + */ + COMPUTATION_CUSTOM_FUNCTION_OPERATOR_SUBTRACT = 2, + /** + * * + * + * @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_MULTIPLY = 3; + */ + COMPUTATION_CUSTOM_FUNCTION_OPERATOR_MULTIPLY = 3, + /** + * / + * + * @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_DIVIDE = 4; + */ + COMPUTATION_CUSTOM_FUNCTION_OPERATOR_DIVIDE = 4 +} +/** + * @generated from protobuf enum api.CustomFunctionFormat + */ +export enum CustomFunctionFormat { + /** + * @generated from protobuf enum value: CUSTOM_FUNCTION_FORMAT_UNKNOWN = 0; + */ + CUSTOM_FUNCTION_FORMAT_UNKNOWN = 0, + /** + * e.g. 12.3456 + * + * @generated from protobuf enum value: CUSTOM_FUNCTION_FORMAT_NUMERIC = 1; + */ + CUSTOM_FUNCTION_FORMAT_NUMERIC = 1, + /** + * e.g. 12.34% + * + * @generated from protobuf enum value: CUSTOM_FUNCTION_FORMAT_PERCENTAGE = 2; + */ + CUSTOM_FUNCTION_FORMAT_PERCENTAGE = 2 +} +/** + * @generated from protobuf enum api.CustomFunctionRounding + */ +export enum CustomFunctionRounding { + /** + * @generated from protobuf enum value: CUSTOM_FUNCTION_ROUNDING_UNKNOWN = 0; + */ + CUSTOM_FUNCTION_ROUNDING_UNKNOWN = 0, + /** + * round up to the next whole unit (e.g. 1.2 → 2) + * + * @generated from protobuf enum value: CUSTOM_FUNCTION_ROUNDING_UP = 1; + */ + CUSTOM_FUNCTION_ROUNDING_UP = 1, + /** + * round down to the previous whole unit (e.g. 1.2 → 1) + * + * @generated from protobuf enum value: CUSTOM_FUNCTION_ROUNDING_DOWN = 2; + */ + CUSTOM_FUNCTION_ROUNDING_DOWN = 2 +} +/** + * @generated from protobuf enum api.MappingTableInputDescriptionGranularity + */ +export enum MappingTableInputDescriptionGranularity { + /** + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_UNKNOWN = 0; + */ + MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_UNKNOWN = 0, + /** + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR = 1; + */ + MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR = 1, + /** + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_DATE = 2; + */ + MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_DATE = 2, + /** + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR_AND_DATE = 3; + */ + MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR_AND_DATE = 3 +} +/** + * @generated from protobuf enum api.MappingTableInputOperator + */ +export enum MappingTableInputOperator { + /** + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_UNKNOWN = 0; + */ + MAPPING_TABLE_INPUT_OPERATOR_UNKNOWN = 0, + /** + * exact match of the timestamp + * + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_EQUALS = 1; + */ + MAPPING_TABLE_INPUT_OPERATOR_EQUALS = 1, + /** + * does not match the timestamp + * + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_NOT_EQUALS = 2; + */ + MAPPING_TABLE_INPUT_OPERATOR_NOT_EQUALS = 2, + /** + * matches if the entity timestamp is before the input value + * + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_LESS_THAN = 3; + */ + MAPPING_TABLE_INPUT_OPERATOR_LESS_THAN = 3, + /** + * matches if the entity timestamp is before or equal to the input value + * + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_LESS_OR_EQUALS = 4; + */ + MAPPING_TABLE_INPUT_OPERATOR_LESS_OR_EQUALS = 4, + /** + * matches if the entity timestamp is after the input value + * + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_GREATER_THAN = 5; + */ + MAPPING_TABLE_INPUT_OPERATOR_GREATER_THAN = 5, + /** + * matches if the entity timestamp is after or equal to the input value + * + * @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_GREATER_OR_EQUALS = 6; + */ + MAPPING_TABLE_INPUT_OPERATOR_GREATER_OR_EQUALS = 6 +} +/** + * @generated from protobuf enum api.MappingTableOutputFieldType + */ +export enum MappingTableOutputFieldType { + /** + * @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_UNKNOWN = 0; + */ + MAPPING_TABLE_OUTPUT_FIELD_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_INTEGER = 1; + */ + MAPPING_TABLE_OUTPUT_FIELD_TYPE_INTEGER = 1, + /** + * @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_STRING = 2; + */ + MAPPING_TABLE_OUTPUT_FIELD_TYPE_STRING = 2, + /** + * @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_BOOLEAN = 3; + */ + MAPPING_TABLE_OUTPUT_FIELD_TYPE_BOOLEAN = 3 +} +// @generated message type with reflection information, may provide speed optimized methods +class EngineRule$Type extends MessageType { + constructor() { + super("api.EngineRule", [ + { no: 10, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ }, + { no: 20, name: "Code", kind: "scalar", localName: "Code", jsonName: "Code", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { pattern: "^[A-Za-z0-9_]+$" }, "n1validate.rules": { string: { pattern: "^[A-Za-z0-9_]+$" } } } }, + { no: 30, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/ }, + { no: 40, name: "ValidityType", kind: "enum", localName: "ValidityType", jsonName: "ValidityType", T: () => ["api.EngineRuleValidityType", EngineRuleValidityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 41, name: "ValidFrom", kind: "scalar", localName: "ValidFrom", jsonName: "ValidFrom", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true, ignoreEmpty: true } } } }, + { no: 42, name: "ValidUntil", kind: "scalar", localName: "ValidUntil", jsonName: "ValidUntil", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true, ignoreEmpty: true } } } }, + { no: 50, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] }, + { no: 60, name: "TriggerType", kind: "enum", localName: "TriggerType", jsonName: "TriggerType", T: () => ["api.EngineRuleTriggerType", EngineRuleTriggerType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 70, name: "ScheduledTrigger", kind: "message", localName: "ScheduledTrigger", jsonName: "ScheduledTrigger", oneof: "Trigger", T: () => EngineRuleScheduledTrigger }, + { no: 71, name: "EventTrigger", kind: "message", localName: "EventTrigger", jsonName: "EventTrigger", oneof: "Trigger", T: () => EngineRuleEventTrigger }, + { no: 72, name: "MilestoneTrigger", kind: "message", localName: "MilestoneTrigger", jsonName: "MilestoneTrigger", oneof: "Trigger", T: () => EngineRuleMilestoneTrigger }, + { no: 80, name: "Conditions", kind: "message", localName: "Conditions", jsonName: "Conditions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleCondition }, + { no: 90, name: "Actions", kind: "message", localName: "Actions", jsonName: "Actions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleAction, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }, + { no: 100, name: "Version", kind: "scalar", localName: "Version", jsonName: "Version", T: 5 /*ScalarType.INT32*/ }, + { no: 110, name: "CreatedBy", kind: "scalar", localName: "CreatedBy", jsonName: "CreatedBy", T: 9 /*ScalarType.STRING*/ }, + { no: 120, name: "CreatedAt", kind: "scalar", localName: "CreatedAt", jsonName: "CreatedAt", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } } } }, + { no: 130, name: "UpdatedAt", kind: "scalar", localName: "UpdatedAt", jsonName: "UpdatedAt", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } } } }, + { no: 140, name: "IsActive", kind: "scalar", localName: "IsActive", jsonName: "IsActive", T: 8 /*ScalarType.BOOL*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Code", "Actions", "Trigger"] } } }); + } + create(value?: PartialMessage): EngineRule { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ProjectID = ""; + message.Code = ""; + message.Label = ""; + message.ValidityType = 0; + message.ValidFrom = ""; + message.ValidUntil = ""; + message.Entity = 0; + message.TriggerType = 0; + message.Trigger = { oneofKind: undefined }; + message.Conditions = []; + message.Actions = []; + message.Version = 0; + message.CreatedBy = ""; + message.CreatedAt = ""; + message.UpdatedAt = ""; + message.IsActive = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRule): EngineRule { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ProjectID */ 10: + message.ProjectID = reader.string(); + break; + case /* string Code */ 20: + message.Code = reader.string(); + break; + case /* string Label */ 30: + message.Label = reader.string(); + break; + case /* api.EngineRuleValidityType ValidityType */ 40: + message.ValidityType = reader.int32(); + break; + case /* string ValidFrom */ 41: + message.ValidFrom = reader.string(); + break; + case /* string ValidUntil */ 42: + message.ValidUntil = reader.string(); + break; + case /* api.EntityType Entity */ 50: + message.Entity = reader.int32(); + break; + case /* api.EngineRuleTriggerType TriggerType */ 60: + message.TriggerType = reader.int32(); + break; + case /* api.EngineRuleScheduledTrigger ScheduledTrigger */ 70: + message.Trigger = { + oneofKind: "ScheduledTrigger", + ScheduledTrigger: EngineRuleScheduledTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).ScheduledTrigger) + }; + break; + case /* api.EngineRuleEventTrigger EventTrigger */ 71: + message.Trigger = { + oneofKind: "EventTrigger", + EventTrigger: EngineRuleEventTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).EventTrigger) + }; + break; + case /* api.EngineRuleMilestoneTrigger MilestoneTrigger */ 72: + message.Trigger = { + oneofKind: "MilestoneTrigger", + MilestoneTrigger: EngineRuleMilestoneTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).MilestoneTrigger) + }; + break; + case /* repeated api.EngineRuleCondition Conditions */ 80: + message.Conditions.push(EngineRuleCondition.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated api.EngineRuleAction Actions */ 90: + message.Actions.push(EngineRuleAction.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* int32 Version */ 100: + message.Version = reader.int32(); + break; + case /* string CreatedBy */ 110: + message.CreatedBy = reader.string(); + break; + case /* string CreatedAt */ 120: + message.CreatedAt = reader.string(); + break; + case /* string UpdatedAt */ 130: + message.UpdatedAt = reader.string(); + break; + case /* bool IsActive */ 140: + message.IsActive = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ProjectID = 10; */ + if (message.ProjectID !== "") + writer.tag(10, WireType.LengthDelimited).string(message.ProjectID); + /* string Code = 20; */ + if (message.Code !== "") + writer.tag(20, WireType.LengthDelimited).string(message.Code); + /* string Label = 30; */ + if (message.Label !== "") + writer.tag(30, WireType.LengthDelimited).string(message.Label); + /* api.EngineRuleValidityType ValidityType = 40; */ + if (message.ValidityType !== 0) + writer.tag(40, WireType.Varint).int32(message.ValidityType); + /* string ValidFrom = 41; */ + if (message.ValidFrom !== "") + writer.tag(41, WireType.LengthDelimited).string(message.ValidFrom); + /* string ValidUntil = 42; */ + if (message.ValidUntil !== "") + writer.tag(42, WireType.LengthDelimited).string(message.ValidUntil); + /* api.EntityType Entity = 50; */ + if (message.Entity !== 0) + writer.tag(50, WireType.Varint).int32(message.Entity); + /* api.EngineRuleTriggerType TriggerType = 60; */ + if (message.TriggerType !== 0) + writer.tag(60, WireType.Varint).int32(message.TriggerType); + /* api.EngineRuleScheduledTrigger ScheduledTrigger = 70; */ + if (message.Trigger.oneofKind === "ScheduledTrigger") + EngineRuleScheduledTrigger.internalBinaryWrite(message.Trigger.ScheduledTrigger, writer.tag(70, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleEventTrigger EventTrigger = 71; */ + if (message.Trigger.oneofKind === "EventTrigger") + EngineRuleEventTrigger.internalBinaryWrite(message.Trigger.EventTrigger, writer.tag(71, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleMilestoneTrigger MilestoneTrigger = 72; */ + if (message.Trigger.oneofKind === "MilestoneTrigger") + EngineRuleMilestoneTrigger.internalBinaryWrite(message.Trigger.MilestoneTrigger, writer.tag(72, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.EngineRuleCondition Conditions = 80; */ + for (let i = 0; i < message.Conditions.length; i++) + EngineRuleCondition.internalBinaryWrite(message.Conditions[i], writer.tag(80, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.EngineRuleAction Actions = 90; */ + for (let i = 0; i < message.Actions.length; i++) + EngineRuleAction.internalBinaryWrite(message.Actions[i], writer.tag(90, WireType.LengthDelimited).fork(), options).join(); + /* int32 Version = 100; */ + if (message.Version !== 0) + writer.tag(100, WireType.Varint).int32(message.Version); + /* string CreatedBy = 110; */ + if (message.CreatedBy !== "") + writer.tag(110, WireType.LengthDelimited).string(message.CreatedBy); + /* string CreatedAt = 120; */ + if (message.CreatedAt !== "") + writer.tag(120, WireType.LengthDelimited).string(message.CreatedAt); + /* string UpdatedAt = 130; */ + if (message.UpdatedAt !== "") + writer.tag(130, WireType.LengthDelimited).string(message.UpdatedAt); + /* bool IsActive = 140; */ + if (message.IsActive !== false) + writer.tag(140, WireType.Varint).bool(message.IsActive); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRule + */ +export const EngineRule = new EngineRule$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleScheduledTrigger$Type extends MessageType { + constructor() { + super("api.EngineRuleScheduledTrigger", [ + { no: 1, name: "Frequency", kind: "enum", localName: "Frequency", jsonName: "Frequency", T: () => ["api.RuleRecurrenceFrequency", RuleRecurrenceFrequency], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 2, name: "Interval", kind: "scalar", localName: "Interval", jsonName: "Interval", T: 5 /*ScalarType.INT32*/, options: { "n1validate.rules": { int32: { gt: 0 } } } }, + { no: 3, name: "ByDay", kind: "enum", localName: "ByDay", jsonName: "ByDay", repeat: 1 /*RepeatType.PACKED*/, T: () => ["api.WeekDay", WeekDay], options: { "n1validate.rules": { repeated: { items: { enum: { definedOnly: true } } } } } }, + { no: 4, name: "StartDate", kind: "scalar", localName: "StartDate", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } } } }, + { no: 5, name: "AtTime", kind: "scalar", localName: "AtTime", jsonName: "AtTime", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { pattern: "^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Frequency", "Interval", "StartDate", "AtTime"] } } }); + } + create(value?: PartialMessage): EngineRuleScheduledTrigger { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Frequency = 0; + message.Interval = 0; + message.ByDay = []; + message.StartDate = ""; + message.AtTime = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleScheduledTrigger): EngineRuleScheduledTrigger { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RuleRecurrenceFrequency Frequency */ 1: + message.Frequency = reader.int32(); + break; + case /* int32 Interval */ 2: + message.Interval = reader.int32(); + break; + case /* repeated api.WeekDay ByDay */ 3: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.ByDay.push(reader.int32()); + else + message.ByDay.push(reader.int32()); + break; + case /* string StartDate */ 4: + message.StartDate = reader.string(); + break; + case /* string AtTime */ 5: + message.AtTime = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleScheduledTrigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RuleRecurrenceFrequency Frequency = 1; */ + if (message.Frequency !== 0) + writer.tag(1, WireType.Varint).int32(message.Frequency); + /* int32 Interval = 2; */ + if (message.Interval !== 0) + writer.tag(2, WireType.Varint).int32(message.Interval); + /* repeated api.WeekDay ByDay = 3; */ + if (message.ByDay.length) { + writer.tag(3, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.ByDay.length; i++) + writer.int32(message.ByDay[i]); + writer.join(); + } + /* string StartDate = 4; */ + if (message.StartDate !== "") + writer.tag(4, WireType.LengthDelimited).string(message.StartDate); + /* string AtTime = 5; */ + if (message.AtTime !== "") + writer.tag(5, WireType.LengthDelimited).string(message.AtTime); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleScheduledTrigger + */ +export const EngineRuleScheduledTrigger = new EngineRuleScheduledTrigger$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleEventTrigger$Type extends MessageType { + constructor() { + super("api.EngineRuleEventTrigger", [ + { no: 1, name: "Creation", kind: "message", localName: "Creation", jsonName: "Creation", oneof: "Event", T: () => EngineRuleEventTriggerCreation }, + { no: 2, name: "Deletion", kind: "message", localName: "Deletion", jsonName: "Deletion", oneof: "Event", T: () => EngineRuleEventTriggerDeletion }, + { no: 3, name: "StatusChange", kind: "message", localName: "StatusChange", jsonName: "StatusChange", oneof: "Event", T: () => EngineRuleEventTriggerStatusChange } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Event"] } } }); + } + create(value?: PartialMessage): EngineRuleEventTrigger { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Event = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTrigger): EngineRuleEventTrigger { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.EngineRuleEventTriggerCreation Creation */ 1: + message.Event = { + oneofKind: "Creation", + Creation: EngineRuleEventTriggerCreation.internalBinaryRead(reader, reader.uint32(), options, (message.Event as any).Creation) + }; + break; + case /* api.EngineRuleEventTriggerDeletion Deletion */ 2: + message.Event = { + oneofKind: "Deletion", + Deletion: EngineRuleEventTriggerDeletion.internalBinaryRead(reader, reader.uint32(), options, (message.Event as any).Deletion) + }; + break; + case /* api.EngineRuleEventTriggerStatusChange StatusChange */ 3: + message.Event = { + oneofKind: "StatusChange", + StatusChange: EngineRuleEventTriggerStatusChange.internalBinaryRead(reader, reader.uint32(), options, (message.Event as any).StatusChange) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleEventTrigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.EngineRuleEventTriggerCreation Creation = 1; */ + if (message.Event.oneofKind === "Creation") + EngineRuleEventTriggerCreation.internalBinaryWrite(message.Event.Creation, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleEventTriggerDeletion Deletion = 2; */ + if (message.Event.oneofKind === "Deletion") + EngineRuleEventTriggerDeletion.internalBinaryWrite(message.Event.Deletion, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleEventTriggerStatusChange StatusChange = 3; */ + if (message.Event.oneofKind === "StatusChange") + EngineRuleEventTriggerStatusChange.internalBinaryWrite(message.Event.StatusChange, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleEventTrigger + */ +export const EngineRuleEventTrigger = new EngineRuleEventTrigger$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleEventTriggerCreation$Type extends MessageType { + constructor() { + super("api.EngineRuleEventTriggerCreation", []); + } + create(value?: PartialMessage): EngineRuleEventTriggerCreation { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTriggerCreation): EngineRuleEventTriggerCreation { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleEventTriggerCreation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleEventTriggerCreation + */ +export const EngineRuleEventTriggerCreation = new EngineRuleEventTriggerCreation$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleEventTriggerDeletion$Type extends MessageType { + constructor() { + super("api.EngineRuleEventTriggerDeletion", []); + } + create(value?: PartialMessage): EngineRuleEventTriggerDeletion { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTriggerDeletion): EngineRuleEventTriggerDeletion { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleEventTriggerDeletion, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleEventTriggerDeletion + */ +export const EngineRuleEventTriggerDeletion = new EngineRuleEventTriggerDeletion$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleEventTriggerStatusChange$Type extends MessageType { + constructor() { + super("api.EngineRuleEventTriggerStatusChange", [ + { no: 1, name: "OrderStatus", kind: "enum", localName: "OrderStatus", jsonName: "OrderStatus", oneof: "StatusCode", T: () => ["api.OrderStatusCode", OrderStatusCode] }, + { no: 2, name: "HandlingunitStatus", kind: "enum", localName: "HandlingunitStatus", jsonName: "HandlingunitStatus", oneof: "StatusCode", T: () => ["api.HandlingunitStatusCode", HandlingunitStatusCode] }, + { no: 3, name: "AppointmentStatus", kind: "enum", localName: "AppointmentStatus", jsonName: "AppointmentStatus", oneof: "StatusCode", T: () => ["api.AppointmentStatusCode", AppointmentStatusCode] }, + { no: 4, name: "ClaimStatus", kind: "enum", localName: "ClaimStatus", jsonName: "ClaimStatus", oneof: "StatusCode", T: () => ["api.ClaimStatus", ClaimStatus] }, + { no: 5, name: "ActorStatus", kind: "enum", localName: "ActorStatus", jsonName: "ActorStatus", oneof: "StatusCode", T: () => ["api.ActorStatusCode", ActorStatusCode] }, + { no: 6, name: "ItemStatus", kind: "enum", localName: "ItemStatus", jsonName: "ItemStatus", oneof: "StatusCode", T: () => ["api.ItemStatusCode", ItemStatusCode] }, + { no: 7, name: "ExecutionflowStatus", kind: "enum", localName: "ExecutionflowStatus", jsonName: "ExecutionflowStatus", oneof: "StatusCode", T: () => ["api.ExecutionflowStatusCode", ExecutionflowStatusCode] }, + { no: 8, name: "PartnerStatus", kind: "enum", localName: "PartnerStatus", jsonName: "PartnerStatus", oneof: "StatusCode", T: () => ["api.PartnerStatusCode", PartnerStatusCode] }, + { no: 9, name: "StockStatus", kind: "enum", localName: "StockStatus", jsonName: "StockStatus", oneof: "StatusCode", T: () => ["api.StockStatusCode", StockStatusCode] }, + { no: 10, name: "MovementStatus", kind: "enum", localName: "MovementStatus", jsonName: "MovementStatus", oneof: "StatusCode", T: () => ["api.MovementStatusCode", MovementStatusCode] } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["StatusCode"] } } }); + } + create(value?: PartialMessage): EngineRuleEventTriggerStatusChange { + const message = globalThis.Object.create((this.messagePrototype!)); + message.StatusCode = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTriggerStatusChange): EngineRuleEventTriggerStatusChange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.OrderStatusCode OrderStatus */ 1: + message.StatusCode = { + oneofKind: "OrderStatus", + OrderStatus: reader.int32() + }; + break; + case /* api.HandlingunitStatusCode HandlingunitStatus */ 2: + message.StatusCode = { + oneofKind: "HandlingunitStatus", + HandlingunitStatus: reader.int32() + }; + break; + case /* api.AppointmentStatusCode AppointmentStatus */ 3: + message.StatusCode = { + oneofKind: "AppointmentStatus", + AppointmentStatus: reader.int32() + }; + break; + case /* api.ClaimStatus ClaimStatus */ 4: + message.StatusCode = { + oneofKind: "ClaimStatus", + ClaimStatus: reader.int32() + }; + break; + case /* api.ActorStatusCode ActorStatus */ 5: + message.StatusCode = { + oneofKind: "ActorStatus", + ActorStatus: reader.int32() + }; + break; + case /* api.ItemStatusCode ItemStatus */ 6: + message.StatusCode = { + oneofKind: "ItemStatus", + ItemStatus: reader.int32() + }; + break; + case /* api.ExecutionflowStatusCode ExecutionflowStatus */ 7: + message.StatusCode = { + oneofKind: "ExecutionflowStatus", + ExecutionflowStatus: reader.int32() + }; + break; + case /* api.PartnerStatusCode PartnerStatus */ 8: + message.StatusCode = { + oneofKind: "PartnerStatus", + PartnerStatus: reader.int32() + }; + break; + case /* api.StockStatusCode StockStatus */ 9: + message.StatusCode = { + oneofKind: "StockStatus", + StockStatus: reader.int32() + }; + break; + case /* api.MovementStatusCode MovementStatus */ 10: + message.StatusCode = { + oneofKind: "MovementStatus", + MovementStatus: reader.int32() + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleEventTriggerStatusChange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.OrderStatusCode OrderStatus = 1; */ + if (message.StatusCode.oneofKind === "OrderStatus") + writer.tag(1, WireType.Varint).int32(message.StatusCode.OrderStatus); + /* api.HandlingunitStatusCode HandlingunitStatus = 2; */ + if (message.StatusCode.oneofKind === "HandlingunitStatus") + writer.tag(2, WireType.Varint).int32(message.StatusCode.HandlingunitStatus); + /* api.AppointmentStatusCode AppointmentStatus = 3; */ + if (message.StatusCode.oneofKind === "AppointmentStatus") + writer.tag(3, WireType.Varint).int32(message.StatusCode.AppointmentStatus); + /* api.ClaimStatus ClaimStatus = 4; */ + if (message.StatusCode.oneofKind === "ClaimStatus") + writer.tag(4, WireType.Varint).int32(message.StatusCode.ClaimStatus); + /* api.ActorStatusCode ActorStatus = 5; */ + if (message.StatusCode.oneofKind === "ActorStatus") + writer.tag(5, WireType.Varint).int32(message.StatusCode.ActorStatus); + /* api.ItemStatusCode ItemStatus = 6; */ + if (message.StatusCode.oneofKind === "ItemStatus") + writer.tag(6, WireType.Varint).int32(message.StatusCode.ItemStatus); + /* api.ExecutionflowStatusCode ExecutionflowStatus = 7; */ + if (message.StatusCode.oneofKind === "ExecutionflowStatus") + writer.tag(7, WireType.Varint).int32(message.StatusCode.ExecutionflowStatus); + /* api.PartnerStatusCode PartnerStatus = 8; */ + if (message.StatusCode.oneofKind === "PartnerStatus") + writer.tag(8, WireType.Varint).int32(message.StatusCode.PartnerStatus); + /* api.StockStatusCode StockStatus = 9; */ + if (message.StatusCode.oneofKind === "StockStatus") + writer.tag(9, WireType.Varint).int32(message.StatusCode.StockStatus); + /* api.MovementStatusCode MovementStatus = 10; */ + if (message.StatusCode.oneofKind === "MovementStatus") + writer.tag(10, WireType.Varint).int32(message.StatusCode.MovementStatus); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleEventTriggerStatusChange + */ +export const EngineRuleEventTriggerStatusChange = new EngineRuleEventTriggerStatusChange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleMilestoneTrigger$Type extends MessageType { + constructor() { + super("api.EngineRuleMilestoneTrigger", [ + { no: 1, name: "MilestoneField", kind: "scalar", localName: "MilestoneField", jsonName: "MilestoneField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["MilestoneField"] } } }); + } + create(value?: PartialMessage): EngineRuleMilestoneTrigger { + const message = globalThis.Object.create((this.messagePrototype!)); + message.MilestoneField = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleMilestoneTrigger): EngineRuleMilestoneTrigger { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string MilestoneField */ 1: + message.MilestoneField = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleMilestoneTrigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string MilestoneField = 1; */ + if (message.MilestoneField !== "") + writer.tag(1, WireType.LengthDelimited).string(message.MilestoneField); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleMilestoneTrigger + */ +export const EngineRuleMilestoneTrigger = new EngineRuleMilestoneTrigger$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleCondition$Type extends MessageType { + constructor() { + super("api.EngineRuleCondition", [ + { no: 10, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", oneof: "Criteria", T: 9 /*ScalarType.STRING*/ }, + { no: 11, name: "Collection", kind: "message", localName: "Collection", jsonName: "Collection", oneof: "Criteria", T: () => EngineRuleConditionCollectionCriteria }, + { no: 12, name: "Aggregate", kind: "message", localName: "Aggregate", jsonName: "Aggregate", oneof: "Criteria", T: () => EngineRuleConditionAggregateCriteria }, + { no: 20, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.EngineRuleConditionOperator", EngineRuleConditionOperator], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 31, name: "LiteralValue", kind: "message", localName: "LiteralValue", jsonName: "LiteralValue", oneof: "Value", T: () => EngineRuleLiteral }, + { no: 32, name: "LiteralListValue", kind: "message", localName: "LiteralListValue", jsonName: "LiteralListValue", oneof: "Value", T: () => EngineRuleLiteralList }, + { no: 33, name: "FieldRefValue", kind: "message", localName: "FieldRefValue", jsonName: "FieldRefValue", oneof: "Value", T: () => EngineRuleFieldRef }, + { no: 34, name: "ComputedValue", kind: "message", localName: "ComputedValue", jsonName: "ComputedValue", oneof: "Value", T: () => EngineRuleComputedRef }, + { no: 35, name: "MappingValue", kind: "message", localName: "MappingValue", jsonName: "MappingValue", oneof: "Value", T: () => EngineRuleMappingRef } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Operator", "Criteria", "Value"] } } }); + } + create(value?: PartialMessage): EngineRuleCondition { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Criteria = { oneofKind: undefined }; + message.Operator = 0; + message.Value = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleCondition): EngineRuleCondition { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Field */ 10: + message.Criteria = { + oneofKind: "Field", + Field: reader.string() + }; + break; + case /* api.EngineRuleConditionCollectionCriteria Collection */ 11: + message.Criteria = { + oneofKind: "Collection", + Collection: EngineRuleConditionCollectionCriteria.internalBinaryRead(reader, reader.uint32(), options, (message.Criteria as any).Collection) + }; + break; + case /* api.EngineRuleConditionAggregateCriteria Aggregate */ 12: + message.Criteria = { + oneofKind: "Aggregate", + Aggregate: EngineRuleConditionAggregateCriteria.internalBinaryRead(reader, reader.uint32(), options, (message.Criteria as any).Aggregate) + }; + break; + case /* api.EngineRuleConditionOperator Operator */ 20: + message.Operator = reader.int32(); + break; + case /* api.EngineRuleLiteral LiteralValue */ 31: + message.Value = { + oneofKind: "LiteralValue", + LiteralValue: EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralValue) + }; + break; + case /* api.EngineRuleLiteralList LiteralListValue */ 32: + message.Value = { + oneofKind: "LiteralListValue", + LiteralListValue: EngineRuleLiteralList.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralListValue) + }; + break; + case /* api.EngineRuleFieldRef FieldRefValue */ 33: + message.Value = { + oneofKind: "FieldRefValue", + FieldRefValue: EngineRuleFieldRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).FieldRefValue) + }; + break; + case /* api.EngineRuleComputedRef ComputedValue */ 34: + message.Value = { + oneofKind: "ComputedValue", + ComputedValue: EngineRuleComputedRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).ComputedValue) + }; + break; + case /* api.EngineRuleMappingRef MappingValue */ 35: + message.Value = { + oneofKind: "MappingValue", + MappingValue: EngineRuleMappingRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).MappingValue) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleCondition, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Field = 10; */ + if (message.Criteria.oneofKind === "Field") + writer.tag(10, WireType.LengthDelimited).string(message.Criteria.Field); + /* api.EngineRuleConditionCollectionCriteria Collection = 11; */ + if (message.Criteria.oneofKind === "Collection") + EngineRuleConditionCollectionCriteria.internalBinaryWrite(message.Criteria.Collection, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleConditionAggregateCriteria Aggregate = 12; */ + if (message.Criteria.oneofKind === "Aggregate") + EngineRuleConditionAggregateCriteria.internalBinaryWrite(message.Criteria.Aggregate, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleConditionOperator Operator = 20; */ + if (message.Operator !== 0) + writer.tag(20, WireType.Varint).int32(message.Operator); + /* api.EngineRuleLiteral LiteralValue = 31; */ + if (message.Value.oneofKind === "LiteralValue") + EngineRuleLiteral.internalBinaryWrite(message.Value.LiteralValue, writer.tag(31, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleLiteralList LiteralListValue = 32; */ + if (message.Value.oneofKind === "LiteralListValue") + EngineRuleLiteralList.internalBinaryWrite(message.Value.LiteralListValue, writer.tag(32, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleFieldRef FieldRefValue = 33; */ + if (message.Value.oneofKind === "FieldRefValue") + EngineRuleFieldRef.internalBinaryWrite(message.Value.FieldRefValue, writer.tag(33, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleComputedRef ComputedValue = 34; */ + if (message.Value.oneofKind === "ComputedValue") + EngineRuleComputedRef.internalBinaryWrite(message.Value.ComputedValue, writer.tag(34, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleMappingRef MappingValue = 35; */ + if (message.Value.oneofKind === "MappingValue") + EngineRuleMappingRef.internalBinaryWrite(message.Value.MappingValue, writer.tag(35, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleCondition + */ +export const EngineRuleCondition = new EngineRuleCondition$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleConditionCollectionCriteria$Type extends MessageType { + constructor() { + super("api.EngineRuleConditionCollectionCriteria", [ + { no: 1, name: "CollectionPath", kind: "scalar", localName: "CollectionPath", jsonName: "CollectionPath", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "ElementField", kind: "scalar", localName: "ElementField", jsonName: "ElementField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 3, name: "Quantifier", kind: "enum", localName: "Quantifier", jsonName: "Quantifier", T: () => ["api.EngineRuleConditionQuantifier", EngineRuleConditionQuantifier], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["CollectionPath", "ElementField", "Quantifier"] } } }); + } + create(value?: PartialMessage): EngineRuleConditionCollectionCriteria { + const message = globalThis.Object.create((this.messagePrototype!)); + message.CollectionPath = ""; + message.ElementField = ""; + message.Quantifier = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleConditionCollectionCriteria): EngineRuleConditionCollectionCriteria { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string CollectionPath */ 1: + message.CollectionPath = reader.string(); + break; + case /* string ElementField */ 2: + message.ElementField = reader.string(); + break; + case /* api.EngineRuleConditionQuantifier Quantifier */ 3: + message.Quantifier = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleConditionCollectionCriteria, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string CollectionPath = 1; */ + if (message.CollectionPath !== "") + writer.tag(1, WireType.LengthDelimited).string(message.CollectionPath); + /* string ElementField = 2; */ + if (message.ElementField !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ElementField); + /* api.EngineRuleConditionQuantifier Quantifier = 3; */ + if (message.Quantifier !== 0) + writer.tag(3, WireType.Varint).int32(message.Quantifier); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleConditionCollectionCriteria + */ +export const EngineRuleConditionCollectionCriteria = new EngineRuleConditionCollectionCriteria$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleConditionAggregateCriteria$Type extends MessageType { + constructor() { + super("api.EngineRuleConditionAggregateCriteria", [ + { no: 1, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "AggregateFunction", kind: "enum", localName: "AggregateFunction", jsonName: "AggregateFunction", T: () => ["api.EngineRuleConditionAggregateFunction", EngineRuleConditionAggregateFunction], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["AggregateFunction"] } } }); + } + create(value?: PartialMessage): EngineRuleConditionAggregateCriteria { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Field = ""; + message.AggregateFunction = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleConditionAggregateCriteria): EngineRuleConditionAggregateCriteria { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Field */ 1: + message.Field = reader.string(); + break; + case /* api.EngineRuleConditionAggregateFunction AggregateFunction */ 2: + message.AggregateFunction = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleConditionAggregateCriteria, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Field = 1; */ + if (message.Field !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Field); + /* api.EngineRuleConditionAggregateFunction AggregateFunction = 2; */ + if (message.AggregateFunction !== 0) + writer.tag(2, WireType.Varint).int32(message.AggregateFunction); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleConditionAggregateCriteria + */ +export const EngineRuleConditionAggregateCriteria = new EngineRuleConditionAggregateCriteria$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleLiteral$Type extends MessageType { + constructor() { + super("api.EngineRuleLiteral", [ + { no: 1, name: "Integer", kind: "scalar", localName: "Integer", jsonName: "Integer", oneof: "Literal", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "Decimal", kind: "scalar", localName: "Decimal", jsonName: "Decimal", oneof: "Literal", T: 2 /*ScalarType.FLOAT*/ }, + { no: 3, name: "String", kind: "scalar", localName: "String", jsonName: "String", oneof: "Literal", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "Boolean", kind: "scalar", localName: "Boolean", jsonName: "Boolean", oneof: "Literal", T: 8 /*ScalarType.BOOL*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Literal"] } } }); + } + create(value?: PartialMessage): EngineRuleLiteral { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Literal = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleLiteral): EngineRuleLiteral { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 Integer */ 1: + message.Literal = { + oneofKind: "Integer", + Integer: reader.int64().toBigInt() + }; + break; + case /* float Decimal */ 2: + message.Literal = { + oneofKind: "Decimal", + Decimal: reader.float() + }; + break; + case /* string String */ 3: + message.Literal = { + oneofKind: "String", + String: reader.string() + }; + break; + case /* bool Boolean */ 4: + message.Literal = { + oneofKind: "Boolean", + Boolean: reader.bool() + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleLiteral, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int64 Integer = 1; */ + if (message.Literal.oneofKind === "Integer") + writer.tag(1, WireType.Varint).int64(message.Literal.Integer); + /* float Decimal = 2; */ + if (message.Literal.oneofKind === "Decimal") + writer.tag(2, WireType.Bit32).float(message.Literal.Decimal); + /* string String = 3; */ + if (message.Literal.oneofKind === "String") + writer.tag(3, WireType.LengthDelimited).string(message.Literal.String); + /* bool Boolean = 4; */ + if (message.Literal.oneofKind === "Boolean") + writer.tag(4, WireType.Varint).bool(message.Literal.Boolean); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleLiteral + */ +export const EngineRuleLiteral = new EngineRuleLiteral$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleLiteralList$Type extends MessageType { + constructor() { + super("api.EngineRuleLiteralList", [ + { no: 1, name: "Items", kind: "message", localName: "Items", jsonName: "Items", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleLiteral, options: { "n1validate.rules": { repeated: { minItems: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Items"] } } }); + } + create(value?: PartialMessage): EngineRuleLiteralList { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Items = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleLiteralList): EngineRuleLiteralList { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated api.EngineRuleLiteral Items */ 1: + message.Items.push(EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleLiteralList, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated api.EngineRuleLiteral Items = 1; */ + for (let i = 0; i < message.Items.length; i++) + EngineRuleLiteral.internalBinaryWrite(message.Items[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleLiteralList + */ +export const EngineRuleLiteralList = new EngineRuleLiteralList$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleFieldRef$Type extends MessageType { + constructor() { + super("api.EngineRuleFieldRef", [ + { no: 1, name: "Path", kind: "scalar", localName: "Path", jsonName: "Path", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "Scope", kind: "enum", localName: "Scope", jsonName: "Scope", T: () => ["api.EngineRuleFieldRefScope", EngineRuleFieldRefScope], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Path", "Scope"] } } }); + } + create(value?: PartialMessage): EngineRuleFieldRef { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Path = ""; + message.Scope = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleFieldRef): EngineRuleFieldRef { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Path */ 1: + message.Path = reader.string(); + break; + case /* api.EngineRuleFieldRefScope Scope */ 2: + message.Scope = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleFieldRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Path = 1; */ + if (message.Path !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Path); + /* api.EngineRuleFieldRefScope Scope = 2; */ + if (message.Scope !== 0) + writer.tag(2, WireType.Varint).int32(message.Scope); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleFieldRef + */ +export const EngineRuleFieldRef = new EngineRuleFieldRef$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleComputedRef$Type extends MessageType { + constructor() { + super("api.EngineRuleComputedRef", [ + { no: 1, name: "ComputationID", kind: "scalar", localName: "ComputationID", jsonName: "ComputationID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ComputationID"] } } }); + } + create(value?: PartialMessage): EngineRuleComputedRef { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ComputationID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleComputedRef): EngineRuleComputedRef { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ComputationID */ 1: + message.ComputationID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleComputedRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ComputationID = 1; */ + if (message.ComputationID !== "") + writer.tag(1, WireType.LengthDelimited).string(message.ComputationID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleComputedRef + */ +export const EngineRuleComputedRef = new EngineRuleComputedRef$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleMappingRef$Type extends MessageType { + constructor() { + super("api.EngineRuleMappingRef", [ + { no: 1, name: "MappingID", kind: "scalar", localName: "MappingID", jsonName: "MappingID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["MappingID"] } } }); + } + create(value?: PartialMessage): EngineRuleMappingRef { + const message = globalThis.Object.create((this.messagePrototype!)); + message.MappingID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleMappingRef): EngineRuleMappingRef { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string MappingID */ 1: + message.MappingID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleMappingRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string MappingID = 1; */ + if (message.MappingID !== "") + writer.tag(1, WireType.LengthDelimited).string(message.MappingID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleMappingRef + */ +export const EngineRuleMappingRef = new EngineRuleMappingRef$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleAction$Type extends MessageType { + constructor() { + super("api.EngineRuleAction", [ + { no: 1, name: "CreateClaim", kind: "message", localName: "CreateClaim", jsonName: "CreateClaim", oneof: "Action", T: () => EngineRuleActionCreateClaim }, + { no: 2, name: "UpdateMetadata", kind: "message", localName: "UpdateMetadata", jsonName: "UpdateMetadata", oneof: "Action", T: () => EngineRuleActionUpdateMetadata }, + { no: 3, name: "CreateAlert", kind: "message", localName: "CreateAlert", jsonName: "CreateAlert", oneof: "Action", T: () => EngineRuleActionCreateAlert } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Action"] } } }); + } + create(value?: PartialMessage): EngineRuleAction { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Action = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleAction): EngineRuleAction { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.EngineRuleActionCreateClaim CreateClaim */ 1: + message.Action = { + oneofKind: "CreateClaim", + CreateClaim: EngineRuleActionCreateClaim.internalBinaryRead(reader, reader.uint32(), options, (message.Action as any).CreateClaim) + }; + break; + case /* api.EngineRuleActionUpdateMetadata UpdateMetadata */ 2: + message.Action = { + oneofKind: "UpdateMetadata", + UpdateMetadata: EngineRuleActionUpdateMetadata.internalBinaryRead(reader, reader.uint32(), options, (message.Action as any).UpdateMetadata) + }; + break; + case /* api.EngineRuleActionCreateAlert CreateAlert */ 3: + message.Action = { + oneofKind: "CreateAlert", + CreateAlert: EngineRuleActionCreateAlert.internalBinaryRead(reader, reader.uint32(), options, (message.Action as any).CreateAlert) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleAction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.EngineRuleActionCreateClaim CreateClaim = 1; */ + if (message.Action.oneofKind === "CreateClaim") + EngineRuleActionCreateClaim.internalBinaryWrite(message.Action.CreateClaim, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleActionUpdateMetadata UpdateMetadata = 2; */ + if (message.Action.oneofKind === "UpdateMetadata") + EngineRuleActionUpdateMetadata.internalBinaryWrite(message.Action.UpdateMetadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleActionCreateAlert CreateAlert = 3; */ + if (message.Action.oneofKind === "CreateAlert") + EngineRuleActionCreateAlert.internalBinaryWrite(message.Action.CreateAlert, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleAction + */ +export const EngineRuleAction = new EngineRuleAction$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleActionCreateClaim$Type extends MessageType { + constructor() { + super("api.EngineRuleActionCreateClaim", [ + { no: 1, name: "ClaimTypeID", kind: "scalar", localName: "ClaimTypeID", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ClaimTypeID"] } } }); + } + create(value?: PartialMessage): EngineRuleActionCreateClaim { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ClaimTypeID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionCreateClaim): EngineRuleActionCreateClaim { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ClaimTypeID */ 1: + message.ClaimTypeID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleActionCreateClaim, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ClaimTypeID = 1; */ + if (message.ClaimTypeID !== "") + writer.tag(1, WireType.LengthDelimited).string(message.ClaimTypeID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleActionCreateClaim + */ +export const EngineRuleActionCreateClaim = new EngineRuleActionCreateClaim$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleActionUpdateMetadata$Type extends MessageType { + constructor() { + super("api.EngineRuleActionUpdateMetadata", [ + { no: 1, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "Value", kind: "message", localName: "Value", jsonName: "Value", T: () => EngineRuleActionAttributeValue, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Field", "Value"] } } }); + } + create(value?: PartialMessage): EngineRuleActionUpdateMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Field = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionUpdateMetadata): EngineRuleActionUpdateMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Field */ 1: + message.Field = reader.string(); + break; + case /* api.EngineRuleActionAttributeValue Value */ 2: + message.Value = EngineRuleActionAttributeValue.internalBinaryRead(reader, reader.uint32(), options, message.Value); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleActionUpdateMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Field = 1; */ + if (message.Field !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Field); + /* api.EngineRuleActionAttributeValue Value = 2; */ + if (message.Value) + EngineRuleActionAttributeValue.internalBinaryWrite(message.Value, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleActionUpdateMetadata + */ +export const EngineRuleActionUpdateMetadata = new EngineRuleActionUpdateMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleActionCreateAlert$Type extends MessageType { + constructor() { + super("api.EngineRuleActionCreateAlert", [ + { no: 1, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label"] } } }); + } + create(value?: PartialMessage): EngineRuleActionCreateAlert { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Label = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionCreateAlert): EngineRuleActionCreateAlert { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Label */ 1: + message.Label = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleActionCreateAlert, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Label = 1; */ + if (message.Label !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Label); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleActionCreateAlert + */ +export const EngineRuleActionCreateAlert = new EngineRuleActionCreateAlert$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EngineRuleActionAttributeValue$Type extends MessageType { + constructor() { + super("api.EngineRuleActionAttributeValue", [ + { no: 1, name: "LiteralValue", kind: "message", localName: "LiteralValue", jsonName: "LiteralValue", oneof: "Value", T: () => EngineRuleLiteral }, + { no: 2, name: "ComputedValue", kind: "message", localName: "ComputedValue", jsonName: "ComputedValue", oneof: "Value", T: () => EngineRuleComputedRef }, + { no: 3, name: "MappingValue", kind: "message", localName: "MappingValue", jsonName: "MappingValue", oneof: "Value", T: () => EngineRuleMappingRef } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Value"] } } }); + } + create(value?: PartialMessage): EngineRuleActionAttributeValue { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Value = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionAttributeValue): EngineRuleActionAttributeValue { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.EngineRuleLiteral LiteralValue */ 1: + message.Value = { + oneofKind: "LiteralValue", + LiteralValue: EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralValue) + }; + break; + case /* api.EngineRuleComputedRef ComputedValue */ 2: + message.Value = { + oneofKind: "ComputedValue", + ComputedValue: EngineRuleComputedRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).ComputedValue) + }; + break; + case /* api.EngineRuleMappingRef MappingValue */ 3: + message.Value = { + oneofKind: "MappingValue", + MappingValue: EngineRuleMappingRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).MappingValue) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EngineRuleActionAttributeValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.EngineRuleLiteral LiteralValue = 1; */ + if (message.Value.oneofKind === "LiteralValue") + EngineRuleLiteral.internalBinaryWrite(message.Value.LiteralValue, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleComputedRef ComputedValue = 2; */ + if (message.Value.oneofKind === "ComputedValue") + EngineRuleComputedRef.internalBinaryWrite(message.Value.ComputedValue, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleMappingRef MappingValue = 3; */ + if (message.Value.oneofKind === "MappingValue") + EngineRuleMappingRef.internalBinaryWrite(message.Value.MappingValue, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.EngineRuleActionAttributeValue + */ +export const EngineRuleActionAttributeValue = new EngineRuleActionAttributeValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Computation$Type extends MessageType { + constructor() { + super("api.Computation", [ + { no: 10, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ }, + { no: 20, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/ }, + { no: 30, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 40, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 50, name: "DateDuration", kind: "message", localName: "DateDuration", jsonName: "DateDuration", oneof: "Type", T: () => ComputationDateDuration }, + { no: 51, name: "DueDate", kind: "message", localName: "DueDate", jsonName: "DueDate", oneof: "Type", T: () => ComputationDueDate }, + { no: 52, name: "StatusDuration", kind: "message", localName: "StatusDuration", jsonName: "StatusDuration", oneof: "Type", T: () => ComputationStatusDuration }, + { no: 53, name: "CustomFunction", kind: "message", localName: "CustomFunction", jsonName: "CustomFunction", oneof: "Type", T: () => ComputationCustomFunction } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label", "Entity", "Type"] } } }); + } + create(value?: PartialMessage): Computation { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ProjectID = ""; + message.ID = ""; + message.Label = ""; + message.Entity = 0; + message.Type = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Computation): Computation { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ProjectID */ 10: + message.ProjectID = reader.string(); + break; + case /* string ID */ 20: + message.ID = reader.string(); + break; + case /* string Label */ 30: + message.Label = reader.string(); + break; + case /* api.EntityType Entity */ 40: + message.Entity = reader.int32(); + break; + case /* api.ComputationDateDuration DateDuration */ 50: + message.Type = { + oneofKind: "DateDuration", + DateDuration: ComputationDateDuration.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).DateDuration) + }; + break; + case /* api.ComputationDueDate DueDate */ 51: + message.Type = { + oneofKind: "DueDate", + DueDate: ComputationDueDate.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).DueDate) + }; + break; + case /* api.ComputationStatusDuration StatusDuration */ 52: + message.Type = { + oneofKind: "StatusDuration", + StatusDuration: ComputationStatusDuration.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).StatusDuration) + }; + break; + case /* api.ComputationCustomFunction CustomFunction */ 53: + message.Type = { + oneofKind: "CustomFunction", + CustomFunction: ComputationCustomFunction.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).CustomFunction) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Computation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ProjectID = 10; */ + if (message.ProjectID !== "") + writer.tag(10, WireType.LengthDelimited).string(message.ProjectID); + /* string ID = 20; */ + if (message.ID !== "") + writer.tag(20, WireType.LengthDelimited).string(message.ID); + /* string Label = 30; */ + if (message.Label !== "") + writer.tag(30, WireType.LengthDelimited).string(message.Label); + /* api.EntityType Entity = 40; */ + if (message.Entity !== 0) + writer.tag(40, WireType.Varint).int32(message.Entity); + /* api.ComputationDateDuration DateDuration = 50; */ + if (message.Type.oneofKind === "DateDuration") + ComputationDateDuration.internalBinaryWrite(message.Type.DateDuration, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationDueDate DueDate = 51; */ + if (message.Type.oneofKind === "DueDate") + ComputationDueDate.internalBinaryWrite(message.Type.DueDate, writer.tag(51, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationStatusDuration StatusDuration = 52; */ + if (message.Type.oneofKind === "StatusDuration") + ComputationStatusDuration.internalBinaryWrite(message.Type.StatusDuration, writer.tag(52, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationCustomFunction CustomFunction = 53; */ + if (message.Type.oneofKind === "CustomFunction") + ComputationCustomFunction.internalBinaryWrite(message.Type.CustomFunction, writer.tag(53, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.Computation + */ +export const Computation = new Computation$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ComputationDateDuration$Type extends MessageType { + constructor() { + super("api.ComputationDateDuration", [ + { no: 1, name: "StartDateField", kind: "scalar", localName: "StartDateField", jsonName: "StartDateField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "EndDateField", kind: "scalar", localName: "EndDateField", jsonName: "EndDateField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 3, name: "DurationFormat", kind: "message", localName: "DurationFormat", jsonName: "DurationFormat", T: () => ComputationDurationFormat, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["StartDateField", "EndDateField", "DurationFormat"] } } }); + } + create(value?: PartialMessage): ComputationDateDuration { + const message = globalThis.Object.create((this.messagePrototype!)); + message.StartDateField = ""; + message.EndDateField = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationDateDuration): ComputationDateDuration { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string StartDateField */ 1: + message.StartDateField = reader.string(); + break; + case /* string EndDateField */ 2: + message.EndDateField = reader.string(); + break; + case /* api.ComputationDurationFormat DurationFormat */ 3: + message.DurationFormat = ComputationDurationFormat.internalBinaryRead(reader, reader.uint32(), options, message.DurationFormat); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ComputationDateDuration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string StartDateField = 1; */ + if (message.StartDateField !== "") + writer.tag(1, WireType.LengthDelimited).string(message.StartDateField); + /* string EndDateField = 2; */ + if (message.EndDateField !== "") + writer.tag(2, WireType.LengthDelimited).string(message.EndDateField); + /* api.ComputationDurationFormat DurationFormat = 3; */ + if (message.DurationFormat) + ComputationDurationFormat.internalBinaryWrite(message.DurationFormat, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ComputationDateDuration + */ +export const ComputationDateDuration = new ComputationDateDuration$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ComputationDueDate$Type extends MessageType { + constructor() { + super("api.ComputationDueDate", [ + { no: 10, name: "ReferenceDateField", kind: "scalar", localName: "ReferenceDateField", jsonName: "ReferenceDateField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 20, name: "ComputationType", kind: "enum", localName: "ComputationType", jsonName: "ComputationType", T: () => ["api.ComputationDueDateComputationType", ComputationDueDateComputationType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 31, name: "Duration", kind: "scalar", localName: "Duration", jsonName: "Duration", oneof: "Value", T: 13 /*ScalarType.UINT32*/ }, + { no: 32, name: "MappingValue", kind: "message", localName: "MappingValue", jsonName: "MappingValue", oneof: "Value", T: () => EngineRuleMappingRef }, + { no: 40, name: "DurationFormat", kind: "message", localName: "DurationFormat", jsonName: "DurationFormat", T: () => ComputationDurationFormat, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ReferenceDateField", "ComputationType", "Value", "DurationFormat"] } } }); + } + create(value?: PartialMessage): ComputationDueDate { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ReferenceDateField = ""; + message.ComputationType = 0; + message.Value = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationDueDate): ComputationDueDate { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ReferenceDateField */ 10: + message.ReferenceDateField = reader.string(); + break; + case /* api.ComputationDueDateComputationType ComputationType */ 20: + message.ComputationType = reader.int32(); + break; + case /* uint32 Duration */ 31: + message.Value = { + oneofKind: "Duration", + Duration: reader.uint32() + }; + break; + case /* api.EngineRuleMappingRef MappingValue */ 32: + message.Value = { + oneofKind: "MappingValue", + MappingValue: EngineRuleMappingRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).MappingValue) + }; + break; + case /* api.ComputationDurationFormat DurationFormat */ 40: + message.DurationFormat = ComputationDurationFormat.internalBinaryRead(reader, reader.uint32(), options, message.DurationFormat); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ComputationDueDate, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ReferenceDateField = 10; */ + if (message.ReferenceDateField !== "") + writer.tag(10, WireType.LengthDelimited).string(message.ReferenceDateField); + /* api.ComputationDueDateComputationType ComputationType = 20; */ + if (message.ComputationType !== 0) + writer.tag(20, WireType.Varint).int32(message.ComputationType); + /* uint32 Duration = 31; */ + if (message.Value.oneofKind === "Duration") + writer.tag(31, WireType.Varint).uint32(message.Value.Duration); + /* api.EngineRuleMappingRef MappingValue = 32; */ + if (message.Value.oneofKind === "MappingValue") + EngineRuleMappingRef.internalBinaryWrite(message.Value.MappingValue, writer.tag(32, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationDurationFormat DurationFormat = 40; */ + if (message.DurationFormat) + ComputationDurationFormat.internalBinaryWrite(message.DurationFormat, writer.tag(40, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ComputationDueDate + */ +export const ComputationDueDate = new ComputationDueDate$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ComputationStatusDuration$Type extends MessageType { + constructor() { + super("api.ComputationStatusDuration", [ + { no: 1, name: "StatusCodes", kind: "scalar", localName: "StatusCodes", jsonName: "StatusCodes", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }, + { no: 2, name: "DurationFormat", kind: "message", localName: "DurationFormat", jsonName: "DurationFormat", T: () => ComputationDurationFormat, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["StatusCodes", "DurationFormat"] } } }); + } + create(value?: PartialMessage): ComputationStatusDuration { + const message = globalThis.Object.create((this.messagePrototype!)); + message.StatusCodes = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationStatusDuration): ComputationStatusDuration { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated string StatusCodes */ 1: + message.StatusCodes.push(reader.string()); + break; + case /* api.ComputationDurationFormat DurationFormat */ 2: + message.DurationFormat = ComputationDurationFormat.internalBinaryRead(reader, reader.uint32(), options, message.DurationFormat); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ComputationStatusDuration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated string StatusCodes = 1; */ + for (let i = 0; i < message.StatusCodes.length; i++) + writer.tag(1, WireType.LengthDelimited).string(message.StatusCodes[i]); + /* api.ComputationDurationFormat DurationFormat = 2; */ + if (message.DurationFormat) + ComputationDurationFormat.internalBinaryWrite(message.DurationFormat, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ComputationStatusDuration + */ +export const ComputationStatusDuration = new ComputationStatusDuration$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ComputationDurationFormat$Type extends MessageType { + constructor() { + super("api.ComputationDurationFormat", [ + { no: 1, name: "Format", kind: "enum", localName: "Format", jsonName: "Format", T: () => ["api.DurationFormat", DurationFormat], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 2, name: "CalendarID", kind: "scalar", localName: "CalendarID", jsonName: "CalendarID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 3, name: "Rounding", kind: "enum", localName: "Rounding", jsonName: "Rounding", T: () => ["api.DurationRounding", DurationRounding], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 4, name: "RoundingValue", kind: "scalar", localName: "RoundingValue", jsonName: "RoundingValue", T: 9 /*ScalarType.STRING*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Format", "Rounding", "CalendarID"] } } }); + } + create(value?: PartialMessage): ComputationDurationFormat { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Format = 0; + message.CalendarID = ""; + message.Rounding = 0; + message.RoundingValue = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationDurationFormat): ComputationDurationFormat { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.DurationFormat Format */ 1: + message.Format = reader.int32(); + break; + case /* string CalendarID */ 2: + message.CalendarID = reader.string(); + break; + case /* api.DurationRounding Rounding */ 3: + message.Rounding = reader.int32(); + break; + case /* string RoundingValue */ 4: + message.RoundingValue = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ComputationDurationFormat, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.DurationFormat Format = 1; */ + if (message.Format !== 0) + writer.tag(1, WireType.Varint).int32(message.Format); + /* string CalendarID = 2; */ + if (message.CalendarID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.CalendarID); + /* api.DurationRounding Rounding = 3; */ + if (message.Rounding !== 0) + writer.tag(3, WireType.Varint).int32(message.Rounding); + /* string RoundingValue = 4; */ + if (message.RoundingValue !== "") + writer.tag(4, WireType.LengthDelimited).string(message.RoundingValue); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ComputationDurationFormat + */ +export const ComputationDurationFormat = new ComputationDurationFormat$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ComputationCustomFunction$Type extends MessageType { + constructor() { + super("api.ComputationCustomFunction", [ + { no: 1, name: "LeftField", kind: "scalar", localName: "LeftField", jsonName: "LeftField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.ComputationCustomFunctionOperator", ComputationCustomFunctionOperator], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 3, name: "RightField", kind: "scalar", localName: "RightField", jsonName: "RightField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 4, name: "Format", kind: "message", localName: "Format", jsonName: "Format", T: () => ComputationCustomFunctionFormat, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["LeftField", "Operator", "RightField", "Format"] } } }); + } + create(value?: PartialMessage): ComputationCustomFunction { + const message = globalThis.Object.create((this.messagePrototype!)); + message.LeftField = ""; + message.Operator = 0; + message.RightField = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationCustomFunction): ComputationCustomFunction { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string LeftField */ 1: + message.LeftField = reader.string(); + break; + case /* api.ComputationCustomFunctionOperator Operator */ 2: + message.Operator = reader.int32(); + break; + case /* string RightField */ 3: + message.RightField = reader.string(); + break; + case /* api.ComputationCustomFunctionFormat Format */ 4: + message.Format = ComputationCustomFunctionFormat.internalBinaryRead(reader, reader.uint32(), options, message.Format); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ComputationCustomFunction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string LeftField = 1; */ + if (message.LeftField !== "") + writer.tag(1, WireType.LengthDelimited).string(message.LeftField); + /* api.ComputationCustomFunctionOperator Operator = 2; */ + if (message.Operator !== 0) + writer.tag(2, WireType.Varint).int32(message.Operator); + /* string RightField = 3; */ + if (message.RightField !== "") + writer.tag(3, WireType.LengthDelimited).string(message.RightField); + /* api.ComputationCustomFunctionFormat Format = 4; */ + if (message.Format) + ComputationCustomFunctionFormat.internalBinaryWrite(message.Format, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ComputationCustomFunction + */ +export const ComputationCustomFunction = new ComputationCustomFunction$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ComputationCustomFunctionFormat$Type extends MessageType { + constructor() { + super("api.ComputationCustomFunctionFormat", [ + { no: 1, name: "Format", kind: "enum", localName: "Format", jsonName: "Format", T: () => ["api.CustomFunctionFormat", CustomFunctionFormat], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 2, name: "Precision", kind: "scalar", localName: "Precision", jsonName: "Precision", T: 13 /*ScalarType.UINT32*/, options: { "n1validate.rules": { uint32: { gte: 0 } } } }, + { no: 3, name: "Rounding", kind: "enum", localName: "Rounding", jsonName: "Rounding", T: () => ["api.CustomFunctionRounding", CustomFunctionRounding], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Format", "Rounding", "Precision"] } } }); + } + create(value?: PartialMessage): ComputationCustomFunctionFormat { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Format = 0; + message.Precision = 0; + message.Rounding = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationCustomFunctionFormat): ComputationCustomFunctionFormat { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.CustomFunctionFormat Format */ 1: + message.Format = reader.int32(); + break; + case /* uint32 Precision */ 2: + message.Precision = reader.uint32(); + break; + case /* api.CustomFunctionRounding Rounding */ 3: + message.Rounding = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ComputationCustomFunctionFormat, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.CustomFunctionFormat Format = 1; */ + if (message.Format !== 0) + writer.tag(1, WireType.Varint).int32(message.Format); + /* uint32 Precision = 2; */ + if (message.Precision !== 0) + writer.tag(2, WireType.Varint).uint32(message.Precision); + /* api.CustomFunctionRounding Rounding = 3; */ + if (message.Rounding !== 0) + writer.tag(3, WireType.Varint).int32(message.Rounding); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ComputationCustomFunctionFormat + */ +export const ComputationCustomFunctionFormat = new ComputationCustomFunctionFormat$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MappingTable$Type extends MessageType { + constructor() { + super("api.MappingTable", [ + { no: 10, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ }, + { no: 20, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 30, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 40, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 50, name: "InputFields", kind: "message", localName: "InputFields", jsonName: "InputFields", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableInputDescription, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }, + { no: 60, name: "OutputField", kind: "message", localName: "OutputField", jsonName: "OutputField", T: () => MappingTableOutputField, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 70, name: "Entries", kind: "message", localName: "Entries", jsonName: "Entries", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableEntry, options: { "n1validate.rules": { repeated: { minItems: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label", "InputFields", "OutputField", "Entries", "Entity"] } } }); + } + create(value?: PartialMessage): MappingTable { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ProjectID = ""; + message.ID = ""; + message.Label = ""; + message.Entity = 0; + message.InputFields = []; + message.Entries = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTable): MappingTable { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ProjectID */ 10: + message.ProjectID = reader.string(); + break; + case /* string ID */ 20: + message.ID = reader.string(); + break; + case /* string Label */ 30: + message.Label = reader.string(); + break; + case /* api.EntityType Entity */ 40: + message.Entity = reader.int32(); + break; + case /* repeated api.MappingTableInputDescription InputFields */ 50: + message.InputFields.push(MappingTableInputDescription.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* api.MappingTableOutputField OutputField */ 60: + message.OutputField = MappingTableOutputField.internalBinaryRead(reader, reader.uint32(), options, message.OutputField); + break; + case /* repeated api.MappingTableEntry Entries */ 70: + message.Entries.push(MappingTableEntry.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MappingTable, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ProjectID = 10; */ + if (message.ProjectID !== "") + writer.tag(10, WireType.LengthDelimited).string(message.ProjectID); + /* string ID = 20; */ + if (message.ID !== "") + writer.tag(20, WireType.LengthDelimited).string(message.ID); + /* string Label = 30; */ + if (message.Label !== "") + writer.tag(30, WireType.LengthDelimited).string(message.Label); + /* api.EntityType Entity = 40; */ + if (message.Entity !== 0) + writer.tag(40, WireType.Varint).int32(message.Entity); + /* repeated api.MappingTableInputDescription InputFields = 50; */ + for (let i = 0; i < message.InputFields.length; i++) + MappingTableInputDescription.internalBinaryWrite(message.InputFields[i], writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* api.MappingTableOutputField OutputField = 60; */ + if (message.OutputField) + MappingTableOutputField.internalBinaryWrite(message.OutputField, writer.tag(60, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.MappingTableEntry Entries = 70; */ + for (let i = 0; i < message.Entries.length; i++) + MappingTableEntry.internalBinaryWrite(message.Entries[i], writer.tag(70, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.MappingTable + */ +export const MappingTable = new MappingTable$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MappingTableInputDescription$Type extends MessageType { + constructor() { + super("api.MappingTableInputDescription", [ + { no: 1, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "Granularity", kind: "enum", localName: "Granularity", jsonName: "Granularity", T: () => ["api.MappingTableInputDescriptionGranularity", MappingTableInputDescriptionGranularity], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ]); + } + create(value?: PartialMessage): MappingTableInputDescription { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Field = ""; + message.Granularity = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableInputDescription): MappingTableInputDescription { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Field */ 1: + message.Field = reader.string(); + break; + case /* api.MappingTableInputDescriptionGranularity Granularity */ 2: + message.Granularity = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MappingTableInputDescription, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Field = 1; */ + if (message.Field !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Field); + /* api.MappingTableInputDescriptionGranularity Granularity = 2; */ + if (message.Granularity !== 0) + writer.tag(2, WireType.Varint).int32(message.Granularity); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.MappingTableInputDescription + */ +export const MappingTableInputDescription = new MappingTableInputDescription$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MappingTableEntry$Type extends MessageType { + constructor() { + super("api.MappingTableEntry", [ + { no: 1, name: "Inputs", kind: "message", localName: "Inputs", jsonName: "Inputs", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableInput, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }, + { no: 2, name: "OutputValue", kind: "message", localName: "OutputValue", jsonName: "OutputValue", T: () => EngineRuleLiteral, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Inputs", "OutputValue"] } } }); + } + create(value?: PartialMessage): MappingTableEntry { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Inputs = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableEntry): MappingTableEntry { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated api.MappingTableInput Inputs */ 1: + message.Inputs.push(MappingTableInput.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* api.EngineRuleLiteral OutputValue */ 2: + message.OutputValue = EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, message.OutputValue); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MappingTableEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated api.MappingTableInput Inputs = 1; */ + for (let i = 0; i < message.Inputs.length; i++) + MappingTableInput.internalBinaryWrite(message.Inputs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleLiteral OutputValue = 2; */ + if (message.OutputValue) + EngineRuleLiteral.internalBinaryWrite(message.OutputValue, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.MappingTableEntry + */ +export const MappingTableEntry = new MappingTableEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MappingTableInput$Type extends MessageType { + constructor() { + super("api.MappingTableInput", [ + { no: 10, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 20, name: "Literal", kind: "message", localName: "Literal", jsonName: "Literal", oneof: "Value", T: () => EngineRuleLiteral, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 21, name: "AllValuesMatch", kind: "scalar", localName: "AllValuesMatch", jsonName: "AllValuesMatch", oneof: "Value", T: 8 /*ScalarType.BOOL*/ }, + { no: 30, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.MappingTableInputOperator", MappingTableInputOperator], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Field", "Value"] } } }); + } + create(value?: PartialMessage): MappingTableInput { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Field = ""; + message.Value = { oneofKind: undefined }; + message.Operator = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableInput): MappingTableInput { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Field */ 10: + message.Field = reader.string(); + break; + case /* api.EngineRuleLiteral Literal */ 20: + message.Value = { + oneofKind: "Literal", + Literal: EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).Literal) + }; + break; + case /* bool AllValuesMatch */ 21: + message.Value = { + oneofKind: "AllValuesMatch", + AllValuesMatch: reader.bool() + }; + break; + case /* api.MappingTableInputOperator Operator */ 30: + message.Operator = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MappingTableInput, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Field = 10; */ + if (message.Field !== "") + writer.tag(10, WireType.LengthDelimited).string(message.Field); + /* api.EngineRuleLiteral Literal = 20; */ + if (message.Value.oneofKind === "Literal") + EngineRuleLiteral.internalBinaryWrite(message.Value.Literal, writer.tag(20, WireType.LengthDelimited).fork(), options).join(); + /* bool AllValuesMatch = 21; */ + if (message.Value.oneofKind === "AllValuesMatch") + writer.tag(21, WireType.Varint).bool(message.Value.AllValuesMatch); + /* api.MappingTableInputOperator Operator = 30; */ + if (message.Operator !== 0) + writer.tag(30, WireType.Varint).int32(message.Operator); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.MappingTableInput + */ +export const MappingTableInput = new MappingTableInput$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MappingTableOutputField$Type extends MessageType { + constructor() { + super("api.MappingTableOutputField", [ + { no: 1, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "Type", kind: "enum", localName: "Type", jsonName: "Type", T: () => ["api.MappingTableOutputFieldType", MappingTableOutputFieldType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label", "Type"] } } }); + } + create(value?: PartialMessage): MappingTableOutputField { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Label = ""; + message.Type = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableOutputField): MappingTableOutputField { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string Label */ 1: + message.Label = reader.string(); + break; + case /* api.MappingTableOutputFieldType Type */ 2: + message.Type = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MappingTableOutputField, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Label = 1; */ + if (message.Label !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Label); + /* api.MappingTableOutputFieldType Type = 2; */ + if (message.Type !== 0) + writer.tag(2, WireType.Varint).int32(message.Type); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.MappingTableOutputField + */ +export const MappingTableOutputField = new MappingTableOutputField$Type(); diff --git a/ruleEngine_services.client.ts b/ruleEngine_services.client.ts new file mode 100644 index 0000000..437ea98 --- /dev/null +++ b/ruleEngine_services.client.ts @@ -0,0 +1,237 @@ +// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix +// @generated from protobuf file "ruleEngine_services.proto" (package "api", syntax proto3) +// tslint:disable +import { MappingTableService } from "./ruleEngine_services"; +import type { DeleteMappingTableResponse } from "./ruleEngine_services"; +import type { DeleteMappingTableRequest } from "./ruleEngine_services"; +import type { ListMappingTableResponse } from "./ruleEngine_services"; +import type { ListMappingTableRequest } from "./ruleEngine_services"; +import type { GetMappingTableResponse } from "./ruleEngine_services"; +import type { GetMappingTableRequest } from "./ruleEngine_services"; +import type { PutMappingTableResponse } from "./ruleEngine_services"; +import type { PutMappingTableRequest } from "./ruleEngine_services"; +import { ComputationService } from "./ruleEngine_services"; +import type { DeleteComputationResponse } from "./ruleEngine_services"; +import type { DeleteComputationRequest } from "./ruleEngine_services"; +import type { ListComputationResponse } from "./ruleEngine_services"; +import type { ListComputationRequest } from "./ruleEngine_services"; +import type { GetComputationResponse } from "./ruleEngine_services"; +import type { GetComputationRequest } from "./ruleEngine_services"; +import type { PutComputationResponse } from "./ruleEngine_services"; +import type { PutComputationRequest } from "./ruleEngine_services"; +import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; +import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; +import { RuleEngineService } from "./ruleEngine_services"; +import type { ToggleDebugOnResponse } from "./ruleEngine_services"; +import type { ToggleDebugOnRequest } from "./ruleEngine_services"; +import type { DeleteEngineRuleResponse } from "./ruleEngine_services"; +import type { DeleteEngineRuleRequest } from "./ruleEngine_services"; +import type { ListEngineRuleResponse } from "./ruleEngine_services"; +import type { ListEngineRuleRequest } from "./ruleEngine_services"; +import type { GetEngineRuleResponse } from "./ruleEngine_services"; +import type { GetEngineRuleRequest } from "./ruleEngine_services"; +import { stackIntercept } from "@protobuf-ts/runtime-rpc"; +import type { PutEngineRuleResponse } from "./ruleEngine_services"; +import type { PutEngineRuleRequest } from "./ruleEngine_services"; +import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; +import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; +// ─── RuleEngineService ──────────────────────────────────────────────────────── + +/** + * @generated from protobuf service api.RuleEngineService + */ +export interface IRuleEngineServiceClient { + /** + * @generated from protobuf rpc: Put + */ + put(input: PutEngineRuleRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Get + */ + get(input: GetEngineRuleRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: List + */ + list(input: ListEngineRuleRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Delete + */ + delete(input: DeleteEngineRuleRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: ToggleDebugOn + */ + toggleDebugOn(input: ToggleDebugOnRequest, options?: RpcOptions): UnaryCall; +} +// ─── RuleEngineService ──────────────────────────────────────────────────────── + +/** + * @generated from protobuf service api.RuleEngineService + */ +export class RuleEngineServiceClient implements IRuleEngineServiceClient, ServiceInfo { + typeName = RuleEngineService.typeName; + methods = RuleEngineService.methods; + options = RuleEngineService.options; + constructor(private readonly _transport: RpcTransport) { + } + /** + * @generated from protobuf rpc: Put + */ + put(input: PutEngineRuleRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Get + */ + get(input: GetEngineRuleRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: List + */ + list(input: ListEngineRuleRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Delete + */ + delete(input: DeleteEngineRuleRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: ToggleDebugOn + */ + toggleDebugOn(input: ToggleDebugOnRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[4], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } +} +// ─── ComputationService ─────────────────────────────────────────────────────── + +/** + * @generated from protobuf service api.ComputationService + */ +export interface IComputationServiceClient { + /** + * @generated from protobuf rpc: Put + */ + put(input: PutComputationRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Get + */ + get(input: GetComputationRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: List + */ + list(input: ListComputationRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Delete + */ + delete(input: DeleteComputationRequest, options?: RpcOptions): UnaryCall; +} +// ─── ComputationService ─────────────────────────────────────────────────────── + +/** + * @generated from protobuf service api.ComputationService + */ +export class ComputationServiceClient implements IComputationServiceClient, ServiceInfo { + typeName = ComputationService.typeName; + methods = ComputationService.methods; + options = ComputationService.options; + constructor(private readonly _transport: RpcTransport) { + } + /** + * @generated from protobuf rpc: Put + */ + put(input: PutComputationRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Get + */ + get(input: GetComputationRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: List + */ + list(input: ListComputationRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Delete + */ + delete(input: DeleteComputationRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } +} +// ─── MappingTableService ────────────────────────────────────────────────────── + +/** + * @generated from protobuf service api.MappingTableService + */ +export interface IMappingTableServiceClient { + /** + * @generated from protobuf rpc: Put + */ + put(input: PutMappingTableRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Get + */ + get(input: GetMappingTableRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: List + */ + list(input: ListMappingTableRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Delete + */ + delete(input: DeleteMappingTableRequest, options?: RpcOptions): UnaryCall; +} +// ─── MappingTableService ────────────────────────────────────────────────────── + +/** + * @generated from protobuf service api.MappingTableService + */ +export class MappingTableServiceClient implements IMappingTableServiceClient, ServiceInfo { + typeName = MappingTableService.typeName; + methods = MappingTableService.methods; + options = MappingTableService.options; + constructor(private readonly _transport: RpcTransport) { + } + /** + * @generated from protobuf rpc: Put + */ + put(input: PutMappingTableRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Get + */ + get(input: GetMappingTableRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: List + */ + list(input: ListMappingTableRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Delete + */ + delete(input: DeleteMappingTableRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } +} diff --git a/ruleEngine_services.ts b/ruleEngine_services.ts new file mode 100644 index 0000000..087154b --- /dev/null +++ b/ruleEngine_services.ts @@ -0,0 +1,1979 @@ +// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix +// @generated from protobuf file "ruleEngine_services.proto" (package "api", syntax proto3) +// tslint:disable +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { MappingTable } from "./ruleEngine_model"; +import { MappingTableEntry } from "./ruleEngine_model"; +import { MappingTableOutputField } from "./ruleEngine_model"; +import { MappingTableInputDescription } from "./ruleEngine_model"; +import { Computation } from "./ruleEngine_model"; +import { ComputationCustomFunction } from "./ruleEngine_model"; +import { ComputationStatusDuration } from "./ruleEngine_model"; +import { ComputationDueDate } from "./ruleEngine_model"; +import { ComputationDateDuration } from "./ruleEngine_model"; +import { EngineRuleTriggerType } from "./ruleEngine_model"; +import { EngineRule } from "./ruleEngine_model"; +import { EngineRuleAction } from "./ruleEngine_model"; +import { EngineRuleCondition } from "./ruleEngine_model"; +import { EngineRuleMilestoneTrigger } from "./ruleEngine_model"; +import { EngineRuleEventTrigger } from "./ruleEngine_model"; +import { EngineRuleScheduledTrigger } from "./ruleEngine_model"; +import { EntityType } from "./shared"; +import { EngineRuleValidityType } from "./ruleEngine_model"; +import { RequestProjectHeader } from "./shared"; +// ========== REQUESTS & RESPONSE MESSAGES ========== + +/** + * Put + * + * @generated from protobuf message api.PutEngineRuleRequest + */ +export interface PutEngineRuleRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string Code = 10 + */ + Code: string; // Unique code for the rule, e.g. "ApplyFreeShipping". Used as the identifier: an existing rule with the same code will be updated. + /** + * @generated from protobuf field: string Label = 20 + */ + Label: string; // Human-readable label of the rule's purpose + /** + * @generated from protobuf field: api.EngineRuleValidityType ValidityType = 30 + */ + ValidityType: EngineRuleValidityType; + /** + * @generated from protobuf field: string ValidFrom = 31 + */ + ValidFrom: string; // optional start date for the rule's validity, only if ValidityType = DATE_RANGE + /** + * @generated from protobuf field: string ValidUntil = 32 + */ + ValidUntil: string; // optional end date for the rule's validity, only if ValidityType = DATE_RANGE + /** + * @generated from protobuf field: api.EntityType Entity = 40 + */ + Entity: EntityType; // Entity type this rule applies to (Order, HandlingUnit, etc.) + /** + * What causes the rule to be evaluated + * + * @generated from protobuf oneof: Trigger + */ + Trigger: { + oneofKind: "ScheduledTrigger"; + /** + * @generated from protobuf field: api.EngineRuleScheduledTrigger ScheduledTrigger = 50 + */ + ScheduledTrigger: EngineRuleScheduledTrigger; // triggered on a schedule defined by a partial RRule model + } | { + oneofKind: "EventTrigger"; + /** + * @generated from protobuf field: api.EngineRuleEventTrigger EventTrigger = 51 + */ + EventTrigger: EngineRuleEventTrigger; // triggered when the entity is created, deleted, or changes status + } | { + oneofKind: "MilestoneTrigger"; + /** + * @generated from protobuf field: api.EngineRuleMilestoneTrigger MilestoneTrigger = 52 + */ + MilestoneTrigger: EngineRuleMilestoneTrigger; // triggered when a logistics milestone is reached + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: repeated api.EngineRuleCondition Conditions = 60 + */ + Conditions: EngineRuleCondition[]; // All conditions evaluated with AND semantics; no conditions = unconditional trigger + /** + * @generated from protobuf field: repeated api.EngineRuleAction Actions = 70 + */ + Actions: EngineRuleAction[]; // Actions to execute when the rule is triggered and conditions are met + /** + * @generated from protobuf field: bool IsActive = 80 + */ + IsActive: boolean; // whether the rule is currently active, independent of its ValidityType and ValidFrom/ValidUntil dates +} +/** + * @generated from protobuf message api.PutEngineRuleResponse + */ +export interface PutEngineRuleResponse { + /** + * @generated from protobuf field: api.EngineRule EngineRule = 1 + */ + EngineRule?: EngineRule; +} +/** + * Get + * + * @generated from protobuf message api.GetEngineRuleRequest + */ +export interface GetEngineRuleRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string Code = 2 + */ + Code: string; +} +/** + * @generated from protobuf message api.GetEngineRuleResponse + */ +export interface GetEngineRuleResponse { + /** + * @generated from protobuf field: api.EngineRule EngineRule = 1 + */ + EngineRule?: EngineRule; +} +/** + * List + * + * @generated from protobuf message api.ListEngineRuleRequest + */ +export interface ListEngineRuleRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: api.EntityType Entity = 2 + */ + Entity: EntityType; // Optional filter: only return rules applying to this entity type + /** + * @generated from protobuf field: api.EngineRuleTriggerType TriggerType = 3 + */ + TriggerType: EngineRuleTriggerType; // Optional filter: only return rules with this trigger type + /** + * @generated from protobuf field: bool IsCurrentlyValid = 4 + */ + IsCurrentlyValid: boolean; // Optional filter: if true, only return rules whose validity period (ValidityType/ValidFrom/ValidUntil) currently includes now and whose IsActive = true. false returns all rules regardless of validity period or IsActive status. +} +/** + * @generated from protobuf message api.ListEngineRuleResponse + */ +export interface ListEngineRuleResponse { + /** + * @generated from protobuf field: repeated api.EngineRule EngineRules = 1 + */ + EngineRules: EngineRule[]; + /** + * @generated from protobuf field: int64 DebugUntil = 2 + */ + DebugUntil: bigint; // Unix timestamp (seconds) until which debug mode is currently active for the project, if any; 0 if debug mode is not active +} +/** + * Delete + * + * @generated from protobuf message api.DeleteEngineRuleRequest + */ +export interface DeleteEngineRuleRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string Code = 2 + */ + Code: string; +} +/** + * @generated from protobuf message api.DeleteEngineRuleResponse + */ +export interface DeleteEngineRuleResponse { +} +/** + * ToggleDebugOn + * + * @generated from protobuf message api.ToggleDebugOnRequest + */ +export interface ToggleDebugOnRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; +} +/** + * @generated from protobuf message api.ToggleDebugOnResponse + */ +export interface ToggleDebugOnResponse { + /** + * @generated from protobuf field: int64 DebugUntil = 1 + */ + DebugUntil: bigint; // Unix timestamp (seconds) until which debug mode will remain active for the project +} +// ========== REQUESTS & RESPONSE MESSAGES ========== + +/** + * Put + * + * @generated from protobuf message api.PutComputationRequest + */ +export interface PutComputationRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ID = 2 + */ + ID: string; // If provided, updates the computation with this ID; if omitted, a new computation is created. + /** + * @generated from protobuf field: string Label = 20 + */ + Label: string; // Human-readable label for the computation, e.g. "Compute Discount" + /** + * @generated from protobuf field: api.EntityType Entity = 30 + */ + Entity: EntityType; // Entity type this computation applies to (Order, HandlingUnit, etc.) + /** + * The computation strategy to apply + * + * @generated from protobuf oneof: Type + */ + Type: { + oneofKind: "DateDuration"; + /** + * @generated from protobuf field: api.ComputationDateDuration DateDuration = 40 + */ + DateDuration: ComputationDateDuration; // computes the duration between two date fields + } | { + oneofKind: "DueDate"; + /** + * @generated from protobuf field: api.ComputationDueDate DueDate = 41 + */ + DueDate: ComputationDueDate; // computes a due date from a reference date and a duration + } | { + oneofKind: "StatusDuration"; + /** + * @generated from protobuf field: api.ComputationStatusDuration StatusDuration = 42 + */ + StatusDuration: ComputationStatusDuration; // computes the cumulated duration spent in a set of statuses + } | { + oneofKind: "CustomFunction"; + /** + * @generated from protobuf field: api.ComputationCustomFunction CustomFunction = 43 + */ + CustomFunction: ComputationCustomFunction; // applies an arithmetic operator between two fields + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message api.PutComputationResponse + */ +export interface PutComputationResponse { + /** + * @generated from protobuf field: api.Computation Computation = 1 + */ + Computation?: Computation; +} +/** + * Get + * + * @generated from protobuf message api.GetComputationRequest + */ +export interface GetComputationRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ID = 2 + */ + ID: string; +} +/** + * @generated from protobuf message api.GetComputationResponse + */ +export interface GetComputationResponse { + /** + * @generated from protobuf field: api.Computation Computation = 1 + */ + Computation?: Computation; +} +/** + * List + * + * @generated from protobuf message api.ListComputationRequest + */ +export interface ListComputationRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: api.EntityType Entity = 2 + */ + Entity: EntityType; // Optional filter: only return computations applying to this entity type +} +/** + * @generated from protobuf message api.ListComputationResponse + */ +export interface ListComputationResponse { + /** + * @generated from protobuf field: repeated api.Computation Computations = 1 + */ + Computations: Computation[]; +} +/** + * Delete + * + * @generated from protobuf message api.DeleteComputationRequest + */ +export interface DeleteComputationRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ID = 2 + */ + ID: string; +} +/** + * @generated from protobuf message api.DeleteComputationResponse + */ +export interface DeleteComputationResponse { +} +// ========== REQUESTS & RESPONSE MESSAGES ========== + +/** + * Put + * + * @generated from protobuf message api.PutMappingTableRequest + */ +export interface PutMappingTableRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ID = 2 + */ + ID: string; // If provided, updates the mapping table with this ID; if omitted, a new mapping table is created. + /** + * @generated from protobuf field: string Label = 3 + */ + Label: string; // Human-readable label for the mapping table, e.g. "Shipping Cost by Priority" + /** + * @generated from protobuf field: api.EntityType Entity = 4 + */ + Entity: EntityType; // Entity type this mapping applies to (Order, HandlingUnit, etc.) + /** + * @generated from protobuf field: repeated api.MappingTableInputDescription InputFields = 5 + */ + InputFields: MappingTableInputDescription[]; // declarative schema: fields the table reads from the entity, e.g. ["Order.Priority", "Order.DestinationZone"]; Entries only reference InputFields listed here + /** + * @generated from protobuf field: api.MappingTableOutputField OutputField = 6 + */ + OutputField?: MappingTableOutputField; // field resulting from the lookup, e.g. "Shipping cost" + /** + * @generated from protobuf field: repeated api.MappingTableEntry Entries = 7 + */ + Entries: MappingTableEntry[]; // mapping entries; must contain at least one entry +} +/** + * @generated from protobuf message api.PutMappingTableResponse + */ +export interface PutMappingTableResponse { + /** + * @generated from protobuf field: api.MappingTable MappingTable = 1 + */ + MappingTable?: MappingTable; +} +/** + * Get + * + * @generated from protobuf message api.GetMappingTableRequest + */ +export interface GetMappingTableRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ID = 2 + */ + ID: string; +} +/** + * @generated from protobuf message api.GetMappingTableResponse + */ +export interface GetMappingTableResponse { + /** + * @generated from protobuf field: api.MappingTable MappingTable = 1 + */ + MappingTable?: MappingTable; +} +/** + * List + * + * @generated from protobuf message api.ListMappingTableRequest + */ +export interface ListMappingTableRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: api.EntityType Entity = 2 + */ + Entity: EntityType; // Optional filter: only return mapping tables applying to this entity type +} +/** + * @generated from protobuf message api.ListMappingTableResponse + */ +export interface ListMappingTableResponse { + /** + * @generated from protobuf field: repeated api.MappingTable MappingTables = 1 + */ + MappingTables: MappingTable[]; +} +/** + * Delete + * + * @generated from protobuf message api.DeleteMappingTableRequest + */ +export interface DeleteMappingTableRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ID = 2 + */ + ID: string; +} +/** + * @generated from protobuf message api.DeleteMappingTableResponse + */ +export interface DeleteMappingTableResponse { +} +// @generated message type with reflection information, may provide speed optimized methods +class PutEngineRuleRequest$Type extends MessageType { + constructor() { + super("api.PutEngineRuleRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 10, name: "Code", kind: "scalar", localName: "Code", jsonName: "Code", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { pattern: "^[A-Za-z0-9_]+$" }, "n1validate.rules": { string: { pattern: "^[A-Za-z0-9_]+$" } } } }, + { no: 20, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/ }, + { no: 30, name: "ValidityType", kind: "enum", localName: "ValidityType", jsonName: "ValidityType", T: () => ["api.EngineRuleValidityType", EngineRuleValidityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 31, name: "ValidFrom", kind: "scalar", localName: "ValidFrom", jsonName: "ValidFrom", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true, ignoreEmpty: true } } } }, + { no: 32, name: "ValidUntil", kind: "scalar", localName: "ValidUntil", jsonName: "ValidUntil", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true, ignoreEmpty: true } } } }, + { no: 40, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] }, + { no: 50, name: "ScheduledTrigger", kind: "message", localName: "ScheduledTrigger", jsonName: "ScheduledTrigger", oneof: "Trigger", T: () => EngineRuleScheduledTrigger }, + { no: 51, name: "EventTrigger", kind: "message", localName: "EventTrigger", jsonName: "EventTrigger", oneof: "Trigger", T: () => EngineRuleEventTrigger }, + { no: 52, name: "MilestoneTrigger", kind: "message", localName: "MilestoneTrigger", jsonName: "MilestoneTrigger", oneof: "Trigger", T: () => EngineRuleMilestoneTrigger }, + { no: 60, name: "Conditions", kind: "message", localName: "Conditions", jsonName: "Conditions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleCondition }, + { no: 70, name: "Actions", kind: "message", localName: "Actions", jsonName: "Actions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleAction, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }, + { no: 80, name: "IsActive", kind: "scalar", localName: "IsActive", jsonName: "IsActive", T: 8 /*ScalarType.BOOL*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Code", "Actions", "Trigger"] } } }); + } + create(value?: PartialMessage): PutEngineRuleRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Code = ""; + message.Label = ""; + message.ValidityType = 0; + message.ValidFrom = ""; + message.ValidUntil = ""; + message.Entity = 0; + message.Trigger = { oneofKind: undefined }; + message.Conditions = []; + message.Actions = []; + message.IsActive = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutEngineRuleRequest): PutEngineRuleRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string Code */ 10: + message.Code = reader.string(); + break; + case /* string Label */ 20: + message.Label = reader.string(); + break; + case /* api.EngineRuleValidityType ValidityType */ 30: + message.ValidityType = reader.int32(); + break; + case /* string ValidFrom */ 31: + message.ValidFrom = reader.string(); + break; + case /* string ValidUntil */ 32: + message.ValidUntil = reader.string(); + break; + case /* api.EntityType Entity */ 40: + message.Entity = reader.int32(); + break; + case /* api.EngineRuleScheduledTrigger ScheduledTrigger */ 50: + message.Trigger = { + oneofKind: "ScheduledTrigger", + ScheduledTrigger: EngineRuleScheduledTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).ScheduledTrigger) + }; + break; + case /* api.EngineRuleEventTrigger EventTrigger */ 51: + message.Trigger = { + oneofKind: "EventTrigger", + EventTrigger: EngineRuleEventTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).EventTrigger) + }; + break; + case /* api.EngineRuleMilestoneTrigger MilestoneTrigger */ 52: + message.Trigger = { + oneofKind: "MilestoneTrigger", + MilestoneTrigger: EngineRuleMilestoneTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).MilestoneTrigger) + }; + break; + case /* repeated api.EngineRuleCondition Conditions */ 60: + message.Conditions.push(EngineRuleCondition.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated api.EngineRuleAction Actions */ 70: + message.Actions.push(EngineRuleAction.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* bool IsActive */ 80: + message.IsActive = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PutEngineRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string Code = 10; */ + if (message.Code !== "") + writer.tag(10, WireType.LengthDelimited).string(message.Code); + /* string Label = 20; */ + if (message.Label !== "") + writer.tag(20, WireType.LengthDelimited).string(message.Label); + /* api.EngineRuleValidityType ValidityType = 30; */ + if (message.ValidityType !== 0) + writer.tag(30, WireType.Varint).int32(message.ValidityType); + /* string ValidFrom = 31; */ + if (message.ValidFrom !== "") + writer.tag(31, WireType.LengthDelimited).string(message.ValidFrom); + /* string ValidUntil = 32; */ + if (message.ValidUntil !== "") + writer.tag(32, WireType.LengthDelimited).string(message.ValidUntil); + /* api.EntityType Entity = 40; */ + if (message.Entity !== 0) + writer.tag(40, WireType.Varint).int32(message.Entity); + /* api.EngineRuleScheduledTrigger ScheduledTrigger = 50; */ + if (message.Trigger.oneofKind === "ScheduledTrigger") + EngineRuleScheduledTrigger.internalBinaryWrite(message.Trigger.ScheduledTrigger, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleEventTrigger EventTrigger = 51; */ + if (message.Trigger.oneofKind === "EventTrigger") + EngineRuleEventTrigger.internalBinaryWrite(message.Trigger.EventTrigger, writer.tag(51, WireType.LengthDelimited).fork(), options).join(); + /* api.EngineRuleMilestoneTrigger MilestoneTrigger = 52; */ + if (message.Trigger.oneofKind === "MilestoneTrigger") + EngineRuleMilestoneTrigger.internalBinaryWrite(message.Trigger.MilestoneTrigger, writer.tag(52, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.EngineRuleCondition Conditions = 60; */ + for (let i = 0; i < message.Conditions.length; i++) + EngineRuleCondition.internalBinaryWrite(message.Conditions[i], writer.tag(60, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.EngineRuleAction Actions = 70; */ + for (let i = 0; i < message.Actions.length; i++) + EngineRuleAction.internalBinaryWrite(message.Actions[i], writer.tag(70, WireType.LengthDelimited).fork(), options).join(); + /* bool IsActive = 80; */ + if (message.IsActive !== false) + writer.tag(80, WireType.Varint).bool(message.IsActive); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.PutEngineRuleRequest + */ +export const PutEngineRuleRequest = new PutEngineRuleRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class PutEngineRuleResponse$Type extends MessageType { + constructor() { + super("api.PutEngineRuleResponse", [ + { no: 1, name: "EngineRule", kind: "message", localName: "EngineRule", jsonName: "EngineRule", T: () => EngineRule, options: { "n1validate.rules": { message: { required: true } } } } + ]); + } + create(value?: PartialMessage): PutEngineRuleResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutEngineRuleResponse): PutEngineRuleResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.EngineRule EngineRule */ 1: + message.EngineRule = EngineRule.internalBinaryRead(reader, reader.uint32(), options, message.EngineRule); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PutEngineRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.EngineRule EngineRule = 1; */ + if (message.EngineRule) + EngineRule.internalBinaryWrite(message.EngineRule, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.PutEngineRuleResponse + */ +export const PutEngineRuleResponse = new PutEngineRuleResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEngineRuleRequest$Type extends MessageType { + constructor() { + super("api.GetEngineRuleRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "Code", kind: "scalar", localName: "Code", jsonName: "Code", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Code"] } } }); + } + create(value?: PartialMessage): GetEngineRuleRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Code = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetEngineRuleRequest): GetEngineRuleRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string Code */ 2: + message.Code = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetEngineRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string Code = 2; */ + if (message.Code !== "") + writer.tag(2, WireType.LengthDelimited).string(message.Code); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.GetEngineRuleRequest + */ +export const GetEngineRuleRequest = new GetEngineRuleRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEngineRuleResponse$Type extends MessageType { + constructor() { + super("api.GetEngineRuleResponse", [ + { no: 1, name: "EngineRule", kind: "message", localName: "EngineRule", jsonName: "EngineRule", T: () => EngineRule, options: { "n1validate.rules": { message: { required: true } } } } + ]); + } + create(value?: PartialMessage): GetEngineRuleResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetEngineRuleResponse): GetEngineRuleResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.EngineRule EngineRule */ 1: + message.EngineRule = EngineRule.internalBinaryRead(reader, reader.uint32(), options, message.EngineRule); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetEngineRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.EngineRule EngineRule = 1; */ + if (message.EngineRule) + EngineRule.internalBinaryWrite(message.EngineRule, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.GetEngineRuleResponse + */ +export const GetEngineRuleResponse = new GetEngineRuleResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListEngineRuleRequest$Type extends MessageType { + constructor() { + super("api.ListEngineRuleRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] }, + { no: 3, name: "TriggerType", kind: "enum", localName: "TriggerType", jsonName: "TriggerType", T: () => ["api.EngineRuleTriggerType", EngineRuleTriggerType] }, + { no: 4, name: "IsCurrentlyValid", kind: "scalar", localName: "IsCurrentlyValid", jsonName: "IsCurrentlyValid", T: 8 /*ScalarType.BOOL*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); + } + create(value?: PartialMessage): ListEngineRuleRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Entity = 0; + message.TriggerType = 0; + message.IsCurrentlyValid = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListEngineRuleRequest): ListEngineRuleRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* api.EntityType Entity */ 2: + message.Entity = reader.int32(); + break; + case /* api.EngineRuleTriggerType TriggerType */ 3: + message.TriggerType = reader.int32(); + break; + case /* bool IsCurrentlyValid */ 4: + message.IsCurrentlyValid = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListEngineRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EntityType Entity = 2; */ + if (message.Entity !== 0) + writer.tag(2, WireType.Varint).int32(message.Entity); + /* api.EngineRuleTriggerType TriggerType = 3; */ + if (message.TriggerType !== 0) + writer.tag(3, WireType.Varint).int32(message.TriggerType); + /* bool IsCurrentlyValid = 4; */ + if (message.IsCurrentlyValid !== false) + writer.tag(4, WireType.Varint).bool(message.IsCurrentlyValid); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ListEngineRuleRequest + */ +export const ListEngineRuleRequest = new ListEngineRuleRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListEngineRuleResponse$Type extends MessageType { + constructor() { + super("api.ListEngineRuleResponse", [ + { no: 1, name: "EngineRules", kind: "message", localName: "EngineRules", jsonName: "EngineRules", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRule }, + { no: 2, name: "DebugUntil", kind: "scalar", localName: "DebugUntil", jsonName: "DebugUntil", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value?: PartialMessage): ListEngineRuleResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.EngineRules = []; + message.DebugUntil = 0n; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListEngineRuleResponse): ListEngineRuleResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated api.EngineRule EngineRules */ 1: + message.EngineRules.push(EngineRule.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* int64 DebugUntil */ 2: + message.DebugUntil = reader.int64().toBigInt(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListEngineRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated api.EngineRule EngineRules = 1; */ + for (let i = 0; i < message.EngineRules.length; i++) + EngineRule.internalBinaryWrite(message.EngineRules[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* int64 DebugUntil = 2; */ + if (message.DebugUntil !== 0n) + writer.tag(2, WireType.Varint).int64(message.DebugUntil); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ListEngineRuleResponse + */ +export const ListEngineRuleResponse = new ListEngineRuleResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteEngineRuleRequest$Type extends MessageType { + constructor() { + super("api.DeleteEngineRuleRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "Code", kind: "scalar", localName: "Code", jsonName: "Code", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Code"] } } }); + } + create(value?: PartialMessage): DeleteEngineRuleRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Code = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteEngineRuleRequest): DeleteEngineRuleRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string Code */ 2: + message.Code = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteEngineRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string Code = 2; */ + if (message.Code !== "") + writer.tag(2, WireType.LengthDelimited).string(message.Code); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.DeleteEngineRuleRequest + */ +export const DeleteEngineRuleRequest = new DeleteEngineRuleRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteEngineRuleResponse$Type extends MessageType { + constructor() { + super("api.DeleteEngineRuleResponse", []); + } + create(value?: PartialMessage): DeleteEngineRuleResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteEngineRuleResponse): DeleteEngineRuleResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteEngineRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.DeleteEngineRuleResponse + */ +export const DeleteEngineRuleResponse = new DeleteEngineRuleResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ToggleDebugOnRequest$Type extends MessageType { + constructor() { + super("api.ToggleDebugOnRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); + } + create(value?: PartialMessage): ToggleDebugOnRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDebugOnRequest): ToggleDebugOnRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ToggleDebugOnRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ToggleDebugOnRequest + */ +export const ToggleDebugOnRequest = new ToggleDebugOnRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ToggleDebugOnResponse$Type extends MessageType { + constructor() { + super("api.ToggleDebugOnResponse", [ + { no: 1, name: "DebugUntil", kind: "scalar", localName: "DebugUntil", jsonName: "DebugUntil", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value?: PartialMessage): ToggleDebugOnResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.DebugUntil = 0n; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDebugOnResponse): ToggleDebugOnResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 DebugUntil */ 1: + message.DebugUntil = reader.int64().toBigInt(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ToggleDebugOnResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int64 DebugUntil = 1; */ + if (message.DebugUntil !== 0n) + writer.tag(1, WireType.Varint).int64(message.DebugUntil); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ToggleDebugOnResponse + */ +export const ToggleDebugOnResponse = new ToggleDebugOnResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class PutComputationRequest$Type extends MessageType { + constructor() { + super("api.PutComputationRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/ }, + { no: 20, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 30, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 40, name: "DateDuration", kind: "message", localName: "DateDuration", jsonName: "DateDuration", oneof: "Type", T: () => ComputationDateDuration }, + { no: 41, name: "DueDate", kind: "message", localName: "DueDate", jsonName: "DueDate", oneof: "Type", T: () => ComputationDueDate }, + { no: 42, name: "StatusDuration", kind: "message", localName: "StatusDuration", jsonName: "StatusDuration", oneof: "Type", T: () => ComputationStatusDuration }, + { no: 43, name: "CustomFunction", kind: "message", localName: "CustomFunction", jsonName: "CustomFunction", oneof: "Type", T: () => ComputationCustomFunction } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Label", "Entity", "Type"] } } }); + } + create(value?: PartialMessage): PutComputationRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ID = ""; + message.Label = ""; + message.Entity = 0; + message.Type = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutComputationRequest): PutComputationRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ID */ 2: + message.ID = reader.string(); + break; + case /* string Label */ 20: + message.Label = reader.string(); + break; + case /* api.EntityType Entity */ 30: + message.Entity = reader.int32(); + break; + case /* api.ComputationDateDuration DateDuration */ 40: + message.Type = { + oneofKind: "DateDuration", + DateDuration: ComputationDateDuration.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).DateDuration) + }; + break; + case /* api.ComputationDueDate DueDate */ 41: + message.Type = { + oneofKind: "DueDate", + DueDate: ComputationDueDate.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).DueDate) + }; + break; + case /* api.ComputationStatusDuration StatusDuration */ 42: + message.Type = { + oneofKind: "StatusDuration", + StatusDuration: ComputationStatusDuration.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).StatusDuration) + }; + break; + case /* api.ComputationCustomFunction CustomFunction */ 43: + message.Type = { + oneofKind: "CustomFunction", + CustomFunction: ComputationCustomFunction.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).CustomFunction) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PutComputationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ID = 2; */ + if (message.ID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ID); + /* string Label = 20; */ + if (message.Label !== "") + writer.tag(20, WireType.LengthDelimited).string(message.Label); + /* api.EntityType Entity = 30; */ + if (message.Entity !== 0) + writer.tag(30, WireType.Varint).int32(message.Entity); + /* api.ComputationDateDuration DateDuration = 40; */ + if (message.Type.oneofKind === "DateDuration") + ComputationDateDuration.internalBinaryWrite(message.Type.DateDuration, writer.tag(40, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationDueDate DueDate = 41; */ + if (message.Type.oneofKind === "DueDate") + ComputationDueDate.internalBinaryWrite(message.Type.DueDate, writer.tag(41, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationStatusDuration StatusDuration = 42; */ + if (message.Type.oneofKind === "StatusDuration") + ComputationStatusDuration.internalBinaryWrite(message.Type.StatusDuration, writer.tag(42, WireType.LengthDelimited).fork(), options).join(); + /* api.ComputationCustomFunction CustomFunction = 43; */ + if (message.Type.oneofKind === "CustomFunction") + ComputationCustomFunction.internalBinaryWrite(message.Type.CustomFunction, writer.tag(43, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.PutComputationRequest + */ +export const PutComputationRequest = new PutComputationRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class PutComputationResponse$Type extends MessageType { + constructor() { + super("api.PutComputationResponse", [ + { no: 1, name: "Computation", kind: "message", localName: "Computation", jsonName: "Computation", T: () => Computation, options: { "n1validate.rules": { message: { required: true } } } } + ]); + } + create(value?: PartialMessage): PutComputationResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutComputationResponse): PutComputationResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.Computation Computation */ 1: + message.Computation = Computation.internalBinaryRead(reader, reader.uint32(), options, message.Computation); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PutComputationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.Computation Computation = 1; */ + if (message.Computation) + Computation.internalBinaryWrite(message.Computation, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.PutComputationResponse + */ +export const PutComputationResponse = new PutComputationResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetComputationRequest$Type extends MessageType { + constructor() { + super("api.GetComputationRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); + } + create(value?: PartialMessage): GetComputationRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetComputationRequest): GetComputationRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ID */ 2: + message.ID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetComputationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ID = 2; */ + if (message.ID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.GetComputationRequest + */ +export const GetComputationRequest = new GetComputationRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetComputationResponse$Type extends MessageType { + constructor() { + super("api.GetComputationResponse", [ + { no: 1, name: "Computation", kind: "message", localName: "Computation", jsonName: "Computation", T: () => Computation, options: { "n1validate.rules": { message: { required: true } } } } + ]); + } + create(value?: PartialMessage): GetComputationResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetComputationResponse): GetComputationResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.Computation Computation */ 1: + message.Computation = Computation.internalBinaryRead(reader, reader.uint32(), options, message.Computation); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetComputationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.Computation Computation = 1; */ + if (message.Computation) + Computation.internalBinaryWrite(message.Computation, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.GetComputationResponse + */ +export const GetComputationResponse = new GetComputationResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListComputationRequest$Type extends MessageType { + constructor() { + super("api.ListComputationRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); + } + create(value?: PartialMessage): ListComputationRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Entity = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListComputationRequest): ListComputationRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* api.EntityType Entity */ 2: + message.Entity = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListComputationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EntityType Entity = 2; */ + if (message.Entity !== 0) + writer.tag(2, WireType.Varint).int32(message.Entity); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ListComputationRequest + */ +export const ListComputationRequest = new ListComputationRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListComputationResponse$Type extends MessageType { + constructor() { + super("api.ListComputationResponse", [ + { no: 1, name: "Computations", kind: "message", localName: "Computations", jsonName: "Computations", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Computation } + ]); + } + create(value?: PartialMessage): ListComputationResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Computations = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListComputationResponse): ListComputationResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated api.Computation Computations */ 1: + message.Computations.push(Computation.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListComputationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated api.Computation Computations = 1; */ + for (let i = 0; i < message.Computations.length; i++) + Computation.internalBinaryWrite(message.Computations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ListComputationResponse + */ +export const ListComputationResponse = new ListComputationResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteComputationRequest$Type extends MessageType { + constructor() { + super("api.DeleteComputationRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); + } + create(value?: PartialMessage): DeleteComputationRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteComputationRequest): DeleteComputationRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ID */ 2: + message.ID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteComputationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ID = 2; */ + if (message.ID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.DeleteComputationRequest + */ +export const DeleteComputationRequest = new DeleteComputationRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteComputationResponse$Type extends MessageType { + constructor() { + super("api.DeleteComputationResponse", []); + } + create(value?: PartialMessage): DeleteComputationResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteComputationResponse): DeleteComputationResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteComputationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.DeleteComputationResponse + */ +export const DeleteComputationResponse = new DeleteComputationResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class PutMappingTableRequest$Type extends MessageType { + constructor() { + super("api.PutMappingTableRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 4, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, + { no: 5, name: "InputFields", kind: "message", localName: "InputFields", jsonName: "InputFields", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableInputDescription, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }, + { no: 6, name: "OutputField", kind: "message", localName: "OutputField", jsonName: "OutputField", T: () => MappingTableOutputField, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 7, name: "Entries", kind: "message", localName: "Entries", jsonName: "Entries", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableEntry, options: { "n1validate.rules": { repeated: { minItems: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Label", "InputFields", "OutputField", "Entries", "Entity"] } } }); + } + create(value?: PartialMessage): PutMappingTableRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ID = ""; + message.Label = ""; + message.Entity = 0; + message.InputFields = []; + message.Entries = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutMappingTableRequest): PutMappingTableRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ID */ 2: + message.ID = reader.string(); + break; + case /* string Label */ 3: + message.Label = reader.string(); + break; + case /* api.EntityType Entity */ 4: + message.Entity = reader.int32(); + break; + case /* repeated api.MappingTableInputDescription InputFields */ 5: + message.InputFields.push(MappingTableInputDescription.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* api.MappingTableOutputField OutputField */ 6: + message.OutputField = MappingTableOutputField.internalBinaryRead(reader, reader.uint32(), options, message.OutputField); + break; + case /* repeated api.MappingTableEntry Entries */ 7: + message.Entries.push(MappingTableEntry.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PutMappingTableRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ID = 2; */ + if (message.ID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ID); + /* string Label = 3; */ + if (message.Label !== "") + writer.tag(3, WireType.LengthDelimited).string(message.Label); + /* api.EntityType Entity = 4; */ + if (message.Entity !== 0) + writer.tag(4, WireType.Varint).int32(message.Entity); + /* repeated api.MappingTableInputDescription InputFields = 5; */ + for (let i = 0; i < message.InputFields.length; i++) + MappingTableInputDescription.internalBinaryWrite(message.InputFields[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* api.MappingTableOutputField OutputField = 6; */ + if (message.OutputField) + MappingTableOutputField.internalBinaryWrite(message.OutputField, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.MappingTableEntry Entries = 7; */ + for (let i = 0; i < message.Entries.length; i++) + MappingTableEntry.internalBinaryWrite(message.Entries[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.PutMappingTableRequest + */ +export const PutMappingTableRequest = new PutMappingTableRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class PutMappingTableResponse$Type extends MessageType { + constructor() { + super("api.PutMappingTableResponse", [ + { no: 1, name: "MappingTable", kind: "message", localName: "MappingTable", jsonName: "MappingTable", T: () => MappingTable, options: { "n1validate.rules": { message: { required: true } } } } + ]); + } + create(value?: PartialMessage): PutMappingTableResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutMappingTableResponse): PutMappingTableResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.MappingTable MappingTable */ 1: + message.MappingTable = MappingTable.internalBinaryRead(reader, reader.uint32(), options, message.MappingTable); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PutMappingTableResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.MappingTable MappingTable = 1; */ + if (message.MappingTable) + MappingTable.internalBinaryWrite(message.MappingTable, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.PutMappingTableResponse + */ +export const PutMappingTableResponse = new PutMappingTableResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetMappingTableRequest$Type extends MessageType { + constructor() { + super("api.GetMappingTableRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); + } + create(value?: PartialMessage): GetMappingTableRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetMappingTableRequest): GetMappingTableRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ID */ 2: + message.ID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetMappingTableRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ID = 2; */ + if (message.ID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.GetMappingTableRequest + */ +export const GetMappingTableRequest = new GetMappingTableRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetMappingTableResponse$Type extends MessageType { + constructor() { + super("api.GetMappingTableResponse", [ + { no: 1, name: "MappingTable", kind: "message", localName: "MappingTable", jsonName: "MappingTable", T: () => MappingTable, options: { "n1validate.rules": { message: { required: true } } } } + ]); + } + create(value?: PartialMessage): GetMappingTableResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetMappingTableResponse): GetMappingTableResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.MappingTable MappingTable */ 1: + message.MappingTable = MappingTable.internalBinaryRead(reader, reader.uint32(), options, message.MappingTable); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetMappingTableResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.MappingTable MappingTable = 1; */ + if (message.MappingTable) + MappingTable.internalBinaryWrite(message.MappingTable, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.GetMappingTableResponse + */ +export const GetMappingTableResponse = new GetMappingTableResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListMappingTableRequest$Type extends MessageType { + constructor() { + super("api.ListMappingTableRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); + } + create(value?: PartialMessage): ListMappingTableRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Entity = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListMappingTableRequest): ListMappingTableRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* api.EntityType Entity */ 2: + message.Entity = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListMappingTableRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.EntityType Entity = 2; */ + if (message.Entity !== 0) + writer.tag(2, WireType.Varint).int32(message.Entity); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ListMappingTableRequest + */ +export const ListMappingTableRequest = new ListMappingTableRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListMappingTableResponse$Type extends MessageType { + constructor() { + super("api.ListMappingTableResponse", [ + { no: 1, name: "MappingTables", kind: "message", localName: "MappingTables", jsonName: "MappingTables", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTable } + ]); + } + create(value?: PartialMessage): ListMappingTableResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.MappingTables = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListMappingTableResponse): ListMappingTableResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated api.MappingTable MappingTables */ 1: + message.MappingTables.push(MappingTable.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListMappingTableResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated api.MappingTable MappingTables = 1; */ + for (let i = 0; i < message.MappingTables.length; i++) + MappingTable.internalBinaryWrite(message.MappingTables[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.ListMappingTableResponse + */ +export const ListMappingTableResponse = new ListMappingTableResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteMappingTableRequest$Type extends MessageType { + constructor() { + super("api.DeleteMappingTableRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, + { no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); + } + create(value?: PartialMessage): DeleteMappingTableRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteMappingTableRequest): DeleteMappingTableRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ID */ 2: + message.ID = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteMappingTableRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ID = 2; */ + if (message.ID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.DeleteMappingTableRequest + */ +export const DeleteMappingTableRequest = new DeleteMappingTableRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteMappingTableResponse$Type extends MessageType { + constructor() { + super("api.DeleteMappingTableResponse", []); + } + create(value?: PartialMessage): DeleteMappingTableResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteMappingTableResponse): DeleteMappingTableResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteMappingTableResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.DeleteMappingTableResponse + */ +export const DeleteMappingTableResponse = new DeleteMappingTableResponse$Type(); +/** + * @generated ServiceType for protobuf service api.RuleEngineService + */ +export const RuleEngineService = new ServiceType("api.RuleEngineService", [ + { name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["RuleEngine"], description: "Create or update an engine rule for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: PutEngineRuleRequest, O: PutEngineRuleResponse }, + { name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["RuleEngine"], description: "Get an engine rule for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: GetEngineRuleRequest, O: GetEngineRuleResponse }, + { name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["RuleEngine"], description: "List engine rules for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: ListEngineRuleRequest, O: ListEngineRuleResponse }, + { name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["RuleEngine"], description: "Delete an engine rule for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: DeleteEngineRuleRequest, O: DeleteEngineRuleResponse }, + { name: "ToggleDebugOn", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["RuleEngine"], description: "Turn on debug mode for the rule engine on a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: ToggleDebugOnRequest, O: ToggleDebugOnResponse } +], { "api.k8sService": "rule-server" }); +/** + * @generated ServiceType for protobuf service api.ComputationService + */ +export const ComputationService = new ServiceType("api.ComputationService", [ + { name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Computation"], description: "Create or update a computation for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: PutComputationRequest, O: PutComputationResponse }, + { name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Computation"], description: "Get a computation for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: GetComputationRequest, O: GetComputationResponse }, + { name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Computation"], description: "List computations for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: ListComputationRequest, O: ListComputationResponse }, + { name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Computation"], description: "Delete a computation for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: DeleteComputationRequest, O: DeleteComputationResponse } +], { "api.k8sService": "rule-server" }); +/** + * @generated ServiceType for protobuf service api.MappingTableService + */ +export const MappingTableService = new ServiceType("api.MappingTableService", [ + { name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["MappingTable"], description: "Create or update a mapping table for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: PutMappingTableRequest, O: PutMappingTableResponse }, + { name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["MappingTable"], description: "Get a mapping table for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: GetMappingTableRequest, O: GetMappingTableResponse }, + { name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["MappingTable"], description: "List mapping tables for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: ListMappingTableRequest, O: ListMappingTableResponse }, + { name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["MappingTable"], description: "Delete a mapping table for a project" }, "google.api.method_visibility": { restriction: "SDK" }, "api.rscType": "Project", "api.roles": "Platform.RuleEngine", "api.moduleID": "rules" }, I: DeleteMappingTableRequest, O: DeleteMappingTableResponse } +], { "api.k8sService": "rule-server" });