|
| 1 | +// @generated by protoc-gen-es v1.0.0 with parameter "target=ts" |
| 2 | +// @generated from file bench.proto (syntax proto3) |
| 3 | +/* eslint-disable */ |
| 4 | +// @ts-nocheck |
| 5 | + |
| 6 | +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; |
| 7 | +import { Message, proto3 } from "@bufbuild/protobuf"; |
| 8 | + |
| 9 | +/** |
| 10 | + * @generated from enum FOO |
| 11 | + */ |
| 12 | +export enum FOO { |
| 13 | + /** |
| 14 | + * @generated from enum value: NONE = 0; |
| 15 | + */ |
| 16 | + NONE = 0, |
| 17 | + |
| 18 | + /** |
| 19 | + * @generated from enum value: LOL = 1; |
| 20 | + */ |
| 21 | + LOL = 1, |
| 22 | + |
| 23 | + /** |
| 24 | + * @generated from enum value: ABE = 3; |
| 25 | + */ |
| 26 | + ABE = 3, |
| 27 | +} |
| 28 | +// Retrieve enum metadata with: proto3.getEnumType(FOO) |
| 29 | +proto3.util.setEnumType(FOO, "FOO", [ |
| 30 | + { no: 0, name: "NONE" }, |
| 31 | + { no: 1, name: "LOL" }, |
| 32 | + { no: 3, name: "ABE" }, |
| 33 | +]); |
| 34 | + |
| 35 | +/** |
| 36 | + * @generated from message Foo |
| 37 | + */ |
| 38 | +export class Foo extends Message<Foo> { |
| 39 | + /** |
| 40 | + * @generated from field: optional uint32 baz = 1; |
| 41 | + */ |
| 42 | + baz?: number; |
| 43 | + |
| 44 | + constructor(data?: PartialMessage<Foo>) { |
| 45 | + super(); |
| 46 | + proto3.util.initPartial(data, this); |
| 47 | + } |
| 48 | + |
| 49 | + static readonly runtime = proto3; |
| 50 | + static readonly typeName = "Foo"; |
| 51 | + static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 52 | + { no: 1, name: "baz", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, |
| 53 | + ]); |
| 54 | + |
| 55 | + static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Foo { |
| 56 | + return new Foo().fromBinary(bytes, options); |
| 57 | + } |
| 58 | + |
| 59 | + static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Foo { |
| 60 | + return new Foo().fromJson(jsonValue, options); |
| 61 | + } |
| 62 | + |
| 63 | + static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Foo { |
| 64 | + return new Foo().fromJsonString(jsonString, options); |
| 65 | + } |
| 66 | + |
| 67 | + static equals(a: Foo | PlainMessage<Foo> | undefined, b: Foo | PlainMessage<Foo> | undefined): boolean { |
| 68 | + return proto3.util.equals(Foo, a, b); |
| 69 | + } |
| 70 | +} |
| 71 | + |
| 72 | +/** |
| 73 | + * @generated from message Bar |
| 74 | + */ |
| 75 | +export class Bar extends Message<Bar> { |
| 76 | + /** |
| 77 | + * @generated from field: optional Foo tmp = 1; |
| 78 | + */ |
| 79 | + tmp?: Foo; |
| 80 | + |
| 81 | + constructor(data?: PartialMessage<Bar>) { |
| 82 | + super(); |
| 83 | + proto3.util.initPartial(data, this); |
| 84 | + } |
| 85 | + |
| 86 | + static readonly runtime = proto3; |
| 87 | + static readonly typeName = "Bar"; |
| 88 | + static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 89 | + { no: 1, name: "tmp", kind: "message", T: Foo, opt: true }, |
| 90 | + ]); |
| 91 | + |
| 92 | + static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Bar { |
| 93 | + return new Bar().fromBinary(bytes, options); |
| 94 | + } |
| 95 | + |
| 96 | + static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Bar { |
| 97 | + return new Bar().fromJson(jsonValue, options); |
| 98 | + } |
| 99 | + |
| 100 | + static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Bar { |
| 101 | + return new Bar().fromJsonString(jsonString, options); |
| 102 | + } |
| 103 | + |
| 104 | + static equals(a: Bar | PlainMessage<Bar> | undefined, b: Bar | PlainMessage<Bar> | undefined): boolean { |
| 105 | + return proto3.util.equals(Bar, a, b); |
| 106 | + } |
| 107 | +} |
| 108 | + |
| 109 | +/** |
| 110 | + * @generated from message Yo |
| 111 | + */ |
| 112 | +export class Yo extends Message<Yo> { |
| 113 | + /** |
| 114 | + * @generated from field: repeated FOO lol = 1; |
| 115 | + */ |
| 116 | + lol: FOO[] = []; |
| 117 | + |
| 118 | + constructor(data?: PartialMessage<Yo>) { |
| 119 | + super(); |
| 120 | + proto3.util.initPartial(data, this); |
| 121 | + } |
| 122 | + |
| 123 | + static readonly runtime = proto3; |
| 124 | + static readonly typeName = "Yo"; |
| 125 | + static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 126 | + { no: 1, name: "lol", kind: "enum", T: proto3.getEnumType(FOO), repeated: true }, |
| 127 | + ]); |
| 128 | + |
| 129 | + static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Yo { |
| 130 | + return new Yo().fromBinary(bytes, options); |
| 131 | + } |
| 132 | + |
| 133 | + static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Yo { |
| 134 | + return new Yo().fromJson(jsonValue, options); |
| 135 | + } |
| 136 | + |
| 137 | + static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Yo { |
| 138 | + return new Yo().fromJsonString(jsonString, options); |
| 139 | + } |
| 140 | + |
| 141 | + static equals(a: Yo | PlainMessage<Yo> | undefined, b: Yo | PlainMessage<Yo> | undefined): boolean { |
| 142 | + return proto3.util.equals(Yo, a, b); |
| 143 | + } |
| 144 | +} |
| 145 | + |
| 146 | +/** |
| 147 | + * @generated from message Lol |
| 148 | + */ |
| 149 | +export class Lol extends Message<Lol> { |
| 150 | + /** |
| 151 | + * @generated from field: optional string lol = 1; |
| 152 | + */ |
| 153 | + lol?: string; |
| 154 | + |
| 155 | + /** |
| 156 | + * @generated from field: Bar b = 2; |
| 157 | + */ |
| 158 | + b?: Bar; |
| 159 | + |
| 160 | + constructor(data?: PartialMessage<Lol>) { |
| 161 | + super(); |
| 162 | + proto3.util.initPartial(data, this); |
| 163 | + } |
| 164 | + |
| 165 | + static readonly runtime = proto3; |
| 166 | + static readonly typeName = "Lol"; |
| 167 | + static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 168 | + { no: 1, name: "lol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, |
| 169 | + { no: 2, name: "b", kind: "message", T: Bar }, |
| 170 | + ]); |
| 171 | + |
| 172 | + static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Lol { |
| 173 | + return new Lol().fromBinary(bytes, options); |
| 174 | + } |
| 175 | + |
| 176 | + static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Lol { |
| 177 | + return new Lol().fromJson(jsonValue, options); |
| 178 | + } |
| 179 | + |
| 180 | + static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Lol { |
| 181 | + return new Lol().fromJsonString(jsonString, options); |
| 182 | + } |
| 183 | + |
| 184 | + static equals(a: Lol | PlainMessage<Lol> | undefined, b: Lol | PlainMessage<Lol> | undefined): boolean { |
| 185 | + return proto3.util.equals(Lol, a, b); |
| 186 | + } |
| 187 | +} |
| 188 | + |
| 189 | +/** |
| 190 | + * @generated from message Test |
| 191 | + */ |
| 192 | +export class Test extends Message<Test> { |
| 193 | + /** |
| 194 | + * @generated from field: optional Lol meh = 6; |
| 195 | + */ |
| 196 | + meh?: Lol; |
| 197 | + |
| 198 | + /** |
| 199 | + * @generated from field: optional uint32 hello = 3; |
| 200 | + */ |
| 201 | + hello?: number; |
| 202 | + |
| 203 | + /** |
| 204 | + * @generated from field: optional string foo = 1; |
| 205 | + */ |
| 206 | + foo?: string; |
| 207 | + |
| 208 | + /** |
| 209 | + * @generated from field: optional bytes payload = 7; |
| 210 | + */ |
| 211 | + payload?: Uint8Array; |
| 212 | + |
| 213 | + constructor(data?: PartialMessage<Test>) { |
| 214 | + super(); |
| 215 | + proto3.util.initPartial(data, this); |
| 216 | + } |
| 217 | + |
| 218 | + static readonly runtime = proto3; |
| 219 | + static readonly typeName = "Test"; |
| 220 | + static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 221 | + { no: 6, name: "meh", kind: "message", T: Lol, opt: true }, |
| 222 | + { no: 3, name: "hello", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, |
| 223 | + { no: 1, name: "foo", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, |
| 224 | + { no: 7, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, |
| 225 | + ]); |
| 226 | + |
| 227 | + static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Test { |
| 228 | + return new Test().fromBinary(bytes, options); |
| 229 | + } |
| 230 | + |
| 231 | + static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Test { |
| 232 | + return new Test().fromJson(jsonValue, options); |
| 233 | + } |
| 234 | + |
| 235 | + static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Test { |
| 236 | + return new Test().fromJsonString(jsonString, options); |
| 237 | + } |
| 238 | + |
| 239 | + static equals(a: Test | PlainMessage<Test> | undefined, b: Test | PlainMessage<Test> | undefined): boolean { |
| 240 | + return proto3.util.equals(Test, a, b); |
| 241 | + } |
| 242 | +} |
| 243 | + |
0 commit comments