// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "appointmentAction.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 { Address } from "./repositoryShared"; import { EntityID } from "./shared"; import { CommandHeader } from "./shared"; import { AppointmentContent } from "./slotbooking"; import { AttachmentSummary } from "./shared"; import { AppointmentStatusStruct } from "./collabShared"; import { Slot } from "./slotbooking"; import { MetadataElement } from "./shared"; import { AppointmentType } from "./slotbooking"; // Action Summary // - Notify : Push appointment to project present into the commissions /** * * Notify : Push the appointment event to partner apps * * @generated from protobuf message api.AppointmentNotifyPayload */ export interface AppointmentNotifyPayload { /** * @generated from protobuf field: api.AppointmentType AppointmentType = 1 */ AppointmentType: AppointmentType; /** * repeated AppointmentCommission Commissions = 2; * repeated SegmentationSelection SegmentationSelections = 4; * * @generated from protobuf field: repeated api.MetadataElement SegmentationKeys = 25 */ SegmentationKeys: MetadataElement[]; /** * @generated from protobuf field: repeated api.MetadataElement CarrierInformation = 19 */ CarrierInformation: MetadataElement[]; /** * @generated from protobuf field: api.Slot Slot = 6 */ Slot?: Slot; /** * repeated string Emails = 7; * repeated string RemovedEmails = 16; * * @generated from protobuf field: api.AppointmentStatusStruct Status = 8 */ Status?: AppointmentStatusStruct; /** * @generated from protobuf field: string CreationDate = 9 */ CreationDate: string; /** * @generated from protobuf field: repeated api.MetadataElement MetaData = 10 */ MetaData: MetadataElement[]; /** * string CarrierID = 11; * string CarrierName = 12; * * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 13 */ Attachments: AttachmentSummary[]; /** * @generated from protobuf field: int32 AttachmentNumber = 14 */ AttachmentNumber: number; /** * @generated from protobuf field: string Reason = 17 */ Reason: string; /** * @generated from protobuf field: bool InstructionAck = 18 */ InstructionAck: boolean; /** * @generated from protobuf field: string TimeZone = 20 */ TimeZone: string; /** * @generated from protobuf field: api.AppointmentContent Loading = 21 */ Loading?: AppointmentContent; /** * @generated from protobuf field: api.AppointmentContent Unloading = 22 */ Unloading?: AppointmentContent; /** * @generated from protobuf field: repeated string Attendees = 23 */ Attendees: string[]; /** * @generated from protobuf field: repeated string RemovedAttendees = 24 */ RemovedAttendees: string[]; /** * @generated from protobuf field: bool WMSCreated = 26 */ WMSCreated: boolean; } /** * @generated from protobuf message api.AppointmentNotify */ export interface AppointmentNotify { /** * @generated from protobuf field: api.CommandHeader Header = 1 */ Header?: CommandHeader; /** * @generated from protobuf field: api.EntityID ID = 2 */ ID?: EntityID; /** * @generated from protobuf field: api.AppointmentNotifyPayload Payload = 3 */ Payload?: AppointmentNotifyPayload; /** * @generated from protobuf field: api.AppointmentNotifyPayload EventPayload = 4 */ EventPayload?: AppointmentNotifyPayload; /** * @generated from protobuf field: api.AppointmentNotifyPayload PreviousPayload = 5 */ PreviousPayload?: AppointmentNotifyPayload; } /** * * Mail : Push the appointment event to watchers * * @generated from protobuf message api.AppointmentMailPayload */ export interface AppointmentMailPayload { /** * @generated from protobuf field: api.AppointmentType AppointmentType = 1 */ AppointmentType: AppointmentType; /** * repeated AppointmentCommission Commissions = 2; * repeated SegmentationSelection SegmentationSelections = 4; * * @generated from protobuf field: repeated api.MetadataElement SegmentationKeys = 25 */ SegmentationKeys: MetadataElement[]; /** * @generated from protobuf field: repeated api.MetadataElement CarrierInformation = 19 */ CarrierInformation: MetadataElement[]; /** * @generated from protobuf field: api.Slot Slot = 6 */ Slot?: Slot; /** * repeated string Emails = 7; * repeated string RemovedEmails = 16; * * @generated from protobuf field: api.AppointmentStatusStruct Status = 8 */ Status?: AppointmentStatusStruct; /** * @generated from protobuf field: string CreationDate = 9 */ CreationDate: string; /** * @generated from protobuf field: repeated api.MetadataElement MetaData = 10 */ MetaData: MetadataElement[]; /** * string CarrierID = 11; * string CarrierName = 12; * * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 13 */ Attachments: AttachmentSummary[]; /** * @generated from protobuf field: int32 AttachmentNumber = 14 */ AttachmentNumber: number; /** * @generated from protobuf field: string Reason = 17 */ Reason: string; /** * Address of the appointment site * * @generated from protobuf field: api.Address Address = 18 */ Address?: Address; /** * Name of the appointment site * * @generated from protobuf field: string SiteName = 20 */ SiteName: string; /** * @generated from protobuf field: api.AppointmentContent Loading = 21 */ Loading?: AppointmentContent; /** * @generated from protobuf field: api.AppointmentContent Unloading = 22 */ Unloading?: AppointmentContent; /** * @generated from protobuf field: repeated string Attendees = 23 */ Attendees: string[]; /** * @generated from protobuf field: repeated string RemovedAttendees = 24 */ RemovedAttendees: string[]; } /** * @generated from protobuf message api.AppointmentMail */ export interface AppointmentMail { /** * @generated from protobuf field: api.CommandHeader Header = 1 */ Header?: CommandHeader; /** * @generated from protobuf field: api.EntityID ID = 2 */ ID?: EntityID; /** * @generated from protobuf field: api.AppointmentMailPayload Payload = 3 */ Payload?: AppointmentMailPayload; /** * @generated from protobuf field: api.AppointmentMailPayload EventPayload = 4 */ EventPayload?: AppointmentMailPayload; /** * @generated from protobuf field: api.AppointmentMailPayload PreviousPayload = 5 */ PreviousPayload?: AppointmentMailPayload; } /** * * LockBooking : Push the appointment event to watchers * * @generated from protobuf message api.AppointmentLockBookingPayload */ export interface AppointmentLockBookingPayload { /** * @generated from protobuf field: api.AppointmentStatusStruct Status = 1 */ Status?: AppointmentStatusStruct; } /** * @generated from protobuf message api.AppointmentLockBooking */ export interface AppointmentLockBooking { /** * @generated from protobuf field: api.CommandHeader Header = 1 */ Header?: CommandHeader; /** * @generated from protobuf field: api.EntityID ID = 2 */ ID?: EntityID; /** * @generated from protobuf field: api.AppointmentLockBookingPayload Payload = 3 */ Payload?: AppointmentLockBookingPayload; /** * @generated from protobuf field: api.AppointmentLockBookingPayload EventPayload = 4 */ EventPayload?: AppointmentLockBookingPayload; /** * @generated from protobuf field: api.AppointmentLockBookingPayload PreviousPayload = 5 */ PreviousPayload?: AppointmentLockBookingPayload; } // @generated message type with reflection information, may provide speed optimized methods class AppointmentNotifyPayload$Type extends MessageType { constructor() { super("api.AppointmentNotifyPayload", [ { no: 1, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType] }, { no: 25, name: "SegmentationKeys", kind: "message", localName: "SegmentationKeys", jsonName: "SegmentationKeys", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement }, { no: 19, name: "CarrierInformation", kind: "message", localName: "CarrierInformation", jsonName: "CarrierInformation", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement }, { no: 6, name: "Slot", kind: "message", localName: "Slot", jsonName: "Slot", T: () => Slot }, { no: 8, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct }, { no: 9, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/ }, { no: 10, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement }, { no: 13, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary }, { no: 14, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/ }, { no: 17, name: "Reason", kind: "scalar", localName: "Reason", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ }, { no: 18, name: "InstructionAck", kind: "scalar", localName: "InstructionAck", jsonName: "InstructionAck", T: 8 /*ScalarType.BOOL*/ }, { no: 20, name: "TimeZone", kind: "scalar", localName: "TimeZone", jsonName: "TimeZone", T: 9 /*ScalarType.STRING*/ }, { no: 21, name: "Loading", kind: "message", localName: "Loading", jsonName: "Loading", T: () => AppointmentContent }, { no: 22, name: "Unloading", kind: "message", localName: "Unloading", jsonName: "Unloading", T: () => AppointmentContent }, { no: 23, name: "Attendees", kind: "scalar", localName: "Attendees", jsonName: "Attendees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 24, name: "RemovedAttendees", kind: "scalar", localName: "RemovedAttendees", jsonName: "RemovedAttendees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 26, name: "WMSCreated", kind: "scalar", localName: "WMSCreated", jsonName: "WMSCreated", T: 8 /*ScalarType.BOOL*/ } ], { "api.messageType": "Command", "api.payload": true, "api.action": "Notify" }); } create(value?: PartialMessage): AppointmentNotifyPayload { const message = globalThis.Object.create((this.messagePrototype!)); message.AppointmentType = 0; message.SegmentationKeys = []; message.CarrierInformation = []; message.CreationDate = ""; message.MetaData = []; message.Attachments = []; message.AttachmentNumber = 0; message.Reason = ""; message.InstructionAck = false; message.TimeZone = ""; message.Attendees = []; message.RemovedAttendees = []; message.WMSCreated = false; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentNotifyPayload): AppointmentNotifyPayload { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.AppointmentType AppointmentType */ 1: message.AppointmentType = reader.int32(); break; case /* repeated api.MetadataElement SegmentationKeys */ 25: message.SegmentationKeys.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated api.MetadataElement CarrierInformation */ 19: message.CarrierInformation.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* api.Slot Slot */ 6: message.Slot = Slot.internalBinaryRead(reader, reader.uint32(), options, message.Slot); break; case /* api.AppointmentStatusStruct Status */ 8: message.Status = AppointmentStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status); break; case /* string CreationDate */ 9: message.CreationDate = reader.string(); break; case /* repeated api.MetadataElement MetaData */ 10: message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated api.AttachmentSummary Attachments */ 13: message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options)); break; case /* int32 AttachmentNumber */ 14: message.AttachmentNumber = reader.int32(); break; case /* string Reason */ 17: message.Reason = reader.string(); break; case /* bool InstructionAck */ 18: message.InstructionAck = reader.bool(); break; case /* string TimeZone */ 20: message.TimeZone = reader.string(); break; case /* api.AppointmentContent Loading */ 21: message.Loading = AppointmentContent.internalBinaryRead(reader, reader.uint32(), options, message.Loading); break; case /* api.AppointmentContent Unloading */ 22: message.Unloading = AppointmentContent.internalBinaryRead(reader, reader.uint32(), options, message.Unloading); break; case /* repeated string Attendees */ 23: message.Attendees.push(reader.string()); break; case /* repeated string RemovedAttendees */ 24: message.RemovedAttendees.push(reader.string()); break; case /* bool WMSCreated */ 26: message.WMSCreated = 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: AppointmentNotifyPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.AppointmentType AppointmentType = 1; */ if (message.AppointmentType !== 0) writer.tag(1, WireType.Varint).int32(message.AppointmentType); /* api.Slot Slot = 6; */ if (message.Slot) Slot.internalBinaryWrite(message.Slot, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentStatusStruct Status = 8; */ if (message.Status) AppointmentStatusStruct.internalBinaryWrite(message.Status, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); /* string CreationDate = 9; */ if (message.CreationDate !== "") writer.tag(9, WireType.LengthDelimited).string(message.CreationDate); /* repeated api.MetadataElement MetaData = 10; */ for (let i = 0; i < message.MetaData.length; i++) MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join(); /* repeated api.AttachmentSummary Attachments = 13; */ for (let i = 0; i < message.Attachments.length; i++) AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join(); /* int32 AttachmentNumber = 14; */ if (message.AttachmentNumber !== 0) writer.tag(14, WireType.Varint).int32(message.AttachmentNumber); /* string Reason = 17; */ if (message.Reason !== "") writer.tag(17, WireType.LengthDelimited).string(message.Reason); /* bool InstructionAck = 18; */ if (message.InstructionAck !== false) writer.tag(18, WireType.Varint).bool(message.InstructionAck); /* repeated api.MetadataElement CarrierInformation = 19; */ for (let i = 0; i < message.CarrierInformation.length; i++) MetadataElement.internalBinaryWrite(message.CarrierInformation[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join(); /* string TimeZone = 20; */ if (message.TimeZone !== "") writer.tag(20, WireType.LengthDelimited).string(message.TimeZone); /* api.AppointmentContent Loading = 21; */ if (message.Loading) AppointmentContent.internalBinaryWrite(message.Loading, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentContent Unloading = 22; */ if (message.Unloading) AppointmentContent.internalBinaryWrite(message.Unloading, writer.tag(22, WireType.LengthDelimited).fork(), options).join(); /* repeated string Attendees = 23; */ for (let i = 0; i < message.Attendees.length; i++) writer.tag(23, WireType.LengthDelimited).string(message.Attendees[i]); /* repeated string RemovedAttendees = 24; */ for (let i = 0; i < message.RemovedAttendees.length; i++) writer.tag(24, WireType.LengthDelimited).string(message.RemovedAttendees[i]); /* repeated api.MetadataElement SegmentationKeys = 25; */ for (let i = 0; i < message.SegmentationKeys.length; i++) MetadataElement.internalBinaryWrite(message.SegmentationKeys[i], writer.tag(25, WireType.LengthDelimited).fork(), options).join(); /* bool WMSCreated = 26; */ if (message.WMSCreated !== false) writer.tag(26, WireType.Varint).bool(message.WMSCreated); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.AppointmentNotifyPayload */ export const AppointmentNotifyPayload = new AppointmentNotifyPayload$Type(); // @generated message type with reflection information, may provide speed optimized methods class AppointmentNotify$Type extends MessageType { constructor() { super("api.AppointmentNotify", [ { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader }, { no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID }, { no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => AppointmentNotifyPayload }, { no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => AppointmentNotifyPayload }, { no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => AppointmentNotifyPayload } ], { "api.messageType": "Command", "api.action": "Notify", "api.triggerNotEventFilters": "AllocationConfirmed", "api.windowMethod": "TumblingProcessingTimeWindows", "api.keyByExpression": "obj.getID().getRefID()" }); } create(value?: PartialMessage): AppointmentNotify { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentNotify): AppointmentNotify { 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: message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); break; case /* api.EntityID ID */ 2: message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID); break; case /* api.AppointmentNotifyPayload Payload */ 3: message.Payload = AppointmentNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload); break; case /* api.AppointmentNotifyPayload EventPayload */ 4: message.EventPayload = AppointmentNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload); break; case /* api.AppointmentNotifyPayload PreviousPayload */ 5: message.PreviousPayload = AppointmentNotifyPayload.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: AppointmentNotify, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.CommandHeader Header = 1; */ if (message.Header) CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* api.EntityID ID = 2; */ if (message.ID) EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentNotifyPayload Payload = 3; */ if (message.Payload) AppointmentNotifyPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentNotifyPayload EventPayload = 4; */ if (message.EventPayload) AppointmentNotifyPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentNotifyPayload PreviousPayload = 5; */ if (message.PreviousPayload) AppointmentNotifyPayload.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.AppointmentNotify */ export const AppointmentNotify = new AppointmentNotify$Type(); // @generated message type with reflection information, may provide speed optimized methods class AppointmentMailPayload$Type extends MessageType { constructor() { super("api.AppointmentMailPayload", [ { no: 1, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType] }, { no: 25, name: "SegmentationKeys", kind: "message", localName: "SegmentationKeys", jsonName: "SegmentationKeys", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement }, { no: 19, name: "CarrierInformation", kind: "message", localName: "CarrierInformation", jsonName: "CarrierInformation", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement }, { no: 6, name: "Slot", kind: "message", localName: "Slot", jsonName: "Slot", T: () => Slot }, { no: 8, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct }, { no: 9, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/ }, { no: 10, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement }, { no: 13, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary }, { no: 14, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/ }, { no: 17, name: "Reason", kind: "scalar", localName: "Reason", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ }, { no: 18, name: "Address", kind: "message", localName: "Address", jsonName: "Address", T: () => Address }, { no: 20, name: "SiteName", kind: "scalar", localName: "SiteName", jsonName: "SiteName", T: 9 /*ScalarType.STRING*/ }, { no: 21, name: "Loading", kind: "message", localName: "Loading", jsonName: "Loading", T: () => AppointmentContent }, { no: 22, name: "Unloading", kind: "message", localName: "Unloading", jsonName: "Unloading", T: () => AppointmentContent }, { no: 23, name: "Attendees", kind: "scalar", localName: "Attendees", jsonName: "Attendees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 24, name: "RemovedAttendees", kind: "scalar", localName: "RemovedAttendees", jsonName: "RemovedAttendees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ], { "api.messageType": "Command", "api.payload": true, "api.action": "Mail" }); } create(value?: PartialMessage): AppointmentMailPayload { const message = globalThis.Object.create((this.messagePrototype!)); message.AppointmentType = 0; message.SegmentationKeys = []; message.CarrierInformation = []; message.CreationDate = ""; message.MetaData = []; message.Attachments = []; message.AttachmentNumber = 0; message.Reason = ""; message.SiteName = ""; message.Attendees = []; message.RemovedAttendees = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentMailPayload): AppointmentMailPayload { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.AppointmentType AppointmentType */ 1: message.AppointmentType = reader.int32(); break; case /* repeated api.MetadataElement SegmentationKeys */ 25: message.SegmentationKeys.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated api.MetadataElement CarrierInformation */ 19: message.CarrierInformation.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* api.Slot Slot */ 6: message.Slot = Slot.internalBinaryRead(reader, reader.uint32(), options, message.Slot); break; case /* api.AppointmentStatusStruct Status */ 8: message.Status = AppointmentStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status); break; case /* string CreationDate */ 9: message.CreationDate = reader.string(); break; case /* repeated api.MetadataElement MetaData */ 10: message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated api.AttachmentSummary Attachments */ 13: message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options)); break; case /* int32 AttachmentNumber */ 14: message.AttachmentNumber = reader.int32(); break; case /* string Reason */ 17: message.Reason = reader.string(); break; case /* api.Address Address */ 18: message.Address = Address.internalBinaryRead(reader, reader.uint32(), options, message.Address); break; case /* string SiteName */ 20: message.SiteName = reader.string(); break; case /* api.AppointmentContent Loading */ 21: message.Loading = AppointmentContent.internalBinaryRead(reader, reader.uint32(), options, message.Loading); break; case /* api.AppointmentContent Unloading */ 22: message.Unloading = AppointmentContent.internalBinaryRead(reader, reader.uint32(), options, message.Unloading); break; case /* repeated string Attendees */ 23: message.Attendees.push(reader.string()); break; case /* repeated string RemovedAttendees */ 24: message.RemovedAttendees.push(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: AppointmentMailPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.AppointmentType AppointmentType = 1; */ if (message.AppointmentType !== 0) writer.tag(1, WireType.Varint).int32(message.AppointmentType); /* api.Slot Slot = 6; */ if (message.Slot) Slot.internalBinaryWrite(message.Slot, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentStatusStruct Status = 8; */ if (message.Status) AppointmentStatusStruct.internalBinaryWrite(message.Status, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); /* string CreationDate = 9; */ if (message.CreationDate !== "") writer.tag(9, WireType.LengthDelimited).string(message.CreationDate); /* repeated api.MetadataElement MetaData = 10; */ for (let i = 0; i < message.MetaData.length; i++) MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join(); /* repeated api.AttachmentSummary Attachments = 13; */ for (let i = 0; i < message.Attachments.length; i++) AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join(); /* int32 AttachmentNumber = 14; */ if (message.AttachmentNumber !== 0) writer.tag(14, WireType.Varint).int32(message.AttachmentNumber); /* string Reason = 17; */ if (message.Reason !== "") writer.tag(17, WireType.LengthDelimited).string(message.Reason); /* api.Address Address = 18; */ if (message.Address) Address.internalBinaryWrite(message.Address, writer.tag(18, WireType.LengthDelimited).fork(), options).join(); /* repeated api.MetadataElement CarrierInformation = 19; */ for (let i = 0; i < message.CarrierInformation.length; i++) MetadataElement.internalBinaryWrite(message.CarrierInformation[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join(); /* string SiteName = 20; */ if (message.SiteName !== "") writer.tag(20, WireType.LengthDelimited).string(message.SiteName); /* api.AppointmentContent Loading = 21; */ if (message.Loading) AppointmentContent.internalBinaryWrite(message.Loading, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentContent Unloading = 22; */ if (message.Unloading) AppointmentContent.internalBinaryWrite(message.Unloading, writer.tag(22, WireType.LengthDelimited).fork(), options).join(); /* repeated string Attendees = 23; */ for (let i = 0; i < message.Attendees.length; i++) writer.tag(23, WireType.LengthDelimited).string(message.Attendees[i]); /* repeated string RemovedAttendees = 24; */ for (let i = 0; i < message.RemovedAttendees.length; i++) writer.tag(24, WireType.LengthDelimited).string(message.RemovedAttendees[i]); /* repeated api.MetadataElement SegmentationKeys = 25; */ for (let i = 0; i < message.SegmentationKeys.length; i++) MetadataElement.internalBinaryWrite(message.SegmentationKeys[i], writer.tag(25, 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.AppointmentMailPayload */ export const AppointmentMailPayload = new AppointmentMailPayload$Type(); // @generated message type with reflection information, may provide speed optimized methods class AppointmentMail$Type extends MessageType { constructor() { super("api.AppointmentMail", [ { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader }, { no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID }, { no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => AppointmentMailPayload }, { no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => AppointmentMailPayload }, { no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => AppointmentMailPayload } ], { "api.messageType": "Command", "api.action": "Mail", "api.resultingEvent": "collab.notif.Created", "api.triggerEventFilters": "Created,EmailsAdded,SlotUpdated,Canceled,AttendeesAdded" }); } create(value?: PartialMessage): AppointmentMail { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentMail): AppointmentMail { 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: message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); break; case /* api.EntityID ID */ 2: message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID); break; case /* api.AppointmentMailPayload Payload */ 3: message.Payload = AppointmentMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload); break; case /* api.AppointmentMailPayload EventPayload */ 4: message.EventPayload = AppointmentMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload); break; case /* api.AppointmentMailPayload PreviousPayload */ 5: message.PreviousPayload = AppointmentMailPayload.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: AppointmentMail, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.CommandHeader Header = 1; */ if (message.Header) CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* api.EntityID ID = 2; */ if (message.ID) EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentMailPayload Payload = 3; */ if (message.Payload) AppointmentMailPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentMailPayload EventPayload = 4; */ if (message.EventPayload) AppointmentMailPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentMailPayload PreviousPayload = 5; */ if (message.PreviousPayload) AppointmentMailPayload.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.AppointmentMail */ export const AppointmentMail = new AppointmentMail$Type(); // @generated message type with reflection information, may provide speed optimized methods class AppointmentLockBookingPayload$Type extends MessageType { constructor() { super("api.AppointmentLockBookingPayload", [ { no: 1, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct } ], { "api.messageType": "Command", "api.payload": true, "api.action": "LockBooking" }); } create(value?: PartialMessage): AppointmentLockBookingPayload { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentLockBookingPayload): AppointmentLockBookingPayload { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.AppointmentStatusStruct Status */ 1: message.Status = AppointmentStatusStruct.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: AppointmentLockBookingPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.AppointmentStatusStruct Status = 1; */ if (message.Status) AppointmentStatusStruct.internalBinaryWrite(message.Status, 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.AppointmentLockBookingPayload */ export const AppointmentLockBookingPayload = new AppointmentLockBookingPayload$Type(); // @generated message type with reflection information, may provide speed optimized methods class AppointmentLockBooking$Type extends MessageType { constructor() { super("api.AppointmentLockBooking", [ { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader }, { no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID }, { no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => AppointmentLockBookingPayload }, { no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => AppointmentLockBookingPayload }, { no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => AppointmentLockBookingPayload } ], { "api.messageType": "Command", "api.action": "LockBooking", "api.triggerEventFilters": "CarrierDeparted" }); } create(value?: PartialMessage): AppointmentLockBooking { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentLockBooking): AppointmentLockBooking { 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: message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); break; case /* api.EntityID ID */ 2: message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID); break; case /* api.AppointmentLockBookingPayload Payload */ 3: message.Payload = AppointmentLockBookingPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload); break; case /* api.AppointmentLockBookingPayload EventPayload */ 4: message.EventPayload = AppointmentLockBookingPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload); break; case /* api.AppointmentLockBookingPayload PreviousPayload */ 5: message.PreviousPayload = AppointmentLockBookingPayload.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: AppointmentLockBooking, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.CommandHeader Header = 1; */ if (message.Header) CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* api.EntityID ID = 2; */ if (message.ID) EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentLockBookingPayload Payload = 3; */ if (message.Payload) AppointmentLockBookingPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentLockBookingPayload EventPayload = 4; */ if (message.EventPayload) AppointmentLockBookingPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* api.AppointmentLockBookingPayload PreviousPayload = 5; */ if (message.PreviousPayload) AppointmentLockBookingPayload.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.AppointmentLockBooking */ export const AppointmentLockBooking = new AppointmentLockBooking$Type();