You've already forked npm-core-sdk
629 lines
34 KiB
TypeScript
629 lines
34 KiB
TypeScript
// @generated by protobuf-ts 2.9.5
|
|
// @generated from protobuf file "metadataInput.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
import { ResponseHeader } from "./shared";
|
|
import { RequestProjectHeader } from "./shared";
|
|
import { EntityID } from "./shared";
|
|
import { EventHeader } from "./shared";
|
|
import { MetadataDisplayType } from "./metadata";
|
|
import { MetadataType } from "./metadata";
|
|
/**
|
|
* Event Payload
|
|
*
|
|
* @generated from protobuf message api.MetadataCreatedPayload
|
|
*/
|
|
export interface MetadataCreatedPayload {
|
|
/**
|
|
* 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 [json_name = "IsSegmentationKey"];
|
|
*/
|
|
isSegmentationKey: boolean;
|
|
/**
|
|
* @generated from protobuf field: string Domain = 3 [json_name = "Domain"];
|
|
*/
|
|
domain: string;
|
|
/**
|
|
* Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"
|
|
*
|
|
* @generated from protobuf field: string Entity = 4 [json_name = "Entity"];
|
|
*/
|
|
entity: string;
|
|
/**
|
|
* Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"
|
|
*
|
|
* @generated from protobuf field: string Parent = 5 [json_name = "Parent"];
|
|
*/
|
|
parent: string;
|
|
/**
|
|
* @generated from protobuf field: string Name = 6 [json_name = "Name"];
|
|
*/
|
|
name: string;
|
|
/**
|
|
* Type attached to the metadata, can be anything such as Item, Actor, Order...
|
|
*
|
|
* @generated from protobuf field: string Type = 7 [json_name = "Type"];
|
|
*/
|
|
type: string;
|
|
/**
|
|
* @generated from protobuf field: bool IsMandatory = 8 [json_name = "IsMandatory"];
|
|
*/
|
|
isMandatory: boolean;
|
|
/**
|
|
* @generated from protobuf field: string RegularExpression = 10 [json_name = "RegularExpression"];
|
|
*/
|
|
regularExpression: string;
|
|
/**
|
|
* @generated from protobuf field: api.MetadataType Typology = 11 [json_name = "Typology"];
|
|
*/
|
|
typology: MetadataType;
|
|
/**
|
|
* Customizable enumeration
|
|
*
|
|
* @generated from protobuf field: repeated string Enumeration = 12 [json_name = "Enumeration"];
|
|
*/
|
|
enumeration: string[];
|
|
/**
|
|
* @generated from protobuf field: api.MetadataDisplayType ShowOnCreation = 13 [json_name = "ShowOnCreation"];
|
|
*/
|
|
showOnCreation: MetadataDisplayType;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MetadataDeletedPayload
|
|
*/
|
|
export interface MetadataDeletedPayload {
|
|
}
|
|
/**
|
|
* Event message
|
|
*
|
|
* @generated from protobuf message api.MetadataCreatedEvent
|
|
*/
|
|
export interface MetadataCreatedEvent {
|
|
/**
|
|
* @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: EventHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.MetadataCreatedPayload Payload = 3 [json_name = "Payload"];
|
|
*/
|
|
payload?: MetadataCreatedPayload;
|
|
}
|
|
/**
|
|
* API Request
|
|
*
|
|
* @generated from protobuf message api.MetadataCreatedRequest
|
|
*/
|
|
export interface MetadataCreatedRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.MetadataCreatedPayload Payload = 3 [json_name = "Payload"];
|
|
*/
|
|
payload?: MetadataCreatedPayload;
|
|
}
|
|
/**
|
|
* API Request
|
|
*
|
|
* @generated from protobuf message api.MetadataDeletedRequest
|
|
*/
|
|
export interface MetadataDeletedRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.MetadataDeletedPayload Payload = 3 [json_name = "Payload"];
|
|
*/
|
|
payload?: MetadataDeletedPayload;
|
|
}
|
|
/**
|
|
* API Response
|
|
*
|
|
* @generated from protobuf message api.MetadataCreatedResponse
|
|
*/
|
|
export interface MetadataCreatedResponse {
|
|
/**
|
|
* @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: ResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MetadataDeletedResponse
|
|
*/
|
|
export interface MetadataDeletedResponse {
|
|
/**
|
|
* @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: ResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataCreatedPayload$Type extends MessageType<MetadataCreatedPayload> {
|
|
constructor() {
|
|
super("api.MetadataCreatedPayload", [
|
|
{ no: 2, name: "IsSegmentationKey", kind: "scalar", 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", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } },
|
|
{ no: 4, name: "Entity", kind: "scalar", jsonName: "Entity", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "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", jsonName: "Parent", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "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", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", pattern: "^[a-zA-Z]{1}[a-zA-Z0-9]*$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { pattern: "^[a-zA-Z]{1}[a-zA-Z0-9]*$" } } },
|
|
{ no: 7, name: "Type", kind: "scalar", jsonName: "Type", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type attached to the metadata, can be anything such as Item, Actor, Order..." } } },
|
|
{ no: 8, name: "IsMandatory", kind: "scalar", jsonName: "IsMandatory", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 10, name: "RegularExpression", kind: "scalar", jsonName: "RegularExpression", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 11, name: "Typology", kind: "enum", jsonName: "Typology", T: () => ["api.MetadataType", MetadataType] },
|
|
{ no: 12, name: "Enumeration", kind: "scalar", 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: "ShowOnCreation", kind: "enum", jsonName: "ShowOnCreation", T: () => ["api.MetadataDisplayType", MetadataDisplayType] }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Domain", "Entity", "Parent", "Name", "Type"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Created" });
|
|
}
|
|
create(value?: PartialMessage<MetadataCreatedPayload>): MetadataCreatedPayload {
|
|
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;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataCreatedPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataCreatedPayload): MetadataCreatedPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* bool IsSegmentationKey = 2 [json_name = "IsSegmentationKey"];*/ 2:
|
|
message.isSegmentationKey = reader.bool();
|
|
break;
|
|
case /* string Domain = 3 [json_name = "Domain"];*/ 3:
|
|
message.domain = reader.string();
|
|
break;
|
|
case /* string Entity = 4 [json_name = "Entity"];*/ 4:
|
|
message.entity = reader.string();
|
|
break;
|
|
case /* string Parent = 5 [json_name = "Parent"];*/ 5:
|
|
message.parent = reader.string();
|
|
break;
|
|
case /* string Name = 6 [json_name = "Name"];*/ 6:
|
|
message.name = reader.string();
|
|
break;
|
|
case /* string Type = 7 [json_name = "Type"];*/ 7:
|
|
message.type = reader.string();
|
|
break;
|
|
case /* bool IsMandatory = 8 [json_name = "IsMandatory"];*/ 8:
|
|
message.isMandatory = reader.bool();
|
|
break;
|
|
case /* string RegularExpression = 10 [json_name = "RegularExpression"];*/ 10:
|
|
message.regularExpression = reader.string();
|
|
break;
|
|
case /* api.MetadataType Typology = 11 [json_name = "Typology"];*/ 11:
|
|
message.typology = reader.int32();
|
|
break;
|
|
case /* repeated string Enumeration = 12 [json_name = "Enumeration"];*/ 12:
|
|
message.enumeration.push(reader.string());
|
|
break;
|
|
case /* api.MetadataDisplayType ShowOnCreation = 13 [json_name = "ShowOnCreation"];*/ 13:
|
|
message.showOnCreation = reader.int32();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: MetadataCreatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* bool IsSegmentationKey = 2 [json_name = "IsSegmentationKey"]; */
|
|
if (message.isSegmentationKey !== false)
|
|
writer.tag(2, WireType.Varint).bool(message.isSegmentationKey);
|
|
/* string Domain = 3 [json_name = "Domain"]; */
|
|
if (message.domain !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.domain);
|
|
/* string Entity = 4 [json_name = "Entity"]; */
|
|
if (message.entity !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.entity);
|
|
/* string Parent = 5 [json_name = "Parent"]; */
|
|
if (message.parent !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.parent);
|
|
/* string Name = 6 [json_name = "Name"]; */
|
|
if (message.name !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.name);
|
|
/* string Type = 7 [json_name = "Type"]; */
|
|
if (message.type !== "")
|
|
writer.tag(7, WireType.LengthDelimited).string(message.type);
|
|
/* bool IsMandatory = 8 [json_name = "IsMandatory"]; */
|
|
if (message.isMandatory !== false)
|
|
writer.tag(8, WireType.Varint).bool(message.isMandatory);
|
|
/* string RegularExpression = 10 [json_name = "RegularExpression"]; */
|
|
if (message.regularExpression !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.regularExpression);
|
|
/* api.MetadataType Typology = 11 [json_name = "Typology"]; */
|
|
if (message.typology !== 0)
|
|
writer.tag(11, WireType.Varint).int32(message.typology);
|
|
/* repeated string Enumeration = 12 [json_name = "Enumeration"]; */
|
|
for (let i = 0; i < message.enumeration.length; i++)
|
|
writer.tag(12, WireType.LengthDelimited).string(message.enumeration[i]);
|
|
/* api.MetadataDisplayType ShowOnCreation = 13 [json_name = "ShowOnCreation"]; */
|
|
if (message.showOnCreation !== 0)
|
|
writer.tag(13, WireType.Varint).int32(message.showOnCreation);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataCreatedPayload
|
|
*/
|
|
export const MetadataCreatedPayload = new MetadataCreatedPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataDeletedPayload$Type extends MessageType<MetadataDeletedPayload> {
|
|
constructor() {
|
|
super("api.MetadataDeletedPayload", [], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted" });
|
|
}
|
|
create(value?: PartialMessage<MetadataDeletedPayload>): MetadataDeletedPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataDeletedPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataDeletedPayload): MetadataDeletedPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: MetadataDeletedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataDeletedPayload
|
|
*/
|
|
export const MetadataDeletedPayload = new MetadataDeletedPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataCreatedEvent$Type extends MessageType<MetadataCreatedEvent> {
|
|
constructor() {
|
|
super("api.MetadataCreatedEvent", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => MetadataCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "api.messageType": "Event", "api.inputEvent": "Created" });
|
|
}
|
|
create(value?: PartialMessage<MetadataCreatedEvent>): MetadataCreatedEvent {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataCreatedEvent>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataCreatedEvent): MetadataCreatedEvent {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
case /* api.MetadataCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
|
message.payload = MetadataCreatedPayload.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: MetadataCreatedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EventHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
EventHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
|
if (message.iD)
|
|
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.MetadataCreatedPayload Payload = 3 [json_name = "Payload"]; */
|
|
if (message.payload)
|
|
MetadataCreatedPayload.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.MetadataCreatedEvent
|
|
*/
|
|
export const MetadataCreatedEvent = new MetadataCreatedEvent$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataCreatedRequest$Type extends MessageType<MetadataCreatedRequest> {
|
|
constructor() {
|
|
super("api.MetadataCreatedRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => MetadataCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Created" });
|
|
}
|
|
create(value?: PartialMessage<MetadataCreatedRequest>): MetadataCreatedRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataCreatedRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataCreatedRequest): MetadataCreatedRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
case /* api.MetadataCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
|
message.payload = MetadataCreatedPayload.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: MetadataCreatedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
|
if (message.iD)
|
|
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.MetadataCreatedPayload Payload = 3 [json_name = "Payload"]; */
|
|
if (message.payload)
|
|
MetadataCreatedPayload.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.MetadataCreatedRequest
|
|
*/
|
|
export const MetadataCreatedRequest = new MetadataCreatedRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataDeletedRequest$Type extends MessageType<MetadataDeletedRequest> {
|
|
constructor() {
|
|
super("api.MetadataDeletedRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => MetadataDeletedPayload, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Deleted" });
|
|
}
|
|
create(value?: PartialMessage<MetadataDeletedRequest>): MetadataDeletedRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataDeletedRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataDeletedRequest): MetadataDeletedRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
case /* api.MetadataDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
|
message.payload = MetadataDeletedPayload.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: MetadataDeletedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
|
if (message.iD)
|
|
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.MetadataDeletedPayload Payload = 3 [json_name = "Payload"]; */
|
|
if (message.payload)
|
|
MetadataDeletedPayload.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.MetadataDeletedRequest
|
|
*/
|
|
export const MetadataDeletedRequest = new MetadataDeletedRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataCreatedResponse$Type extends MessageType<MetadataCreatedResponse> {
|
|
constructor() {
|
|
super("api.MetadataCreatedResponse", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
|
|
], { "api.messageType": "Response", "api.inputEvent": "Created" });
|
|
}
|
|
create(value?: PartialMessage<MetadataCreatedResponse>): MetadataCreatedResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataCreatedResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataCreatedResponse): MetadataCreatedResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = ResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
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: MetadataCreatedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.ResponseHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
ResponseHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
|
if (message.iD)
|
|
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataCreatedResponse
|
|
*/
|
|
export const MetadataCreatedResponse = new MetadataCreatedResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MetadataDeletedResponse$Type extends MessageType<MetadataDeletedResponse> {
|
|
constructor() {
|
|
super("api.MetadataDeletedResponse", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
|
|
], { "api.messageType": "Response", "api.inputEvent": "Deleted" });
|
|
}
|
|
create(value?: PartialMessage<MetadataDeletedResponse>): MetadataDeletedResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MetadataDeletedResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MetadataDeletedResponse): MetadataDeletedResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = ResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
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: MetadataDeletedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.ResponseHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
ResponseHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
|
if (message.iD)
|
|
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MetadataDeletedResponse
|
|
*/
|
|
export const MetadataDeletedResponse = new MetadataDeletedResponse$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.MetadataInputAPI
|
|
*/
|
|
export const MetadataInputAPI = new ServiceType("api.MetadataInputAPI", [
|
|
{ name: "Created", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Metadata Inputs"], description: "A metadataDef has been created." }, "api.rscType": "Project", "api.roles": "Platform.Project-Metadata", "api.platformReserved": true, "google.api.method_visibility": { restriction: "SDK" } }, I: MetadataCreatedRequest, O: MetadataCreatedResponse },
|
|
{ name: "Deleted", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Metadata Inputs"], description: "A metadataDef has been deleted." }, "api.rscType": "Project", "api.roles": "Platform.Project-Metadata", "api.platformReserved": true, "google.api.method_visibility": { restriction: "SDK" } }, I: MetadataDeletedRequest, O: MetadataDeletedResponse }
|
|
], { "api.serviceType": "Api", "api.k8sService": "api-server,collab-api-server" });
|