Files
npm-core-sdk/executionflowAction.ts
2025-03-20 10:05:56 +00:00

1031 lines
62 KiB
TypeScript

// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "executionflowAction.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 { HandlingunitSummary } from "./warehousingShared";
import { ExeFlowLine } from "./tradeShared";
import { OrderRequestedMilestones } from "./tradeShared";
import { MetadataElement } from "./shared";
import { DateTime } from "./shared";
import { ETA } from "./tradeShared";
import { EntityID } from "./shared";
import { CommandHeader } from "./shared";
import { ClaimSummary } from "./shared";
import { AttachmentSummary } from "./shared";
import { TradeTier } from "./tradeShared";
import { ExecutionflowStatusStruct } from "./tradeShared";
// Action Summary
// - MapSummaryToOrder : Map entity summary to Order entity > trade.order.ExecutionflowUpdated
// - NotifyPartnerApps : Notify new exeflow to PartnerApps
// - CreateDetectedOrder : Create an order for the detected ExecutionFlow > trade.order.OrderDetected
// - MapETAToOrder : map the Executionflow ETA to the corresponding order entity >trade.order.ExecutionflowETAUpdated
//
/**
*
* ExecutionflowMapSummaryToOrder : map the Executionflow status to the corresponding trade order entity
*
* @generated from protobuf message api.ExecutionflowMapSummaryToOrderPayload
*/
export interface ExecutionflowMapSummaryToOrderPayload {
/**
* @generated from protobuf field: api.ExecutionflowStatusStruct Status = 1 [json_name = "Status"];
*/
status?: ExecutionflowStatusStruct;
/**
* @generated from protobuf field: string OrderID = 2 [json_name = "OrderID"];
*/
orderID: string;
/**
* @generated from protobuf field: api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"];
*/
shipFrom?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier ShipTo = 5 [json_name = "ShipTo"];
*/
shipTo?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier Carrier = 6 [json_name = "Carrier"];
*/
carrier?: TradeTier;
/**
* @generated from protobuf field: string CarrierService = 7 [json_name = "CarrierService"];
*/
carrierService: string;
/**
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 16 [json_name = "Attachments"];
*/
attachments: AttachmentSummary[];
/**
* @generated from protobuf field: int32 AttachmentNumber = 17 [json_name = "AttachmentNumber"];
*/
attachmentNumber: number;
/**
* @generated from protobuf field: repeated api.ClaimSummary Claims = 18 [json_name = "Claims"];
*/
claims: ClaimSummary[];
/**
* @generated from protobuf field: int32 ClaimNumber = 19 [json_name = "ClaimNumber"];
*/
claimNumber: number;
}
/**
* @generated from protobuf message api.ExecutionflowMapSummaryToOrder
*/
export interface ExecutionflowMapSummaryToOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
*/
header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
*/
iD?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowMapSummaryToOrderPayload Payload = 3 [json_name = "Payload"];
*/
payload?: ExecutionflowMapSummaryToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapSummaryToOrderPayload EventPayload = 4 [json_name = "EventPayload"];
*/
eventPayload?: ExecutionflowMapSummaryToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapSummaryToOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
*/
previousPayload?: ExecutionflowMapSummaryToOrderPayload;
}
/**
*
* ExecutionflowMapETAToOrder : map the Executionflow ETA to the corresponding trade order entity
*
* @generated from protobuf message api.ExecutionflowMapETAToOrderPayload
*/
export interface ExecutionflowMapETAToOrderPayload {
/**
* @generated from protobuf field: api.ETA ExecutionflowETAComputed = 1 [json_name = "ExecutionflowETAComputed"];
*/
executionflowETAComputed?: ETA;
/**
* @generated from protobuf field: string OrderID = 2 [json_name = "OrderID"];
*/
orderID: string;
}
/**
* @generated from protobuf message api.ExecutionflowMapETAToOrder
*/
export interface ExecutionflowMapETAToOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
*/
header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
*/
iD?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowMapETAToOrderPayload Payload = 3 [json_name = "Payload"];
*/
payload?: ExecutionflowMapETAToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapETAToOrderPayload EventPayload = 4 [json_name = "EventPayload"];
*/
eventPayload?: ExecutionflowMapETAToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapETAToOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
*/
previousPayload?: ExecutionflowMapETAToOrderPayload;
}
/**
*
* NotifyPartnerApps : Notify new exeflow to partner Apps
*
* @generated from protobuf message api.ExecutionflowNotifyPartnerAppsPayload
*/
export interface ExecutionflowNotifyPartnerAppsPayload {
/**
* @generated from protobuf field: api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];
*/
creationDateTime?: DateTime;
/**
* @generated from protobuf field: string OrderID = 2 [json_name = "OrderID"];
*/
orderID: string;
/**
* Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
*
* @generated from protobuf field: repeated api.MetadataElement MetaData = 3 [json_name = "MetaData"];
*/
metaData: MetadataElement[];
/**
* Where to ship the order from
*
* @generated from protobuf field: api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"];
*/
shipFrom?: TradeTier;
/**
* Where to ship the order to
*
* @generated from protobuf field: api.TradeTier ShipTo = 5 [json_name = "ShipTo"];
*/
shipTo?: TradeTier;
/**
* Definition of the order carrier
*
* @generated from protobuf field: api.TradeTier Carrier = 6 [json_name = "Carrier"];
*/
carrier?: TradeTier;
/**
* Type of carrier service
*
* @generated from protobuf field: string CarrierService = 7 [json_name = "CarrierService"];
*/
carrierService: string;
/**
* @generated from protobuf field: api.OrderRequestedMilestones RequestedMilestones = 8 [json_name = "RequestedMilestones"];
*/
requestedMilestones?: OrderRequestedMilestones;
/**
* @generated from protobuf field: repeated api.ExeFlowLine Lines = 9 [json_name = "Lines"];
*/
lines: ExeFlowLine[];
/**
* @generated from protobuf field: repeated api.HandlingunitSummary Handlingunits = 11 [json_name = "Handlingunits"];
*/
handlingunits: HandlingunitSummary[];
/**
* @generated from protobuf field: api.ExecutionflowStatusStruct Status = 13 [json_name = "Status"];
*/
status?: ExecutionflowStatusStruct;
/**
* @generated from protobuf field: bool ShipFromAcked = 14 [json_name = "ShipFromAcked"];
*/
shipFromAcked: boolean;
/**
* @generated from protobuf field: bool ShipToAcked = 15 [json_name = "ShipToAcked"];
*/
shipToAcked: boolean;
}
/**
* @generated from protobuf message api.ExecutionflowNotifyPartnerApps
*/
export interface ExecutionflowNotifyPartnerApps {
/**
* @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
*/
header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
*/
iD?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowNotifyPartnerAppsPayload Payload = 3 [json_name = "Payload"];
*/
payload?: ExecutionflowNotifyPartnerAppsPayload;
/**
* @generated from protobuf field: api.ExecutionflowNotifyPartnerAppsPayload EventPayload = 4 [json_name = "EventPayload"];
*/
eventPayload?: ExecutionflowNotifyPartnerAppsPayload;
/**
* @generated from protobuf field: api.ExecutionflowNotifyPartnerAppsPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
*/
previousPayload?: ExecutionflowNotifyPartnerAppsPayload;
}
/**
*
* CreateDetectedOrder : Create order to give access to detected exeflow
*
* @generated from protobuf message api.ExecutionflowCreateDetectedOrderPayload
*/
export interface ExecutionflowCreateDetectedOrderPayload {
/**
* @generated from protobuf field: api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];
*/
creationDateTime?: DateTime;
/**
* @generated from protobuf field: string OrderID = 2 [json_name = "OrderID"];
*/
orderID: string;
/**
* @generated from protobuf field: repeated api.MetadataElement MetaData = 3 [json_name = "MetaData"];
*/
metaData: MetadataElement[];
/**
* @generated from protobuf field: api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"];
*/
shipFrom?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier ShipTo = 5 [json_name = "ShipTo"];
*/
shipTo?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier Carrier = 6 [json_name = "Carrier"];
*/
carrier?: TradeTier;
/**
* @generated from protobuf field: string CarrierService = 7 [json_name = "CarrierService"];
*/
carrierService: string;
/**
* @generated from protobuf field: api.OrderRequestedMilestones RequestedMilestones = 8 [json_name = "RequestedMilestones"];
*/
requestedMilestones?: OrderRequestedMilestones;
/**
* @generated from protobuf field: repeated api.ExeFlowLine Lines = 9 [json_name = "Lines"];
*/
lines: ExeFlowLine[];
// repeated HandlingunitSummary Handlingunits = 11;
/**
* @generated from protobuf field: api.ExecutionflowStatusStruct Status = 13 [json_name = "Status"];
*/
status?: ExecutionflowStatusStruct;
}
/**
* @generated from protobuf message api.ExecutionflowCreateDetectedOrder
*/
export interface ExecutionflowCreateDetectedOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
*/
header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
*/
iD?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowCreateDetectedOrderPayload Payload = 3 [json_name = "Payload"];
*/
payload?: ExecutionflowCreateDetectedOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowCreateDetectedOrderPayload EventPayload = 4 [json_name = "EventPayload"];
*/
eventPayload?: ExecutionflowCreateDetectedOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowCreateDetectedOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
*/
previousPayload?: ExecutionflowCreateDetectedOrderPayload;
}
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapSummaryToOrderPayload$Type extends MessageType<ExecutionflowMapSummaryToOrderPayload> {
constructor() {
super("api.ExecutionflowMapSummaryToOrderPayload", [
{ no: 1, name: "Status", kind: "message", jsonName: "Status", T: () => ExecutionflowStatusStruct },
{ no: 2, name: "OrderID", kind: "scalar", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "ShipFrom", kind: "message", jsonName: "ShipFrom", T: () => TradeTier },
{ no: 5, name: "ShipTo", kind: "message", jsonName: "ShipTo", T: () => TradeTier },
{ no: 6, name: "Carrier", kind: "message", jsonName: "Carrier", T: () => TradeTier },
{ no: 7, name: "CarrierService", kind: "scalar", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/ },
{ no: 16, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary },
{ no: 17, name: "AttachmentNumber", kind: "scalar", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/ },
{ no: 18, name: "Claims", kind: "message", jsonName: "Claims", repeat: 1 /*RepeatType.PACKED*/, T: () => ClaimSummary },
{ no: 19, name: "ClaimNumber", kind: "scalar", jsonName: "ClaimNumber", T: 5 /*ScalarType.INT32*/ }
], { "api.messageType": "Command", "api.payload": true, "api.action": "MapSummaryToOrder" });
}
create(value?: PartialMessage<ExecutionflowMapSummaryToOrderPayload>): ExecutionflowMapSummaryToOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.orderID = "";
message.carrierService = "";
message.attachments = [];
message.attachmentNumber = 0;
message.claims = [];
message.claimNumber = 0;
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapSummaryToOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapSummaryToOrderPayload): ExecutionflowMapSummaryToOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.ExecutionflowStatusStruct Status = 1 [json_name = "Status"];*/ 1:
message.status = ExecutionflowStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
case /* string OrderID = 2 [json_name = "OrderID"];*/ 2:
message.orderID = reader.string();
break;
case /* api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"];*/ 4:
message.shipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipFrom);
break;
case /* api.TradeTier ShipTo = 5 [json_name = "ShipTo"];*/ 5:
message.shipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipTo);
break;
case /* api.TradeTier Carrier = 6 [json_name = "Carrier"];*/ 6:
message.carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.carrier);
break;
case /* string CarrierService = 7 [json_name = "CarrierService"];*/ 7:
message.carrierService = reader.string();
break;
case /* repeated api.AttachmentSummary Attachments = 16 [json_name = "Attachments"];*/ 16:
message.attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* int32 AttachmentNumber = 17 [json_name = "AttachmentNumber"];*/ 17:
message.attachmentNumber = reader.int32();
break;
case /* repeated api.ClaimSummary Claims = 18 [json_name = "Claims"];*/ 18:
message.claims.push(ClaimSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* int32 ClaimNumber = 19 [json_name = "ClaimNumber"];*/ 19:
message.claimNumber = 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: ExecutionflowMapSummaryToOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.ExecutionflowStatusStruct Status = 1 [json_name = "Status"]; */
if (message.status)
ExecutionflowStatusStruct.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2 [json_name = "OrderID"]; */
if (message.orderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.orderID);
/* api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"]; */
if (message.shipFrom)
TradeTier.internalBinaryWrite(message.shipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipTo = 5 [json_name = "ShipTo"]; */
if (message.shipTo)
TradeTier.internalBinaryWrite(message.shipTo, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier Carrier = 6 [json_name = "Carrier"]; */
if (message.carrier)
TradeTier.internalBinaryWrite(message.carrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* string CarrierService = 7 [json_name = "CarrierService"]; */
if (message.carrierService !== "")
writer.tag(7, WireType.LengthDelimited).string(message.carrierService);
/* repeated api.AttachmentSummary Attachments = 16 [json_name = "Attachments"]; */
for (let i = 0; i < message.attachments.length; i++)
AttachmentSummary.internalBinaryWrite(message.attachments[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
/* int32 AttachmentNumber = 17 [json_name = "AttachmentNumber"]; */
if (message.attachmentNumber !== 0)
writer.tag(17, WireType.Varint).int32(message.attachmentNumber);
/* repeated api.ClaimSummary Claims = 18 [json_name = "Claims"]; */
for (let i = 0; i < message.claims.length; i++)
ClaimSummary.internalBinaryWrite(message.claims[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
/* int32 ClaimNumber = 19 [json_name = "ClaimNumber"]; */
if (message.claimNumber !== 0)
writer.tag(19, WireType.Varint).int32(message.claimNumber);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowMapSummaryToOrderPayload
*/
export const ExecutionflowMapSummaryToOrderPayload = new ExecutionflowMapSummaryToOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapSummaryToOrder$Type extends MessageType<ExecutionflowMapSummaryToOrder> {
constructor() {
super("api.ExecutionflowMapSummaryToOrder", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ExecutionflowMapSummaryToOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ExecutionflowMapSummaryToOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ExecutionflowMapSummaryToOrderPayload }
], { "api.messageType": "Command", "api.action": "MapSummaryToOrder", "api.resultingEvent": "order.ExecutionflowUpdated", "api.triggerNotEventFilters": "ETAUpdated,HUETAUpdated,Restored" });
}
create(value?: PartialMessage<ExecutionflowMapSummaryToOrder>): ExecutionflowMapSummaryToOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapSummaryToOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapSummaryToOrder): ExecutionflowMapSummaryToOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
break;
case /* api.ExecutionflowMapSummaryToOrderPayload Payload = 3 [json_name = "Payload"];*/ 3:
message.payload = ExecutionflowMapSummaryToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
break;
case /* api.ExecutionflowMapSummaryToOrderPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
message.eventPayload = ExecutionflowMapSummaryToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
break;
case /* api.ExecutionflowMapSummaryToOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
message.previousPayload = ExecutionflowMapSummaryToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
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: ExecutionflowMapSummaryToOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1 [json_name = "Header"]; */
if (message.header)
CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2 [json_name = "ID"]; */
if (message.iD)
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapSummaryToOrderPayload Payload = 3 [json_name = "Payload"]; */
if (message.payload)
ExecutionflowMapSummaryToOrderPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapSummaryToOrderPayload EventPayload = 4 [json_name = "EventPayload"]; */
if (message.eventPayload)
ExecutionflowMapSummaryToOrderPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapSummaryToOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
if (message.previousPayload)
ExecutionflowMapSummaryToOrderPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, 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.ExecutionflowMapSummaryToOrder
*/
export const ExecutionflowMapSummaryToOrder = new ExecutionflowMapSummaryToOrder$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapETAToOrderPayload$Type extends MessageType<ExecutionflowMapETAToOrderPayload> {
constructor() {
super("api.ExecutionflowMapETAToOrderPayload", [
{ no: 1, name: "ExecutionflowETAComputed", kind: "message", jsonName: "ExecutionflowETAComputed", T: () => ETA },
{ no: 2, name: "OrderID", kind: "scalar", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ }
], { "api.messageType": "Command", "api.payload": true, "api.action": "MapETAToOrder" });
}
create(value?: PartialMessage<ExecutionflowMapETAToOrderPayload>): ExecutionflowMapETAToOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.orderID = "";
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapETAToOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapETAToOrderPayload): ExecutionflowMapETAToOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.ETA ExecutionflowETAComputed = 1 [json_name = "ExecutionflowETAComputed"];*/ 1:
message.executionflowETAComputed = ETA.internalBinaryRead(reader, reader.uint32(), options, message.executionflowETAComputed);
break;
case /* string OrderID = 2 [json_name = "OrderID"];*/ 2:
message.orderID = 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: ExecutionflowMapETAToOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.ETA ExecutionflowETAComputed = 1 [json_name = "ExecutionflowETAComputed"]; */
if (message.executionflowETAComputed)
ETA.internalBinaryWrite(message.executionflowETAComputed, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2 [json_name = "OrderID"]; */
if (message.orderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.orderID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowMapETAToOrderPayload
*/
export const ExecutionflowMapETAToOrderPayload = new ExecutionflowMapETAToOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapETAToOrder$Type extends MessageType<ExecutionflowMapETAToOrder> {
constructor() {
super("api.ExecutionflowMapETAToOrder", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ExecutionflowMapETAToOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ExecutionflowMapETAToOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ExecutionflowMapETAToOrderPayload }
], { "api.messageType": "Command", "api.action": "MapETAToOrder", "api.resultingEvent": "order.ExecutionflowETAUpdated", "api.triggerEventFilters": "ETAUpdated,HUETAUpdated,Created,Detected,HUContentUpdated" });
}
create(value?: PartialMessage<ExecutionflowMapETAToOrder>): ExecutionflowMapETAToOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapETAToOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapETAToOrder): ExecutionflowMapETAToOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
break;
case /* api.ExecutionflowMapETAToOrderPayload Payload = 3 [json_name = "Payload"];*/ 3:
message.payload = ExecutionflowMapETAToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
break;
case /* api.ExecutionflowMapETAToOrderPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
message.eventPayload = ExecutionflowMapETAToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
break;
case /* api.ExecutionflowMapETAToOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
message.previousPayload = ExecutionflowMapETAToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
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: ExecutionflowMapETAToOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1 [json_name = "Header"]; */
if (message.header)
CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2 [json_name = "ID"]; */
if (message.iD)
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapETAToOrderPayload Payload = 3 [json_name = "Payload"]; */
if (message.payload)
ExecutionflowMapETAToOrderPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapETAToOrderPayload EventPayload = 4 [json_name = "EventPayload"]; */
if (message.eventPayload)
ExecutionflowMapETAToOrderPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapETAToOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
if (message.previousPayload)
ExecutionflowMapETAToOrderPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, 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.ExecutionflowMapETAToOrder
*/
export const ExecutionflowMapETAToOrder = new ExecutionflowMapETAToOrder$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowNotifyPartnerAppsPayload$Type extends MessageType<ExecutionflowNotifyPartnerAppsPayload> {
constructor() {
super("api.ExecutionflowNotifyPartnerAppsPayload", [
{ no: 1, name: "CreationDateTime", kind: "message", jsonName: "CreationDateTime", T: () => DateTime },
{ no: 2, name: "OrderID", kind: "scalar", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key", "api.transientRef": "Order,Payload.MetaData,hard" } },
{ no: 4, name: "ShipFrom", kind: "message", jsonName: "ShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order from" } } },
{ no: 5, name: "ShipTo", kind: "message", jsonName: "ShipTo", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order to" } } },
{ no: 6, name: "Carrier", kind: "message", jsonName: "Carrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Definition of the order carrier" } } },
{ no: 7, name: "CarrierService", kind: "scalar", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type of carrier service" } } },
{ no: 8, name: "RequestedMilestones", kind: "message", jsonName: "RequestedMilestones", T: () => OrderRequestedMilestones },
{ no: 9, name: "Lines", kind: "message", jsonName: "Lines", repeat: 1 /*RepeatType.PACKED*/, T: () => ExeFlowLine, options: { "api.aggKey": "LineID" } },
{ no: 11, name: "Handlingunits", kind: "message", jsonName: "Handlingunits", repeat: 1 /*RepeatType.PACKED*/, T: () => HandlingunitSummary, options: { "api.aggKey": "HandlingunitID" } },
{ no: 13, name: "Status", kind: "message", jsonName: "Status", T: () => ExecutionflowStatusStruct },
{ no: 14, name: "ShipFromAcked", kind: "scalar", jsonName: "ShipFromAcked", T: 8 /*ScalarType.BOOL*/ },
{ no: 15, name: "ShipToAcked", kind: "scalar", jsonName: "ShipToAcked", T: 8 /*ScalarType.BOOL*/ }
], { "api.messageType": "Command", "api.payload": true, "api.action": "NotifyPartnerApps" });
}
create(value?: PartialMessage<ExecutionflowNotifyPartnerAppsPayload>): ExecutionflowNotifyPartnerAppsPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.orderID = "";
message.metaData = [];
message.carrierService = "";
message.lines = [];
message.handlingunits = [];
message.shipFromAcked = false;
message.shipToAcked = false;
if (value !== undefined)
reflectionMergePartial<ExecutionflowNotifyPartnerAppsPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowNotifyPartnerAppsPayload): ExecutionflowNotifyPartnerAppsPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];*/ 1:
message.creationDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.creationDateTime);
break;
case /* string OrderID = 2 [json_name = "OrderID"];*/ 2:
message.orderID = reader.string();
break;
case /* repeated api.MetadataElement MetaData = 3 [json_name = "MetaData"];*/ 3:
message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"];*/ 4:
message.shipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipFrom);
break;
case /* api.TradeTier ShipTo = 5 [json_name = "ShipTo"];*/ 5:
message.shipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipTo);
break;
case /* api.TradeTier Carrier = 6 [json_name = "Carrier"];*/ 6:
message.carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.carrier);
break;
case /* string CarrierService = 7 [json_name = "CarrierService"];*/ 7:
message.carrierService = reader.string();
break;
case /* api.OrderRequestedMilestones RequestedMilestones = 8 [json_name = "RequestedMilestones"];*/ 8:
message.requestedMilestones = OrderRequestedMilestones.internalBinaryRead(reader, reader.uint32(), options, message.requestedMilestones);
break;
case /* repeated api.ExeFlowLine Lines = 9 [json_name = "Lines"];*/ 9:
message.lines.push(ExeFlowLine.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.HandlingunitSummary Handlingunits = 11 [json_name = "Handlingunits"];*/ 11:
message.handlingunits.push(HandlingunitSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.ExecutionflowStatusStruct Status = 13 [json_name = "Status"];*/ 13:
message.status = ExecutionflowStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
case /* bool ShipFromAcked = 14 [json_name = "ShipFromAcked"];*/ 14:
message.shipFromAcked = reader.bool();
break;
case /* bool ShipToAcked = 15 [json_name = "ShipToAcked"];*/ 15:
message.shipToAcked = 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: ExecutionflowNotifyPartnerAppsPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"]; */
if (message.creationDateTime)
DateTime.internalBinaryWrite(message.creationDateTime, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2 [json_name = "OrderID"]; */
if (message.orderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.orderID);
/* repeated api.MetadataElement MetaData = 3 [json_name = "MetaData"]; */
for (let i = 0; i < message.metaData.length; i++)
MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"]; */
if (message.shipFrom)
TradeTier.internalBinaryWrite(message.shipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipTo = 5 [json_name = "ShipTo"]; */
if (message.shipTo)
TradeTier.internalBinaryWrite(message.shipTo, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier Carrier = 6 [json_name = "Carrier"]; */
if (message.carrier)
TradeTier.internalBinaryWrite(message.carrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* string CarrierService = 7 [json_name = "CarrierService"]; */
if (message.carrierService !== "")
writer.tag(7, WireType.LengthDelimited).string(message.carrierService);
/* api.OrderRequestedMilestones RequestedMilestones = 8 [json_name = "RequestedMilestones"]; */
if (message.requestedMilestones)
OrderRequestedMilestones.internalBinaryWrite(message.requestedMilestones, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* repeated api.ExeFlowLine Lines = 9 [json_name = "Lines"]; */
for (let i = 0; i < message.lines.length; i++)
ExeFlowLine.internalBinaryWrite(message.lines[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
/* repeated api.HandlingunitSummary Handlingunits = 11 [json_name = "Handlingunits"]; */
for (let i = 0; i < message.handlingunits.length; i++)
HandlingunitSummary.internalBinaryWrite(message.handlingunits[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowStatusStruct Status = 13 [json_name = "Status"]; */
if (message.status)
ExecutionflowStatusStruct.internalBinaryWrite(message.status, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
/* bool ShipFromAcked = 14 [json_name = "ShipFromAcked"]; */
if (message.shipFromAcked !== false)
writer.tag(14, WireType.Varint).bool(message.shipFromAcked);
/* bool ShipToAcked = 15 [json_name = "ShipToAcked"]; */
if (message.shipToAcked !== false)
writer.tag(15, WireType.Varint).bool(message.shipToAcked);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowNotifyPartnerAppsPayload
*/
export const ExecutionflowNotifyPartnerAppsPayload = new ExecutionflowNotifyPartnerAppsPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowNotifyPartnerApps$Type extends MessageType<ExecutionflowNotifyPartnerApps> {
constructor() {
super("api.ExecutionflowNotifyPartnerApps", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ExecutionflowNotifyPartnerAppsPayload },
{ no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ExecutionflowNotifyPartnerAppsPayload },
{ no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ExecutionflowNotifyPartnerAppsPayload }
], { "api.messageType": "Command", "api.action": "NotifyPartnerApps", "api.triggerEventFilters": "Detected,Created", "api.triggerNotEventFilters": "Restored,ETAUpdated,HUETAUpdated" });
}
create(value?: PartialMessage<ExecutionflowNotifyPartnerApps>): ExecutionflowNotifyPartnerApps {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowNotifyPartnerApps>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowNotifyPartnerApps): ExecutionflowNotifyPartnerApps {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
break;
case /* api.ExecutionflowNotifyPartnerAppsPayload Payload = 3 [json_name = "Payload"];*/ 3:
message.payload = ExecutionflowNotifyPartnerAppsPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
break;
case /* api.ExecutionflowNotifyPartnerAppsPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
message.eventPayload = ExecutionflowNotifyPartnerAppsPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
break;
case /* api.ExecutionflowNotifyPartnerAppsPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
message.previousPayload = ExecutionflowNotifyPartnerAppsPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
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: ExecutionflowNotifyPartnerApps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1 [json_name = "Header"]; */
if (message.header)
CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2 [json_name = "ID"]; */
if (message.iD)
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowNotifyPartnerAppsPayload Payload = 3 [json_name = "Payload"]; */
if (message.payload)
ExecutionflowNotifyPartnerAppsPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowNotifyPartnerAppsPayload EventPayload = 4 [json_name = "EventPayload"]; */
if (message.eventPayload)
ExecutionflowNotifyPartnerAppsPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowNotifyPartnerAppsPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
if (message.previousPayload)
ExecutionflowNotifyPartnerAppsPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, 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.ExecutionflowNotifyPartnerApps
*/
export const ExecutionflowNotifyPartnerApps = new ExecutionflowNotifyPartnerApps$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowCreateDetectedOrderPayload$Type extends MessageType<ExecutionflowCreateDetectedOrderPayload> {
constructor() {
super("api.ExecutionflowCreateDetectedOrderPayload", [
{ no: 1, name: "CreationDateTime", kind: "message", jsonName: "CreationDateTime", T: () => DateTime },
{ no: 2, name: "OrderID", kind: "scalar", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement },
{ no: 4, name: "ShipFrom", kind: "message", jsonName: "ShipFrom", T: () => TradeTier },
{ no: 5, name: "ShipTo", kind: "message", jsonName: "ShipTo", T: () => TradeTier },
{ no: 6, name: "Carrier", kind: "message", jsonName: "Carrier", T: () => TradeTier },
{ no: 7, name: "CarrierService", kind: "scalar", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/ },
{ no: 8, name: "RequestedMilestones", kind: "message", jsonName: "RequestedMilestones", T: () => OrderRequestedMilestones },
{ no: 9, name: "Lines", kind: "message", jsonName: "Lines", repeat: 1 /*RepeatType.PACKED*/, T: () => ExeFlowLine },
{ no: 13, name: "Status", kind: "message", jsonName: "Status", T: () => ExecutionflowStatusStruct }
], { "api.messageType": "Command", "api.payload": true, "api.action": "CreateDetectedOrder" });
}
create(value?: PartialMessage<ExecutionflowCreateDetectedOrderPayload>): ExecutionflowCreateDetectedOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.orderID = "";
message.metaData = [];
message.carrierService = "";
message.lines = [];
if (value !== undefined)
reflectionMergePartial<ExecutionflowCreateDetectedOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowCreateDetectedOrderPayload): ExecutionflowCreateDetectedOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];*/ 1:
message.creationDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.creationDateTime);
break;
case /* string OrderID = 2 [json_name = "OrderID"];*/ 2:
message.orderID = reader.string();
break;
case /* repeated api.MetadataElement MetaData = 3 [json_name = "MetaData"];*/ 3:
message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"];*/ 4:
message.shipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipFrom);
break;
case /* api.TradeTier ShipTo = 5 [json_name = "ShipTo"];*/ 5:
message.shipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipTo);
break;
case /* api.TradeTier Carrier = 6 [json_name = "Carrier"];*/ 6:
message.carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.carrier);
break;
case /* string CarrierService = 7 [json_name = "CarrierService"];*/ 7:
message.carrierService = reader.string();
break;
case /* api.OrderRequestedMilestones RequestedMilestones = 8 [json_name = "RequestedMilestones"];*/ 8:
message.requestedMilestones = OrderRequestedMilestones.internalBinaryRead(reader, reader.uint32(), options, message.requestedMilestones);
break;
case /* repeated api.ExeFlowLine Lines = 9 [json_name = "Lines"];*/ 9:
message.lines.push(ExeFlowLine.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.ExecutionflowStatusStruct Status = 13 [json_name = "Status"];*/ 13:
message.status = ExecutionflowStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
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: ExecutionflowCreateDetectedOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"]; */
if (message.creationDateTime)
DateTime.internalBinaryWrite(message.creationDateTime, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2 [json_name = "OrderID"]; */
if (message.orderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.orderID);
/* repeated api.MetadataElement MetaData = 3 [json_name = "MetaData"]; */
for (let i = 0; i < message.metaData.length; i++)
MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipFrom = 4 [json_name = "ShipFrom"]; */
if (message.shipFrom)
TradeTier.internalBinaryWrite(message.shipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipTo = 5 [json_name = "ShipTo"]; */
if (message.shipTo)
TradeTier.internalBinaryWrite(message.shipTo, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier Carrier = 6 [json_name = "Carrier"]; */
if (message.carrier)
TradeTier.internalBinaryWrite(message.carrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* string CarrierService = 7 [json_name = "CarrierService"]; */
if (message.carrierService !== "")
writer.tag(7, WireType.LengthDelimited).string(message.carrierService);
/* api.OrderRequestedMilestones RequestedMilestones = 8 [json_name = "RequestedMilestones"]; */
if (message.requestedMilestones)
OrderRequestedMilestones.internalBinaryWrite(message.requestedMilestones, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* repeated api.ExeFlowLine Lines = 9 [json_name = "Lines"]; */
for (let i = 0; i < message.lines.length; i++)
ExeFlowLine.internalBinaryWrite(message.lines[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowStatusStruct Status = 13 [json_name = "Status"]; */
if (message.status)
ExecutionflowStatusStruct.internalBinaryWrite(message.status, writer.tag(13, 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.ExecutionflowCreateDetectedOrderPayload
*/
export const ExecutionflowCreateDetectedOrderPayload = new ExecutionflowCreateDetectedOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowCreateDetectedOrder$Type extends MessageType<ExecutionflowCreateDetectedOrder> {
constructor() {
super("api.ExecutionflowCreateDetectedOrder", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ExecutionflowCreateDetectedOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ExecutionflowCreateDetectedOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ExecutionflowCreateDetectedOrderPayload }
], { "api.messageType": "Command", "api.action": "CreateDetectedOrder", "api.resultingEvent": "order.ExecutionflowDetected", "api.triggerEventFilters": "Detected,Redetected" });
}
create(value?: PartialMessage<ExecutionflowCreateDetectedOrder>): ExecutionflowCreateDetectedOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowCreateDetectedOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowCreateDetectedOrder): ExecutionflowCreateDetectedOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
break;
case /* api.ExecutionflowCreateDetectedOrderPayload Payload = 3 [json_name = "Payload"];*/ 3:
message.payload = ExecutionflowCreateDetectedOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
break;
case /* api.ExecutionflowCreateDetectedOrderPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
message.eventPayload = ExecutionflowCreateDetectedOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
break;
case /* api.ExecutionflowCreateDetectedOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
message.previousPayload = ExecutionflowCreateDetectedOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
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: ExecutionflowCreateDetectedOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1 [json_name = "Header"]; */
if (message.header)
CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2 [json_name = "ID"]; */
if (message.iD)
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowCreateDetectedOrderPayload Payload = 3 [json_name = "Payload"]; */
if (message.payload)
ExecutionflowCreateDetectedOrderPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowCreateDetectedOrderPayload EventPayload = 4 [json_name = "EventPayload"]; */
if (message.eventPayload)
ExecutionflowCreateDetectedOrderPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowCreateDetectedOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
if (message.previousPayload)
ExecutionflowCreateDetectedOrderPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, 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.ExecutionflowCreateDetectedOrder
*/
export const ExecutionflowCreateDetectedOrder = new ExecutionflowCreateDetectedOrder$Type();