@ohos-ports/protoc 36.0.0-beta.0
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 +11 -0
- package/assets.json +50 -0
- package/bin/protoc-linux-aarch_64 +0 -0
- package/bin/protoc-linux-x86_64 +0 -0
- package/bin/protoc-osx-aarch_64 +0 -0
- package/bin/protoc-osx-x86_64 +0 -0
- package/bin/protoc-win64.exe +0 -0
- package/include/google/protobuf/any.proto +106 -0
- package/include/google/protobuf/api.proto +229 -0
- package/include/google/protobuf/c_sharp_features.proto +36 -0
- package/include/google/protobuf/compiler/plugin.proto +180 -0
- package/include/google/protobuf/cpp_features.proto +87 -0
- package/include/google/protobuf/cpp_file_options.proto +24 -0
- package/include/google/protobuf/cpp_options.proto +15 -0
- package/include/google/protobuf/descriptor.proto +1532 -0
- package/include/google/protobuf/duration.proto +115 -0
- package/include/google/protobuf/empty.proto +51 -0
- package/include/google/protobuf/field_mask.proto +243 -0
- package/include/google/protobuf/go_features.proto +112 -0
- package/include/google/protobuf/java_features.proto +132 -0
- package/include/google/protobuf/json_enumvalue_options.proto +31 -0
- package/include/google/protobuf/json_options.proto +16 -0
- package/include/google/protobuf/source_context.proto +48 -0
- package/include/google/protobuf/struct.proto +111 -0
- package/include/google/protobuf/timestamp.proto +145 -0
- package/include/google/protobuf/type.proto +217 -0
- package/include/google/protobuf/wrappers.proto +157 -0
- package/package.json +42 -0
- package/protoc.cjs +51 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2026 Google LLC. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by a BSD-style
|
|
5
|
+
// license that can be found in the LICENSE file or at
|
|
6
|
+
// https://developers.google.com/open-source/licenses/bsd
|
|
7
|
+
|
|
8
|
+
// A convenience proto that houses all JSON-related options.
|
|
9
|
+
|
|
10
|
+
edition = "2024";
|
|
11
|
+
|
|
12
|
+
package pb;
|
|
13
|
+
|
|
14
|
+
import public "google/protobuf/json_enumvalue_options.proto";
|
|
15
|
+
|
|
16
|
+
option java_package = "com.google.protobuf.util";
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option java_package = "com.google.protobuf";
|
|
36
|
+
option java_outer_classname = "SourceContextProto";
|
|
37
|
+
option java_multiple_files = true;
|
|
38
|
+
option objc_class_prefix = "GPB";
|
|
39
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
40
|
+
option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb";
|
|
41
|
+
|
|
42
|
+
// `SourceContext` represents information about the source of a
|
|
43
|
+
// protobuf element, like the file in which it is defined.
|
|
44
|
+
message SourceContext {
|
|
45
|
+
// The path-qualified name of the .proto file that contained the associated
|
|
46
|
+
// protobuf element. For example: `"google/protobuf/source_context.proto"`.
|
|
47
|
+
string file_name = 1;
|
|
48
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option cc_enable_arenas = true;
|
|
36
|
+
option go_package = "google.golang.org/protobuf/types/known/structpb";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "StructProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option objc_class_prefix = "GPB";
|
|
41
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
42
|
+
|
|
43
|
+
// Represents a JSON object.
|
|
44
|
+
//
|
|
45
|
+
// An unordered key-value map, intending to perfectly capture the semantics of a
|
|
46
|
+
// JSON object. This enables parsing any arbitrary JSON payload as a message
|
|
47
|
+
// field in ProtoJSON format.
|
|
48
|
+
//
|
|
49
|
+
// This follows RFC 8259 guidelines for interoperable JSON: notably this type
|
|
50
|
+
// cannot represent large Int64 values or `NaN`/`Infinity` numbers,
|
|
51
|
+
// since the JSON format generally does not support those values in its number
|
|
52
|
+
// type.
|
|
53
|
+
//
|
|
54
|
+
// If you do not intend to parse arbitrary JSON into your message, a custom
|
|
55
|
+
// typed message should be preferred instead of using this type.
|
|
56
|
+
message Struct {
|
|
57
|
+
// Unordered map of dynamically typed values.
|
|
58
|
+
map<string, Value> fields = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Represents a JSON value.
|
|
62
|
+
//
|
|
63
|
+
// `Value` represents a dynamically typed value which can be either
|
|
64
|
+
// null, a number, a string, a boolean, a recursive struct value, or a
|
|
65
|
+
// list of values. A producer of value is expected to set one of these
|
|
66
|
+
// variants. Absence of any variant is an invalid state.
|
|
67
|
+
message Value {
|
|
68
|
+
// The kind of value.
|
|
69
|
+
oneof kind {
|
|
70
|
+
// Represents a JSON `null`.
|
|
71
|
+
NullValue null_value = 1;
|
|
72
|
+
|
|
73
|
+
// Represents a JSON number. Must not be `NaN`, `Infinity` or
|
|
74
|
+
// `-Infinity`, since those are not supported in JSON. This also cannot
|
|
75
|
+
// represent large Int64 values, since JSON format generally does not
|
|
76
|
+
// support them in its number type.
|
|
77
|
+
double number_value = 2;
|
|
78
|
+
|
|
79
|
+
// Represents a JSON string.
|
|
80
|
+
string string_value = 3;
|
|
81
|
+
|
|
82
|
+
// Represents a JSON boolean (`true` or `false` literal in JSON).
|
|
83
|
+
bool bool_value = 4;
|
|
84
|
+
|
|
85
|
+
// Represents a JSON object.
|
|
86
|
+
Struct struct_value = 5;
|
|
87
|
+
|
|
88
|
+
// Represents a JSON array.
|
|
89
|
+
ListValue list_value = 6;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Represents a JSON `null`.
|
|
94
|
+
//
|
|
95
|
+
// `NullValue` is a sentinel, using an enum with only one value to represent
|
|
96
|
+
// the null value for the `Value` type union.
|
|
97
|
+
//
|
|
98
|
+
// A field of type `NullValue` with any value other than `0` is considered
|
|
99
|
+
// invalid. Most ProtoJSON serializers will emit a `Value` with a `null_value`
|
|
100
|
+
// set as a JSON `null` regardless of the integer value, and so will round trip
|
|
101
|
+
// to a `0` value.
|
|
102
|
+
enum NullValue {
|
|
103
|
+
// Null value.
|
|
104
|
+
NULL_VALUE = 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Represents a JSON array.
|
|
108
|
+
message ListValue {
|
|
109
|
+
// Repeated field of dynamically typed values.
|
|
110
|
+
repeated Value values = 1;
|
|
111
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option cc_enable_arenas = true;
|
|
36
|
+
option go_package = "google.golang.org/protobuf/types/known/timestamppb";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "TimestampProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option objc_class_prefix = "GPB";
|
|
41
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
42
|
+
|
|
43
|
+
// A Timestamp represents a point in time independent of any time zone or local
|
|
44
|
+
// calendar, encoded as a count of seconds and fractions of seconds at
|
|
45
|
+
// nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
|
46
|
+
// January 1, 1970, in the proleptic Gregorian calendar which extends the
|
|
47
|
+
// Gregorian calendar backwards to year one.
|
|
48
|
+
//
|
|
49
|
+
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
|
50
|
+
// second table is needed for interpretation, using a [24-hour linear
|
|
51
|
+
// smear](https://developers.google.com/time/smear).
|
|
52
|
+
//
|
|
53
|
+
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
|
54
|
+
// restricting to that range, we ensure that we can convert to and from [RFC
|
|
55
|
+
// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
|
56
|
+
//
|
|
57
|
+
// # Examples
|
|
58
|
+
//
|
|
59
|
+
// Example 1: Compute Timestamp from POSIX `time()`.
|
|
60
|
+
//
|
|
61
|
+
// Timestamp timestamp;
|
|
62
|
+
// timestamp.set_seconds(time(NULL));
|
|
63
|
+
// timestamp.set_nanos(0);
|
|
64
|
+
//
|
|
65
|
+
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
66
|
+
//
|
|
67
|
+
// struct timeval tv;
|
|
68
|
+
// gettimeofday(&tv, NULL);
|
|
69
|
+
//
|
|
70
|
+
// Timestamp timestamp;
|
|
71
|
+
// timestamp.set_seconds(tv.tv_sec);
|
|
72
|
+
// timestamp.set_nanos(tv.tv_usec * 1000);
|
|
73
|
+
//
|
|
74
|
+
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
75
|
+
//
|
|
76
|
+
// FILETIME ft;
|
|
77
|
+
// GetSystemTimeAsFileTime(&ft);
|
|
78
|
+
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
|
79
|
+
//
|
|
80
|
+
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
|
81
|
+
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
|
82
|
+
// Timestamp timestamp;
|
|
83
|
+
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
84
|
+
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
85
|
+
//
|
|
86
|
+
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
87
|
+
//
|
|
88
|
+
// long millis = System.currentTimeMillis();
|
|
89
|
+
//
|
|
90
|
+
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
|
91
|
+
// .setNanos((int) ((millis % 1000) * 1000000)).build();
|
|
92
|
+
//
|
|
93
|
+
// Example 5: Compute Timestamp from Java `Instant.now()`.
|
|
94
|
+
//
|
|
95
|
+
// Instant now = Instant.now();
|
|
96
|
+
//
|
|
97
|
+
// Timestamp timestamp =
|
|
98
|
+
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
|
99
|
+
// .setNanos(now.getNano()).build();
|
|
100
|
+
//
|
|
101
|
+
// Example 6: Compute Timestamp from current time in Python.
|
|
102
|
+
//
|
|
103
|
+
// timestamp = Timestamp()
|
|
104
|
+
// timestamp.GetCurrentTime()
|
|
105
|
+
//
|
|
106
|
+
// # JSON Mapping
|
|
107
|
+
//
|
|
108
|
+
// In JSON format, the Timestamp type is encoded as a string in the
|
|
109
|
+
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
110
|
+
// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
|
111
|
+
// where {year} is always expressed using four digits while {month}, {day},
|
|
112
|
+
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
113
|
+
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
114
|
+
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
115
|
+
// is required. A ProtoJSON serializer should always use UTC (as indicated by
|
|
116
|
+
// "Z") when printing the Timestamp type and a ProtoJSON parser should be
|
|
117
|
+
// able to accept both UTC and other timezones (as indicated by an offset).
|
|
118
|
+
//
|
|
119
|
+
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
120
|
+
// 01:30 UTC on January 15, 2017.
|
|
121
|
+
//
|
|
122
|
+
// In JavaScript, one can convert a Date object to this format using the
|
|
123
|
+
// standard
|
|
124
|
+
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
125
|
+
// method. In Python, a standard `datetime.datetime` object can be converted
|
|
126
|
+
// to this format using
|
|
127
|
+
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
128
|
+
// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
129
|
+
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
130
|
+
// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
131
|
+
// ) to obtain a formatter capable of generating timestamps in this format.
|
|
132
|
+
//
|
|
133
|
+
message Timestamp {
|
|
134
|
+
// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
|
|
135
|
+
// be between -62135596800 and 253402300799 inclusive (which corresponds to
|
|
136
|
+
// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
|
|
137
|
+
int64 seconds = 1;
|
|
138
|
+
|
|
139
|
+
// Non-negative fractions of a second at nanosecond resolution. This field is
|
|
140
|
+
// the nanosecond portion of the duration, not an alternative to seconds.
|
|
141
|
+
// Negative second values with fractions must still have non-negative nanos
|
|
142
|
+
// values that count forward in time. Must be between 0 and 999,999,999
|
|
143
|
+
// inclusive.
|
|
144
|
+
int32 nanos = 2;
|
|
145
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
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
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
import "google/protobuf/any.proto";
|
|
36
|
+
import "google/protobuf/source_context.proto";
|
|
37
|
+
|
|
38
|
+
option cc_enable_arenas = true;
|
|
39
|
+
option java_package = "com.google.protobuf";
|
|
40
|
+
option java_outer_classname = "TypeProto";
|
|
41
|
+
option java_multiple_files = true;
|
|
42
|
+
option objc_class_prefix = "GPB";
|
|
43
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
44
|
+
option go_package = "google.golang.org/protobuf/types/known/typepb";
|
|
45
|
+
|
|
46
|
+
// A protocol buffer message type.
|
|
47
|
+
//
|
|
48
|
+
// New usages of this message as an alternative to DescriptorProto are strongly
|
|
49
|
+
// discouraged. This message does not reliability preserve all information
|
|
50
|
+
// necessary to model the schema and preserve semantics. Instead make use of
|
|
51
|
+
// FileDescriptorSet which preserves the necessary information.
|
|
52
|
+
message Type {
|
|
53
|
+
// The fully qualified message name.
|
|
54
|
+
string name = 1;
|
|
55
|
+
// The list of fields.
|
|
56
|
+
repeated Field fields = 2;
|
|
57
|
+
// The list of types appearing in `oneof` definitions in this type.
|
|
58
|
+
repeated string oneofs = 3;
|
|
59
|
+
// The protocol buffer options.
|
|
60
|
+
repeated Option options = 4;
|
|
61
|
+
// The source context.
|
|
62
|
+
SourceContext source_context = 5;
|
|
63
|
+
// The source syntax.
|
|
64
|
+
Syntax syntax = 6;
|
|
65
|
+
// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
66
|
+
string edition = 7;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// A single field of a message type.
|
|
70
|
+
//
|
|
71
|
+
// New usages of this message as an alternative to FieldDescriptorProto are
|
|
72
|
+
// strongly discouraged. This message does not reliability preserve all
|
|
73
|
+
// information necessary to model the schema and preserve semantics. Instead
|
|
74
|
+
// make use of FileDescriptorSet which preserves the necessary information.
|
|
75
|
+
message Field {
|
|
76
|
+
// Basic field types.
|
|
77
|
+
enum Kind {
|
|
78
|
+
// Field type unknown.
|
|
79
|
+
TYPE_UNKNOWN = 0;
|
|
80
|
+
// Field type double.
|
|
81
|
+
TYPE_DOUBLE = 1;
|
|
82
|
+
// Field type float.
|
|
83
|
+
TYPE_FLOAT = 2;
|
|
84
|
+
// Field type int64.
|
|
85
|
+
TYPE_INT64 = 3;
|
|
86
|
+
// Field type uint64.
|
|
87
|
+
TYPE_UINT64 = 4;
|
|
88
|
+
// Field type int32.
|
|
89
|
+
TYPE_INT32 = 5;
|
|
90
|
+
// Field type fixed64.
|
|
91
|
+
TYPE_FIXED64 = 6;
|
|
92
|
+
// Field type fixed32.
|
|
93
|
+
TYPE_FIXED32 = 7;
|
|
94
|
+
// Field type bool.
|
|
95
|
+
TYPE_BOOL = 8;
|
|
96
|
+
// Field type string.
|
|
97
|
+
TYPE_STRING = 9;
|
|
98
|
+
// Field type group. Proto2 syntax only, and deprecated.
|
|
99
|
+
TYPE_GROUP = 10;
|
|
100
|
+
// Field type message.
|
|
101
|
+
TYPE_MESSAGE = 11;
|
|
102
|
+
// Field type bytes.
|
|
103
|
+
TYPE_BYTES = 12;
|
|
104
|
+
// Field type uint32.
|
|
105
|
+
TYPE_UINT32 = 13;
|
|
106
|
+
// Field type enum.
|
|
107
|
+
TYPE_ENUM = 14;
|
|
108
|
+
// Field type sfixed32.
|
|
109
|
+
TYPE_SFIXED32 = 15;
|
|
110
|
+
// Field type sfixed64.
|
|
111
|
+
TYPE_SFIXED64 = 16;
|
|
112
|
+
// Field type sint32.
|
|
113
|
+
TYPE_SINT32 = 17;
|
|
114
|
+
// Field type sint64.
|
|
115
|
+
TYPE_SINT64 = 18;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Whether a field is optional, required, or repeated.
|
|
119
|
+
enum Cardinality {
|
|
120
|
+
// For fields with unknown cardinality.
|
|
121
|
+
CARDINALITY_UNKNOWN = 0;
|
|
122
|
+
// For optional fields.
|
|
123
|
+
CARDINALITY_OPTIONAL = 1;
|
|
124
|
+
// For required fields. Proto2 syntax only.
|
|
125
|
+
CARDINALITY_REQUIRED = 2;
|
|
126
|
+
// For repeated fields.
|
|
127
|
+
CARDINALITY_REPEATED = 3;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// The field type.
|
|
131
|
+
Kind kind = 1;
|
|
132
|
+
// The field cardinality.
|
|
133
|
+
Cardinality cardinality = 2;
|
|
134
|
+
// The field number.
|
|
135
|
+
int32 number = 3;
|
|
136
|
+
// The field name.
|
|
137
|
+
string name = 4;
|
|
138
|
+
// The field type URL, without the scheme, for message or enumeration
|
|
139
|
+
// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
|
140
|
+
string type_url = 6;
|
|
141
|
+
// The index of the field type in `Type.oneofs`, for message or enumeration
|
|
142
|
+
// types. The first type has index 1; zero means the type is not in the list.
|
|
143
|
+
int32 oneof_index = 7;
|
|
144
|
+
// Whether to use alternative packed wire representation.
|
|
145
|
+
bool packed = 8;
|
|
146
|
+
// The protocol buffer options.
|
|
147
|
+
repeated Option options = 9;
|
|
148
|
+
// The field JSON name.
|
|
149
|
+
string json_name = 10;
|
|
150
|
+
// The string value of the default value of this field. Proto2 syntax only.
|
|
151
|
+
string default_value = 11;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Enum type definition.
|
|
155
|
+
//
|
|
156
|
+
// New usages of this message as an alternative to EnumDescriptorProto are
|
|
157
|
+
// strongly discouraged. This message does not reliability preserve all
|
|
158
|
+
// information necessary to model the schema and preserve semantics. Instead
|
|
159
|
+
// make use of FileDescriptorSet which preserves the necessary information.
|
|
160
|
+
message Enum {
|
|
161
|
+
// Enum type name.
|
|
162
|
+
string name = 1;
|
|
163
|
+
// Enum value definitions.
|
|
164
|
+
repeated EnumValue enumvalue = 2;
|
|
165
|
+
// Protocol buffer options.
|
|
166
|
+
repeated Option options = 3;
|
|
167
|
+
// The source context.
|
|
168
|
+
SourceContext source_context = 4;
|
|
169
|
+
// The source syntax.
|
|
170
|
+
Syntax syntax = 5;
|
|
171
|
+
// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
172
|
+
string edition = 6;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Enum value definition.
|
|
176
|
+
//
|
|
177
|
+
// New usages of this message as an alternative to EnumValueDescriptorProto are
|
|
178
|
+
// strongly discouraged. This message does not reliability preserve all
|
|
179
|
+
// information necessary to model the schema and preserve semantics. Instead
|
|
180
|
+
// make use of FileDescriptorSet which preserves the necessary information.
|
|
181
|
+
message EnumValue {
|
|
182
|
+
// Enum value name.
|
|
183
|
+
string name = 1;
|
|
184
|
+
// Enum value number.
|
|
185
|
+
int32 number = 2;
|
|
186
|
+
// Protocol buffer options.
|
|
187
|
+
repeated Option options = 3;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// A protocol buffer option, which can be attached to a message, field,
|
|
191
|
+
// enumeration, etc.
|
|
192
|
+
//
|
|
193
|
+
// New usages of this message as an alternative to FileOptions, MessageOptions,
|
|
194
|
+
// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
|
|
195
|
+
// are strongly discouraged.
|
|
196
|
+
message Option {
|
|
197
|
+
// The option's name. For protobuf built-in options (options defined in
|
|
198
|
+
// descriptor.proto), this is the short name. For example, `"map_entry"`.
|
|
199
|
+
// For custom options, it should be the fully-qualified name. For example,
|
|
200
|
+
// `"google.api.http"`.
|
|
201
|
+
string name = 1;
|
|
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
|
+
Any value = 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// The syntax in which a protocol buffer element is defined.
|
|
210
|
+
enum Syntax {
|
|
211
|
+
// Syntax `proto2`.
|
|
212
|
+
SYNTAX_PROTO2 = 0;
|
|
213
|
+
// Syntax `proto3`.
|
|
214
|
+
SYNTAX_PROTO3 = 1;
|
|
215
|
+
// Syntax `editions`.
|
|
216
|
+
SYNTAX_EDITIONS = 2;
|
|
217
|
+
}
|