@aptre/protobuf-es-lite 0.5.1 → 0.5.3
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 +1 -22
- package/dist/google/index.d.ts +9 -0
- package/dist/google/index.js +9 -0
- package/dist/google/protobuf/any.pb.d.ts +148 -0
- package/dist/google/protobuf/any.pb.js +120 -0
- package/dist/google/protobuf/api.pb.d.ts +232 -0
- package/dist/google/protobuf/api.pb.js +88 -0
- package/dist/google/protobuf/duration.pb.d.ts +93 -0
- package/dist/google/protobuf/duration.pb.js +89 -0
- package/dist/google/protobuf/empty.pb.d.ts +17 -0
- package/dist/google/protobuf/empty.pb.js +37 -0
- package/dist/google/protobuf/source_context.pb.d.ts +18 -0
- package/dist/google/protobuf/source_context.pb.js +39 -0
- package/dist/google/protobuf/struct.pb.d.ts +141 -0
- package/dist/google/protobuf/struct.pb.js +228 -0
- package/dist/google/protobuf/timestamp.pb.d.ts +125 -0
- package/dist/google/protobuf/timestamp.pb.js +137 -0
- package/dist/google/protobuf/type.pb.d.ts +401 -0
- package/dist/google/protobuf/type.pb.js +347 -0
- package/dist/google/protobuf/wrappers.pb.d.ts +201 -0
- package/dist/google/protobuf/wrappers.pb.js +365 -0
- package/dist/message.d.ts +1 -1
- package/dist/message.js +2 -0
- package/package.json +5 -5
- package/tsconfig.json +11 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { JsonValue, MessageType } from "../../index.js";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* A Timestamp represents a point in time independent of any time zone or local
|
|
5
|
+
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
6
|
+
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
|
7
|
+
* January 1, 1970, in the proleptic Gregorian calendar which extends the
|
|
8
|
+
* Gregorian calendar backwards to year one.
|
|
9
|
+
*
|
|
10
|
+
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
|
11
|
+
* second table is needed for interpretation, using a [24-hour linear
|
|
12
|
+
* smear](https://developers.google.com/time/smear).
|
|
13
|
+
*
|
|
14
|
+
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
|
15
|
+
* restricting to that range, we ensure that we can convert to and from [RFC
|
|
16
|
+
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
|
17
|
+
*
|
|
18
|
+
* # Examples
|
|
19
|
+
*
|
|
20
|
+
* Example 1: Compute Timestamp from POSIX `time()`.
|
|
21
|
+
*
|
|
22
|
+
* Timestamp timestamp;
|
|
23
|
+
* timestamp.set_seconds(time(NULL));
|
|
24
|
+
* timestamp.set_nanos(0);
|
|
25
|
+
*
|
|
26
|
+
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
27
|
+
*
|
|
28
|
+
* struct timeval tv;
|
|
29
|
+
* gettimeofday(&tv, NULL);
|
|
30
|
+
*
|
|
31
|
+
* Timestamp timestamp;
|
|
32
|
+
* timestamp.set_seconds(tv.tv_sec);
|
|
33
|
+
* timestamp.set_nanos(tv.tv_usec * 1000);
|
|
34
|
+
*
|
|
35
|
+
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
36
|
+
*
|
|
37
|
+
* FILETIME ft;
|
|
38
|
+
* GetSystemTimeAsFileTime(&ft);
|
|
39
|
+
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
|
40
|
+
*
|
|
41
|
+
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
|
42
|
+
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
|
43
|
+
* Timestamp timestamp;
|
|
44
|
+
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
45
|
+
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
46
|
+
*
|
|
47
|
+
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
48
|
+
*
|
|
49
|
+
* long millis = System.currentTimeMillis();
|
|
50
|
+
*
|
|
51
|
+
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
|
52
|
+
* .setNanos((int) ((millis % 1000) * 1000000)).build();
|
|
53
|
+
*
|
|
54
|
+
* Example 5: Compute Timestamp from Java `Instant.now()`.
|
|
55
|
+
*
|
|
56
|
+
* Instant now = Instant.now();
|
|
57
|
+
*
|
|
58
|
+
* Timestamp timestamp =
|
|
59
|
+
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
|
60
|
+
* .setNanos(now.getNano()).build();
|
|
61
|
+
*
|
|
62
|
+
* Example 6: Compute Timestamp from current time in Python.
|
|
63
|
+
*
|
|
64
|
+
* timestamp = Timestamp()
|
|
65
|
+
* timestamp.GetCurrentTime()
|
|
66
|
+
*
|
|
67
|
+
* # JSON Mapping
|
|
68
|
+
*
|
|
69
|
+
* In JSON format, the Timestamp type is encoded as a string in the
|
|
70
|
+
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
71
|
+
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
|
72
|
+
* where {year} is always expressed using four digits while {month}, {day},
|
|
73
|
+
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
74
|
+
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
75
|
+
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
76
|
+
* is required. A proto3 JSON serializer should always use UTC (as indicated by
|
|
77
|
+
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
|
78
|
+
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
79
|
+
*
|
|
80
|
+
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
81
|
+
* 01:30 UTC on January 15, 2017.
|
|
82
|
+
*
|
|
83
|
+
* In JavaScript, one can convert a Date object to this format using the
|
|
84
|
+
* standard
|
|
85
|
+
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
86
|
+
* method. In Python, a standard `datetime.datetime` object can be converted
|
|
87
|
+
* to this format using
|
|
88
|
+
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
89
|
+
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
90
|
+
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
91
|
+
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
92
|
+
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
93
|
+
*
|
|
94
|
+
* protobuf-go-lite:disable-text
|
|
95
|
+
*
|
|
96
|
+
* @generated from message google.protobuf.Timestamp
|
|
97
|
+
*/
|
|
98
|
+
export interface Timestamp {
|
|
99
|
+
/**
|
|
100
|
+
* Represents seconds of UTC time since Unix epoch
|
|
101
|
+
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
102
|
+
* 9999-12-31T23:59:59Z inclusive.
|
|
103
|
+
*
|
|
104
|
+
* @generated from field: int64 seconds = 1;
|
|
105
|
+
*/
|
|
106
|
+
seconds?: bigint;
|
|
107
|
+
/**
|
|
108
|
+
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
109
|
+
* second values with fractions must still have non-negative nanos values
|
|
110
|
+
* that count forward in time. Must be from 0 to 999,999,999
|
|
111
|
+
* inclusive.
|
|
112
|
+
*
|
|
113
|
+
* @generated from field: int32 nanos = 2;
|
|
114
|
+
*/
|
|
115
|
+
nanos?: number;
|
|
116
|
+
}
|
|
117
|
+
declare const Timestamp_Wkt: {
|
|
118
|
+
fromJson(json: JsonValue): Timestamp;
|
|
119
|
+
toJson(msg: Timestamp): JsonValue;
|
|
120
|
+
toDate(msg: Timestamp | null | undefined): Date | null;
|
|
121
|
+
fromDate(value: Date | null | undefined): Timestamp;
|
|
122
|
+
equals(a: Timestamp | Date | undefined | null, b: Timestamp | Date | undefined | null): boolean;
|
|
123
|
+
};
|
|
124
|
+
export declare const Timestamp: MessageType<Timestamp> & typeof Timestamp_Wkt;
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
// https://developers.google.com/protocol-buffers/
|
|
4
|
+
//
|
|
5
|
+
// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
// modification, are permitted provided that the following conditions are
|
|
7
|
+
// met:
|
|
8
|
+
//
|
|
9
|
+
// * Redistributions of source code must retain the above copyright
|
|
10
|
+
// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
// * Redistributions in binary form must reproduce the above
|
|
12
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
// in the documentation and/or other materials provided with the
|
|
14
|
+
// distribution.
|
|
15
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
// contributors may be used to endorse or promote products derived from
|
|
17
|
+
// this software without specific prior written permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
import { createMessageType, protoInt64, ScalarType } from "../../index.js";
|
|
31
|
+
export const protobufPackage = "google.protobuf";
|
|
32
|
+
// Timestamp_Wkt contains the well-known-type overrides for Timestamp.
|
|
33
|
+
const Timestamp_Wkt = {
|
|
34
|
+
fromJson(json) {
|
|
35
|
+
if (typeof json !== "string") {
|
|
36
|
+
throw new Error(`cannot decode google.protobuf.Timestamp(json)}`);
|
|
37
|
+
}
|
|
38
|
+
const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
|
|
39
|
+
if (!matches) {
|
|
40
|
+
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);
|
|
41
|
+
}
|
|
42
|
+
const ms = Date.parse(matches[1] +
|
|
43
|
+
"-" +
|
|
44
|
+
matches[2] +
|
|
45
|
+
"-" +
|
|
46
|
+
matches[3] +
|
|
47
|
+
"T" +
|
|
48
|
+
matches[4] +
|
|
49
|
+
":" +
|
|
50
|
+
matches[5] +
|
|
51
|
+
":" +
|
|
52
|
+
matches[6] +
|
|
53
|
+
(matches[8] ? matches[8] : "Z"));
|
|
54
|
+
if (Number.isNaN(ms)) {
|
|
55
|
+
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);
|
|
56
|
+
}
|
|
57
|
+
if (ms < Date.parse("0001-01-01T00:00:00Z") ||
|
|
58
|
+
ms > Date.parse("9999-12-31T23:59:59Z")) {
|
|
59
|
+
throw new Error(`cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
seconds: protoInt64.parse(ms / 1000),
|
|
63
|
+
nanos: !matches[7] ? 0 : (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) -
|
|
64
|
+
1000000000),
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
toJson(msg) {
|
|
68
|
+
const ms = Number(msg.seconds) * 1000;
|
|
69
|
+
if (ms < Date.parse("0001-01-01T00:00:00Z") ||
|
|
70
|
+
ms > Date.parse("9999-12-31T23:59:59Z")) {
|
|
71
|
+
throw new Error(`cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
|
|
72
|
+
}
|
|
73
|
+
if (msg.nanos != null && msg.nanos < 0) {
|
|
74
|
+
throw new Error(`cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative`);
|
|
75
|
+
}
|
|
76
|
+
let z = "Z";
|
|
77
|
+
if (msg.nanos != null && msg.nanos > 0) {
|
|
78
|
+
const nanosStr = (msg.nanos + 1000000000).toString().substring(1);
|
|
79
|
+
if (nanosStr.substring(3) === "000000") {
|
|
80
|
+
z = "." + nanosStr.substring(0, 3) + "Z";
|
|
81
|
+
}
|
|
82
|
+
else if (nanosStr.substring(6) === "000") {
|
|
83
|
+
z = "." + nanosStr.substring(0, 6) + "Z";
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
z = "." + nanosStr + "Z";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return new Date(ms).toISOString().replace(".000Z", z);
|
|
90
|
+
},
|
|
91
|
+
toDate(msg) {
|
|
92
|
+
if (!msg?.seconds && !msg?.nanos) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return new Date(Number(msg.seconds ?? 0) * 1000 + Math.ceil((msg.nanos ?? 0) / 1000000));
|
|
96
|
+
},
|
|
97
|
+
fromDate(value) {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return {};
|
|
100
|
+
}
|
|
101
|
+
const ms = value.getTime();
|
|
102
|
+
const seconds = Math.floor(ms / 1000);
|
|
103
|
+
const nanos = (ms % 1000) * 1000000;
|
|
104
|
+
return { seconds: protoInt64.parse(seconds), nanos: nanos };
|
|
105
|
+
},
|
|
106
|
+
equals(a, b) {
|
|
107
|
+
const aDate = a instanceof Date ? a : Timestamp_Wkt.toDate(a);
|
|
108
|
+
const bDate = b instanceof Date ? b : Timestamp_Wkt.toDate(b);
|
|
109
|
+
if (aDate === bDate) {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
if (aDate == null || bDate == null) {
|
|
113
|
+
return aDate === bDate;
|
|
114
|
+
}
|
|
115
|
+
return +aDate === +bDate;
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
// Timestamp contains the message type declaration for Timestamp.
|
|
119
|
+
export const Timestamp = createMessageType({
|
|
120
|
+
typeName: "google.protobuf.Timestamp",
|
|
121
|
+
fields: [
|
|
122
|
+
{ no: 1, name: "seconds", kind: "scalar", T: ScalarType.INT64 },
|
|
123
|
+
{ no: 2, name: "nanos", kind: "scalar", T: ScalarType.INT32 },
|
|
124
|
+
],
|
|
125
|
+
packedByDefault: true,
|
|
126
|
+
fieldWrapper: {
|
|
127
|
+
wrapField(value) {
|
|
128
|
+
if (value == null || value instanceof Date) {
|
|
129
|
+
return Timestamp_Wkt.fromDate(value);
|
|
130
|
+
}
|
|
131
|
+
return Timestamp.createComplete(value);
|
|
132
|
+
},
|
|
133
|
+
unwrapField(msg) {
|
|
134
|
+
return Timestamp_Wkt.toDate(msg);
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
}, Timestamp_Wkt);
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Any } from "./any.pb.js";
|
|
3
|
+
import { SourceContext } from "./source_context.pb.js";
|
|
4
|
+
export declare const protobufPackage = "google.protobuf";
|
|
5
|
+
/**
|
|
6
|
+
* The syntax in which a protocol buffer element is defined.
|
|
7
|
+
*
|
|
8
|
+
* @generated from enum google.protobuf.Syntax
|
|
9
|
+
*/
|
|
10
|
+
export declare enum Syntax {
|
|
11
|
+
/**
|
|
12
|
+
* Syntax `proto2`.
|
|
13
|
+
*
|
|
14
|
+
* @generated from enum value: SYNTAX_PROTO2 = 0;
|
|
15
|
+
*/
|
|
16
|
+
PROTO2 = 0,
|
|
17
|
+
/**
|
|
18
|
+
* Syntax `proto3`.
|
|
19
|
+
*
|
|
20
|
+
* @generated from enum value: SYNTAX_PROTO3 = 1;
|
|
21
|
+
*/
|
|
22
|
+
PROTO3 = 1,
|
|
23
|
+
/**
|
|
24
|
+
* Syntax `editions`.
|
|
25
|
+
*
|
|
26
|
+
* @generated from enum value: SYNTAX_EDITIONS = 2;
|
|
27
|
+
*/
|
|
28
|
+
EDITIONS = 2
|
|
29
|
+
}
|
|
30
|
+
export declare const Syntax_Enum: import("../../enum.js").EnumType;
|
|
31
|
+
/**
|
|
32
|
+
* Basic field types.
|
|
33
|
+
*
|
|
34
|
+
* @generated from enum google.protobuf.Field.Kind
|
|
35
|
+
*/
|
|
36
|
+
export declare enum Field_Kind {
|
|
37
|
+
/**
|
|
38
|
+
* Field type unknown.
|
|
39
|
+
*
|
|
40
|
+
* @generated from enum value: TYPE_UNKNOWN = 0;
|
|
41
|
+
*/
|
|
42
|
+
TYPE_UNKNOWN = 0,
|
|
43
|
+
/**
|
|
44
|
+
* Field type double.
|
|
45
|
+
*
|
|
46
|
+
* @generated from enum value: TYPE_DOUBLE = 1;
|
|
47
|
+
*/
|
|
48
|
+
TYPE_DOUBLE = 1,
|
|
49
|
+
/**
|
|
50
|
+
* Field type float.
|
|
51
|
+
*
|
|
52
|
+
* @generated from enum value: TYPE_FLOAT = 2;
|
|
53
|
+
*/
|
|
54
|
+
TYPE_FLOAT = 2,
|
|
55
|
+
/**
|
|
56
|
+
* Field type int64.
|
|
57
|
+
*
|
|
58
|
+
* @generated from enum value: TYPE_INT64 = 3;
|
|
59
|
+
*/
|
|
60
|
+
TYPE_INT64 = 3,
|
|
61
|
+
/**
|
|
62
|
+
* Field type uint64.
|
|
63
|
+
*
|
|
64
|
+
* @generated from enum value: TYPE_UINT64 = 4;
|
|
65
|
+
*/
|
|
66
|
+
TYPE_UINT64 = 4,
|
|
67
|
+
/**
|
|
68
|
+
* Field type int32.
|
|
69
|
+
*
|
|
70
|
+
* @generated from enum value: TYPE_INT32 = 5;
|
|
71
|
+
*/
|
|
72
|
+
TYPE_INT32 = 5,
|
|
73
|
+
/**
|
|
74
|
+
* Field type fixed64.
|
|
75
|
+
*
|
|
76
|
+
* @generated from enum value: TYPE_FIXED64 = 6;
|
|
77
|
+
*/
|
|
78
|
+
TYPE_FIXED64 = 6,
|
|
79
|
+
/**
|
|
80
|
+
* Field type fixed32.
|
|
81
|
+
*
|
|
82
|
+
* @generated from enum value: TYPE_FIXED32 = 7;
|
|
83
|
+
*/
|
|
84
|
+
TYPE_FIXED32 = 7,
|
|
85
|
+
/**
|
|
86
|
+
* Field type bool.
|
|
87
|
+
*
|
|
88
|
+
* @generated from enum value: TYPE_BOOL = 8;
|
|
89
|
+
*/
|
|
90
|
+
TYPE_BOOL = 8,
|
|
91
|
+
/**
|
|
92
|
+
* Field type string.
|
|
93
|
+
*
|
|
94
|
+
* @generated from enum value: TYPE_STRING = 9;
|
|
95
|
+
*/
|
|
96
|
+
TYPE_STRING = 9,
|
|
97
|
+
/**
|
|
98
|
+
* Field type group. Proto2 syntax only, and deprecated.
|
|
99
|
+
*
|
|
100
|
+
* @generated from enum value: TYPE_GROUP = 10;
|
|
101
|
+
*/
|
|
102
|
+
TYPE_GROUP = 10,
|
|
103
|
+
/**
|
|
104
|
+
* Field type message.
|
|
105
|
+
*
|
|
106
|
+
* @generated from enum value: TYPE_MESSAGE = 11;
|
|
107
|
+
*/
|
|
108
|
+
TYPE_MESSAGE = 11,
|
|
109
|
+
/**
|
|
110
|
+
* Field type bytes.
|
|
111
|
+
*
|
|
112
|
+
* @generated from enum value: TYPE_BYTES = 12;
|
|
113
|
+
*/
|
|
114
|
+
TYPE_BYTES = 12,
|
|
115
|
+
/**
|
|
116
|
+
* Field type uint32.
|
|
117
|
+
*
|
|
118
|
+
* @generated from enum value: TYPE_UINT32 = 13;
|
|
119
|
+
*/
|
|
120
|
+
TYPE_UINT32 = 13,
|
|
121
|
+
/**
|
|
122
|
+
* Field type enum.
|
|
123
|
+
*
|
|
124
|
+
* @generated from enum value: TYPE_ENUM = 14;
|
|
125
|
+
*/
|
|
126
|
+
TYPE_ENUM = 14,
|
|
127
|
+
/**
|
|
128
|
+
* Field type sfixed32.
|
|
129
|
+
*
|
|
130
|
+
* @generated from enum value: TYPE_SFIXED32 = 15;
|
|
131
|
+
*/
|
|
132
|
+
TYPE_SFIXED32 = 15,
|
|
133
|
+
/**
|
|
134
|
+
* Field type sfixed64.
|
|
135
|
+
*
|
|
136
|
+
* @generated from enum value: TYPE_SFIXED64 = 16;
|
|
137
|
+
*/
|
|
138
|
+
TYPE_SFIXED64 = 16,
|
|
139
|
+
/**
|
|
140
|
+
* Field type sint32.
|
|
141
|
+
*
|
|
142
|
+
* @generated from enum value: TYPE_SINT32 = 17;
|
|
143
|
+
*/
|
|
144
|
+
TYPE_SINT32 = 17,
|
|
145
|
+
/**
|
|
146
|
+
* Field type sint64.
|
|
147
|
+
*
|
|
148
|
+
* @generated from enum value: TYPE_SINT64 = 18;
|
|
149
|
+
*/
|
|
150
|
+
TYPE_SINT64 = 18
|
|
151
|
+
}
|
|
152
|
+
export declare const Field_Kind_Enum: import("../../enum.js").EnumType;
|
|
153
|
+
/**
|
|
154
|
+
* Whether a field is optional, required, or repeated.
|
|
155
|
+
*
|
|
156
|
+
* @generated from enum google.protobuf.Field.Cardinality
|
|
157
|
+
*/
|
|
158
|
+
export declare enum Field_Cardinality {
|
|
159
|
+
/**
|
|
160
|
+
* For fields with unknown cardinality.
|
|
161
|
+
*
|
|
162
|
+
* @generated from enum value: CARDINALITY_UNKNOWN = 0;
|
|
163
|
+
*/
|
|
164
|
+
UNKNOWN = 0,
|
|
165
|
+
/**
|
|
166
|
+
* For optional fields.
|
|
167
|
+
*
|
|
168
|
+
* @generated from enum value: CARDINALITY_OPTIONAL = 1;
|
|
169
|
+
*/
|
|
170
|
+
OPTIONAL = 1,
|
|
171
|
+
/**
|
|
172
|
+
* For required fields. Proto2 syntax only.
|
|
173
|
+
*
|
|
174
|
+
* @generated from enum value: CARDINALITY_REQUIRED = 2;
|
|
175
|
+
*/
|
|
176
|
+
REQUIRED = 2,
|
|
177
|
+
/**
|
|
178
|
+
* For repeated fields.
|
|
179
|
+
*
|
|
180
|
+
* @generated from enum value: CARDINALITY_REPEATED = 3;
|
|
181
|
+
*/
|
|
182
|
+
REPEATED = 3
|
|
183
|
+
}
|
|
184
|
+
export declare const Field_Cardinality_Enum: import("../../enum.js").EnumType;
|
|
185
|
+
/**
|
|
186
|
+
* A protocol buffer option, which can be attached to a message, field,
|
|
187
|
+
* enumeration, etc.
|
|
188
|
+
*
|
|
189
|
+
* @generated from message google.protobuf.Option
|
|
190
|
+
*/
|
|
191
|
+
export interface Option {
|
|
192
|
+
/**
|
|
193
|
+
* The option's name. For protobuf built-in options (options defined in
|
|
194
|
+
* descriptor.proto), this is the short name. For example, `"map_entry"`.
|
|
195
|
+
* For custom options, it should be the fully-qualified name. For example,
|
|
196
|
+
* `"google.api.http"`.
|
|
197
|
+
*
|
|
198
|
+
* @generated from field: string name = 1;
|
|
199
|
+
*/
|
|
200
|
+
name?: string;
|
|
201
|
+
/**
|
|
202
|
+
* The option's value packed in an Any message. If the value is a primitive,
|
|
203
|
+
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
|
|
204
|
+
* should be used. If the value is an enum, it should be stored as an int32
|
|
205
|
+
* value using the google.protobuf.Int32Value type.
|
|
206
|
+
*
|
|
207
|
+
* @generated from field: google.protobuf.Any value = 2;
|
|
208
|
+
*/
|
|
209
|
+
value?: Any;
|
|
210
|
+
}
|
|
211
|
+
export declare const Option: MessageType<Option>;
|
|
212
|
+
/**
|
|
213
|
+
* A single field of a message type.
|
|
214
|
+
*
|
|
215
|
+
* @generated from message google.protobuf.Field
|
|
216
|
+
*/
|
|
217
|
+
export interface Field {
|
|
218
|
+
/**
|
|
219
|
+
* The field type.
|
|
220
|
+
*
|
|
221
|
+
* @generated from field: google.protobuf.Field.Kind kind = 1;
|
|
222
|
+
*/
|
|
223
|
+
kind?: Field_Kind;
|
|
224
|
+
/**
|
|
225
|
+
* The field cardinality.
|
|
226
|
+
*
|
|
227
|
+
* @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
|
|
228
|
+
*/
|
|
229
|
+
cardinality?: Field_Cardinality;
|
|
230
|
+
/**
|
|
231
|
+
* The field number.
|
|
232
|
+
*
|
|
233
|
+
* @generated from field: int32 number = 3;
|
|
234
|
+
*/
|
|
235
|
+
number?: number;
|
|
236
|
+
/**
|
|
237
|
+
* The field name.
|
|
238
|
+
*
|
|
239
|
+
* @generated from field: string name = 4;
|
|
240
|
+
*/
|
|
241
|
+
name?: string;
|
|
242
|
+
/**
|
|
243
|
+
* The field type URL, without the scheme, for message or enumeration
|
|
244
|
+
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
|
245
|
+
*
|
|
246
|
+
* @generated from field: string type_url = 6;
|
|
247
|
+
*/
|
|
248
|
+
typeUrl?: string;
|
|
249
|
+
/**
|
|
250
|
+
* The index of the field type in `Type.oneofs`, for message or enumeration
|
|
251
|
+
* types. The first type has index 1; zero means the type is not in the list.
|
|
252
|
+
*
|
|
253
|
+
* @generated from field: int32 oneof_index = 7;
|
|
254
|
+
*/
|
|
255
|
+
oneofIndex?: number;
|
|
256
|
+
/**
|
|
257
|
+
* Whether to use alternative packed wire representation.
|
|
258
|
+
*
|
|
259
|
+
* @generated from field: bool packed = 8;
|
|
260
|
+
*/
|
|
261
|
+
packed?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* The protocol buffer options.
|
|
264
|
+
*
|
|
265
|
+
* @generated from field: repeated google.protobuf.Option options = 9;
|
|
266
|
+
*/
|
|
267
|
+
options?: Option[];
|
|
268
|
+
/**
|
|
269
|
+
* The field JSON name.
|
|
270
|
+
*
|
|
271
|
+
* @generated from field: string json_name = 10;
|
|
272
|
+
*/
|
|
273
|
+
jsonName?: string;
|
|
274
|
+
/**
|
|
275
|
+
* The string value of the default value of this field. Proto2 syntax only.
|
|
276
|
+
*
|
|
277
|
+
* @generated from field: string default_value = 11;
|
|
278
|
+
*/
|
|
279
|
+
defaultValue?: string;
|
|
280
|
+
}
|
|
281
|
+
export declare const Field: MessageType<Field>;
|
|
282
|
+
/**
|
|
283
|
+
* A protocol buffer message type.
|
|
284
|
+
*
|
|
285
|
+
* @generated from message google.protobuf.Type
|
|
286
|
+
*/
|
|
287
|
+
export interface Type {
|
|
288
|
+
/**
|
|
289
|
+
* The fully qualified message name.
|
|
290
|
+
*
|
|
291
|
+
* @generated from field: string name = 1;
|
|
292
|
+
*/
|
|
293
|
+
name?: string;
|
|
294
|
+
/**
|
|
295
|
+
* The list of fields.
|
|
296
|
+
*
|
|
297
|
+
* @generated from field: repeated google.protobuf.Field fields = 2;
|
|
298
|
+
*/
|
|
299
|
+
fields?: Field[];
|
|
300
|
+
/**
|
|
301
|
+
* The list of types appearing in `oneof` definitions in this type.
|
|
302
|
+
*
|
|
303
|
+
* @generated from field: repeated string oneofs = 3;
|
|
304
|
+
*/
|
|
305
|
+
oneofs?: string[];
|
|
306
|
+
/**
|
|
307
|
+
* The protocol buffer options.
|
|
308
|
+
*
|
|
309
|
+
* @generated from field: repeated google.protobuf.Option options = 4;
|
|
310
|
+
*/
|
|
311
|
+
options?: Option[];
|
|
312
|
+
/**
|
|
313
|
+
* The source context.
|
|
314
|
+
*
|
|
315
|
+
* @generated from field: google.protobuf.SourceContext source_context = 5;
|
|
316
|
+
*/
|
|
317
|
+
sourceContext?: SourceContext;
|
|
318
|
+
/**
|
|
319
|
+
* The source syntax.
|
|
320
|
+
*
|
|
321
|
+
* @generated from field: google.protobuf.Syntax syntax = 6;
|
|
322
|
+
*/
|
|
323
|
+
syntax?: Syntax;
|
|
324
|
+
/**
|
|
325
|
+
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
326
|
+
*
|
|
327
|
+
* @generated from field: string edition = 7;
|
|
328
|
+
*/
|
|
329
|
+
edition?: string;
|
|
330
|
+
}
|
|
331
|
+
export declare const Type: MessageType<Type>;
|
|
332
|
+
/**
|
|
333
|
+
* Enum value definition.
|
|
334
|
+
*
|
|
335
|
+
* @generated from message google.protobuf.EnumValue
|
|
336
|
+
*/
|
|
337
|
+
export interface EnumValue {
|
|
338
|
+
/**
|
|
339
|
+
* Enum value name.
|
|
340
|
+
*
|
|
341
|
+
* @generated from field: string name = 1;
|
|
342
|
+
*/
|
|
343
|
+
name?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Enum value number.
|
|
346
|
+
*
|
|
347
|
+
* @generated from field: int32 number = 2;
|
|
348
|
+
*/
|
|
349
|
+
number?: number;
|
|
350
|
+
/**
|
|
351
|
+
* Protocol buffer options.
|
|
352
|
+
*
|
|
353
|
+
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
354
|
+
*/
|
|
355
|
+
options?: Option[];
|
|
356
|
+
}
|
|
357
|
+
export declare const EnumValue: MessageType<EnumValue>;
|
|
358
|
+
/**
|
|
359
|
+
* Enum type definition.
|
|
360
|
+
*
|
|
361
|
+
* @generated from message google.protobuf.Enum
|
|
362
|
+
*/
|
|
363
|
+
export interface Enum {
|
|
364
|
+
/**
|
|
365
|
+
* Enum type name.
|
|
366
|
+
*
|
|
367
|
+
* @generated from field: string name = 1;
|
|
368
|
+
*/
|
|
369
|
+
name?: string;
|
|
370
|
+
/**
|
|
371
|
+
* Enum value definitions.
|
|
372
|
+
*
|
|
373
|
+
* @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
|
|
374
|
+
*/
|
|
375
|
+
enumvalue?: EnumValue[];
|
|
376
|
+
/**
|
|
377
|
+
* Protocol buffer options.
|
|
378
|
+
*
|
|
379
|
+
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
380
|
+
*/
|
|
381
|
+
options?: Option[];
|
|
382
|
+
/**
|
|
383
|
+
* The source context.
|
|
384
|
+
*
|
|
385
|
+
* @generated from field: google.protobuf.SourceContext source_context = 4;
|
|
386
|
+
*/
|
|
387
|
+
sourceContext?: SourceContext;
|
|
388
|
+
/**
|
|
389
|
+
* The source syntax.
|
|
390
|
+
*
|
|
391
|
+
* @generated from field: google.protobuf.Syntax syntax = 5;
|
|
392
|
+
*/
|
|
393
|
+
syntax?: Syntax;
|
|
394
|
+
/**
|
|
395
|
+
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
396
|
+
*
|
|
397
|
+
* @generated from field: string edition = 6;
|
|
398
|
+
*/
|
|
399
|
+
edition?: string;
|
|
400
|
+
}
|
|
401
|
+
export declare const Enum: MessageType<Enum>;
|