You've already forked npm-core-sdk
487 lines
29 KiB
TypeScript
487 lines
29 KiB
TypeScript
// @generated by protobuf-ts 2.9.6
|
|
// @generated from protobuf file "claim.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 { MetadataElement } from "./shared";
|
|
import { ClaimEntityType } from "./shared";
|
|
import { ClaimSector } from "./shared";
|
|
import { Amount } from "./shared";
|
|
import { AttachmentSummary } from "./shared";
|
|
import { ClaimClosure } from "./shared";
|
|
import { ClaimStatusStruct } from "./collabShared";
|
|
import { ClaimCriticality } from "./shared";
|
|
import { EntityID } from "./shared";
|
|
import { EventHeader } from "./shared";
|
|
/**
|
|
*
|
|
* Aggregation object message
|
|
*
|
|
* @generated from protobuf message api.Claim
|
|
*/
|
|
export interface Claim {
|
|
/**
|
|
* @generated from protobuf field: api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];
|
|
*/
|
|
lastEventHeader?: EventHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.ClaimPayload Payload = 3 [json_name = "Payload"];
|
|
*/
|
|
payload?: ClaimPayload;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ClaimPayload
|
|
*/
|
|
export interface ClaimPayload {
|
|
/**
|
|
* Identifier of the claim type
|
|
*
|
|
* @generated from protobuf field: string ClaimTypeID = 1 [json_name = "ClaimTypeID"];
|
|
*/
|
|
claimTypeID: string;
|
|
/**
|
|
* Identifier of the targetted entity
|
|
*
|
|
* @generated from protobuf field: string EntityID = 2 [json_name = "EntityID"];
|
|
*/
|
|
entityID: string;
|
|
/**
|
|
* Criticality of the claim
|
|
*
|
|
* @generated from protobuf field: api.ClaimCriticality Criticality = 3 [json_name = "Criticality"];
|
|
*/
|
|
criticality: ClaimCriticality;
|
|
/**
|
|
* Status of the claim
|
|
*
|
|
* @generated from protobuf field: api.ClaimStatusStruct Status = 4 [json_name = "Status"];
|
|
*/
|
|
status?: ClaimStatusStruct;
|
|
/**
|
|
* Creation date of the claim
|
|
*
|
|
* @generated from protobuf field: string CreationDate = 6 [json_name = "CreationDate"];
|
|
*/
|
|
creationDate: string;
|
|
/**
|
|
* Contacts assigned on the claim
|
|
*
|
|
* @generated from protobuf field: repeated string Assignees = 7 [json_name = "Assignees"];
|
|
*/
|
|
assignees: string[];
|
|
/**
|
|
* Contacts assigned removed from the claim
|
|
*
|
|
* @generated from protobuf field: repeated string RemovedAssignees = 16 [json_name = "RemovedAssignees"];
|
|
*/
|
|
removedAssignees: string[];
|
|
/**
|
|
* Contacts assigned added from the claim
|
|
*
|
|
* @generated from protobuf field: repeated string AddedAssignees = 17 [json_name = "AddedAssignees"];
|
|
*/
|
|
addedAssignees: string[];
|
|
/**
|
|
* End comment of the claim
|
|
*
|
|
* @generated from protobuf field: string EndComment = 8 [json_name = "EndComment"];
|
|
*/
|
|
endComment: string;
|
|
/**
|
|
* Closure responsible and causes of the claim
|
|
*
|
|
* @generated from protobuf field: api.ClaimClosure Closure = 9 [json_name = "Closure"];
|
|
*/
|
|
closure?: ClaimClosure;
|
|
/**
|
|
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 10 [json_name = "Attachments"];
|
|
*/
|
|
attachments: AttachmentSummary[];
|
|
/**
|
|
* @generated from protobuf field: int32 AttachmentNumber = 11 [json_name = "AttachmentNumber"];
|
|
*/
|
|
attachmentNumber: number;
|
|
/**
|
|
* @generated from protobuf field: api.Amount Amount = 12 [json_name = "Amount"];
|
|
*/
|
|
amount?: Amount;
|
|
/**
|
|
* @generated from protobuf field: string Reason = 13 [json_name = "Reason"];
|
|
*/
|
|
reason: string;
|
|
/**
|
|
* @generated from protobuf field: string ReasonCode = 18 [json_name = "ReasonCode"];
|
|
*/
|
|
reasonCode: string; // Code for the reason of the claim. It should be unique for the project.
|
|
/**
|
|
* @generated from protobuf field: api.ClaimSector Sector = 14 [json_name = "Sector"];
|
|
*/
|
|
sector: ClaimSector;
|
|
/**
|
|
* @generated from protobuf field: api.ClaimEntityType EntityType = 15 [json_name = "EntityType"];
|
|
*/
|
|
entityType: ClaimEntityType;
|
|
/**
|
|
* Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
|
|
*
|
|
* @generated from protobuf field: repeated api.MetadataElement MetaData = 19 [json_name = "MetaData"];
|
|
*/
|
|
metaData: MetadataElement[];
|
|
/**
|
|
* Title of the claim
|
|
*
|
|
* @generated from protobuf field: string Title = 20 [json_name = "Title"];
|
|
*/
|
|
title: string;
|
|
/**
|
|
* Identifier to display, because it may differ from the EntityID
|
|
*
|
|
* @generated from protobuf field: string DisplayID = 21 [json_name = "DisplayID"];
|
|
*/
|
|
displayID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ClaimTriplet
|
|
*/
|
|
export interface ClaimTriplet {
|
|
/**
|
|
* @generated from protobuf field: api.Claim Current = 1 [json_name = "Current"];
|
|
*/
|
|
current?: Claim;
|
|
/**
|
|
* @generated from protobuf field: api.Claim Previous = 2 [json_name = "Previous"];
|
|
*/
|
|
previous?: Claim;
|
|
/**
|
|
* @generated from protobuf field: api.Claim LastEvent = 3 [json_name = "LastEvent"];
|
|
*/
|
|
lastEvent?: Claim;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Claim$Type extends MessageType<Claim> {
|
|
constructor() {
|
|
super("api.Claim", [
|
|
{ no: 1, name: "LastEventHeader", kind: "message", jsonName: "LastEventHeader", T: () => EventHeader },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimPayload }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Aggregation object message" } } });
|
|
}
|
|
create(value?: PartialMessage<Claim>): Claim {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Claim>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Claim): Claim {
|
|
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 [json_name = "LastEventHeader"];*/ 1:
|
|
message.lastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.lastEventHeader);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
case /* api.ClaimPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
|
message.payload = ClaimPayload.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: Claim, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"]; */
|
|
if (message.lastEventHeader)
|
|
EventHeader.internalBinaryWrite(message.lastEventHeader, 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.ClaimPayload Payload = 3 [json_name = "Payload"]; */
|
|
if (message.payload)
|
|
ClaimPayload.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.Claim
|
|
*/
|
|
export const Claim = new Claim$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ClaimPayload$Type extends MessageType<ClaimPayload> {
|
|
constructor() {
|
|
super("api.ClaimPayload", [
|
|
{ no: 1, name: "ClaimTypeID", kind: "scalar", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the claim type" }, "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } },
|
|
{ no: 2, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the targetted entity" }, "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } },
|
|
{ no: 3, name: "Criticality", kind: "enum", jsonName: "Criticality", T: () => ["api.ClaimCriticality", ClaimCriticality, "CLAIM_CRITICALITY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Criticality of the claim" }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] } } },
|
|
{ no: 4, name: "Status", kind: "message", jsonName: "Status", T: () => ClaimStatusStruct, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Status of the claim" }, "api.aggSkip": "StatusUpdated" } },
|
|
{ no: 6, name: "CreationDate", kind: "scalar", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { dateIso8601: true } }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "date" }] } } },
|
|
{ no: 7, name: "Assignees", kind: "scalar", jsonName: "Assignees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Contacts assigned on the claims" }, "api.aggSkip": "AssigneesAdded", "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "user" }] } } },
|
|
{ no: 16, name: "RemovedAssignees", kind: "scalar", jsonName: "RemovedAssignees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true }, "api.aggSkip": "AssigneesRemoved", "api.viewType": { Types: [{ Context: "*", Type: "user" }] } } },
|
|
{ no: 17, name: "AddedAssignees", kind: "scalar", jsonName: "AddedAssignees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } },
|
|
{ no: 8, name: "EndComment", kind: "scalar", jsonName: "EndComment", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "End comment of the claim" } } },
|
|
{ no: 9, name: "Closure", kind: "message", jsonName: "Closure", T: () => ClaimClosure, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Closure responsible and causes of the claim" } } },
|
|
{ no: 10, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments per type" }, "api.aggSkip": "AttachmentAdded,AttachmentRemoved" } },
|
|
{ no: 11, name: "AttachmentNumber", kind: "scalar", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Total number of attachments" } } },
|
|
{ no: 12, name: "Amount", kind: "message", jsonName: "Amount", T: () => Amount, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Amount value of the claim" } } },
|
|
{ no: 13, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "255" } }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] } } },
|
|
{ no: 18, name: "ReasonCode", kind: "scalar", jsonName: "ReasonCode", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", pattern: "^[a-zA-Z0-9]+$" } }, "api.indexationType": { Types: [{ Context: "*", Type: "generatedText" }] }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortText" }] } } },
|
|
{ no: 14, name: "Sector", kind: "enum", jsonName: "Sector", T: () => ["api.ClaimSector", ClaimSector, "CLAIM_SECTOR_"], options: { "validate.rules": { enum: { definedOnly: true } }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] } } },
|
|
{ no: 15, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] } } },
|
|
{ no: 19, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key", "api.parentEntity": "Claim" } },
|
|
{ no: 20, name: "Title", kind: "scalar", jsonName: "Title", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Title of the claim" } } },
|
|
{ no: 21, name: "DisplayID", kind: "scalar", jsonName: "DisplayID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier to display, because it may differ from the EntityID" }, "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Claim", Group: "claim", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ClaimTypeID", "EntityID", "Criticality", "Status"] } } });
|
|
}
|
|
create(value?: PartialMessage<ClaimPayload>): ClaimPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.claimTypeID = "";
|
|
message.entityID = "";
|
|
message.criticality = 0;
|
|
message.creationDate = "";
|
|
message.assignees = [];
|
|
message.removedAssignees = [];
|
|
message.addedAssignees = [];
|
|
message.endComment = "";
|
|
message.attachments = [];
|
|
message.attachmentNumber = 0;
|
|
message.reason = "";
|
|
message.reasonCode = "";
|
|
message.sector = 0;
|
|
message.entityType = 0;
|
|
message.metaData = [];
|
|
message.title = "";
|
|
message.displayID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ClaimPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPayload): ClaimPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ClaimTypeID = 1 [json_name = "ClaimTypeID"];*/ 1:
|
|
message.claimTypeID = reader.string();
|
|
break;
|
|
case /* string EntityID = 2 [json_name = "EntityID"];*/ 2:
|
|
message.entityID = reader.string();
|
|
break;
|
|
case /* api.ClaimCriticality Criticality = 3 [json_name = "Criticality"];*/ 3:
|
|
message.criticality = reader.int32();
|
|
break;
|
|
case /* api.ClaimStatusStruct Status = 4 [json_name = "Status"];*/ 4:
|
|
message.status = ClaimStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
|
|
break;
|
|
case /* string CreationDate = 6 [json_name = "CreationDate"];*/ 6:
|
|
message.creationDate = reader.string();
|
|
break;
|
|
case /* repeated string Assignees = 7 [json_name = "Assignees"];*/ 7:
|
|
message.assignees.push(reader.string());
|
|
break;
|
|
case /* repeated string RemovedAssignees = 16 [json_name = "RemovedAssignees"];*/ 16:
|
|
message.removedAssignees.push(reader.string());
|
|
break;
|
|
case /* repeated string AddedAssignees = 17 [json_name = "AddedAssignees"];*/ 17:
|
|
message.addedAssignees.push(reader.string());
|
|
break;
|
|
case /* string EndComment = 8 [json_name = "EndComment"];*/ 8:
|
|
message.endComment = reader.string();
|
|
break;
|
|
case /* api.ClaimClosure Closure = 9 [json_name = "Closure"];*/ 9:
|
|
message.closure = ClaimClosure.internalBinaryRead(reader, reader.uint32(), options, message.closure);
|
|
break;
|
|
case /* repeated api.AttachmentSummary Attachments = 10 [json_name = "Attachments"];*/ 10:
|
|
message.attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* int32 AttachmentNumber = 11 [json_name = "AttachmentNumber"];*/ 11:
|
|
message.attachmentNumber = reader.int32();
|
|
break;
|
|
case /* api.Amount Amount = 12 [json_name = "Amount"];*/ 12:
|
|
message.amount = Amount.internalBinaryRead(reader, reader.uint32(), options, message.amount);
|
|
break;
|
|
case /* string Reason = 13 [json_name = "Reason"];*/ 13:
|
|
message.reason = reader.string();
|
|
break;
|
|
case /* string ReasonCode = 18 [json_name = "ReasonCode"];*/ 18:
|
|
message.reasonCode = reader.string();
|
|
break;
|
|
case /* api.ClaimSector Sector = 14 [json_name = "Sector"];*/ 14:
|
|
message.sector = reader.int32();
|
|
break;
|
|
case /* api.ClaimEntityType EntityType = 15 [json_name = "EntityType"];*/ 15:
|
|
message.entityType = reader.int32();
|
|
break;
|
|
case /* repeated api.MetadataElement MetaData = 19 [json_name = "MetaData"];*/ 19:
|
|
message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* string Title = 20 [json_name = "Title"];*/ 20:
|
|
message.title = reader.string();
|
|
break;
|
|
case /* string DisplayID = 21 [json_name = "DisplayID"];*/ 21:
|
|
message.displayID = 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: ClaimPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ClaimTypeID = 1 [json_name = "ClaimTypeID"]; */
|
|
if (message.claimTypeID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.claimTypeID);
|
|
/* string EntityID = 2 [json_name = "EntityID"]; */
|
|
if (message.entityID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.entityID);
|
|
/* api.ClaimCriticality Criticality = 3 [json_name = "Criticality"]; */
|
|
if (message.criticality !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.criticality);
|
|
/* api.ClaimStatusStruct Status = 4 [json_name = "Status"]; */
|
|
if (message.status)
|
|
ClaimStatusStruct.internalBinaryWrite(message.status, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* string CreationDate = 6 [json_name = "CreationDate"]; */
|
|
if (message.creationDate !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.creationDate);
|
|
/* repeated string Assignees = 7 [json_name = "Assignees"]; */
|
|
for (let i = 0; i < message.assignees.length; i++)
|
|
writer.tag(7, WireType.LengthDelimited).string(message.assignees[i]);
|
|
/* repeated string RemovedAssignees = 16 [json_name = "RemovedAssignees"]; */
|
|
for (let i = 0; i < message.removedAssignees.length; i++)
|
|
writer.tag(16, WireType.LengthDelimited).string(message.removedAssignees[i]);
|
|
/* repeated string AddedAssignees = 17 [json_name = "AddedAssignees"]; */
|
|
for (let i = 0; i < message.addedAssignees.length; i++)
|
|
writer.tag(17, WireType.LengthDelimited).string(message.addedAssignees[i]);
|
|
/* string EndComment = 8 [json_name = "EndComment"]; */
|
|
if (message.endComment !== "")
|
|
writer.tag(8, WireType.LengthDelimited).string(message.endComment);
|
|
/* api.ClaimClosure Closure = 9 [json_name = "Closure"]; */
|
|
if (message.closure)
|
|
ClaimClosure.internalBinaryWrite(message.closure, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.AttachmentSummary Attachments = 10 [json_name = "Attachments"]; */
|
|
for (let i = 0; i < message.attachments.length; i++)
|
|
AttachmentSummary.internalBinaryWrite(message.attachments[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
/* int32 AttachmentNumber = 11 [json_name = "AttachmentNumber"]; */
|
|
if (message.attachmentNumber !== 0)
|
|
writer.tag(11, WireType.Varint).int32(message.attachmentNumber);
|
|
/* api.Amount Amount = 12 [json_name = "Amount"]; */
|
|
if (message.amount)
|
|
Amount.internalBinaryWrite(message.amount, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Reason = 13 [json_name = "Reason"]; */
|
|
if (message.reason !== "")
|
|
writer.tag(13, WireType.LengthDelimited).string(message.reason);
|
|
/* string ReasonCode = 18 [json_name = "ReasonCode"]; */
|
|
if (message.reasonCode !== "")
|
|
writer.tag(18, WireType.LengthDelimited).string(message.reasonCode);
|
|
/* api.ClaimSector Sector = 14 [json_name = "Sector"]; */
|
|
if (message.sector !== 0)
|
|
writer.tag(14, WireType.Varint).int32(message.sector);
|
|
/* api.ClaimEntityType EntityType = 15 [json_name = "EntityType"]; */
|
|
if (message.entityType !== 0)
|
|
writer.tag(15, WireType.Varint).int32(message.entityType);
|
|
/* repeated api.MetadataElement MetaData = 19 [json_name = "MetaData"]; */
|
|
for (let i = 0; i < message.metaData.length; i++)
|
|
MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Title = 20 [json_name = "Title"]; */
|
|
if (message.title !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.title);
|
|
/* string DisplayID = 21 [json_name = "DisplayID"]; */
|
|
if (message.displayID !== "")
|
|
writer.tag(21, WireType.LengthDelimited).string(message.displayID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ClaimPayload
|
|
*/
|
|
export const ClaimPayload = new ClaimPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ClaimTriplet$Type extends MessageType<ClaimTriplet> {
|
|
constructor() {
|
|
super("api.ClaimTriplet", [
|
|
{ no: 1, name: "Current", kind: "message", jsonName: "Current", T: () => Claim },
|
|
{ no: 2, name: "Previous", kind: "message", jsonName: "Previous", T: () => Claim },
|
|
{ no: 3, name: "LastEvent", kind: "message", jsonName: "LastEvent", T: () => Claim }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ClaimTriplet>): ClaimTriplet {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ClaimTriplet>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimTriplet): ClaimTriplet {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Claim Current = 1 [json_name = "Current"];*/ 1:
|
|
message.current = Claim.internalBinaryRead(reader, reader.uint32(), options, message.current);
|
|
break;
|
|
case /* api.Claim Previous = 2 [json_name = "Previous"];*/ 2:
|
|
message.previous = Claim.internalBinaryRead(reader, reader.uint32(), options, message.previous);
|
|
break;
|
|
case /* api.Claim LastEvent = 3 [json_name = "LastEvent"];*/ 3:
|
|
message.lastEvent = Claim.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: ClaimTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Claim Current = 1 [json_name = "Current"]; */
|
|
if (message.current)
|
|
Claim.internalBinaryWrite(message.current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Claim Previous = 2 [json_name = "Previous"]; */
|
|
if (message.previous)
|
|
Claim.internalBinaryWrite(message.previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Claim LastEvent = 3 [json_name = "LastEvent"]; */
|
|
if (message.lastEvent)
|
|
Claim.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.ClaimTriplet
|
|
*/
|
|
export const ClaimTriplet = new ClaimTriplet$Type();
|