@bufbuild/protobuf 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/cjs/binary-encoding.js +434 -0
- package/dist/cjs/binary-format.js +2 -0
- package/dist/cjs/descriptor-registry.js +518 -0
- package/dist/cjs/descriptor-set.js +557 -0
- package/dist/cjs/enum.js +2 -0
- package/dist/cjs/field-list.js +2 -0
- package/dist/cjs/field.js +40 -0
- package/dist/cjs/google/protobuf/any_pb.js +280 -0
- package/dist/cjs/google/protobuf/api_pb.js +383 -0
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +334 -0
- package/dist/cjs/google/protobuf/descriptor_pb.js +2311 -0
- package/dist/cjs/google/protobuf/duration_pb.js +201 -0
- package/dist/cjs/google/protobuf/empty_pb.js +72 -0
- package/dist/cjs/google/protobuf/field_mask_pb.js +347 -0
- package/dist/cjs/google/protobuf/source_context_pb.js +74 -0
- package/dist/cjs/google/protobuf/struct_pb.js +288 -0
- package/dist/cjs/google/protobuf/timestamp_pb.js +271 -0
- package/dist/cjs/google/protobuf/type_pb.js +613 -0
- package/dist/cjs/google/protobuf/wrappers_pb.js +658 -0
- package/dist/cjs/google/varint.js +280 -0
- package/dist/cjs/index.js +148 -0
- package/dist/cjs/json-format.js +2 -0
- package/dist/cjs/message-type.js +2 -0
- package/dist/cjs/message.js +98 -0
- package/dist/cjs/private/assert.js +52 -0
- package/dist/cjs/private/base64.js +118 -0
- package/dist/cjs/private/binary-format-common.js +253 -0
- package/dist/cjs/private/binary-format-proto2.js +120 -0
- package/dist/cjs/private/binary-format-proto3.js +102 -0
- package/dist/cjs/private/enum.js +70 -0
- package/dist/cjs/private/field-list.js +62 -0
- package/dist/cjs/private/field-wrapper.js +25 -0
- package/dist/cjs/private/field.js +34 -0
- package/dist/cjs/private/json-format-common.js +482 -0
- package/dist/cjs/private/json-format-proto2.js +100 -0
- package/dist/cjs/private/json-format-proto3.js +103 -0
- package/dist/cjs/private/message-type.js +37 -0
- package/dist/cjs/private/names.js +101 -0
- package/dist/cjs/private/options-map.js +2 -0
- package/dist/cjs/private/proto-runtime.js +24 -0
- package/dist/cjs/private/scalars.js +138 -0
- package/dist/cjs/private/util-common.js +229 -0
- package/dist/cjs/private/util.js +2 -0
- package/dist/cjs/proto-int64.js +121 -0
- package/dist/cjs/proto2.js +86 -0
- package/dist/cjs/proto3.js +99 -0
- package/dist/cjs/service-type.js +43 -0
- package/dist/cjs/type-registry.js +42 -0
- package/dist/esm/binary-encoding.js +434 -0
- package/dist/esm/binary-format.js +1 -0
- package/dist/esm/descriptor-registry.js +521 -0
- package/dist/esm/descriptor-set.js +517 -0
- package/dist/esm/enum.js +1 -0
- package/dist/esm/field-list.js +1 -0
- package/dist/esm/field.js +37 -0
- package/dist/esm/google/protobuf/any_pb.js +276 -0
- package/dist/esm/google/protobuf/api_pb.js +350 -0
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +318 -0
- package/dist/esm/google/protobuf/descriptor_pb.js +2213 -0
- package/dist/esm/google/protobuf/duration_pb.js +197 -0
- package/dist/esm/google/protobuf/empty_pb.js +68 -0
- package/dist/esm/google/protobuf/field_mask_pb.js +343 -0
- package/dist/esm/google/protobuf/source_context_pb.js +70 -0
- package/dist/esm/google/protobuf/struct_pb.js +282 -0
- package/dist/esm/google/protobuf/timestamp_pb.js +267 -0
- package/dist/esm/google/protobuf/type_pb.js +569 -0
- package/dist/esm/google/protobuf/wrappers_pb.js +574 -0
- package/dist/esm/google/varint.js +265 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/json-format.js +1 -0
- package/dist/esm/message-type.js +1 -0
- package/dist/esm/message.js +94 -0
- package/dist/esm/private/assert.js +41 -0
- package/dist/esm/private/base64.js +113 -0
- package/dist/esm/private/binary-format-common.js +243 -0
- package/dist/esm/private/binary-format-proto2.js +87 -0
- package/dist/esm/private/binary-format-proto3.js +74 -0
- package/dist/esm/private/enum.js +64 -0
- package/dist/esm/private/field-list.js +58 -0
- package/dist/esm/private/field-wrapper.js +20 -0
- package/dist/esm/private/field.js +27 -0
- package/dist/esm/private/json-format-common.js +473 -0
- package/dist/esm/private/json-format-proto2.js +90 -0
- package/dist/esm/private/json-format-proto3.js +89 -0
- package/dist/esm/private/message-type.js +33 -0
- package/dist/esm/private/names.js +90 -0
- package/dist/esm/private/options-map.js +1 -0
- package/dist/esm/private/proto-runtime.js +15 -0
- package/dist/esm/private/scalars.js +129 -0
- package/dist/esm/private/util-common.js +207 -0
- package/dist/esm/private/util.js +1 -0
- package/dist/esm/proto-int64.js +118 -0
- package/dist/esm/proto2.js +77 -0
- package/dist/esm/proto3.js +90 -0
- package/dist/esm/service-type.js +37 -0
- package/dist/esm/type-registry.js +38 -0
- package/dist/types/binary-encoding.d.ts +421 -0
- package/dist/types/binary-format.d.ts +109 -0
- package/dist/types/descriptor-registry.d.ts +42 -0
- package/dist/types/descriptor-set.d.ts +171 -0
- package/dist/types/enum.d.ts +31 -0
- package/dist/types/field-list.d.ts +27 -0
- package/dist/types/field.d.ts +295 -0
- package/dist/types/google/protobuf/any_pb.d.ts +167 -0
- package/dist/types/google/protobuf/api_pb.d.ts +296 -0
- package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +294 -0
- package/dist/types/google/protobuf/descriptor_pb.d.ts +1959 -0
- package/dist/types/google/protobuf/duration_pb.d.ts +117 -0
- package/dist/types/google/protobuf/empty_pb.d.ts +44 -0
- package/dist/types/google/protobuf/field_mask_pb.d.ts +243 -0
- package/dist/types/google/protobuf/source_context_pb.d.ts +44 -0
- package/dist/types/google/protobuf/struct_pb.d.ts +205 -0
- package/dist/types/google/protobuf/timestamp_pb.d.ts +151 -0
- package/dist/types/google/protobuf/type_pb.d.ts +482 -0
- package/dist/types/google/protobuf/wrappers_pb.d.ts +379 -0
- package/dist/types/google/varint.d.ts +65 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/types/json-format.d.ts +129 -0
- package/dist/types/message-type.d.ts +58 -0
- package/dist/types/message.d.ts +124 -0
- package/dist/types/private/assert.d.ts +19 -0
- package/dist/types/private/base64.d.ts +18 -0
- package/dist/types/private/binary-format-common.d.ts +38 -0
- package/dist/types/private/binary-format-proto2.d.ts +2 -0
- package/dist/types/private/binary-format-proto3.d.ts +2 -0
- package/dist/types/private/enum.d.ts +29 -0
- package/dist/types/private/field-list.d.ts +25 -0
- package/dist/types/private/field-wrapper.d.ts +27 -0
- package/dist/types/private/field.d.ts +15 -0
- package/dist/types/private/json-format-common.d.ts +30 -0
- package/dist/types/private/json-format-proto2.d.ts +2 -0
- package/dist/types/private/json-format-proto3.d.ts +2 -0
- package/dist/types/private/message-type.d.ts +15 -0
- package/dist/types/private/names.d.ts +19 -0
- package/dist/types/private/options-map.d.ts +7 -0
- package/dist/types/private/proto-runtime.d.ts +55 -0
- package/dist/types/private/scalars.d.ts +33 -0
- package/dist/types/private/util-common.d.ts +5 -0
- package/dist/types/private/util.d.ts +55 -0
- package/dist/types/proto-int64.d.ts +94 -0
- package/dist/types/proto2.d.ts +4 -0
- package/dist/types/proto3.d.ts +4 -0
- package/dist/types/service-type.d.ts +118 -0
- package/dist/types/type-registry.d.ts +37 -0
- package/package.json +31 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BinaryReadOptions,
|
|
3
|
+
FieldList,
|
|
4
|
+
JsonReadOptions,
|
|
5
|
+
JsonValue,
|
|
6
|
+
JsonWriteOptions,
|
|
7
|
+
PartialMessage,
|
|
8
|
+
PlainMessage,
|
|
9
|
+
} from "../../index.js";
|
|
10
|
+
import { Message } from "../../index.js";
|
|
11
|
+
/**
|
|
12
|
+
* A Timestamp represents a point in time independent of any time zone or local
|
|
13
|
+
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
14
|
+
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
|
15
|
+
* January 1, 1970, in the proleptic Gregorian calendar which extends the
|
|
16
|
+
* Gregorian calendar backwards to year one.
|
|
17
|
+
*
|
|
18
|
+
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
|
19
|
+
* second table is needed for interpretation, using a [24-hour linear
|
|
20
|
+
* smear](https://developers.google.com/time/smear).
|
|
21
|
+
*
|
|
22
|
+
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
|
23
|
+
* restricting to that range, we ensure that we can convert to and from [RFC
|
|
24
|
+
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
|
25
|
+
*
|
|
26
|
+
* # Examples
|
|
27
|
+
*
|
|
28
|
+
* Example 1: Compute Timestamp from POSIX `time()`.
|
|
29
|
+
*
|
|
30
|
+
* Timestamp timestamp;
|
|
31
|
+
* timestamp.set_seconds(time(NULL));
|
|
32
|
+
* timestamp.set_nanos(0);
|
|
33
|
+
*
|
|
34
|
+
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
35
|
+
*
|
|
36
|
+
* struct timeval tv;
|
|
37
|
+
* gettimeofday(&tv, NULL);
|
|
38
|
+
*
|
|
39
|
+
* Timestamp timestamp;
|
|
40
|
+
* timestamp.set_seconds(tv.tv_sec);
|
|
41
|
+
* timestamp.set_nanos(tv.tv_usec * 1000);
|
|
42
|
+
*
|
|
43
|
+
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
44
|
+
*
|
|
45
|
+
* FILETIME ft;
|
|
46
|
+
* GetSystemTimeAsFileTime(&ft);
|
|
47
|
+
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
|
48
|
+
*
|
|
49
|
+
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
|
50
|
+
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
|
51
|
+
* Timestamp timestamp;
|
|
52
|
+
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
53
|
+
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
54
|
+
*
|
|
55
|
+
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
56
|
+
*
|
|
57
|
+
* long millis = System.currentTimeMillis();
|
|
58
|
+
*
|
|
59
|
+
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
|
60
|
+
* .setNanos((int) ((millis % 1000) * 1000000)).build();
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* Example 5: Compute Timestamp from Java `Instant.now()`.
|
|
64
|
+
*
|
|
65
|
+
* Instant now = Instant.now();
|
|
66
|
+
*
|
|
67
|
+
* Timestamp timestamp =
|
|
68
|
+
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
|
69
|
+
* .setNanos(now.getNano()).build();
|
|
70
|
+
*
|
|
71
|
+
*
|
|
72
|
+
* Example 6: Compute Timestamp from current time in Python.
|
|
73
|
+
*
|
|
74
|
+
* timestamp = Timestamp()
|
|
75
|
+
* timestamp.GetCurrentTime()
|
|
76
|
+
*
|
|
77
|
+
* # JSON Mapping
|
|
78
|
+
*
|
|
79
|
+
* In JSON format, the Timestamp type is encoded as a string in the
|
|
80
|
+
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
81
|
+
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
|
82
|
+
* where {year} is always expressed using four digits while {month}, {day},
|
|
83
|
+
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
84
|
+
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
85
|
+
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
86
|
+
* is required. A proto3 JSON serializer should always use UTC (as indicated by
|
|
87
|
+
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
|
88
|
+
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
89
|
+
*
|
|
90
|
+
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
91
|
+
* 01:30 UTC on January 15, 2017.
|
|
92
|
+
*
|
|
93
|
+
* In JavaScript, one can convert a Date object to this format using the
|
|
94
|
+
* standard
|
|
95
|
+
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
96
|
+
* method. In Python, a standard `datetime.datetime` object can be converted
|
|
97
|
+
* to this format using
|
|
98
|
+
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
99
|
+
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
100
|
+
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
101
|
+
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
|
102
|
+
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
103
|
+
*
|
|
104
|
+
*
|
|
105
|
+
*
|
|
106
|
+
* @generated from message google.protobuf.Timestamp
|
|
107
|
+
*/
|
|
108
|
+
export declare class Timestamp extends Message<Timestamp> {
|
|
109
|
+
/**
|
|
110
|
+
* Represents seconds of UTC time since Unix epoch
|
|
111
|
+
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
112
|
+
* 9999-12-31T23:59:59Z inclusive.
|
|
113
|
+
*
|
|
114
|
+
* @generated from field: int64 seconds = 1;
|
|
115
|
+
*/
|
|
116
|
+
seconds: bigint;
|
|
117
|
+
/**
|
|
118
|
+
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
119
|
+
* second values with fractions must still have non-negative nanos values
|
|
120
|
+
* that count forward in time. Must be from 0 to 999,999,999
|
|
121
|
+
* inclusive.
|
|
122
|
+
*
|
|
123
|
+
* @generated from field: int32 nanos = 2;
|
|
124
|
+
*/
|
|
125
|
+
nanos: number;
|
|
126
|
+
constructor(data?: PartialMessage<Timestamp>);
|
|
127
|
+
fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
|
|
128
|
+
toJson(options?: Partial<JsonWriteOptions>): JsonValue;
|
|
129
|
+
toDate(): Date;
|
|
130
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
131
|
+
static readonly typeName = "google.protobuf.Timestamp";
|
|
132
|
+
static readonly fields: FieldList;
|
|
133
|
+
static now(): Timestamp;
|
|
134
|
+
static fromDate(date: Date): Timestamp;
|
|
135
|
+
static fromBinary(
|
|
136
|
+
bytes: Uint8Array,
|
|
137
|
+
options?: Partial<BinaryReadOptions>
|
|
138
|
+
): Timestamp;
|
|
139
|
+
static fromJson(
|
|
140
|
+
jsonValue: JsonValue,
|
|
141
|
+
options?: Partial<JsonReadOptions>
|
|
142
|
+
): Timestamp;
|
|
143
|
+
static fromJsonString(
|
|
144
|
+
jsonString: string,
|
|
145
|
+
options?: Partial<JsonReadOptions>
|
|
146
|
+
): Timestamp;
|
|
147
|
+
static equals(
|
|
148
|
+
a: Timestamp | PlainMessage<Timestamp> | undefined,
|
|
149
|
+
b: Timestamp | PlainMessage<Timestamp> | undefined
|
|
150
|
+
): boolean;
|
|
151
|
+
}
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BinaryReadOptions,
|
|
3
|
+
FieldList,
|
|
4
|
+
JsonReadOptions,
|
|
5
|
+
JsonValue,
|
|
6
|
+
PartialMessage,
|
|
7
|
+
PlainMessage,
|
|
8
|
+
} from "../../index.js";
|
|
9
|
+
import { Message } from "../../index.js";
|
|
10
|
+
import { SourceContext } from "./source_context_pb.js";
|
|
11
|
+
import { Any } from "./any_pb.js";
|
|
12
|
+
/**
|
|
13
|
+
* The syntax in which a protocol buffer element is defined.
|
|
14
|
+
*
|
|
15
|
+
* @generated from enum google.protobuf.Syntax
|
|
16
|
+
*/
|
|
17
|
+
export declare enum Syntax {
|
|
18
|
+
/**
|
|
19
|
+
* Syntax `proto2`.
|
|
20
|
+
*
|
|
21
|
+
* @generated from enum value: SYNTAX_PROTO2 = 0;
|
|
22
|
+
*/
|
|
23
|
+
PROTO2 = 0,
|
|
24
|
+
/**
|
|
25
|
+
* Syntax `proto3`.
|
|
26
|
+
*
|
|
27
|
+
* @generated from enum value: SYNTAX_PROTO3 = 1;
|
|
28
|
+
*/
|
|
29
|
+
PROTO3 = 1,
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A protocol buffer message type.
|
|
33
|
+
*
|
|
34
|
+
* @generated from message google.protobuf.Type
|
|
35
|
+
*/
|
|
36
|
+
export declare class Type extends Message<Type> {
|
|
37
|
+
/**
|
|
38
|
+
* The fully qualified message name.
|
|
39
|
+
*
|
|
40
|
+
* @generated from field: string name = 1;
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* The list of fields.
|
|
45
|
+
*
|
|
46
|
+
* @generated from field: repeated google.protobuf.Field fields = 2;
|
|
47
|
+
*/
|
|
48
|
+
fields: Field[];
|
|
49
|
+
/**
|
|
50
|
+
* The list of types appearing in `oneof` definitions in this type.
|
|
51
|
+
*
|
|
52
|
+
* @generated from field: repeated string oneofs = 3;
|
|
53
|
+
*/
|
|
54
|
+
oneofs: string[];
|
|
55
|
+
/**
|
|
56
|
+
* The protocol buffer options.
|
|
57
|
+
*
|
|
58
|
+
* @generated from field: repeated google.protobuf.Option options = 4;
|
|
59
|
+
*/
|
|
60
|
+
options: Option[];
|
|
61
|
+
/**
|
|
62
|
+
* The source context.
|
|
63
|
+
*
|
|
64
|
+
* @generated from field: google.protobuf.SourceContext source_context = 5;
|
|
65
|
+
*/
|
|
66
|
+
sourceContext?: SourceContext;
|
|
67
|
+
/**
|
|
68
|
+
* The source syntax.
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: google.protobuf.Syntax syntax = 6;
|
|
71
|
+
*/
|
|
72
|
+
syntax: Syntax;
|
|
73
|
+
constructor(data?: PartialMessage<Type>);
|
|
74
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
75
|
+
static readonly typeName = "google.protobuf.Type";
|
|
76
|
+
static readonly fields: FieldList;
|
|
77
|
+
static fromBinary(
|
|
78
|
+
bytes: Uint8Array,
|
|
79
|
+
options?: Partial<BinaryReadOptions>
|
|
80
|
+
): Type;
|
|
81
|
+
static fromJson(
|
|
82
|
+
jsonValue: JsonValue,
|
|
83
|
+
options?: Partial<JsonReadOptions>
|
|
84
|
+
): Type;
|
|
85
|
+
static fromJsonString(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
options?: Partial<JsonReadOptions>
|
|
88
|
+
): Type;
|
|
89
|
+
static equals(
|
|
90
|
+
a: Type | PlainMessage<Type> | undefined,
|
|
91
|
+
b: Type | PlainMessage<Type> | undefined
|
|
92
|
+
): boolean;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A single field of a message type.
|
|
96
|
+
*
|
|
97
|
+
* @generated from message google.protobuf.Field
|
|
98
|
+
*/
|
|
99
|
+
export declare class Field extends Message<Field> {
|
|
100
|
+
/**
|
|
101
|
+
* The field type.
|
|
102
|
+
*
|
|
103
|
+
* @generated from field: google.protobuf.Field.Kind kind = 1;
|
|
104
|
+
*/
|
|
105
|
+
kind: Field_Kind;
|
|
106
|
+
/**
|
|
107
|
+
* The field cardinality.
|
|
108
|
+
*
|
|
109
|
+
* @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
|
|
110
|
+
*/
|
|
111
|
+
cardinality: Field_Cardinality;
|
|
112
|
+
/**
|
|
113
|
+
* The field number.
|
|
114
|
+
*
|
|
115
|
+
* @generated from field: int32 number = 3;
|
|
116
|
+
*/
|
|
117
|
+
number: number;
|
|
118
|
+
/**
|
|
119
|
+
* The field name.
|
|
120
|
+
*
|
|
121
|
+
* @generated from field: string name = 4;
|
|
122
|
+
*/
|
|
123
|
+
name: string;
|
|
124
|
+
/**
|
|
125
|
+
* The field type URL, without the scheme, for message or enumeration
|
|
126
|
+
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
|
127
|
+
*
|
|
128
|
+
* @generated from field: string type_url = 6;
|
|
129
|
+
*/
|
|
130
|
+
typeUrl: string;
|
|
131
|
+
/**
|
|
132
|
+
* The index of the field type in `Type.oneofs`, for message or enumeration
|
|
133
|
+
* types. The first type has index 1; zero means the type is not in the list.
|
|
134
|
+
*
|
|
135
|
+
* @generated from field: int32 oneof_index = 7;
|
|
136
|
+
*/
|
|
137
|
+
oneofIndex: number;
|
|
138
|
+
/**
|
|
139
|
+
* Whether to use alternative packed wire representation.
|
|
140
|
+
*
|
|
141
|
+
* @generated from field: bool packed = 8;
|
|
142
|
+
*/
|
|
143
|
+
packed: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* The protocol buffer options.
|
|
146
|
+
*
|
|
147
|
+
* @generated from field: repeated google.protobuf.Option options = 9;
|
|
148
|
+
*/
|
|
149
|
+
options: Option[];
|
|
150
|
+
/**
|
|
151
|
+
* The field JSON name.
|
|
152
|
+
*
|
|
153
|
+
* @generated from field: string json_name = 10;
|
|
154
|
+
*/
|
|
155
|
+
jsonName: string;
|
|
156
|
+
/**
|
|
157
|
+
* The string value of the default value of this field. Proto2 syntax only.
|
|
158
|
+
*
|
|
159
|
+
* @generated from field: string default_value = 11;
|
|
160
|
+
*/
|
|
161
|
+
defaultValue: string;
|
|
162
|
+
constructor(data?: PartialMessage<Field>);
|
|
163
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
164
|
+
static readonly typeName = "google.protobuf.Field";
|
|
165
|
+
static readonly fields: FieldList;
|
|
166
|
+
static fromBinary(
|
|
167
|
+
bytes: Uint8Array,
|
|
168
|
+
options?: Partial<BinaryReadOptions>
|
|
169
|
+
): Field;
|
|
170
|
+
static fromJson(
|
|
171
|
+
jsonValue: JsonValue,
|
|
172
|
+
options?: Partial<JsonReadOptions>
|
|
173
|
+
): Field;
|
|
174
|
+
static fromJsonString(
|
|
175
|
+
jsonString: string,
|
|
176
|
+
options?: Partial<JsonReadOptions>
|
|
177
|
+
): Field;
|
|
178
|
+
static equals(
|
|
179
|
+
a: Field | PlainMessage<Field> | undefined,
|
|
180
|
+
b: Field | PlainMessage<Field> | undefined
|
|
181
|
+
): boolean;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Basic field types.
|
|
185
|
+
*
|
|
186
|
+
* @generated from enum google.protobuf.Field.Kind
|
|
187
|
+
*/
|
|
188
|
+
export declare enum Field_Kind {
|
|
189
|
+
/**
|
|
190
|
+
* Field type unknown.
|
|
191
|
+
*
|
|
192
|
+
* @generated from enum value: TYPE_UNKNOWN = 0;
|
|
193
|
+
*/
|
|
194
|
+
TYPE_UNKNOWN = 0,
|
|
195
|
+
/**
|
|
196
|
+
* Field type double.
|
|
197
|
+
*
|
|
198
|
+
* @generated from enum value: TYPE_DOUBLE = 1;
|
|
199
|
+
*/
|
|
200
|
+
TYPE_DOUBLE = 1,
|
|
201
|
+
/**
|
|
202
|
+
* Field type float.
|
|
203
|
+
*
|
|
204
|
+
* @generated from enum value: TYPE_FLOAT = 2;
|
|
205
|
+
*/
|
|
206
|
+
TYPE_FLOAT = 2,
|
|
207
|
+
/**
|
|
208
|
+
* Field type int64.
|
|
209
|
+
*
|
|
210
|
+
* @generated from enum value: TYPE_INT64 = 3;
|
|
211
|
+
*/
|
|
212
|
+
TYPE_INT64 = 3,
|
|
213
|
+
/**
|
|
214
|
+
* Field type uint64.
|
|
215
|
+
*
|
|
216
|
+
* @generated from enum value: TYPE_UINT64 = 4;
|
|
217
|
+
*/
|
|
218
|
+
TYPE_UINT64 = 4,
|
|
219
|
+
/**
|
|
220
|
+
* Field type int32.
|
|
221
|
+
*
|
|
222
|
+
* @generated from enum value: TYPE_INT32 = 5;
|
|
223
|
+
*/
|
|
224
|
+
TYPE_INT32 = 5,
|
|
225
|
+
/**
|
|
226
|
+
* Field type fixed64.
|
|
227
|
+
*
|
|
228
|
+
* @generated from enum value: TYPE_FIXED64 = 6;
|
|
229
|
+
*/
|
|
230
|
+
TYPE_FIXED64 = 6,
|
|
231
|
+
/**
|
|
232
|
+
* Field type fixed32.
|
|
233
|
+
*
|
|
234
|
+
* @generated from enum value: TYPE_FIXED32 = 7;
|
|
235
|
+
*/
|
|
236
|
+
TYPE_FIXED32 = 7,
|
|
237
|
+
/**
|
|
238
|
+
* Field type bool.
|
|
239
|
+
*
|
|
240
|
+
* @generated from enum value: TYPE_BOOL = 8;
|
|
241
|
+
*/
|
|
242
|
+
TYPE_BOOL = 8,
|
|
243
|
+
/**
|
|
244
|
+
* Field type string.
|
|
245
|
+
*
|
|
246
|
+
* @generated from enum value: TYPE_STRING = 9;
|
|
247
|
+
*/
|
|
248
|
+
TYPE_STRING = 9,
|
|
249
|
+
/**
|
|
250
|
+
* Field type group. Proto2 syntax only, and deprecated.
|
|
251
|
+
*
|
|
252
|
+
* @generated from enum value: TYPE_GROUP = 10;
|
|
253
|
+
*/
|
|
254
|
+
TYPE_GROUP = 10,
|
|
255
|
+
/**
|
|
256
|
+
* Field type message.
|
|
257
|
+
*
|
|
258
|
+
* @generated from enum value: TYPE_MESSAGE = 11;
|
|
259
|
+
*/
|
|
260
|
+
TYPE_MESSAGE = 11,
|
|
261
|
+
/**
|
|
262
|
+
* Field type bytes.
|
|
263
|
+
*
|
|
264
|
+
* @generated from enum value: TYPE_BYTES = 12;
|
|
265
|
+
*/
|
|
266
|
+
TYPE_BYTES = 12,
|
|
267
|
+
/**
|
|
268
|
+
* Field type uint32.
|
|
269
|
+
*
|
|
270
|
+
* @generated from enum value: TYPE_UINT32 = 13;
|
|
271
|
+
*/
|
|
272
|
+
TYPE_UINT32 = 13,
|
|
273
|
+
/**
|
|
274
|
+
* Field type enum.
|
|
275
|
+
*
|
|
276
|
+
* @generated from enum value: TYPE_ENUM = 14;
|
|
277
|
+
*/
|
|
278
|
+
TYPE_ENUM = 14,
|
|
279
|
+
/**
|
|
280
|
+
* Field type sfixed32.
|
|
281
|
+
*
|
|
282
|
+
* @generated from enum value: TYPE_SFIXED32 = 15;
|
|
283
|
+
*/
|
|
284
|
+
TYPE_SFIXED32 = 15,
|
|
285
|
+
/**
|
|
286
|
+
* Field type sfixed64.
|
|
287
|
+
*
|
|
288
|
+
* @generated from enum value: TYPE_SFIXED64 = 16;
|
|
289
|
+
*/
|
|
290
|
+
TYPE_SFIXED64 = 16,
|
|
291
|
+
/**
|
|
292
|
+
* Field type sint32.
|
|
293
|
+
*
|
|
294
|
+
* @generated from enum value: TYPE_SINT32 = 17;
|
|
295
|
+
*/
|
|
296
|
+
TYPE_SINT32 = 17,
|
|
297
|
+
/**
|
|
298
|
+
* Field type sint64.
|
|
299
|
+
*
|
|
300
|
+
* @generated from enum value: TYPE_SINT64 = 18;
|
|
301
|
+
*/
|
|
302
|
+
TYPE_SINT64 = 18,
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Whether a field is optional, required, or repeated.
|
|
306
|
+
*
|
|
307
|
+
* @generated from enum google.protobuf.Field.Cardinality
|
|
308
|
+
*/
|
|
309
|
+
export declare enum Field_Cardinality {
|
|
310
|
+
/**
|
|
311
|
+
* For fields with unknown cardinality.
|
|
312
|
+
*
|
|
313
|
+
* @generated from enum value: CARDINALITY_UNKNOWN = 0;
|
|
314
|
+
*/
|
|
315
|
+
UNKNOWN = 0,
|
|
316
|
+
/**
|
|
317
|
+
* For optional fields.
|
|
318
|
+
*
|
|
319
|
+
* @generated from enum value: CARDINALITY_OPTIONAL = 1;
|
|
320
|
+
*/
|
|
321
|
+
OPTIONAL = 1,
|
|
322
|
+
/**
|
|
323
|
+
* For required fields. Proto2 syntax only.
|
|
324
|
+
*
|
|
325
|
+
* @generated from enum value: CARDINALITY_REQUIRED = 2;
|
|
326
|
+
*/
|
|
327
|
+
REQUIRED = 2,
|
|
328
|
+
/**
|
|
329
|
+
* For repeated fields.
|
|
330
|
+
*
|
|
331
|
+
* @generated from enum value: CARDINALITY_REPEATED = 3;
|
|
332
|
+
*/
|
|
333
|
+
REPEATED = 3,
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Enum type definition.
|
|
337
|
+
*
|
|
338
|
+
* @generated from message google.protobuf.Enum
|
|
339
|
+
*/
|
|
340
|
+
export declare class Enum extends Message<Enum> {
|
|
341
|
+
/**
|
|
342
|
+
* Enum type name.
|
|
343
|
+
*
|
|
344
|
+
* @generated from field: string name = 1;
|
|
345
|
+
*/
|
|
346
|
+
name: string;
|
|
347
|
+
/**
|
|
348
|
+
* Enum value definitions.
|
|
349
|
+
*
|
|
350
|
+
* @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
|
|
351
|
+
*/
|
|
352
|
+
enumvalue: EnumValue[];
|
|
353
|
+
/**
|
|
354
|
+
* Protocol buffer options.
|
|
355
|
+
*
|
|
356
|
+
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
357
|
+
*/
|
|
358
|
+
options: Option[];
|
|
359
|
+
/**
|
|
360
|
+
* The source context.
|
|
361
|
+
*
|
|
362
|
+
* @generated from field: google.protobuf.SourceContext source_context = 4;
|
|
363
|
+
*/
|
|
364
|
+
sourceContext?: SourceContext;
|
|
365
|
+
/**
|
|
366
|
+
* The source syntax.
|
|
367
|
+
*
|
|
368
|
+
* @generated from field: google.protobuf.Syntax syntax = 5;
|
|
369
|
+
*/
|
|
370
|
+
syntax: Syntax;
|
|
371
|
+
constructor(data?: PartialMessage<Enum>);
|
|
372
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
373
|
+
static readonly typeName = "google.protobuf.Enum";
|
|
374
|
+
static readonly fields: FieldList;
|
|
375
|
+
static fromBinary(
|
|
376
|
+
bytes: Uint8Array,
|
|
377
|
+
options?: Partial<BinaryReadOptions>
|
|
378
|
+
): Enum;
|
|
379
|
+
static fromJson(
|
|
380
|
+
jsonValue: JsonValue,
|
|
381
|
+
options?: Partial<JsonReadOptions>
|
|
382
|
+
): Enum;
|
|
383
|
+
static fromJsonString(
|
|
384
|
+
jsonString: string,
|
|
385
|
+
options?: Partial<JsonReadOptions>
|
|
386
|
+
): Enum;
|
|
387
|
+
static equals(
|
|
388
|
+
a: Enum | PlainMessage<Enum> | undefined,
|
|
389
|
+
b: Enum | PlainMessage<Enum> | undefined
|
|
390
|
+
): boolean;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Enum value definition.
|
|
394
|
+
*
|
|
395
|
+
* @generated from message google.protobuf.EnumValue
|
|
396
|
+
*/
|
|
397
|
+
export declare class EnumValue extends Message<EnumValue> {
|
|
398
|
+
/**
|
|
399
|
+
* Enum value name.
|
|
400
|
+
*
|
|
401
|
+
* @generated from field: string name = 1;
|
|
402
|
+
*/
|
|
403
|
+
name: string;
|
|
404
|
+
/**
|
|
405
|
+
* Enum value number.
|
|
406
|
+
*
|
|
407
|
+
* @generated from field: int32 number = 2;
|
|
408
|
+
*/
|
|
409
|
+
number: number;
|
|
410
|
+
/**
|
|
411
|
+
* Protocol buffer options.
|
|
412
|
+
*
|
|
413
|
+
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
414
|
+
*/
|
|
415
|
+
options: Option[];
|
|
416
|
+
constructor(data?: PartialMessage<EnumValue>);
|
|
417
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
418
|
+
static readonly typeName = "google.protobuf.EnumValue";
|
|
419
|
+
static readonly fields: FieldList;
|
|
420
|
+
static fromBinary(
|
|
421
|
+
bytes: Uint8Array,
|
|
422
|
+
options?: Partial<BinaryReadOptions>
|
|
423
|
+
): EnumValue;
|
|
424
|
+
static fromJson(
|
|
425
|
+
jsonValue: JsonValue,
|
|
426
|
+
options?: Partial<JsonReadOptions>
|
|
427
|
+
): EnumValue;
|
|
428
|
+
static fromJsonString(
|
|
429
|
+
jsonString: string,
|
|
430
|
+
options?: Partial<JsonReadOptions>
|
|
431
|
+
): EnumValue;
|
|
432
|
+
static equals(
|
|
433
|
+
a: EnumValue | PlainMessage<EnumValue> | undefined,
|
|
434
|
+
b: EnumValue | PlainMessage<EnumValue> | undefined
|
|
435
|
+
): boolean;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* A protocol buffer option, which can be attached to a message, field,
|
|
439
|
+
* enumeration, etc.
|
|
440
|
+
*
|
|
441
|
+
* @generated from message google.protobuf.Option
|
|
442
|
+
*/
|
|
443
|
+
export declare class Option extends Message<Option> {
|
|
444
|
+
/**
|
|
445
|
+
* The option's name. For protobuf built-in options (options defined in
|
|
446
|
+
* descriptor.proto), this is the short name. For example, `"map_entry"`.
|
|
447
|
+
* For custom options, it should be the fully-qualified name. For example,
|
|
448
|
+
* `"google.api.http"`.
|
|
449
|
+
*
|
|
450
|
+
* @generated from field: string name = 1;
|
|
451
|
+
*/
|
|
452
|
+
name: string;
|
|
453
|
+
/**
|
|
454
|
+
* The option's value packed in an Any message. If the value is a primitive,
|
|
455
|
+
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
|
|
456
|
+
* should be used. If the value is an enum, it should be stored as an int32
|
|
457
|
+
* value using the google.protobuf.Int32Value type.
|
|
458
|
+
*
|
|
459
|
+
* @generated from field: google.protobuf.Any value = 2;
|
|
460
|
+
*/
|
|
461
|
+
value?: Any;
|
|
462
|
+
constructor(data?: PartialMessage<Option>);
|
|
463
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
464
|
+
static readonly typeName = "google.protobuf.Option";
|
|
465
|
+
static readonly fields: FieldList;
|
|
466
|
+
static fromBinary(
|
|
467
|
+
bytes: Uint8Array,
|
|
468
|
+
options?: Partial<BinaryReadOptions>
|
|
469
|
+
): Option;
|
|
470
|
+
static fromJson(
|
|
471
|
+
jsonValue: JsonValue,
|
|
472
|
+
options?: Partial<JsonReadOptions>
|
|
473
|
+
): Option;
|
|
474
|
+
static fromJsonString(
|
|
475
|
+
jsonString: string,
|
|
476
|
+
options?: Partial<JsonReadOptions>
|
|
477
|
+
): Option;
|
|
478
|
+
static equals(
|
|
479
|
+
a: Option | PlainMessage<Option> | undefined,
|
|
480
|
+
b: Option | PlainMessage<Option> | undefined
|
|
481
|
+
): boolean;
|
|
482
|
+
}
|