// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "notifAction.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 { EntityID } from "./shared"; import { CommandHeader } from "./shared"; import { NotifTypeEnum } from "./collabShared"; // Action Summary // - NotifyByMail : Send Notif by mail // - NotifyChatRoom : Send Notif to chat room /** * * NotifyByMail * * @generated from protobuf message api.NotifNotifyByMailPayload */ export interface NotifNotifyByMailPayload { /** * @generated from protobuf field: api.NotifTypeEnum NotificationType = 1 */ NotificationType: NotifTypeEnum; /** * @generated from protobuf field: string IssuerID = 2 */ IssuerID: string; /** * @generated from protobuf field: repeated string Contacts = 3 */ Contacts: string[]; /** * @generated from protobuf field: string Details = 4 */ Details: string; /** * @generated from protobuf field: string EntityDomain = 5 */ EntityDomain: string; /** * @generated from protobuf field: string EntityType = 6 */ EntityType: string; /** * @generated from protobuf field: string EntityRefID = 7 */ EntityRefID: string; /** * @generated from protobuf field: string Tags = 8 */ Tags: string; /** * @generated from protobuf field: repeated string ContactMails = 9 */ ContactMails: string[]; /** * @generated from protobuf field: bool GroupSending = 10 */ GroupSending: boolean; /** * @generated from protobuf field: bool SendToIssuer = 11 */ SendToIssuer: boolean; } /** * @generated from protobuf message api.NotifNotifyByMail */ export interface NotifNotifyByMail { /** * @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.NotifNotifyByMailPayload Payload = 3 */ Payload?: NotifNotifyByMailPayload; /** * @generated from protobuf field: api.NotifNotifyByMailPayload EventPayload = 4 */ EventPayload?: NotifNotifyByMailPayload; /** * @generated from protobuf field: api.NotifNotifyByMailPayload PreviousPayload = 5 */ PreviousPayload?: NotifNotifyByMailPayload; } /** * * NotifyChatRoom * * @generated from protobuf message api.NotifNotifyChatRoomPayload */ export interface NotifNotifyChatRoomPayload { /** * @generated from protobuf field: api.NotifTypeEnum NotificationType = 1 */ NotificationType: NotifTypeEnum; /** * @generated from protobuf field: string IssuerID = 2 */ IssuerID: string; /** * @generated from protobuf field: repeated string Contacts = 3 */ Contacts: string[]; /** * @generated from protobuf field: string Details = 4 */ Details: string; /** * @generated from protobuf field: string EntityDomain = 5 */ EntityDomain: string; /** * @generated from protobuf field: string EntityType = 6 */ EntityType: string; /** * @generated from protobuf field: string EntityRefID = 7 */ EntityRefID: string; /** * @generated from protobuf field: string Tags = 8 */ Tags: string; } /** * @generated from protobuf message api.NotifNotifyChatRoom */ export interface NotifNotifyChatRoom { /** * @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.NotifNotifyChatRoomPayload Payload = 3 */ Payload?: NotifNotifyChatRoomPayload; /** * @generated from protobuf field: api.NotifNotifyChatRoomPayload EventPayload = 4 */ EventPayload?: NotifNotifyChatRoomPayload; /** * @generated from protobuf field: api.NotifNotifyChatRoomPayload PreviousPayload = 5 */ PreviousPayload?: NotifNotifyChatRoomPayload; } // @generated message type with reflection information, may provide speed optimized methods class NotifNotifyByMailPayload$Type extends MessageType { constructor() { super("api.NotifNotifyByMailPayload", [ { no: 1, name: "NotificationType", kind: "enum", localName: "NotificationType", jsonName: "NotificationType", T: () => ["api.NotifTypeEnum", NotifTypeEnum] }, { no: 2, name: "IssuerID", kind: "scalar", localName: "IssuerID", jsonName: "IssuerID", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "Contacts", kind: "scalar", localName: "Contacts", jsonName: "Contacts", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "Details", kind: "scalar", localName: "Details", jsonName: "Details", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "EntityDomain", kind: "scalar", localName: "EntityDomain", jsonName: "EntityDomain", T: 9 /*ScalarType.STRING*/ }, { no: 6, name: "EntityType", kind: "scalar", localName: "EntityType", jsonName: "EntityType", T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/ }, { no: 8, name: "Tags", kind: "scalar", localName: "Tags", jsonName: "Tags", T: 9 /*ScalarType.STRING*/ }, { no: 9, name: "ContactMails", kind: "scalar", localName: "ContactMails", jsonName: "ContactMails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 10, name: "GroupSending", kind: "scalar", localName: "GroupSending", jsonName: "GroupSending", T: 8 /*ScalarType.BOOL*/ }, { no: 11, name: "SendToIssuer", kind: "scalar", localName: "SendToIssuer", jsonName: "SendToIssuer", T: 8 /*ScalarType.BOOL*/ } ], { "api.messageType": "Command", "api.payload": true, "api.action": "NotifyByMail" }); } create(value?: PartialMessage): NotifNotifyByMailPayload { const message = globalThis.Object.create((this.messagePrototype!)); message.NotificationType = 0; message.IssuerID = ""; message.Contacts = []; message.Details = ""; message.EntityDomain = ""; message.EntityType = ""; message.EntityRefID = ""; message.Tags = ""; message.ContactMails = []; message.GroupSending = false; message.SendToIssuer = false; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotifNotifyByMailPayload): NotifNotifyByMailPayload { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.NotifTypeEnum NotificationType */ 1: message.NotificationType = reader.int32(); break; case /* string IssuerID */ 2: message.IssuerID = reader.string(); break; case /* repeated string Contacts */ 3: message.Contacts.push(reader.string()); break; case /* string Details */ 4: message.Details = reader.string(); break; case /* string EntityDomain */ 5: message.EntityDomain = reader.string(); break; case /* string EntityType */ 6: message.EntityType = reader.string(); break; case /* string EntityRefID */ 7: message.EntityRefID = reader.string(); break; case /* string Tags */ 8: message.Tags = reader.string(); break; case /* repeated string ContactMails */ 9: message.ContactMails.push(reader.string()); break; case /* bool GroupSending */ 10: message.GroupSending = reader.bool(); break; case /* bool SendToIssuer */ 11: message.SendToIssuer = 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: NotifNotifyByMailPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.NotifTypeEnum NotificationType = 1; */ if (message.NotificationType !== 0) writer.tag(1, WireType.Varint).int32(message.NotificationType); /* string IssuerID = 2; */ if (message.IssuerID !== "") writer.tag(2, WireType.LengthDelimited).string(message.IssuerID); /* repeated string Contacts = 3; */ for (let i = 0; i < message.Contacts.length; i++) writer.tag(3, WireType.LengthDelimited).string(message.Contacts[i]); /* string Details = 4; */ if (message.Details !== "") writer.tag(4, WireType.LengthDelimited).string(message.Details); /* string EntityDomain = 5; */ if (message.EntityDomain !== "") writer.tag(5, WireType.LengthDelimited).string(message.EntityDomain); /* string EntityType = 6; */ if (message.EntityType !== "") writer.tag(6, WireType.LengthDelimited).string(message.EntityType); /* string EntityRefID = 7; */ if (message.EntityRefID !== "") writer.tag(7, WireType.LengthDelimited).string(message.EntityRefID); /* string Tags = 8; */ if (message.Tags !== "") writer.tag(8, WireType.LengthDelimited).string(message.Tags); /* repeated string ContactMails = 9; */ for (let i = 0; i < message.ContactMails.length; i++) writer.tag(9, WireType.LengthDelimited).string(message.ContactMails[i]); /* bool GroupSending = 10; */ if (message.GroupSending !== false) writer.tag(10, WireType.Varint).bool(message.GroupSending); /* bool SendToIssuer = 11; */ if (message.SendToIssuer !== false) writer.tag(11, WireType.Varint).bool(message.SendToIssuer); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.NotifNotifyByMailPayload */ export const NotifNotifyByMailPayload = new NotifNotifyByMailPayload$Type(); // @generated message type with reflection information, may provide speed optimized methods class NotifNotifyByMail$Type extends MessageType { constructor() { super("api.NotifNotifyByMail", [ { 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: () => NotifNotifyByMailPayload }, { no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => NotifNotifyByMailPayload }, { no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => NotifNotifyByMailPayload } ], { "api.messageType": "Command", "api.action": "NotifyByMail", "api.windowMethod": "TumblingProcessingTimeWindows", "api.keyByExpression": "obj.getHeader().getProject()+'-'+obj.getPayload().getEntityType()+'-'+obj.getPayload().getEntityRefID()" }); } create(value?: PartialMessage): NotifNotifyByMail { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotifNotifyByMail): NotifNotifyByMail { 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.NotifNotifyByMailPayload Payload */ 3: message.Payload = NotifNotifyByMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload); break; case /* api.NotifNotifyByMailPayload EventPayload */ 4: message.EventPayload = NotifNotifyByMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload); break; case /* api.NotifNotifyByMailPayload PreviousPayload */ 5: message.PreviousPayload = NotifNotifyByMailPayload.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: NotifNotifyByMail, 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.NotifNotifyByMailPayload Payload = 3; */ if (message.Payload) NotifNotifyByMailPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* api.NotifNotifyByMailPayload EventPayload = 4; */ if (message.EventPayload) NotifNotifyByMailPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* api.NotifNotifyByMailPayload PreviousPayload = 5; */ if (message.PreviousPayload) NotifNotifyByMailPayload.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.NotifNotifyByMail */ export const NotifNotifyByMail = new NotifNotifyByMail$Type(); // @generated message type with reflection information, may provide speed optimized methods class NotifNotifyChatRoomPayload$Type extends MessageType { constructor() { super("api.NotifNotifyChatRoomPayload", [ { no: 1, name: "NotificationType", kind: "enum", localName: "NotificationType", jsonName: "NotificationType", T: () => ["api.NotifTypeEnum", NotifTypeEnum] }, { no: 2, name: "IssuerID", kind: "scalar", localName: "IssuerID", jsonName: "IssuerID", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "Contacts", kind: "scalar", localName: "Contacts", jsonName: "Contacts", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "Details", kind: "scalar", localName: "Details", jsonName: "Details", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "EntityDomain", kind: "scalar", localName: "EntityDomain", jsonName: "EntityDomain", T: 9 /*ScalarType.STRING*/ }, { no: 6, name: "EntityType", kind: "scalar", localName: "EntityType", jsonName: "EntityType", T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/ }, { no: 8, name: "Tags", kind: "scalar", localName: "Tags", jsonName: "Tags", T: 9 /*ScalarType.STRING*/ } ], { "api.messageType": "Command", "api.payload": true, "api.action": "NotifyChatRoom" }); } create(value?: PartialMessage): NotifNotifyChatRoomPayload { const message = globalThis.Object.create((this.messagePrototype!)); message.NotificationType = 0; message.IssuerID = ""; message.Contacts = []; message.Details = ""; message.EntityDomain = ""; message.EntityType = ""; message.EntityRefID = ""; message.Tags = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotifNotifyChatRoomPayload): NotifNotifyChatRoomPayload { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.NotifTypeEnum NotificationType */ 1: message.NotificationType = reader.int32(); break; case /* string IssuerID */ 2: message.IssuerID = reader.string(); break; case /* repeated string Contacts */ 3: message.Contacts.push(reader.string()); break; case /* string Details */ 4: message.Details = reader.string(); break; case /* string EntityDomain */ 5: message.EntityDomain = reader.string(); break; case /* string EntityType */ 6: message.EntityType = reader.string(); break; case /* string EntityRefID */ 7: message.EntityRefID = reader.string(); break; case /* string Tags */ 8: message.Tags = 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: NotifNotifyChatRoomPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.NotifTypeEnum NotificationType = 1; */ if (message.NotificationType !== 0) writer.tag(1, WireType.Varint).int32(message.NotificationType); /* string IssuerID = 2; */ if (message.IssuerID !== "") writer.tag(2, WireType.LengthDelimited).string(message.IssuerID); /* repeated string Contacts = 3; */ for (let i = 0; i < message.Contacts.length; i++) writer.tag(3, WireType.LengthDelimited).string(message.Contacts[i]); /* string Details = 4; */ if (message.Details !== "") writer.tag(4, WireType.LengthDelimited).string(message.Details); /* string EntityDomain = 5; */ if (message.EntityDomain !== "") writer.tag(5, WireType.LengthDelimited).string(message.EntityDomain); /* string EntityType = 6; */ if (message.EntityType !== "") writer.tag(6, WireType.LengthDelimited).string(message.EntityType); /* string EntityRefID = 7; */ if (message.EntityRefID !== "") writer.tag(7, WireType.LengthDelimited).string(message.EntityRefID); /* string Tags = 8; */ if (message.Tags !== "") writer.tag(8, WireType.LengthDelimited).string(message.Tags); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.NotifNotifyChatRoomPayload */ export const NotifNotifyChatRoomPayload = new NotifNotifyChatRoomPayload$Type(); // @generated message type with reflection information, may provide speed optimized methods class NotifNotifyChatRoom$Type extends MessageType { constructor() { super("api.NotifNotifyChatRoom", [ { 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: () => NotifNotifyChatRoomPayload }, { no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => NotifNotifyChatRoomPayload }, { no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => NotifNotifyChatRoomPayload } ], { "api.messageType": "Command", "api.action": "NotifyChatRoom" }); } create(value?: PartialMessage): NotifNotifyChatRoom { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotifNotifyChatRoom): NotifNotifyChatRoom { 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.NotifNotifyChatRoomPayload Payload */ 3: message.Payload = NotifNotifyChatRoomPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload); break; case /* api.NotifNotifyChatRoomPayload EventPayload */ 4: message.EventPayload = NotifNotifyChatRoomPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload); break; case /* api.NotifNotifyChatRoomPayload PreviousPayload */ 5: message.PreviousPayload = NotifNotifyChatRoomPayload.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: NotifNotifyChatRoom, 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.NotifNotifyChatRoomPayload Payload = 3; */ if (message.Payload) NotifNotifyChatRoomPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* api.NotifNotifyChatRoomPayload EventPayload = 4; */ if (message.EventPayload) NotifNotifyChatRoomPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* api.NotifNotifyChatRoomPayload PreviousPayload = 5; */ if (message.PreviousPayload) NotifNotifyChatRoomPayload.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.NotifNotifyChatRoom */ export const NotifNotifyChatRoom = new NotifNotifyChatRoom$Type();