You've already forked npm-core-sdk
696 lines
33 KiB
TypeScript
696 lines
33 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "metadata.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 { DateTime } from "./shared";
|
|
import { LabelByLanguage } from "./shared";
|
|
import { EntityID } from "./shared";
|
|
import { EventHeader } from "./shared";
|
|
/**
|
|
*
|
|
* Aggregation object message
|
|
*
|
|
* @generated from protobuf message api.Metadata
|
|
*/
|
|
export interface Metadata {
|
|
/**
|
|
* @generated from protobuf field: api.EventHeader LastEventHeader = 1
|
|
*/
|
|
LastEventHeader?: EventHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.MetadataPayload Payload = 3
|
|
*/
|
|
Payload?: MetadataPayload;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MetadataPayload
|
|
*/
|
|
export interface MetadataPayload {
|
|
/**
|
|
* The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements
|
|
*
|
|
* @generated from protobuf field: bool IsSegmentationKey = 2
|
|
*/
|
|
IsSegmentationKey: boolean;
|
|
/**
|
|
* @generated from protobuf field: string Domain = 3
|
|
*/
|
|
Domain: string;
|
|
/**
|
|
* Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"
|
|
*
|
|
* @generated from protobuf field: string Entity = 4
|
|
*/
|
|
Entity: string;
|
|
/**
|
|
* Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"
|
|
*
|
|
* @generated from protobuf field: string Parent = 5
|
|
*/
|
|
Parent: string;
|
|
/**
|
|
* @generated from protobuf field: string Name = 6
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* Type attached to the metadata, should be in ["string","float","int","bool","timestamp"]
|
|
*
|
|
* @generated from protobuf field: string Type = 7
|
|
*/
|
|
Type: string;
|
|
/**
|
|
* @generated from protobuf field: bool IsMandatory = 8
|
|
*/
|
|
IsMandatory: boolean;
|
|
/**
|
|
* @generated from protobuf field: string RegularExpression = 10
|
|
*/
|
|
RegularExpression: string;
|
|
/**
|
|
* @generated from protobuf field: api.MetadataType Typology = 11
|
|
*/
|
|
Typology: MetadataType;
|
|
/**
|
|
* Customizable enumeration
|
|
*
|
|
* @generated from protobuf field: repeated string Enumeration = 12
|
|
*/
|
|
Enumeration: string[];
|
|
/**
|
|
* @generated from protobuf field: api.MetadataStatusStruct Status = 13
|
|
*/
|
|
Status?: MetadataStatusStruct; // Status field is not accessible from APIs
|
|
/**
|
|
* @generated from protobuf field: api.MetadataDisplayType ShowOnCreation = 14
|
|
*/
|
|
ShowOnCreation: MetadataDisplayType;
|
|
/**
|
|
* @generated from protobuf field: repeated api.LabelByLanguage Labels = 15
|
|
*/
|
|
Labels: LabelByLanguage[]; // @option language
|
|
/**
|
|
* @generated from protobuf field: bool IsKpi = 16
|
|
*/
|
|
IsKpi: boolean;
|
|
}
|
|
/**
|
|
*
|
|
* Metadata entity status structure
|
|
*
|
|
* @generated from protobuf message api.MetadataStatus
|
|
*/
|
|
export interface MetadataStatus {
|
|
/**
|
|
* @generated from protobuf field: api.MetadataStatusCode StatusCode = 1
|
|
*/
|
|
StatusCode: MetadataStatusCode;
|
|
/**
|
|
* @generated from protobuf field: string Date = 2
|
|
*/
|
|
Date: string;
|
|
/**
|
|
* Status effective date. Set by the event's RefDate that triggered the status change.
|
|
*
|
|
* @generated from protobuf field: api.DateTime ActualDate = 3
|
|
*/
|
|
ActualDate?: DateTime;
|
|
}
|
|
/**
|
|
*
|
|
* MetadataStatusStruct statuses structure
|
|
*
|
|
* @generated from protobuf message api.MetadataStatusStruct
|
|
*/
|
|
export interface MetadataStatusStruct {
|
|
/**
|
|
* @generated from protobuf field: api.MetadataStatus Current = 1
|
|
*/
|
|
Current?: MetadataStatus; // Current status of the Metadata entity
|
|
/**
|
|
* @generated from protobuf field: repeated api.MetadataStatus History = 2
|
|
*/
|
|
History: MetadataStatus[]; // List of all status history of the Metadata entity
|
|
/**
|
|
* @generated from protobuf field: string CreationDate = 3
|
|
*/
|
|
CreationDate: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MetadataTriplet
|
|
*/
|
|
export interface MetadataTriplet {
|
|
/**
|
|
* @generated from protobuf field: api.Metadata Current = 1
|
|
*/
|
|
Current?: Metadata;
|
|
/**
|
|
* @generated from protobuf field: api.Metadata Previous = 2
|
|
*/
|
|
Previous?: Metadata;
|
|
/**
|
|
* @generated from protobuf field: api.Metadata LastEvent = 3
|
|
*/
|
|
LastEvent?: Metadata;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MetadatasToApply
|
|
*/
|
|
export interface MetadatasToApply {
|
|
/**
|
|
* @generated from protobuf field: string Parent = 1
|
|
*/
|
|
Parent: string;
|
|
/**
|
|
* @generated from protobuf field: api.Metadata Metadata = 2
|
|
*/
|
|
Metadata?: Metadata;
|
|
}
|
|
// _common_
|
|
|
|
/**
|
|
* @generated from protobuf enum api.MetadataType
|
|
*/
|
|
export enum MetadataType {
|
|
/**
|
|
* @generated from protobuf enum value: TYPE_UNKNOWN = 0;
|
|
*/
|
|
TYPE_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: TYPE_STRING = 1;
|
|
*/
|
|
TYPE_STRING = 1,
|
|
/**
|
|
* @generated from protobuf enum value: TYPE_INTEGER = 2;
|
|
*/
|
|
TYPE_INTEGER = 2,
|
|
/**
|
|
* @generated from protobuf enum value: TYPE_BOOLEAN = 3;
|
|
*/
|
|
TYPE_BOOLEAN = 3,
|
|
/**
|
|
* @generated from protobuf enum value: TYPE_FLOAT = 4;
|
|
*/
|
|
TYPE_FLOAT = 4,
|
|
/**
|
|
* @generated from protobuf enum value: TYPE_TIMESTAMP = 5;
|
|
*/
|
|
TYPE_TIMESTAMP = 5
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.MetadataDisplayType
|
|
*/
|
|
export enum MetadataDisplayType {
|
|
/**
|
|
* @generated from protobuf enum value: DISPLAY_UNKNOWN = 0;
|
|
*/
|
|
DISPLAY_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: DISPLAY_ALWAYS = 1;
|
|
*/
|
|
DISPLAY_ALWAYS = 1,
|
|
/**
|
|
* @generated from protobuf enum value: DISPLAY_NEVER = 2;
|
|
*/
|
|
DISPLAY_NEVER = 2
|
|
}
|
|
/**
|
|
*
|
|
* All statuses for Metadata entity
|
|
*
|
|
* @generated from protobuf enum api.MetadataStatusCode
|
|
*/
|
|
export enum MetadataStatusCode {
|
|
/**
|
|
* @generated from protobuf enum value: METADATA_0000_UNKNOWN = 0;
|
|
*/
|
|
METADATA_0000_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: METADATA_1000_ACTIVE = 1000;
|
|
*/
|
|
METADATA_1000_ACTIVE = 1000,
|
|
/**
|
|
* @generated from protobuf enum value: METADATA_9000_CANCELLED = 9000;
|
|
*/
|
|
METADATA_9000_CANCELLED = 9000
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Metadata$Type extends MessageType<Metadata> {
|
|
constructor() {
|
|
super("api.Metadata", [
|
|
{ no: 1, name: "LastEventHeader", kind: "message", localName: "LastEventHeader", jsonName: "LastEventHeader", T: () => EventHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => MetadataPayload }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Metadata>): Metadata {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Metadata>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Metadata): Metadata {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EventHeader LastEventHeader */ 1:
|
|
message.LastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.LastEventHeader);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.MetadataPayload Payload */ 3:
|
|
message.Payload = MetadataPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
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: Metadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EventHeader LastEventHeader = 1; */
|
|
if (message.LastEventHeader)
|
|
EventHeader.internalBinaryWrite(message.LastEventHeader, 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.MetadataPayload Payload = 3; */
|
|
if (message.Payload)
|
|
MetadataPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.Metadata
|
|
*/
|
|
export const Metadata = new Metadata$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataPayload$Type extends MessageType<MetadataPayload> {
|
|
constructor() {
|
|
super("api.MetadataPayload", [
|
|
{ no: 2, name: "IsSegmentationKey", kind: "scalar", localName: "IsSegmentationKey", jsonName: "IsSegmentationKey", T: 8 /*ScalarType.BOOL*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements" } } },
|
|
{ no: 3, name: "Domain", kind: "scalar", localName: "Domain", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } },
|
|
{ no: 4, name: "Entity", kind: "scalar", localName: "Entity", jsonName: "Entity", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"", example: "\"order\"" } } },
|
|
{ no: 5, name: "Parent", kind: "scalar", localName: "Parent", jsonName: "Parent", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"" } } },
|
|
{ no: 6, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 7, name: "Type", kind: "scalar", localName: "Type", jsonName: "Type", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["string", "float", "integer", "bool", "datetime"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type attached to the metadata, should be in [\"string\",\"float\",\"int\",\"bool\",\"timestamp\"]" } } },
|
|
{ no: 8, name: "IsMandatory", kind: "scalar", localName: "IsMandatory", jsonName: "IsMandatory", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 10, name: "RegularExpression", kind: "scalar", localName: "RegularExpression", jsonName: "RegularExpression", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 11, name: "Typology", kind: "enum", localName: "Typology", jsonName: "Typology", T: () => ["api.MetadataType", MetadataType] },
|
|
{ no: 12, name: "Enumeration", kind: "scalar", localName: "Enumeration", jsonName: "Enumeration", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Customizable enumeration" } } },
|
|
{ no: 13, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => MetadataStatusStruct, options: { "validate.rules": { message: { unauthorized: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } },
|
|
{ no: 14, name: "ShowOnCreation", kind: "enum", localName: "ShowOnCreation", jsonName: "ShowOnCreation", T: () => ["api.MetadataDisplayType", MetadataDisplayType] },
|
|
{ no: 15, name: "Labels", kind: "message", localName: "Labels", jsonName: "Labels", repeat: 2 /*RepeatType.UNPACKED*/, T: () => LabelByLanguage, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } },
|
|
{ no: 16, name: "IsKpi", kind: "scalar", localName: "IsKpi", jsonName: "IsKpi", T: 8 /*ScalarType.BOOL*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<MetadataPayload>): MetadataPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.IsSegmentationKey = false;
|
|
message.Domain = "";
|
|
message.Entity = "";
|
|
message.Parent = "";
|
|
message.Name = "";
|
|
message.Type = "";
|
|
message.IsMandatory = false;
|
|
message.RegularExpression = "";
|
|
message.Typology = 0;
|
|
message.Enumeration = [];
|
|
message.ShowOnCreation = 0;
|
|
message.Labels = [];
|
|
message.IsKpi = false;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataPayload): MetadataPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* bool IsSegmentationKey */ 2:
|
|
message.IsSegmentationKey = reader.bool();
|
|
break;
|
|
case /* string Domain */ 3:
|
|
message.Domain = reader.string();
|
|
break;
|
|
case /* string Entity */ 4:
|
|
message.Entity = reader.string();
|
|
break;
|
|
case /* string Parent */ 5:
|
|
message.Parent = reader.string();
|
|
break;
|
|
case /* string Name */ 6:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string Type */ 7:
|
|
message.Type = reader.string();
|
|
break;
|
|
case /* bool IsMandatory */ 8:
|
|
message.IsMandatory = reader.bool();
|
|
break;
|
|
case /* string RegularExpression */ 10:
|
|
message.RegularExpression = reader.string();
|
|
break;
|
|
case /* api.MetadataType Typology */ 11:
|
|
message.Typology = reader.int32();
|
|
break;
|
|
case /* repeated string Enumeration */ 12:
|
|
message.Enumeration.push(reader.string());
|
|
break;
|
|
case /* api.MetadataStatusStruct Status */ 13:
|
|
message.Status = MetadataStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
|
|
break;
|
|
case /* api.MetadataDisplayType ShowOnCreation */ 14:
|
|
message.ShowOnCreation = reader.int32();
|
|
break;
|
|
case /* repeated api.LabelByLanguage Labels */ 15:
|
|
message.Labels.push(LabelByLanguage.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* bool IsKpi */ 16:
|
|
message.IsKpi = 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: MetadataPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* bool IsSegmentationKey = 2; */
|
|
if (message.IsSegmentationKey !== false)
|
|
writer.tag(2, WireType.Varint).bool(message.IsSegmentationKey);
|
|
/* string Domain = 3; */
|
|
if (message.Domain !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Domain);
|
|
/* string Entity = 4; */
|
|
if (message.Entity !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.Entity);
|
|
/* string Parent = 5; */
|
|
if (message.Parent !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.Parent);
|
|
/* string Name = 6; */
|
|
if (message.Name !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.Name);
|
|
/* string Type = 7; */
|
|
if (message.Type !== "")
|
|
writer.tag(7, WireType.LengthDelimited).string(message.Type);
|
|
/* bool IsMandatory = 8; */
|
|
if (message.IsMandatory !== false)
|
|
writer.tag(8, WireType.Varint).bool(message.IsMandatory);
|
|
/* string RegularExpression = 10; */
|
|
if (message.RegularExpression !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.RegularExpression);
|
|
/* api.MetadataType Typology = 11; */
|
|
if (message.Typology !== 0)
|
|
writer.tag(11, WireType.Varint).int32(message.Typology);
|
|
/* repeated string Enumeration = 12; */
|
|
for (let i = 0; i < message.Enumeration.length; i++)
|
|
writer.tag(12, WireType.LengthDelimited).string(message.Enumeration[i]);
|
|
/* api.MetadataStatusStruct Status = 13; */
|
|
if (message.Status)
|
|
MetadataStatusStruct.internalBinaryWrite(message.Status, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.MetadataDisplayType ShowOnCreation = 14; */
|
|
if (message.ShowOnCreation !== 0)
|
|
writer.tag(14, WireType.Varint).int32(message.ShowOnCreation);
|
|
/* repeated api.LabelByLanguage Labels = 15; */
|
|
for (let i = 0; i < message.Labels.length; i++)
|
|
LabelByLanguage.internalBinaryWrite(message.Labels[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
/* bool IsKpi = 16; */
|
|
if (message.IsKpi !== false)
|
|
writer.tag(16, WireType.Varint).bool(message.IsKpi);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataPayload
|
|
*/
|
|
export const MetadataPayload = new MetadataPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataStatus$Type extends MessageType<MetadataStatus> {
|
|
constructor() {
|
|
super("api.MetadataStatus", [
|
|
{ no: 1, name: "StatusCode", kind: "enum", localName: "StatusCode", jsonName: "StatusCode", T: () => ["api.MetadataStatusCode", MetadataStatusCode], options: { "api.indexationType": { Types: [{ Context: "*", Type: "generatedText" }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortText" }] } } },
|
|
{ no: 2, name: "Date", kind: "scalar", localName: "Date", jsonName: "Date", T: 9 /*ScalarType.STRING*/, options: { "api.indexationType": { Types: [{ Context: "*", Type: "date" }] }, "api.viewType": { Types: [{ Context: "*", Type: "date" }] } } },
|
|
{ no: 3, name: "ActualDate", kind: "message", localName: "ActualDate", jsonName: "ActualDate", T: () => DateTime, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Status effective date. Set by the event's RefDate that triggered the status change." } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<MetadataStatus>): MetadataStatus {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.StatusCode = 0;
|
|
message.Date = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataStatus>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataStatus): MetadataStatus {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.MetadataStatusCode StatusCode */ 1:
|
|
message.StatusCode = reader.int32();
|
|
break;
|
|
case /* string Date */ 2:
|
|
message.Date = reader.string();
|
|
break;
|
|
case /* api.DateTime ActualDate */ 3:
|
|
message.ActualDate = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.ActualDate);
|
|
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: MetadataStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.MetadataStatusCode StatusCode = 1; */
|
|
if (message.StatusCode !== 0)
|
|
writer.tag(1, WireType.Varint).int32(message.StatusCode);
|
|
/* string Date = 2; */
|
|
if (message.Date !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Date);
|
|
/* api.DateTime ActualDate = 3; */
|
|
if (message.ActualDate)
|
|
DateTime.internalBinaryWrite(message.ActualDate, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataStatus
|
|
*/
|
|
export const MetadataStatus = new MetadataStatus$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataStatusStruct$Type extends MessageType<MetadataStatusStruct> {
|
|
constructor() {
|
|
super("api.MetadataStatusStruct", [
|
|
{ no: 1, name: "Current", kind: "message", localName: "Current", jsonName: "Current", T: () => MetadataStatus },
|
|
{ no: 2, name: "History", kind: "message", localName: "History", jsonName: "History", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataStatus, options: { "api.aggKey": "Date", "api.kpiExclude": { Items: [{ Context: "Stock", Group: "stock" }, { Context: "Stock", Group: "stock_extended" }, { Context: "Executionflow", Group: "executionflow" }, { Context: "Order", Group: "order" }] } } },
|
|
{ no: 3, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { dateIso8601: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<MetadataStatusStruct>): MetadataStatusStruct {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.History = [];
|
|
message.CreationDate = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataStatusStruct>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataStatusStruct): MetadataStatusStruct {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.MetadataStatus Current */ 1:
|
|
message.Current = MetadataStatus.internalBinaryRead(reader, reader.uint32(), options, message.Current);
|
|
break;
|
|
case /* repeated api.MetadataStatus History */ 2:
|
|
message.History.push(MetadataStatus.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* string CreationDate */ 3:
|
|
message.CreationDate = 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: MetadataStatusStruct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.MetadataStatus Current = 1; */
|
|
if (message.Current)
|
|
MetadataStatus.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.MetadataStatus History = 2; */
|
|
for (let i = 0; i < message.History.length; i++)
|
|
MetadataStatus.internalBinaryWrite(message.History[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* string CreationDate = 3; */
|
|
if (message.CreationDate !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.CreationDate);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataStatusStruct
|
|
*/
|
|
export const MetadataStatusStruct = new MetadataStatusStruct$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataTriplet$Type extends MessageType<MetadataTriplet> {
|
|
constructor() {
|
|
super("api.MetadataTriplet", [
|
|
{ no: 1, name: "Current", kind: "message", localName: "Current", jsonName: "Current", T: () => Metadata },
|
|
{ no: 2, name: "Previous", kind: "message", localName: "Previous", jsonName: "Previous", T: () => Metadata },
|
|
{ no: 3, name: "LastEvent", kind: "message", localName: "LastEvent", jsonName: "LastEvent", T: () => Metadata }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<MetadataTriplet>): MetadataTriplet {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataTriplet>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataTriplet): MetadataTriplet {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Metadata Current */ 1:
|
|
message.Current = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.Current);
|
|
break;
|
|
case /* api.Metadata Previous */ 2:
|
|
message.Previous = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.Previous);
|
|
break;
|
|
case /* api.Metadata LastEvent */ 3:
|
|
message.LastEvent = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.LastEvent);
|
|
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: MetadataTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Metadata Current = 1; */
|
|
if (message.Current)
|
|
Metadata.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Metadata Previous = 2; */
|
|
if (message.Previous)
|
|
Metadata.internalBinaryWrite(message.Previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Metadata LastEvent = 3; */
|
|
if (message.LastEvent)
|
|
Metadata.internalBinaryWrite(message.LastEvent, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataTriplet
|
|
*/
|
|
export const MetadataTriplet = new MetadataTriplet$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadatasToApply$Type extends MessageType<MetadatasToApply> {
|
|
constructor() {
|
|
super("api.MetadatasToApply", [
|
|
{ no: 1, name: "Parent", kind: "scalar", localName: "Parent", jsonName: "Parent", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "Metadata", kind: "message", localName: "Metadata", jsonName: "Metadata", T: () => Metadata }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<MetadatasToApply>): MetadatasToApply {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Parent = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadatasToApply>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadatasToApply): MetadatasToApply {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Parent */ 1:
|
|
message.Parent = reader.string();
|
|
break;
|
|
case /* api.Metadata Metadata */ 2:
|
|
message.Metadata = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.Metadata);
|
|
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: MetadatasToApply, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Parent = 1; */
|
|
if (message.Parent !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Parent);
|
|
/* api.Metadata Metadata = 2; */
|
|
if (message.Metadata)
|
|
Metadata.internalBinaryWrite(message.Metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadatasToApply
|
|
*/
|
|
export const MetadatasToApply = new MetadatasToApply$Type();
|