-
Notifications
You must be signed in to change notification settings - Fork 55
/
example_pb.ts
88 lines (73 loc) · 2.91 KB
/
example_pb.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright 2021-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.8.0 with parameter "ts_nocheck=false,target=ts"
// @generated from file extra/example.proto (package docs, syntax proto3)
/* eslint-disable */
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message docs.User
*/
export class User extends Message<User> {
/**
* @generated from field: string first_name = 1;
*/
firstName = "";
/**
* @generated from field: string last_name = 2;
*/
lastName = "";
/**
* @generated from field: bool active = 3;
*/
active = false;
/**
* @generated from field: docs.User manager = 4;
*/
manager?: User;
/**
* @generated from field: repeated string locations = 5;
*/
locations: string[] = [];
/**
* @generated from field: map<string, string> projects = 6;
*/
projects: { [key: string]: string } = {};
constructor(data?: PartialMessage<User>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "docs.User";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "first_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "last_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 4, name: "manager", kind: "message", T: User },
{ no: 5, name: "locations", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 6, name: "projects", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): User {
return new User().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): User {
return new User().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): User {
return new User().fromJsonString(jsonString, options);
}
static equals(a: User | PlainMessage<User> | undefined, b: User | PlainMessage<User> | undefined): boolean {
return proto3.util.equals(User, a, b);
}
}