2 // @generated by protobuf-ts 2.8.2
3 // @generated from protobuf file "label-v1.proto" (package "proton_pass_label_v1", syntax proto3)
5 import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
6 import type { IBinaryWriter } from '@protobuf-ts/runtime';
7 import { WireType } from '@protobuf-ts/runtime';
8 import type { BinaryReadOptions } from '@protobuf-ts/runtime';
9 import type { IBinaryReader } from '@protobuf-ts/runtime';
10 import { UnknownFieldHandler } from '@protobuf-ts/runtime';
11 import type { PartialMessage } from '@protobuf-ts/runtime';
12 import { reflectionMergePartial } from '@protobuf-ts/runtime';
13 import { MESSAGE_TYPE } from '@protobuf-ts/runtime';
14 import { MessageType } from '@protobuf-ts/runtime';
17 * @generated from protobuf message proton_pass_label_v1.Label
19 export interface Label {
21 * @generated from protobuf field: string name = 1;
25 * @generated from protobuf field: string description = 2;
29 // @generated message type with reflection information, may provide speed optimized methods
30 class Label$Type extends MessageType<Label> {
32 super('proton_pass_label_v1.Label', [
33 { no: 1, name: 'name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
34 { no: 2, name: 'description', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
37 create(value?: PartialMessage<Label>): Label {
38 const message = { name: '', description: '' };
39 globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
40 if (value !== undefined) reflectionMergePartial<Label>(this, message, value);
43 internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Label): Label {
44 let message = target ?? this.create(),
45 end = reader.pos + length;
46 while (reader.pos < end) {
47 let [fieldNo, wireType] = reader.tag();
49 case /* string name */ 1:
50 message.name = reader.string();
52 case /* string description */ 2:
53 message.description = reader.string();
56 let u = options.readUnknownField;
58 throw new globalThis.Error(
59 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
61 let d = reader.skip(wireType);
63 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
68 internalBinaryWrite(message: Label, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
69 /* string name = 1; */
70 if (message.name !== '') writer.tag(1, WireType.LengthDelimited).string(message.name);
71 /* string description = 2; */
72 if (message.description !== '') writer.tag(2, WireType.LengthDelimited).string(message.description);
73 let u = options.writeUnknownFields;
74 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
79 * @generated MessageType for protobuf message proton_pass_label_v1.Label
81 export const Label = new Label$Type();